diff --git a/providers/src/cloudflare/v00.00.00000/services/abuse_reports.yaml b/providers/src/cloudflare/v00.00.00000/services/abuse_reports.yaml index e5ffb44e..cf8a8ee4 100644 --- a/providers/src/cloudflare/v00.00.00000/services/abuse_reports.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/abuse_reports.yaml @@ -1,1375 +1,1326 @@ -openapi: 3.0.3 -info: - title: abuse_reports API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/abuse-reports: - get: - description: List the abuse reports for a given account - operationId: ListAbuseReports - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Where in pagination to start listing abuse reports - in: query - name: page - schema: - type: integer - - description: How many abuse reports per page to list - in: query - name: per_page - schema: - type: integer - - description: >- - A property to sort by, followed by the order (id, cdate, domain, - type, status) - in: query - name: sort - schema: - type: string - - description: Filter by domain name related to the abuse report - in: query - name: domain - schema: - type: string - - description: Returns reports created before the specified date - in: query - name: created_before - schema: - description: >- - Time in RFC 3339 format - (https://www.rfc-editor.org/rfc/rfc3339.html) - type: string - - description: Returns reports created after the specified date - in: query - name: created_after - schema: - description: >- - Time in RFC 3339 format - (https://www.rfc-editor.org/rfc/rfc3339.html) - type: string - - description: Filter by the status of the report. - in: query - name: status - schema: - $ref: '#/components/schemas/abuseReportsReportStatus' - - description: Filter by the type of the report. - in: query - name: type - schema: - $ref: '#/components/schemas/abuseReportsReportType' - - description: Filter reports that have any mitigations in the given status. - in: query - name: mitigation_status - schema: - $ref: '#/components/schemas/abuseReportsMitigationStatus' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - $ref: '#/components/schemas/abuseReportsMessage' - type: array - messages: - items: - $ref: '#/components/schemas/abuseReportsMessage' - type: array - result: - properties: - reports: - items: - $ref: '#/components/schemas/abuseReportsAbuseReport' - type: array - required: - - reports - type: object - result_info: - properties: - count: - type: number - page: - type: number - per_page: - type: number - total_count: - type: number - total_pages: - type: number - required: - - page - - per_page - - count - - total_count - - total_pages - type: object - success: - type: boolean - required: - - success - type: object - description: Abuse report list successful - '500': - content: - application/json: - schema: - properties: - errors: - items: - $ref: '#/components/schemas/abuseReportsMessage' - type: array - messages: - items: - $ref: '#/components/schemas/abuseReportsMessage' - type: array - success: - type: boolean - required: - - success - type: object - description: Failed to retrieve abuse reports - security: - - api_token: [] - summary: List abuse reports - tags: - - tseng-abuse-complaint-processor_other - x-api-token-group: - - Trust and Safety Write - - Trust and Safety Read - x-stackql-sdk: - service: abuse_reports - resource_chain: [] - method: list - /accounts/{account_id}/abuse-reports/{report_id}/emails: - get: - description: >- - List emails sent to the customer for an abuse report. Returns all - successful customer emails sent for the specified abuse report. Does not - include emails sent to hosts or submitters. - operationId: ListEmails - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Abuse Report ID - in: path - name: report_id - schema: - type: string - required: true - - description: Page number to retrieve (default 1) - in: query - name: page - schema: - type: integer - - description: Number of emails per page (default 20, max 100) - in: query - name: per_page - schema: - type: integer - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - $ref: '#/components/schemas/abuseReportsMessage' - type: array - messages: - items: - $ref: '#/components/schemas/abuseReportsMessage' - type: array - result: - properties: - emails: - items: - $ref: '#/components/schemas/abuseReportsEmailListItem' - type: array - required: - - emails - type: object - result_info: - properties: - count: - type: number - page: - type: number - per_page: - type: number - total_count: - type: number - total_pages: - type: number - required: - - page - - per_page - - count - - total_count - - total_pages - type: object - success: - type: boolean - required: - - success - type: object - description: List abuse report emails successful - '400': - content: - application/json: - schema: - properties: - errors: - items: - $ref: '#/components/schemas/abuseReportsMessage' - type: array - messages: - items: - $ref: '#/components/schemas/abuseReportsMessage' - type: array - success: - type: boolean - required: - - success - type: object - description: Bad request - invalid parameters or report not found - '500': - content: - application/json: - schema: - properties: - errors: - items: - $ref: '#/components/schemas/abuseReportsMessage' - type: array - messages: - items: - $ref: '#/components/schemas/abuseReportsMessage' - type: array - success: - type: boolean - required: - - success - type: object - description: Failed to list abuse report emails - security: - - api_token: [] - summary: List abuse report emails - tags: - - tseng-abuse-complaint-processor_other - x-api-token-group: - - Trust and Safety Write - - Trust and Safety Read - /accounts/{account_id}/abuse-reports/{report_id}/mitigations: - get: - description: List mitigations done to remediate the abuse report. - operationId: ListMitigations - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Abuse Report ID - in: path - name: report_id - schema: - type: string - required: true - - description: Where in pagination to start listing abuse reports - in: query - name: page - schema: - type: integer - - description: How many abuse reports per page to list - in: query - name: per_page - schema: - type: integer - - description: A property to sort by, followed by the order - in: query - name: sort - schema: - enum: - - type,asc - - type,desc - - effective_date,asc - - effective_date,desc - - status,asc - - status,desc - - entity_type,asc - - entity_type,desc - type: string - - description: >- - Filter by the type of mitigation. This filter parameter can be - specified multiple times to include multiple types of mitigations in - the result set, e.g. ?type=rate_limit_cache&type=legal_block. - in: query - name: type - schema: - $ref: '#/components/schemas/abuseReportsMitigationType' - - description: Returns mitigations that were dispatched before the given date - in: query - name: effective_before - schema: - description: >- - Time in RFC 3339 format - (https://www.rfc-editor.org/rfc/rfc3339.html) - type: string - - description: Returns mitigation that were dispatched after the given date - in: query - name: effective_after - schema: - description: >- - Time in RFC 3339 format - (https://www.rfc-editor.org/rfc/rfc3339.html) - type: string - - description: Filter by the status of the mitigation. - in: query - name: status - schema: - $ref: '#/components/schemas/abuseReportsMitigationStatus' - - description: Filter by the type of entity the mitigation impacts. - in: query - name: entity_type - schema: - $ref: '#/components/schemas/abuseReportsMitigatedEntityType' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - $ref: '#/components/schemas/abuseReportsMessage' - type: array - messages: - items: - $ref: '#/components/schemas/abuseReportsMessage' - type: array - result: - properties: - mitigations: - items: - $ref: '#/components/schemas/abuseReportsMitigationListItem' - type: array - required: - - mitigations - type: object - result_info: - properties: - count: - type: number - page: - type: number - per_page: - type: number - total_count: - type: number - total_pages: - type: number - required: - - page - - per_page - - count - - total_count - - total_pages - type: object - success: - type: boolean - required: - - success - type: object - description: List abuse report mitigations successful - '500': - content: - application/json: - schema: - properties: - errors: - items: - $ref: '#/components/schemas/abuseReportsMessage' - type: array - messages: - items: - $ref: '#/components/schemas/abuseReportsMessage' - type: array - success: - type: boolean - required: - - success - type: object - description: Failed to list abuse report mitigations - security: - - api_token: [] - summary: List abuse report mitigations - tags: - - tseng-abuse-complaint-processor_other - x-api-token-group: - - Trust and Safety Write - - Trust and Safety Read - x-stackql-sdk: - service: abuse_reports - resource_chain: - - mitigations - method: list - /accounts/{account_id}/abuse-reports/{report_id}/mitigations/appeal: - post: - description: Request a review for mitigations on an account. - operationId: RequestReview - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Abuse Report ID - in: path - name: report_id - schema: - type: string - required: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/abuseReportsMitigationAppealRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/abuseReportsMitigationAppealResult' - description: Mitigation appeals received - '500': - content: - application/json: - schema: - properties: - errors: - items: - $ref: '#/components/schemas/abuseReportsMessage' - type: array - messages: - items: - $ref: '#/components/schemas/abuseReportsMessage' - type: array - success: - type: boolean - required: - - success - type: object - description: Failed to request review on delayed action. - security: - - api_token: [] - summary: Request review on mitigations - tags: - - tseng-abuse-complaint-processor_other - x-api-token-group: - - Trust and Safety Write - /accounts/{account_id}/abuse-reports/{report_param}: - get: - description: Retrieve the details of an abuse report. - operationId: GetAbuseReport - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Identifier of the abuse report - in: path - name: report_param - schema: - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - $ref: '#/components/schemas/abuseReportsErrorMessage' - type: array - messages: - items: - $ref: '#/components/schemas/abuseReportsMessage' - type: array - result: - $ref: '#/components/schemas/abuseReportsAbuseReport' - success: - type: boolean - required: - - success - - result - type: object - description: Report submitted successfully - '400': - content: - application/json: - schema: - properties: - errors: - items: - $ref: '#/components/schemas/abuseReportsErrorMessage' - type: array - messages: - items: - $ref: '#/components/schemas/abuseReportsMessage' - type: array - result: - $ref: '#/components/schemas/abuseReportsAbuseReport' - success: - type: boolean - required: - - success - - errors - type: object - description: Report submitted with an error - '500': - content: - application/json: - schema: - properties: - errors: - items: - $ref: '#/components/schemas/abuseReportsErrorMessage' - type: array - messages: - items: - $ref: '#/components/schemas/abuseReportsMessage' - type: array - result: - $ref: '#/components/schemas/abuseReportsAbuseReport' - success: - type: boolean - required: - - success - - errors - type: object - description: Report submitted with an error - security: - - api_token: [] - summary: Abuse Report Details - tags: - - tseng-abuse-complaint-processor_other - x-api-token-group: - - Trust and Safety Write - - Trust and Safety Read - x-stackql-sdk: - service: abuse_reports - resource_chain: [] - method: get - post: - description: Submit the Abuse Report of a particular type - operationId: SubmitAbuseReport - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: 'The report type to be submitted. Example: abuse_general' - in: path - name: report_param - schema: - $ref: '#/components/schemas/abuseReportsSubmissionReportType' - required: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/abuseReportsSubmitReportRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/abuseReportsSubmitReportResponse' - description: Report submitted successfully - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/abuseReportsSubmitErrorResponse' - description: Report submitted with an error - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/abuseReportsSubmitErrorResponse' - description: Report submitted with an error - security: - - api_token: [] - summary: Submit an abuse report - tags: - - tseng-abuse-complaint-processor_other - x-stackql-sdk: - service: abuse_reports - resource_chain: [] - method: create -components: - schemas: - abuseReportsAbuseReport: - properties: - cdate: - description: >- - Creation date of report. Time in RFC 3339 format - (https://www.rfc-editor.org/rfc/rfc3339.html) - example: '2009-11-10T23:00:00Z' - type: string - domain: - description: Domain that relates to the report. - type: string - id: - description: Public facing ID of abuse report, aka abuse_rand. - type: string - justification: - description: Justification for the report. - type: string - mitigation_summary: - $ref: '#/components/schemas/abuseReportsMitigationSummary' - original_work: - description: Original work / Targeted brand in the alleged abuse. - type: string - status: - $ref: '#/components/schemas/abuseReportsReportStatus' - submitter: - $ref: '#/components/schemas/abuseReportsSubmitterDetails' - type: - $ref: '#/components/schemas/abuseReportsReportType' - urls: - items: - type: string - type: array - required: - - id - - cdate - - domain - - type - - status - - mitigation_summary - type: object - abuseReportsAppealReason: - description: Reason why the customer is appealing. - enum: - - removed - - misclassified - example: misclassified - type: string - abuseReportsEmailListItem: - description: An email sent to the customer for an abuse report. - properties: - body: - description: Body content of the email. - type: string - id: - description: Unique identifier of the email. - type: string - recipient: - description: Email address of the recipient. - type: string - sent_at: - description: >- - When the email was sent. Time in RFC 3339 format - (https://www.rfc-editor.org/rfc/rfc3339.html) - example: '2009-11-10T23:00:00Z' - type: string - subject: - description: Subject line of the email. - type: string - required: - - id - - subject - - body - - recipient - - sent_at - type: object - abuseReportsErrorCode: - type: string - description: Report has invalid type - abuseReportsErrorMessage: - properties: - code: - type: string - message: - type: string - required: - - message - type: object - abuseReportsMessage: - properties: - message: - type: string - required: - - message - type: object - abuseReportsMitigatedEntityType: - enum: - - url_pattern - - account - - zone - type: string - abuseReportsMitigationAppeal: - properties: - id: - description: ID of the mitigation to appeal. - type: string - reason: - $ref: '#/components/schemas/abuseReportsAppealReason' - required: - - id - - reason - type: object - abuseReportsMitigationAppealRequest: - properties: - appeals: - description: List of mitigations to appeal. - items: - $ref: '#/components/schemas/abuseReportsMitigationAppeal' - type: array - required: - - appeals - type: object - abuseReportsMitigationAppealResult: - properties: - errors: - items: - $ref: '#/components/schemas/abuseReportsMessage' - type: array - messages: - items: - $ref: '#/components/schemas/abuseReportsMessage' - type: array - result: - items: - $ref: '#/components/schemas/abuseReportsMitigationListItem' - type: array - result_info: - properties: - count: - type: number - page: - type: number - per_page: - type: number - total_count: - type: number - total_pages: - type: number - required: - - page - - per_page - - count - - total_count - - total_pages - type: object - success: - type: boolean - required: - - success - - result_info - type: object - abuseReportsMitigationListItem: - properties: - effective_date: - description: >- - Date when the mitigation will become active. Time in RFC 3339 format - (https://www.rfc-editor.org/rfc/rfc3339.html) - example: '2009-11-10T23:00:00Z' - type: string - entity_id: - type: string - entity_type: - $ref: '#/components/schemas/abuseReportsMitigatedEntityType' - id: - description: ID of remediation. - type: string - status: - $ref: '#/components/schemas/abuseReportsMitigationStatus' - type: - $ref: '#/components/schemas/abuseReportsMitigationType' - required: - - id - - type - - effective_date - - status - - entity_type - - entity_id - type: object - abuseReportsMitigationStatus: - description: The status of a mitigation - enum: - - pending - - active - - in_review - - cancelled - - removed - type: string - abuseReportsMitigationSummary: - description: A summary of the mitigations related to this report. - properties: - accepted_url_count: - description: How many of the reported URLs were confirmed as abusive. - type: integer - active_count: - description: How many mitigations are active. - type: integer - external_host_notified: - description: >- - Whether the report has been forwarded to an external hosting - provider. - type: boolean - in_review_count: - description: How many mitigations are under review. - type: integer - pending_count: - description: How many mitigations are pending their effective date. - type: integer - required: - - accepted_url_count - - pending_count - - active_count - - in_review_count - - external_host_notified - type: object - abuseReportsMitigationType: - description: The type of mitigation - enum: - - legal_block - - misleading_interstitial - - phishing_interstitial - - network_block - - rate_limit_cache - - account_suspend - - redirect_video_stream - type: string - abuseReportsRegistrarWhoIsFields: - description: RDP-mandated fields for registrar WHOIS data disclosure requests. - properties: - reg_who_authorization_statement: - description: >- - Optional authorization statement or power of attorney per RDP - 10.2.1.3. - maxLength: 5000 - type: string - reg_who_good_faith_affirmation: - description: >- - Affirmation that the request is made in good faith per RDP 10.2.4. - Must be true. - type: boolean - reg_who_lawful_processing_agreement: - description: Agreement to process data lawfully per RDP 10.2.5. Must be true. - type: boolean - reg_who_legal_basis: - description: >- - Legal rights and rationale for the request per RDP 10.2.3. Required - for all WHOIS requests. - maxLength: 5000 - type: string - reg_who_request_type: - description: The type of WHOIS data request per RDP procedure. - enum: - - disclosure - - invalid_whois - type: string - reg_who_requested_data_elements: - description: >- - The specific WHOIS data elements being requested per RDP 10.2.2. - Required for all WHOIS requests. - items: - enum: - - registrant_name - - registrant_organization - - registrant_email - - registrant_phone - - registrant_address - - registrant_address_country - - registrant_address_postal_code - - admin_name - - admin_organization - - admin_email - - admin_phone - - admin_address - - tech_name - - tech_organization - - tech_email - - tech_phone - - tech_address - type: string - maxItems: 17 - minItems: 1 - type: array - reg_who_requestor_type: - description: The nature of the requestor per RDP 10.2.1.2. - enum: - - government - - corporation - - individual - type: string - required: - - reg_who_request_type - - reg_who_requested_data_elements - - reg_who_legal_basis - - reg_who_good_faith_affirmation - - reg_who_lawful_processing_agreement - type: object - abuseReportsReportStatus: - description: An enum value that represents the status of an abuse record - enum: - - accepted - - in_review - type: string - abuseReportsReportType: - description: The abuse report type - enum: - - PHISH - - GEN - - THREAT - - DMCA - - EMER - - TM - - REG_WHO - - NCSEI - - NETWORK - type: string - abuseReportsSubmissionReportType: - description: The report type for submitted reports. - type: string - abuseReportsSubmitErrorResponse: - properties: - error_code: - $ref: '#/components/schemas/abuseReportsErrorCode' - msg: - description: The error message for the error - type: string - request: - properties: - act: - $ref: '#/components/schemas/abuseReportsSubmissionReportType' - required: - - act - type: object - result: - description: The result should be 'error' for successful response - type: string - required: - - request - - result - - msg - - error_code - type: object - abuseReportsSubmitReportRequest: - type: object - title: DMCA Report - properties: - act: - description: The report type for submitted reports. - type: string - enum: - - abuse_dmca - comments: - description: >- - Any additional comments about the infringement not exceeding 2000 - characters - maxLength: 2000 - minLength: 1 - type: string - company: - description: >- - Text not exceeding 100 characters. This field may be released by - Cloudflare to third parties such as the Lumen Database - (https://lumendatabase.org/). - maxLength: 100 - minLength: 1 - type: string - email: - description: >- - A valid email of the abuse reporter. This field may be released by - Cloudflare to third parties such as the Lumen Database - (https://lumendatabase.org/). - type: string - email2: - description: Should match the value provided in `email` - type: string - name: - description: >- - Text not exceeding 255 characters. This field may be released by - Cloudflare to third parties such as the Lumen Database - (https://lumendatabase.org/). - maxLength: 255 - minLength: 1 - type: string - reported_country: - description: Text containing 2 characters - maxLength: 2 - minLength: 2 - type: string - reported_user_agent: - description: Text not exceeding 255 characters - maxLength: 255 - minLength: 1 - type: string - tele: - description: >- - Text not exceeding 20 characters. This field may be released by - Cloudflare to third parties such as the Lumen Database - (https://lumendatabase.org/). - maxLength: 20 - minLength: 1 - type: string - title: - description: Text not exceeding 255 characters - maxLength: 255 - minLength: 1 - type: string - urls: - description: >- - A list of valid URLs separated by ‘\n’ (new line character). The - list of the URLs should not exceed 250 URLs. All URLs should have - the same hostname. Each URL should be unique. This field may be - released by Cloudflare to third parties such as the Lumen Database - (https://lumendatabase.org/). - type: string - address1: - description: >- - Text not exceeding 100 characters. This field may be released by - Cloudflare to third parties such as the Lumen Database - (https://lumendatabase.org/). - maxLength: 100 - minLength: 1 - type: string - agent_name: - description: >- - The name of the copyright holder. Text not exceeding 60 characters. - This field may be released by Cloudflare to third parties such as - the Lumen Database (https://lumendatabase.org/). - maxLength: 60 - minLength: 1 - type: string - agree: - description: >- - Can be `0` for false or `1` for true. Must be value: 1 for DMCA - reports - enum: - - 1 - type: integer - city: - description: >- - Text not exceeding 255 characters. This field may be released by - Cloudflare to third parties such as the Lumen Database - (https://lumendatabase.org/). - maxLength: 255 - minLength: 1 - type: string - country: - description: >- - Text not exceeding 255 characters. This field may be released by - Cloudflare to third parties such as the Lumen Database - (https://lumendatabase.org/). - maxLength: 255 - minLength: 1 - type: string - host_notification: - description: >- - Notification type based on the abuse type. NOTE: Copyright (DMCA) - and Trademark reports cannot be anonymous. - enum: - - send - type: string - original_work: - description: >- - Text not exceeding 255 characters. This field may be released by - Cloudflare to third parties such as the Lumen Database - (https://lumendatabase.org/). - maxLength: 255 - minLength: 1 - type: string - owner_notification: - description: >- - Notification type based on the abuse type. NOTE: Copyright (DMCA) - and Trademark reports cannot be anonymous. - enum: - - send - type: string - signature: - description: >- - Required for DMCA reports, should be same as Name. An affirmation - that all information in the report is true and accurate while - agreeing to the policies of Cloudflare's abuse reports - type: string - state: - description: >- - Text not exceeding 255 characters. This field may be released by - Cloudflare to third parties such as the Lumen Database - (https://lumendatabase.org/). - maxLength: 255 - minLength: 1 - type: string - justification: - description: >- - A detailed description of the infringement, including any necessary - access details and the exact steps needed to view the content, not - exceeding 5000 characters. - maxLength: 5000 - minLength: 1 - type: string - trademark_number: - description: Text not exceeding 1000 characters - maxLength: 1000 - minLength: 1 - type: string - trademark_office: - description: Text not exceeding 1000 characters - maxLength: 1000 - minLength: 1 - type: string - trademark_symbol: - description: Text not exceeding 1000 characters - maxLength: 1000 - minLength: 1 - type: string - destination_ips: - description: >- - A list of IP addresses separated by ‘\n’ (new line character). The - list of destination IPs should not exceed 30 IP addresses. Each one - of the IP addresses ought to be unique. - type: string - ports_protocols: - description: >- - A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. - The total size of the field should not exceed 2000 characters. Each - individual port/protocol should not exceed 100 characters. The list - should not have more than 30 unique ports and protocols. - type: string - source_ips: - description: >- - A list of IP addresses separated by ‘\n’ (new line character). The - list of source IPs should not exceed 30 IP addresses. Each one of - the IP addresses ought to be unique. - type: string - ncmec_notification: - description: >- - Notification type based on the abuse type. NOTE: Copyright (DMCA) - and Trademark reports cannot be anonymous. - enum: - - send - - send-anon - type: string - reg_who_request: - $ref: '#/components/schemas/abuseReportsRegistrarWhoIsFields' - ncsei_subject_representation: - description: >- - If the submitter is the target of NCSEI in the URLs of the abuse - report. - type: boolean - required: - - act - - email - - email2 - - name - - owner_notification - - urls - abuseReportsSubmitReportResponse: - properties: - abuse_rand: - description: The identifier for the submitted abuse report. - type: string - request: - properties: - act: - $ref: '#/components/schemas/abuseReportsSubmissionReportType' - required: - - act - type: object - result: - description: The result should be 'success' for successful response - type: string - required: - - request - - result - - abuse_rand - type: object - abuseReportsSubmitterDetails: - description: Information about the submitter of the report. - properties: - company: - type: string - email: - type: string - name: - type: string - telephone: - type: string - type: object - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - abuse_reports: - id: cloudflare.abuse_reports.abuse_reports - name: abuse_reports - title: Abuse Reports - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1abuse-reports/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result.reports - request_review: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1abuse-reports~1{report_id}~1mitigations~1appeal/post - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1abuse-reports~1{report_param}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1abuse-reports~1{report_param}/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/abuse_reports/methods/get' - - $ref: '#/components/x-stackQL-resources/abuse_reports/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/abuse_reports/methods/create' - update: [] - delete: [] - replace: [] - emails: - id: cloudflare.abuse_reports.emails - name: emails - title: Emails - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1abuse-reports~1{report_id}~1emails/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result.emails - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/emails/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - mitigations: - id: cloudflare.abuse_reports.mitigations - name: mitigations - title: Mitigations - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1abuse-reports~1{report_id}~1mitigations/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result.mitigations - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/mitigations/methods/list' - insert: [] - update: [] - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: abuse_reports API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/abuse-reports: + get: + description: List the abuse reports for a given account + operationId: ListAbuseReports + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Where in pagination to start listing abuse reports + in: query + name: page + schema: + type: integer + - description: How many abuse reports per page to list + in: query + name: per_page + schema: + type: integer + - description: A property to sort by, followed by the order (id, cdate, domain, type, status) + in: query + name: sort + schema: + type: string + - description: Filter by domain name related to the abuse report + in: query + name: domain + schema: + type: string + - description: Returns reports created before the specified date + in: query + name: created_before + schema: + description: Time in RFC 3339 format (https://www.rfc-editor.org/rfc/rfc3339.html) + type: string + - description: Returns reports created after the specified date + in: query + name: created_after + schema: + description: Time in RFC 3339 format (https://www.rfc-editor.org/rfc/rfc3339.html) + type: string + - description: Filter by the status of the report. + in: query + name: status + schema: + $ref: '#/components/schemas/abuseReportsReportStatus' + - description: Filter by the type of the report. + in: query + name: type + schema: + $ref: '#/components/schemas/abuseReportsReportType' + - description: Filter reports that have any mitigations in the given status. + in: query + name: mitigation_status + schema: + $ref: '#/components/schemas/abuseReportsMitigationStatus' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + $ref: '#/components/schemas/abuseReportsMessage' + type: array + messages: + items: + $ref: '#/components/schemas/abuseReportsMessage' + type: array + result: + properties: + reports: + items: + $ref: '#/components/schemas/abuseReportsAbuseReport' + type: array + required: + - reports + type: object + result_info: + properties: + count: + type: number + page: + type: number + per_page: + type: number + total_count: + type: number + total_pages: + type: number + required: + - page + - per_page + - count + - total_count + - total_pages + type: object + success: + type: boolean + required: + - success + type: object + description: Abuse report list successful + '500': + content: + application/json: + schema: + properties: + errors: + items: + $ref: '#/components/schemas/abuseReportsMessage' + type: array + messages: + items: + $ref: '#/components/schemas/abuseReportsMessage' + type: array + success: + type: boolean + required: + - success + type: object + description: Failed to retrieve abuse reports + security: + - api_token: [] + summary: List abuse reports + tags: + - tseng-abuse-complaint-processor_other + x-api-token-group: + - Trust and Safety Write + - Trust and Safety Read + x-stackql-sdk: + service: abuse_reports + resource_chain: [] + method: list + /accounts/{account_id}/abuse-reports/{report_id}/emails: + get: + description: List emails sent to the customer for an abuse report. Returns all successful customer emails sent for the specified abuse report. Does not include emails sent to hosts or submitters. + operationId: ListEmails + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Abuse Report ID + in: path + name: report_id + schema: + type: string + required: true + - description: Page number to retrieve (default 1) + in: query + name: page + schema: + type: integer + - description: Number of emails per page (default 20, max 100) + in: query + name: per_page + schema: + type: integer + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + $ref: '#/components/schemas/abuseReportsMessage' + type: array + messages: + items: + $ref: '#/components/schemas/abuseReportsMessage' + type: array + result: + properties: + emails: + items: + $ref: '#/components/schemas/abuseReportsEmailListItem' + type: array + required: + - emails + type: object + result_info: + properties: + count: + type: number + page: + type: number + per_page: + type: number + total_count: + type: number + total_pages: + type: number + required: + - page + - per_page + - count + - total_count + - total_pages + type: object + success: + type: boolean + required: + - success + type: object + description: List abuse report emails successful + '400': + content: + application/json: + schema: + properties: + errors: + items: + $ref: '#/components/schemas/abuseReportsMessage' + type: array + messages: + items: + $ref: '#/components/schemas/abuseReportsMessage' + type: array + success: + type: boolean + required: + - success + type: object + description: Bad request - invalid parameters or report not found + '500': + content: + application/json: + schema: + properties: + errors: + items: + $ref: '#/components/schemas/abuseReportsMessage' + type: array + messages: + items: + $ref: '#/components/schemas/abuseReportsMessage' + type: array + success: + type: boolean + required: + - success + type: object + description: Failed to list abuse report emails + security: + - api_token: [] + summary: List abuse report emails + tags: + - tseng-abuse-complaint-processor_other + x-api-token-group: + - Trust and Safety Write + - Trust and Safety Read + /accounts/{account_id}/abuse-reports/{report_id}/mitigations: + get: + description: List mitigations done to remediate the abuse report. + operationId: ListMitigations + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Abuse Report ID + in: path + name: report_id + schema: + type: string + required: true + - description: Where in pagination to start listing abuse reports + in: query + name: page + schema: + type: integer + - description: How many abuse reports per page to list + in: query + name: per_page + schema: + type: integer + - description: A property to sort by, followed by the order + in: query + name: sort + schema: + enum: + - type,asc + - type,desc + - effective_date,asc + - effective_date,desc + - status,asc + - status,desc + - entity_type,asc + - entity_type,desc + type: string + - description: Filter by the type of mitigation. This filter parameter can be specified multiple times to include multiple types of mitigations in the result set, e.g. ?type=rate_limit_cache&type=legal_block. + in: query + name: type + schema: + $ref: '#/components/schemas/abuseReportsMitigationType' + - description: Returns mitigations that were dispatched before the given date + in: query + name: effective_before + schema: + description: Time in RFC 3339 format (https://www.rfc-editor.org/rfc/rfc3339.html) + type: string + - description: Returns mitigation that were dispatched after the given date + in: query + name: effective_after + schema: + description: Time in RFC 3339 format (https://www.rfc-editor.org/rfc/rfc3339.html) + type: string + - description: Filter by the status of the mitigation. + in: query + name: status + schema: + $ref: '#/components/schemas/abuseReportsMitigationStatus' + - description: Filter by the type of entity the mitigation impacts. + in: query + name: entity_type + schema: + $ref: '#/components/schemas/abuseReportsMitigatedEntityType' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + $ref: '#/components/schemas/abuseReportsMessage' + type: array + messages: + items: + $ref: '#/components/schemas/abuseReportsMessage' + type: array + result: + properties: + mitigations: + items: + $ref: '#/components/schemas/abuseReportsMitigationListItem' + type: array + required: + - mitigations + type: object + result_info: + properties: + count: + type: number + page: + type: number + per_page: + type: number + total_count: + type: number + total_pages: + type: number + required: + - page + - per_page + - count + - total_count + - total_pages + type: object + success: + type: boolean + required: + - success + type: object + description: List abuse report mitigations successful + '500': + content: + application/json: + schema: + properties: + errors: + items: + $ref: '#/components/schemas/abuseReportsMessage' + type: array + messages: + items: + $ref: '#/components/schemas/abuseReportsMessage' + type: array + success: + type: boolean + required: + - success + type: object + description: Failed to list abuse report mitigations + security: + - api_token: [] + summary: List abuse report mitigations + tags: + - tseng-abuse-complaint-processor_other + x-api-token-group: + - Trust and Safety Write + - Trust and Safety Read + x-stackql-sdk: + service: abuse_reports + resource_chain: + - mitigations + method: list + /accounts/{account_id}/abuse-reports/{report_id}/mitigations/appeal: + post: + description: Request a review for mitigations on an account. + operationId: RequestReview + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Abuse Report ID + in: path + name: report_id + schema: + type: string + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/abuseReportsMitigationAppealRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/abuseReportsMitigationAppealResult' + description: Mitigation appeals received + '500': + content: + application/json: + schema: + properties: + errors: + items: + $ref: '#/components/schemas/abuseReportsMessage' + type: array + messages: + items: + $ref: '#/components/schemas/abuseReportsMessage' + type: array + success: + type: boolean + required: + - success + type: object + description: Failed to request review on delayed action. + security: + - api_token: [] + summary: Request review on mitigations + tags: + - tseng-abuse-complaint-processor_other + x-api-token-group: + - Trust and Safety Write + /accounts/{account_id}/abuse-reports/{report_param}: + get: + description: Retrieve the details of an abuse report. + operationId: GetAbuseReport + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Identifier of the abuse report + in: path + name: report_param + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + $ref: '#/components/schemas/abuseReportsErrorMessage' + type: array + messages: + items: + $ref: '#/components/schemas/abuseReportsMessage' + type: array + result: + $ref: '#/components/schemas/abuseReportsAbuseReport' + success: + type: boolean + required: + - success + - result + type: object + description: Report submitted successfully + '400': + content: + application/json: + schema: + properties: + errors: + items: + $ref: '#/components/schemas/abuseReportsErrorMessage' + type: array + messages: + items: + $ref: '#/components/schemas/abuseReportsMessage' + type: array + result: + $ref: '#/components/schemas/abuseReportsAbuseReport' + success: + type: boolean + required: + - success + - errors + type: object + description: Report submitted with an error + '500': + content: + application/json: + schema: + properties: + errors: + items: + $ref: '#/components/schemas/abuseReportsErrorMessage' + type: array + messages: + items: + $ref: '#/components/schemas/abuseReportsMessage' + type: array + result: + $ref: '#/components/schemas/abuseReportsAbuseReport' + success: + type: boolean + required: + - success + - errors + type: object + description: Report submitted with an error + security: + - api_token: [] + summary: Abuse Report Details + tags: + - tseng-abuse-complaint-processor_other + x-api-token-group: + - Trust and Safety Write + - Trust and Safety Read + x-stackql-sdk: + service: abuse_reports + resource_chain: [] + method: get + post: + description: Submit the Abuse Report of a particular type + operationId: SubmitAbuseReport + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: 'The report type to be submitted. Example: abuse_general' + in: path + name: report_param + schema: + $ref: '#/components/schemas/abuseReportsSubmissionReportType' + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/abuseReportsSubmitReportRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/abuseReportsSubmitReportResponse' + description: Report submitted successfully + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/abuseReportsSubmitErrorResponse' + description: Report submitted with an error + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/abuseReportsSubmitErrorResponse' + description: Report submitted with an error + security: + - api_token: [] + summary: Submit an abuse report + tags: + - tseng-abuse-complaint-processor_other + x-stackql-sdk: + service: abuse_reports + resource_chain: [] + method: create +components: + schemas: + abuseReportsAbuseReport: + properties: + cdate: + description: Creation date of report. Time in RFC 3339 format (https://www.rfc-editor.org/rfc/rfc3339.html) + example: '2009-11-10T23:00:00Z' + type: string + domain: + description: Domain that relates to the report. + type: string + id: + description: Public facing ID of abuse report, aka abuse_rand. + type: string + justification: + description: Justification for the report. + type: string + mitigation_summary: + $ref: '#/components/schemas/abuseReportsMitigationSummary' + original_work: + description: Original work / Targeted brand in the alleged abuse. + type: string + status: + $ref: '#/components/schemas/abuseReportsReportStatus' + submitter: + $ref: '#/components/schemas/abuseReportsSubmitterDetails' + type: + $ref: '#/components/schemas/abuseReportsReportType' + urls: + items: + type: string + type: array + required: + - id + - cdate + - domain + - type + - status + - mitigation_summary + type: object + abuseReportsAppealReason: + description: Reason why the customer is appealing. + enum: + - removed + - misclassified + example: misclassified + type: string + abuseReportsEmailListItem: + description: An email sent to the customer for an abuse report. + properties: + body: + description: Body content of the email. + type: string + id: + description: Unique identifier of the email. + type: string + recipient: + description: Email address of the recipient. + type: string + sent_at: + description: When the email was sent. Time in RFC 3339 format (https://www.rfc-editor.org/rfc/rfc3339.html) + example: '2009-11-10T23:00:00Z' + type: string + subject: + description: Subject line of the email. + type: string + required: + - id + - subject + - body + - recipient + - sent_at + type: object + abuseReportsErrorCode: + type: string + description: Report has invalid type + abuseReportsErrorMessage: + properties: + code: + type: string + message: + type: string + required: + - message + type: object + abuseReportsMessage: + properties: + message: + type: string + required: + - message + type: object + abuseReportsMitigatedEntityType: + enum: + - url_pattern + - account + - zone + type: string + abuseReportsMitigationAppeal: + properties: + id: + description: ID of the mitigation to appeal. + type: string + reason: + $ref: '#/components/schemas/abuseReportsAppealReason' + required: + - id + - reason + type: object + abuseReportsMitigationAppealRequest: + properties: + appeals: + description: List of mitigations to appeal. + items: + $ref: '#/components/schemas/abuseReportsMitigationAppeal' + type: array + required: + - appeals + type: object + abuseReportsMitigationAppealResult: + properties: + errors: + items: + $ref: '#/components/schemas/abuseReportsMessage' + type: array + messages: + items: + $ref: '#/components/schemas/abuseReportsMessage' + type: array + result: + items: + $ref: '#/components/schemas/abuseReportsMitigationListItem' + type: array + result_info: + properties: + count: + type: number + page: + type: number + per_page: + type: number + total_count: + type: number + total_pages: + type: number + required: + - page + - per_page + - count + - total_count + - total_pages + type: object + success: + type: boolean + required: + - success + - result_info + type: object + abuseReportsMitigationListItem: + properties: + effective_date: + description: Date when the mitigation will become active. Time in RFC 3339 format (https://www.rfc-editor.org/rfc/rfc3339.html) + example: '2009-11-10T23:00:00Z' + type: string + entity_id: + type: string + entity_type: + $ref: '#/components/schemas/abuseReportsMitigatedEntityType' + id: + description: ID of remediation. + type: string + status: + $ref: '#/components/schemas/abuseReportsMitigationStatus' + type: + $ref: '#/components/schemas/abuseReportsMitigationType' + required: + - id + - type + - effective_date + - status + - entity_type + - entity_id + type: object + abuseReportsMitigationStatus: + description: The status of a mitigation + enum: + - pending + - active + - in_review + - cancelled + - removed + type: string + abuseReportsMitigationSummary: + description: A summary of the mitigations related to this report. + properties: + accepted_url_count: + description: How many of the reported URLs were confirmed as abusive. + type: integer + active_count: + description: How many mitigations are active. + type: integer + external_host_notified: + description: Whether the report has been forwarded to an external hosting provider. + type: boolean + in_review_count: + description: How many mitigations are under review. + type: integer + pending_count: + description: How many mitigations are pending their effective date. + type: integer + required: + - accepted_url_count + - pending_count + - active_count + - in_review_count + - external_host_notified + type: object + abuseReportsMitigationType: + description: The type of mitigation + enum: + - legal_block + - misleading_interstitial + - phishing_interstitial + - network_block + - rate_limit_cache + - account_suspend + - redirect_video_stream + type: string + abuseReportsRegistrarWhoIsFields: + description: RDP-mandated fields for registrar WHOIS data disclosure requests. + properties: + reg_who_authorization_statement: + description: Optional authorization statement or power of attorney per RDP 10.2.1.3. + maxLength: 5000 + type: string + reg_who_good_faith_affirmation: + description: Affirmation that the request is made in good faith per RDP 10.2.4. Must be true. + type: boolean + reg_who_lawful_processing_agreement: + description: Agreement to process data lawfully per RDP 10.2.5. Must be true. + type: boolean + reg_who_legal_basis: + description: Legal rights and rationale for the request per RDP 10.2.3. Required for all WHOIS requests. + maxLength: 5000 + type: string + reg_who_request_type: + description: The type of WHOIS data request per RDP procedure. + enum: + - disclosure + - invalid_whois + type: string + reg_who_requested_data_elements: + description: The specific WHOIS data elements being requested per RDP 10.2.2. Required for all WHOIS requests. + items: + enum: + - registrant_name + - registrant_organization + - registrant_email + - registrant_phone + - registrant_address + - registrant_address_country + - registrant_address_postal_code + - admin_name + - admin_organization + - admin_email + - admin_phone + - admin_address + - tech_name + - tech_organization + - tech_email + - tech_phone + - tech_address + type: string + maxItems: 17 + minItems: 1 + type: array + reg_who_requestor_type: + description: The nature of the requestor per RDP 10.2.1.2. + enum: + - government + - corporation + - individual + type: string + required: + - reg_who_request_type + - reg_who_requested_data_elements + - reg_who_legal_basis + - reg_who_good_faith_affirmation + - reg_who_lawful_processing_agreement + type: object + abuseReportsReportStatus: + description: An enum value that represents the status of an abuse record + enum: + - accepted + - in_review + type: string + abuseReportsReportType: + description: The abuse report type + enum: + - PHISH + - GEN + - THREAT + - DMCA + - EMER + - TM + - REG_WHO + - NCSEI + - NETWORK + type: string + abuseReportsSubmissionReportType: + description: The report type for submitted reports. + type: string + abuseReportsSubmitErrorResponse: + properties: + error_code: + $ref: '#/components/schemas/abuseReportsErrorCode' + msg: + description: The error message for the error + type: string + request: + properties: + act: + $ref: '#/components/schemas/abuseReportsSubmissionReportType' + required: + - act + type: object + result: + description: The result should be 'error' for successful response + type: string + required: + - request + - result + - msg + - error_code + type: object + abuseReportsSubmitReportRequest: + type: object + title: DMCA Report + properties: + act: + description: The report type for submitted reports. + type: string + enum: + - abuse_dmca + comments: + description: Any additional comments about the infringement not exceeding 2000 characters + maxLength: 2000 + minLength: 1 + type: string + company: + description: Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). + maxLength: 100 + minLength: 1 + type: string + email: + description: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). + type: string + email2: + description: Should match the value provided in `email` + type: string + name: + description: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). + maxLength: 255 + minLength: 1 + type: string + reported_country: + description: Text containing 2 characters + maxLength: 2 + minLength: 2 + type: string + reported_user_agent: + description: Text not exceeding 255 characters + maxLength: 255 + minLength: 1 + type: string + tele: + description: Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). + maxLength: 20 + minLength: 1 + type: string + title: + description: Text not exceeding 255 characters + maxLength: 255 + minLength: 1 + type: string + urls: + description: "A list of valid URLs separated by \u2018\\n\u2019 (new line character). The list of the URLs should not exceed 250 URLs. All URLs should have the same hostname. Each URL should be unique. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/)." + type: string + address1: + description: Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). + maxLength: 100 + minLength: 1 + type: string + agent_name: + description: The name of the copyright holder. Text not exceeding 60 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). + maxLength: 60 + minLength: 1 + type: string + agree: + description: 'Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports' + enum: + - 1 + type: integer + city: + description: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). + maxLength: 255 + minLength: 1 + type: string + country: + description: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). + maxLength: 255 + minLength: 1 + type: string + host_notification: + description: 'Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.' + enum: + - send + type: string + original_work: + description: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). + maxLength: 255 + minLength: 1 + type: string + owner_notification: + description: 'Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.' + enum: + - send + type: string + signature: + description: Required for DMCA reports, should be same as Name. An affirmation that all information in the report is true and accurate while agreeing to the policies of Cloudflare's abuse reports + type: string + state: + description: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). + maxLength: 255 + minLength: 1 + type: string + justification: + description: A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 characters. + maxLength: 5000 + minLength: 1 + type: string + trademark_number: + description: Text not exceeding 1000 characters + maxLength: 1000 + minLength: 1 + type: string + trademark_office: + description: Text not exceeding 1000 characters + maxLength: 1000 + minLength: 1 + type: string + trademark_symbol: + description: Text not exceeding 1000 characters + maxLength: 1000 + minLength: 1 + type: string + destination_ips: + description: "A list of IP addresses separated by \u2018\\n\u2019 (new line character). The list of destination IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be unique." + type: string + ports_protocols: + description: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total size of the field should not exceed 2000 characters. Each individual port/protocol should not exceed 100 characters. The list should not have more than 30 unique ports and protocols. + type: string + source_ips: + description: "A list of IP addresses separated by \u2018\\n\u2019 (new line character). The list of source IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be unique." + type: string + ncmec_notification: + description: 'Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.' + enum: + - send + - send-anon + type: string + reg_who_request: + $ref: '#/components/schemas/abuseReportsRegistrarWhoIsFields' + ncsei_subject_representation: + description: If the submitter is the target of NCSEI in the URLs of the abuse report. + type: boolean + required: + - act + - email + - email2 + - name + - owner_notification + - urls + abuseReportsSubmitReportResponse: + properties: + abuse_rand: + description: The identifier for the submitted abuse report. + type: string + request: + properties: + act: + $ref: '#/components/schemas/abuseReportsSubmissionReportType' + required: + - act + type: object + result: + description: The result should be 'success' for successful response + type: string + required: + - request + - result + - abuse_rand + type: object + abuseReportsSubmitterDetails: + description: Information about the submitter of the report. + properties: + company: + type: string + email: + type: string + name: + type: string + telephone: + type: string + type: object + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + abuse_reports: + id: cloudflare.abuse_reports.abuse_reports + name: abuse_reports + title: Abuse Reports + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1abuse-reports/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result.reports + request_review: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1abuse-reports~1{report_id}~1mitigations~1appeal/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .appeals }}{{ $sep }}"appeals": {{ if eq (kindOf .appeals) "string" }}{{ .appeals }}{{ else }}{{ toJson .appeals }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1abuse-reports~1{report_param}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1abuse-reports~1{report_param}/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .act }}{{ $sep }}"act": {{ toJson .act }}{{- $sep = "," -}}{{ end }} + + {{- if .comments }}{{ $sep }}"comments": {{ toJson .comments }}{{- $sep = "," -}}{{ end }} + + {{- if .company }}{{ $sep }}"company": {{ toJson .company }}{{- $sep = "," -}}{{ end }} + + {{- if .email }}{{ $sep }}"email": {{ toJson .email }}{{- $sep = "," -}}{{ end }} + + {{- if .email2 }}{{ $sep }}"email2": {{ toJson .email2 }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .reported_country }}{{ $sep }}"reported_country": {{ toJson .reported_country }}{{- $sep = "," -}}{{ end }} + + {{- if .reported_user_agent }}{{ $sep }}"reported_user_agent": {{ toJson .reported_user_agent }}{{- $sep = "," -}}{{ end }} + + {{- if .tele }}{{ $sep }}"tele": {{ toJson .tele }}{{- $sep = "," -}}{{ end }} + + {{- if .title }}{{ $sep }}"title": {{ toJson .title }}{{- $sep = "," -}}{{ end }} + + {{- if .urls }}{{ $sep }}"urls": {{ toJson .urls }}{{- $sep = "," -}}{{ end }} + + {{- if .address1 }}{{ $sep }}"address1": {{ toJson .address1 }}{{- $sep = "," -}}{{ end }} + + {{- if .agent_name }}{{ $sep }}"agent_name": {{ toJson .agent_name }}{{- $sep = "," -}}{{ end }} + + {{- if .agree }}{{ $sep }}"agree": {{ toJson .agree }}{{- $sep = "," -}}{{ end }} + + {{- if .city }}{{ $sep }}"city": {{ toJson .city }}{{- $sep = "," -}}{{ end }} + + {{- if .country }}{{ $sep }}"country": {{ toJson .country }}{{- $sep = "," -}}{{ end }} + + {{- if .host_notification }}{{ $sep }}"host_notification": {{ toJson .host_notification }}{{- $sep = "," -}}{{ end }} + + {{- if .original_work }}{{ $sep }}"original_work": {{ toJson .original_work }}{{- $sep = "," -}}{{ end }} + + {{- if .owner_notification }}{{ $sep }}"owner_notification": {{ toJson .owner_notification }}{{- $sep = "," -}}{{ end }} + + {{- if .signature }}{{ $sep }}"signature": {{ toJson .signature }}{{- $sep = "," -}}{{ end }} + + {{- if .state }}{{ $sep }}"state": {{ toJson .state }}{{- $sep = "," -}}{{ end }} + + {{- if .justification }}{{ $sep }}"justification": {{ toJson .justification }}{{- $sep = "," -}}{{ end }} + + {{- if .trademark_number }}{{ $sep }}"trademark_number": {{ toJson .trademark_number }}{{- $sep = "," -}}{{ end }} + + {{- if .trademark_office }}{{ $sep }}"trademark_office": {{ toJson .trademark_office }}{{- $sep = "," -}}{{ end }} + + {{- if .trademark_symbol }}{{ $sep }}"trademark_symbol": {{ toJson .trademark_symbol }}{{- $sep = "," -}}{{ end }} + + {{- if .destination_ips }}{{ $sep }}"destination_ips": {{ toJson .destination_ips }}{{- $sep = "," -}}{{ end }} + + {{- if .ports_protocols }}{{ $sep }}"ports_protocols": {{ toJson .ports_protocols }}{{- $sep = "," -}}{{ end }} + + {{- if .source_ips }}{{ $sep }}"source_ips": {{ toJson .source_ips }}{{- $sep = "," -}}{{ end }} + + {{- if .ncmec_notification }}{{ $sep }}"ncmec_notification": {{ toJson .ncmec_notification }}{{- $sep = "," -}}{{ end }} + + {{- if .reg_who_request }}{{ $sep }}"reg_who_request": {{ if eq (kindOf .reg_who_request) "string" }}{{ .reg_who_request }}{{ else }}{{ toJson .reg_who_request }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ncsei_subject_representation }}{{ $sep }}"ncsei_subject_representation": {{ toJson .ncsei_subject_representation }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/abuse_reports/methods/get' + - $ref: '#/components/x-stackQL-resources/abuse_reports/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/abuse_reports/methods/create' + update: [] + delete: [] + replace: [] + emails: + id: cloudflare.abuse_reports.emails + name: emails + title: Emails + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1abuse-reports~1{report_id}~1emails/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result.emails + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/emails/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + mitigations: + id: cloudflare.abuse_reports.mitigations + name: mitigations + title: Mitigations + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1abuse-reports~1{report_id}~1mitigations/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result.mitigations + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/mitigations/methods/list' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/accounts.yaml b/providers/src/cloudflare/v00.00.00000/services/accounts.yaml index 9ca6e218..e01320bd 100644 --- a/providers/src/cloudflare/v00.00.00000/services/accounts.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/accounts.yaml @@ -1,5034 +1,5031 @@ -openapi: 3.0.3 -info: - title: accounts API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts: - get: - description: List all accounts you have ownership or verified access to. - operationId: accounts-list-accounts - parameters: - - in: query - name: name - schema: - description: Name of the account. - type: string - - in: query - name: page - schema: - default: 1 - description: Page number of paginated results. - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 20 - description: Maximum number of results per page. - maximum: 50 - minimum: 5 - type: number - - in: query - name: direction - schema: - description: Direction to order results. - enum: - - asc - - desc - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamResponseCollectionAccounts' - description: List Accounts response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: List Accounts response failure - security: - - api_email: [] - api_key: [] - summary: List Accounts - tags: - - Accounts - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: accounts - resource_chain: [] - method: list - post: - description: Create an account (only available for tenant admins at this time) - operationId: account-creation - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/iamCreateAccount' - description: Parameters for account creation - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamResponseSingleAccount' - description: Account Creation Success Response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Account Creation Failure Response - security: - - api_email: [] - api_key: [] - summary: Create an account - tags: - - Accounts - x-cfPlanAvailability: - business: false - enterprise: false - free: false - pro: false - x-stackql-sdk: - service: accounts - resource_chain: [] - method: create - /accounts/move: - post: - description: >- - Batch move a collection of accounts to a specific organization. ⚠️ Not - implemented. - operationId: Accounts_batchMoveAccounts - requestBody: - content: - application/json: - schema: - properties: - account_ids: - description: Move these accounts to the destination organization. - items: - type: string - type: array - destination_organization_id: - description: Move accounts to this organization ID. - type: string - required: - - account_ids - - destination_organization_id - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - type: object - maxItems: 0 - type: array - messages: - items: - $ref: '#/components/schemas/organizationsApiV4Message' - type: array - result: - $ref: >- - #/components/schemas/organizationsApiBatchAccountMoveResponse - success: - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: The request has succeeded. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/organizationsApiV4ErrorResponse' - description: An unexpected error response. - security: - - api_email: [] - api_key: [] - summary: Batch move accounts - tags: - - Accounts - /accounts/{account_id}: - delete: - description: >- - Delete a specific account (only available for tenant admins at this - time). This is a permanent operation that will delete any zones or other - resources under the account - operationId: account-deletion - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseSingleId' - description: Account Deletion Success Response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Account Deletion Failure Response - security: - - api_email: [] - api_key: [] - summary: Delete a specific account - tags: - - Accounts - x-api-token-group: - - Account Settings Write - x-cfPermissionsRequired: - enum: - - '#organization:edit' - x-cfPlanAvailability: - business: false - enterprise: false - free: false - pro: false - x-stackql-sdk: - service: accounts - resource_chain: [] - method: delete - get: - description: Get information about a specific account that you are a member of. - operationId: accounts-account-details - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamResponseSingleAccount' - description: Account Details response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Account Details response failure - security: - - api_email: [] - api_key: [] - summary: Account Details - tags: - - Accounts - x-api-token-group: - - Trust and Safety Write - - Trust and Safety Read - - DNS View Write - - DNS View Read - - SCIM Provisioning - - Load Balancers Account Write - - Load Balancers Account Read - - 'Zero Trust: PII Read' - - DDoS Botnet Feed Write - - DDoS Botnet Feed Read - - Workers R2 Storage Write - - Workers R2 Storage Read - - DDoS Protection Write - - DDoS Protection Read - - Workers Tail Read - - Workers KV Storage Write - - Workers KV Storage Read - - Workers Scripts Write - - Workers Scripts Read - - 'Load Balancing: Monitors and Pools Write' - - 'Load Balancing: Monitors and Pools Read' - - Account Firewall Access Rules Write - - Account Firewall Access Rules Read - - DNS Firewall Write - - DNS Firewall Read - - Billing Write - - Billing Read - - Account Settings Write - - Account Settings Read - x-cfPermissionsRequired: - enum: - - '#organization:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: accounts - resource_chain: [] - method: get - put: - description: Update an existing account. - operationId: accounts-update-account - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/iamComponentsSchemasAccount' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamResponseSingleAccount' - description: Update Account response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Update Account response failure - security: - - api_email: [] - api_key: [] - summary: Update Account - tags: - - Accounts - x-api-token-group: - - Account Settings Write - x-cfPermissionsRequired: - enum: - - '#organization:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: accounts - resource_chain: [] - method: update - /accounts/{account_id}/email/sending/feedback: - get: - operationId: get_publicFeedbackStatus - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: start_at - schema: - format: date-time - type: string - - in: query - name: end_at - schema: - format: date-time - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - count: - type: number - end_at: - format: date-time - type: string - start_at: - format: date-time - type: string - required: - - count - - start_at - - end_at - type: object - required: - - result - type: object - description: Returns feedback statistics. - security: - - bearerAuth: [] - summary: Get feedback emails statistics - tags: - - Public - /accounts/{account_id}/email/sending/limits: - get: - description: >- - Returns the current daily sending quota for the account. Null when the - quota is not yet available. - operationId: email-sending-get-sending-limits - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/emailSendingLimitsResponseSingle' - description: Get sending limits response - security: - - api_email: [] - api_key: [] - summary: Get sending limits - tags: - - Email Sending - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.email.sending.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/logs/audit: - get: - description: Gets a list of audit logs for an account. - operationId: audit-logs-v2-get-account-audit-logs - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: account_name - schema: - description: Filters by the account name. - items: - type: string - type: array - explode: true - - in: query - name: action_result - schema: - description: Filters by whether the action was successful or not. - items: - enum: - - success - - failure - type: string - type: array - explode: true - - in: query - name: action_type - schema: - description: Filters by the action type. - items: - enum: - - create - - delete - - view - - update - type: string - type: array - explode: true - - in: query - name: actor_context - schema: - description: Filters by the actor context. - items: - enum: - - api_key - - api_token - - dash - - oauth - - origin_ca_key - type: string - type: array - explode: true - - in: query - name: actor_email - schema: - description: Filters by the actor's email address. - items: - format: email - type: string - type: array - explode: true - - in: query - name: actor_id - schema: - description: >- - Filters by the actor ID. This can be either the Account ID or User - ID. - items: - type: string - type: array - explode: true - - in: query - name: actor_ip_address - schema: - description: The IP address where the action was initiated. - items: - type: string - type: array - explode: true - - in: query - name: actor_token_id - schema: - description: >- - Filters by the API token ID when the actor context is an api_token - or oauth. - items: - type: string - type: array - explode: true - - in: query - name: actor_token_name - schema: - description: >- - Filters by the API token name when the actor context is an - api_token or oauth. - items: - type: string - type: array - explode: true - - in: query - name: actor_type - schema: - description: Filters by the actor type. - items: - enum: - - account - - cloudflare_admin - - system - - user - type: string - type: array - explode: true - - in: query - name: audit_log_id - schema: - deprecated: true - description: Finds a specific log by its ID. - items: - type: string - type: array - explode: true - - in: query - name: id - schema: - description: Finds a specific log by its ID. - items: - type: string - type: array - explode: true - - in: query - name: raw_cf_ray_id - schema: - description: Filters by the response CF Ray ID. - items: - type: string - type: array - explode: true - - in: query - name: raw_method - schema: - description: The HTTP method for the API call. - items: - type: string - type: array - explode: true - - in: query - name: raw_status_code - schema: - description: The response status code that was returned. - items: - type: integer - type: array - explode: true - - in: query - name: raw_uri - schema: - description: Filters by the request URI. - items: - type: string - type: array - explode: true - - in: query - name: resource_id - schema: - description: Filters by the resource ID. - items: - type: string - type: array - explode: true - - in: query - name: resource_product - schema: - description: >- - Filters audit logs by the Cloudflare product associated with the - changed resource. - items: - type: string - type: array - explode: true - - in: query - name: resource_type - schema: - description: >- - Filters audit logs based on the unique type of resource changed by - the action. - items: - type: string - type: array - explode: true - - in: query - name: resource_scope - schema: - description: >- - Filters by the resource scope, specifying whether the resource is - associated with an user, an account, a zone, or a membership. - items: - enum: - - accounts - - user - - zones - - memberships - type: string - type: array - explode: true - - in: query - name: zone_id - schema: - description: Filters by the zone ID. - items: - type: string - type: array - explode: true - - in: query - name: zone_name - schema: - description: Filters by the zone name associated with the change. - items: - type: string - type: array - explode: true - - in: query - name: account_name.not - schema: - description: Filters out audit logs by the account name. - items: - type: string - type: array - explode: true - - in: query - name: action_result.not - schema: - description: >- - Filters out audit logs by whether the action was successful or - not. - items: - enum: - - success - - failure - type: string - type: array - explode: true - - in: query - name: action_type.not - schema: - description: Filters out audit logs by the action type. - items: - enum: - - create - - delete - - view - - update - type: string - type: array - explode: true - - in: query - name: actor_context.not - schema: - description: Filters out audit logs by the actor context. - items: - enum: - - api_key - - api_token - - dash - - oauth - - origin_ca_key - type: string - type: array - explode: true - - in: query - name: actor_email.not - schema: - description: Filters out audit logs by the actor's email address. - items: - format: email - type: string - type: array - explode: true - - in: query - name: actor_id.not - schema: - description: >- - Filters out audit logs by the actor ID. This can be either the - Account ID or User ID. - items: - type: string - type: array - explode: true - - in: query - name: actor_ip_address.not - schema: - description: Filters out audit logs IP address where the action was initiated. - items: - type: string - type: array - explode: true - - in: query - name: actor_token_id.not - schema: - description: >- - Filters out audit logs by the API token ID when the actor context - is an api_token or oauth. - items: - type: string - type: array - explode: true - - in: query - name: actor_token_name.not - schema: - description: >- - Filters out audit logs by the API token name when the actor - context is an api_token or oauth. - items: - type: string - type: array - explode: true - - in: query - name: actor_type.not - schema: - description: Filters out audit logs by the actor type. - items: - enum: - - account - - cloudflare_admin - - system - - user - type: string - type: array - explode: true - - in: query - name: audit_log_id.not - schema: - deprecated: true - description: Filters out audit logs by their IDs. - items: - type: string - type: array - explode: true - - in: query - name: id.not - schema: - description: Filters out audit logs by their IDs. - items: - type: string - type: array - explode: true - - in: query - name: raw_cf_ray_id.not - schema: - description: Filters out audit logs by the response CF Ray ID. - items: - type: string - type: array - explode: true - - in: query - name: raw_method.not - schema: - description: Filters out audit logs by the HTTP method for the API call. - items: - type: string - type: array - explode: true - - in: query - name: raw_status_code.not - schema: - description: >- - Filters out audit logs by the response status code that was - returned. - items: - type: integer - type: array - explode: true - - in: query - name: raw_uri.not - schema: - description: Filters out audit logs by the request URI. - items: - type: string - type: array - explode: true - - in: query - name: resource_id.not - schema: - description: Filters out audit logs by the resource ID. - items: - type: string - type: array - explode: true - - in: query - name: resource_product.not - schema: - description: >- - Filters out audit logs by the Cloudflare product associated with - the changed resource. - items: - type: string - type: array - explode: true - - in: query - name: resource_type.not - schema: - description: >- - Filters out audit logs based on the unique type of resource - changed by the action. - items: - type: string - type: array - explode: true - - in: query - name: resource_scope.not - schema: - description: >- - Filters out audit logs by the resource scope, specifying whether - the resource is associated with an user, an account, a zone, or a - membership. - items: - enum: - - accounts - - user - - zones - - memberships - type: string - type: array - explode: true - - in: query - name: zone_id.not - schema: - description: Filters out audit logs by the zone ID. - items: - type: string - type: array - explode: true - - in: query - name: zone_name.not - schema: - description: >- - Filters out audit logs by the zone name associated with the - change. - items: - type: string - type: array - explode: true - - description: >- - Limits the returned results to logs newer than the specified date. - This can be a date string 2019-04-30 (interpreted in UTC) or an - absolute timestamp that conforms to RFC3339. - in: query - name: since - schema: - format: date - type: string - - description: >- - Limits the returned results to logs older than the specified date. - This can be a date string 2019-04-30 (interpreted in UTC) or an - absolute timestamp that conforms to RFC3339. - in: query - name: before - schema: - format: date - type: string - - in: query - name: direction - schema: - default: desc - description: Sets sorting order. - enum: - - desc - - asc - type: string - - in: query - name: limit - schema: - default: 100 - description: >- - The number limits the objects to return. The cursor attribute may - be used to iterate over the next batch of objects if there are - more than the limit. - maximum: 1000 - minimum: 1 - type: number - - in: query - name: cursor - schema: - description: >- - The cursor is an opaque token used to paginate through large sets - of records. It indicates the position from which to continue when - requesting the next set of records. A valid cursor value can be - obtained from the cursor object in the result_info structure of a - previous response. - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/aaaAuditLogsV2ResponseCollection' - description: Get account audit logs successful response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/aaaSchemasApiResponseCommonFailure' - description: Get account audit logs failed response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get account audit logs (Version 2) - tags: - - Audit Logs - x-api-token-group: - - Account Settings Write - - Account Settings Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: accounts - resource_chain: - - logs - - audit - method: list - /accounts/{account_id}/members: - get: - description: List all members of an account. - operationId: account-members-list-members - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: order - schema: - description: Field to order results by. - enum: - - user.first_name - - user.last_name - - user.email - - status - type: string - - in: query - name: status - schema: - description: A member's status in the account. - enum: - - accepted - - pending - - rejected - type: string - - in: query - name: page - schema: - default: 1 - description: Page number of paginated results. - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 20 - description: Maximum number of results per page. - maximum: 50 - minimum: 5 - type: number - - in: query - name: direction - schema: - description: Direction to order results. - enum: - - asc - - desc - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamCollectionMemberResponseWithPolicies' - description: List Members response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: List Members response failure - security: - - api_email: [] - api_key: [] - summary: List Members - tags: - - Account Members - x-api-token-group: - - SCIM Provisioning - - Account Settings Write - - Account Settings Read - x-cfPermissionsRequired: - enum: - - '#organization:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: accounts - resource_chain: - - members - method: list - post: - description: Add a user to the list of members for this account. - operationId: account-members-add-member - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Add Member with Account Roles - properties: - email: - $ref: '#/components/schemas/iamEmail' - roles: - description: Array of roles associated with this member. - items: - $ref: '#/components/schemas/iamRoleComponentsSchemasIdentifier' - type: array - status: - $ref: '#/components/schemas/iamMemberInvitationStatus' - policies: - description: Array of policies associated with this member. - items: - $ref: '#/components/schemas/iamCreateMemberPolicy' - type: array - required: - - email - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamSingleMemberResponseWithPolicies' - description: Add Member response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Add Member response failure - security: - - api_email: [] - api_key: [] - summary: Add Member - tags: - - Account Members - x-api-token-group: - - SCIM Provisioning - - Account Settings Write - x-cfPermissionsRequired: - enum: - - '#organization:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: accounts - resource_chain: - - members - method: create - /accounts/{account_id}/members/{member_id}: - delete: - description: Remove a member from an account. - operationId: account-members-remove-member - parameters: - - name: member_id - in: path - required: true - description: The account member ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseSingleId' - description: Remove Member response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Remove Member response failure - security: - - api_email: [] - api_key: [] - summary: Remove Member - tags: - - Account Members - x-api-token-group: - - SCIM Provisioning - - Account Settings Write - x-cfPermissionsRequired: - enum: - - '#organization:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: accounts - resource_chain: - - members - method: delete - get: - description: Get information about a specific member of an account. - operationId: account-members-member-details - parameters: - - name: member_id - in: path - required: true - description: The account member ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamSingleMemberResponseWithPolicies' - description: Member Details response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Member Details response failure - security: - - api_email: [] - api_key: [] - summary: Member Details - tags: - - Account Members - x-api-token-group: - - SCIM Provisioning - - Account Settings Write - - Account Settings Read - x-cfPermissionsRequired: - enum: - - '#organization:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: accounts - resource_chain: - - members - method: get - put: - description: Modify an account member. - operationId: account-members-update-member - parameters: - - name: member_id - in: path - required: true - description: The account member ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Update Member with Account Roles - properties: - id: - $ref: >- - #/components/schemas/iamMembershipComponentsSchemasIdentifier - roles: - description: Roles assigned to this member. - items: - $ref: '#/components/schemas/iamRole' - type: array - status: - description: A member's status in the account. - enum: - - accepted - - pending - readOnly: true - x-auditable: true - type: string - user: - description: Details of the user associated to the membership. - properties: - email: - $ref: '#/components/schemas/iamEmail' - first_name: - $ref: '#/components/schemas/iamFirstName' - id: - $ref: >- - #/components/schemas/iamCommonComponentsSchemasIdentifier - last_name: - $ref: '#/components/schemas/iamLastName' - two_factor_authentication_enabled: - $ref: '#/components/schemas/iamTwoFactorAuthenticationEnabled' - readOnly: true - required: - - email - type: object - policies: - description: Array of policies associated with this member. - items: - $ref: '#/components/schemas/iamCreateMemberPolicy' - type: array - required: - - policies - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamSingleMemberResponseWithPolicies' - description: Update Member response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Update Member response failure - security: - - api_email: [] - api_key: [] - summary: Update Member - tags: - - Account Members - x-api-token-group: - - SCIM Provisioning - - Account Settings Write - x-cfPermissionsRequired: - enum: - - '#organization:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: accounts - resource_chain: - - members - method: update - /accounts/{account_id}/move: - post: - description: >- - Move an account within an organization hierarchy or an account outside - an organization. (Currently in Closed Beta - see - https://developers.cloudflare.com/fundamentals/organizations/) - operationId: Accounts_moveAccounts - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - destination_organization_id: - type: string - required: - - destination_organization_id - type: object - description: The destination organization ID is where the account is to be moved. - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - type: object - maxItems: 0 - type: array - messages: - items: - $ref: '#/components/schemas/organizationsApiV4Message' - type: array - result: - $ref: '#/components/schemas/organizationsApiMoveAccountResponse' - success: - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: The request has succeeded. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/organizationsApiV4ErrorResponse' - description: An unexpected error response. - security: - - api_email: [] - api_key: [] - summary: Move account - tags: - - Accounts - x-api-token-group: null - /accounts/{account_id}/roles: - get: - description: Get all available roles for an account. - operationId: account-roles-list-roles - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: page - schema: - default: 1 - description: Page number of paginated results. - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 20 - description: Number of roles per page. - maximum: 50 - minimum: 5 - type: number - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamCollectionRoleResponse' - description: List Roles response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: List Roles response failure - security: - - api_email: [] - api_key: [] - summary: List Roles - tags: - - Account Roles - x-api-token-group: - - SCIM Provisioning - - Account Settings Write - - Account Settings Read - x-cfPermissionsRequired: - enum: - - '#organization:read' - x-stackql-sdk: - service: accounts - resource_chain: - - roles - method: list - /accounts/{account_id}/roles/{role_id}: - get: - description: Get information about a specific role for an account. - operationId: account-roles-role-details - parameters: - - name: role_id - in: path - required: true - description: The role ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamSingleRoleResponse' - description: Role Details response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Role Details response failure - security: - - api_email: [] - api_key: [] - summary: Role Details - tags: - - Account Roles - x-api-token-group: - - SCIM Provisioning - - Account Settings Write - - Account Settings Read - x-cfPermissionsRequired: - enum: - - '#organization:read' - x-stackql-sdk: - service: accounts - resource_chain: - - roles - method: get - /accounts/{account_id}/subscriptions: - get: - description: Lists all of an account's subscriptions. - operationId: account-subscriptions-list-subscriptions - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/billSubsApiAccountSubscriptionResponseCollection - description: List Subscriptions response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - items: - $ref: '#/components/schemas/billSubsApiSubscription' - nullable: true - type: array - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/billSubsApiResultInfo' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: List Subscriptions response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Subscriptions - tags: - - Account Subscriptions - x-api-token-group: - - Billing Write - - Billing Read - x-cfPermissionsRequired: - enum: - - '#billing:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: accounts - resource_chain: - - subscriptions - method: get - post: - description: Creates an account subscription. - operationId: account-subscriptions-create-subscription - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/billSubsApiSubscriptionV2' - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/billSubsApiAccountSubscriptionResponseSingle - description: Create Subscription response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - type: object - properties: - currency: - $ref: '#/components/schemas/billSubsApiCurrency' - current_period_end: - $ref: '#/components/schemas/billSubsApiCurrentPeriodEnd' - current_period_start: - $ref: '#/components/schemas/billSubsApiCurrentPeriodStart' - frequency: - $ref: '#/components/schemas/billSubsApiFrequency' - id: - $ref: '#/components/schemas/billSubsApiSchemasIdentifier' - price: - $ref: '#/components/schemas/billSubsApiPrice' - rate_plan: - $ref: '#/components/schemas/billSubsApiRatePlan_2' - state: - $ref: '#/components/schemas/billSubsApiState' - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Create Subscription response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Subscription - tags: - - Account Subscriptions - x-api-token-group: - - Billing Write - x-cfPermissionsRequired: - enum: - - '#billing:read' - - '#billing:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: accounts - resource_chain: - - subscriptions - method: create - /accounts/{account_id}/subscriptions/{subscription_identifier}: - delete: - description: Deletes an account's subscription. - operationId: account-subscriptions-delete-subscription - parameters: - - in: path - name: subscription_identifier - schema: - $ref: '#/components/schemas/billSubsApiSchemasIdentifier' - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - properties: - subscription_id: - $ref: '#/components/schemas/billSubsApiSchemasIdentifier' - type: object - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Delete Subscription response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - properties: - subscription_id: - $ref: '#/components/schemas/billSubsApiSchemasIdentifier' - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Delete Subscription response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Subscription - tags: - - Account Subscriptions - x-api-token-group: - - Billing Write - x-cfPermissionsRequired: - enum: - - '#billing:edit' - x-stackql-sdk: - service: accounts - resource_chain: - - subscriptions - method: delete - put: - description: Updates an account subscription. - operationId: account-subscriptions-update-subscription - parameters: - - in: path - name: subscription_identifier - schema: - $ref: '#/components/schemas/billSubsApiSchemasIdentifier' - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/billSubsApiSubscriptionV2' - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/billSubsApiAccountSubscriptionResponseSingle - description: Update Subscription response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - type: object - properties: - currency: - $ref: '#/components/schemas/billSubsApiCurrency' - current_period_end: - $ref: '#/components/schemas/billSubsApiCurrentPeriodEnd' - current_period_start: - $ref: '#/components/schemas/billSubsApiCurrentPeriodStart' - frequency: - $ref: '#/components/schemas/billSubsApiFrequency' - id: - $ref: '#/components/schemas/billSubsApiSchemasIdentifier' - price: - $ref: '#/components/schemas/billSubsApiPrice' - rate_plan: - $ref: '#/components/schemas/billSubsApiRatePlan_2' - state: - $ref: '#/components/schemas/billSubsApiState' - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Update Subscription response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Subscription - tags: - - Account Subscriptions - x-api-token-group: - - Billing Write - x-cfPermissionsRequired: - enum: - - '#billing:read' - - '#billing:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: accounts - resource_chain: - - subscriptions - method: update - /accounts/{account_id}/tokens: - get: - description: List all Account Owned API tokens created for this account. - operationId: account-api-tokens-list-tokens - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: page - schema: - default: 1 - description: Page number of paginated results. - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 20 - description: Maximum number of results per page. - maximum: 50 - minimum: 5 - type: number - - in: query - name: direction - schema: - description: Direction to order results. - enum: - - asc - - desc - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamCollectionTokensResponse' - description: List Tokens response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: List Tokens response failure - security: - - api_token: [] - summary: List Tokens - tags: - - Account Owned API Tokens - x-api-token-group: - - Account API Tokens Write - - Account API Tokens Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.token.list - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: accounts - resource_chain: - - tokens - method: list - post: - description: Create a new Account Owned API token. - operationId: account-api-tokens-create-token - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/iamCreatePayload' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamSingleTokenCreateResponse' - description: Create Token response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Create Token response failure - security: - - api_token: [] - summary: Create Token - tags: - - Account Owned API Tokens - x-api-token-group: - - Account API Tokens Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.token.create - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: accounts - resource_chain: - - tokens - method: create - /accounts/{account_id}/tokens/permission_groups: - get: - description: Find all available permission groups for Account Owned API Tokens - operationId: account-api-tokens-list-permission-groups - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: >- - Filter by the name of the permission group. The value must be - URL-encoded. - in: query - name: name - schema: - type: string - - description: >- - Filter by the scope of the permission group. The value must be - URL-encoded. - in: query - name: scope - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamPermissionsGroupResponseCollection' - description: List Account Owned API Token Permission Groups response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: List Account Owned API Token Permission Groups response failure - security: - - api_token: [] - summary: List Permission Groups - tags: - - Account Owned API Tokens - x-api-token-group: - - Account API Tokens Write - - Account API Tokens Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.token.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: accounts - resource_chain: - - tokens - - permission_groups - method: list - /accounts/{account_id}/tokens/verify: - get: - description: Test whether a token works. - operationId: account-api-tokens-verify-token - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamTokenVerifyResponseSingleSegment' - description: Verify Token response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Verify Token response failure - security: - - api_token: [] - summary: Verify Token - tags: - - Account Owned API Tokens - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: accounts - resource_chain: - - tokens - method: verify - /accounts/{account_id}/tokens/{token_id}: - delete: - description: Destroy an Account Owned API token. - operationId: account-api-tokens-delete-token - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: token_id - in: path - required: true - description: The API token ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseSingleId' - description: Delete Token response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Delete Token response failure - security: - - api_token: [] - summary: Delete Token - tags: - - Account Owned API Tokens - x-api-token-group: - - Account API Tokens Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.token.delete - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: accounts - resource_chain: - - tokens - method: delete - get: - description: Get information about a specific Account Owned API token. - operationId: account-api-tokens-token-details - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: token_id - in: path - required: true - description: The API token ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamSingleTokenResponse' - description: Token Details response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Token Details response failure - security: - - api_token: [] - summary: Token Details - tags: - - Account Owned API Tokens - x-api-token-group: - - Account API Tokens Write - - Account API Tokens Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.token.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: accounts - resource_chain: - - tokens - method: get - put: - description: Update an existing token. - operationId: account-api-tokens-update-token - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: token_id - in: path - required: true - description: The API token ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/iamTokenBody' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamSingleTokenResponse' - description: Update Token response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Update Token response failure - security: - - api_token: [] - summary: Update Token - tags: - - Account Owned API Tokens - x-api-token-group: - - Account API Tokens Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.token.update - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: accounts - resource_chain: - - tokens - method: update - /accounts/{account_id}/tokens/{token_id}/value: - put: - description: Roll the Account Owned API token secret. - operationId: account-api-tokens-roll-token - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: token_id - in: path - required: true - description: The API token ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamResponseSingleValue' - description: Roll Token response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Roll Token response failure - security: - - api_token: [] - summary: Roll Token - tags: - - Account Owned API Tokens - x-api-token-group: - - Account API Tokens Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.token.update - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: accounts - resource_chain: - - tokens - - value - method: update - /accounts/{account_id}/email/routing/suppression: - get: - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: page - schema: - default: 1 - minimum: 0 - type: integer - - in: query - name: per_page - schema: - default: 100 - maximum: 1000 - minimum: 0 - type: integer - - in: query - name: order - schema: - default: created_at - enum: - - email - - expires_at - - created_at - type: string - - in: query - name: direction - schema: - default: desc - enum: - - asc - - desc - type: string - responses: - '200': - content: - application/json: - schema: - properties: - page: - type: integer - per_page: - type: integer - result: - items: - properties: - created_at: - format: date-time - type: string - readOnly: true - email: - format: email - type: string - expires_at: - format: date-time - nullable: true - type: string - id: - format: uuid - type: string - reason: - type: string - zones: - default: [] - items: - type: string - type: array - required: - - id - - email - - reason - - created_at - - expires_at - type: object - type: array - total: - type: integer - required: - - page - - per_page - - total - - result - type: object - description: Returns suppressed emails. - '400': - content: - application/json: - schema: - properties: - errors: - items: - type: string - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Bad request. - security: - - bearerAuth: [] - summary: List account or zone email suppressions - tags: [] - operationId: get_accounts_account_id_email_routing_suppression - post: - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - email: - format: email - type: string - expires_at: - format: date-time - nullable: true - type: string - required: - - email - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - id: - format: uuid - type: string - required: - - id - type: object - required: - - result - type: object - description: Returns suppression. - '400': - content: - application/json: - schema: - properties: - errors: - items: - type: string - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Bad request. - security: - - bearerAuth: [] - summary: Create account or zone email suppression - tags: [] - operationId: post_accounts_account_id_email_routing_suppression - /accounts/{account_id}/email/routing/suppression/{suppression_id}: - get: - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: suppression_id - schema: - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - created_at: - format: date-time - type: string - readOnly: true - email: - format: email - type: string - expires_at: - format: date-time - nullable: true - type: string - id: - format: uuid - type: string - reason: - type: string - zones: - default: [] - items: - type: string - type: array - required: - - id - - email - - reason - - created_at - - expires_at - type: object - required: - - result - type: object - description: Returns suppression. - '404': - content: - application/json: - schema: - properties: - error: - type: string - success: - type: boolean - required: - - success - - error - type: object - description: Suppression not found. - security: - - bearerAuth: [] - summary: Get account or zone email suppression - tags: [] - operationId: get_accounts_account_id_email_routing_suppression_suppression_id - delete: - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: suppression_id - schema: - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - success: - type: boolean - required: - - success - type: object - description: Deletes suppression. - '404': - content: - application/json: - schema: - properties: - error: - type: string - success: - type: boolean - required: - - success - - error - type: object - description: Suppression not found. - security: - - bearerAuth: [] - summary: Delete account or zone email suppression - tags: [] - operationId: delete_accounts_account_id_email_routing_suppression_suppression_id - /accounts/{account_id}/email/sending/suppression: - get: - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: page - schema: - default: 1 - minimum: 0 - type: integer - - in: query - name: per_page - schema: - default: 100 - maximum: 1000 - minimum: 0 - type: integer - - in: query - name: order - schema: - default: created_at - enum: - - email - - expires_at - - created_at - type: string - - in: query - name: direction - schema: - default: desc - enum: - - asc - - desc - type: string - responses: - '200': - content: - application/json: - schema: - properties: - page: - type: integer - per_page: - type: integer - result: - items: - properties: - created_at: - format: date-time - type: string - readOnly: true - email: - format: email - type: string - expires_at: - format: date-time - nullable: true - type: string - id: - format: uuid - type: string - reason: - type: string - zones: - default: [] - items: - type: string - type: array - required: - - id - - email - - reason - - created_at - - expires_at - type: object - type: array - total: - type: integer - required: - - page - - per_page - - total - - result - type: object - description: Returns suppressed emails. - '400': - content: - application/json: - schema: - properties: - errors: - items: - type: string - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Bad request. - security: - - bearerAuth: [] - summary: List account or zone email suppressions - tags: [] - operationId: get_accounts_account_id_email_sending_suppression - post: - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - email: - format: email - type: string - expires_at: - format: date-time - nullable: true - type: string - required: - - email - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - id: - format: uuid - type: string - required: - - id - type: object - required: - - result - type: object - description: Returns suppression. - '400': - content: - application/json: - schema: - properties: - errors: - items: - type: string - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Bad request. - security: - - bearerAuth: [] - summary: Create account or zone email suppression - tags: [] - operationId: post_accounts_account_id_email_sending_suppression - /accounts/{account_id}/email/sending/suppression/{suppression_id}: - get: - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: suppression_id - schema: - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - created_at: - format: date-time - type: string - readOnly: true - email: - format: email - type: string - expires_at: - format: date-time - nullable: true - type: string - id: - format: uuid - type: string - reason: - type: string - zones: - default: [] - items: - type: string - type: array - required: - - id - - email - - reason - - created_at - - expires_at - type: object - required: - - result - type: object - description: Returns suppression. - '404': - content: - application/json: - schema: - properties: - error: - type: string - success: - type: boolean - required: - - success - - error - type: object - description: Suppression not found. - security: - - bearerAuth: [] - summary: Get account or zone email suppression - tags: [] - operationId: get_accounts_account_id_email_sending_suppression_suppression_id - delete: - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: suppression_id - schema: - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - success: - type: boolean - required: - - success - type: object - description: Deletes suppression. - '404': - content: - application/json: - schema: - properties: - error: - type: string - success: - type: boolean - required: - - success - - error - type: object - description: Suppression not found. - security: - - bearerAuth: [] - summary: Delete account or zone email suppression - tags: [] - operationId: delete_accounts_account_id_email_sending_suppression_suppression_id -components: - schemas: - aaaAuditLogAction: - description: Provides information about the action performed. - properties: - description: - description: A short description of the action performed. - example: Add Member - type: string - result: - description: The result of the action, indicating success or failure. - example: success - type: string - time: - description: A timestamp indicating when the action was logged. - example: '2024-04-26T17:31:07Z' - format: date-time - type: string - type: - description: A short string that describes the action that was performed. - example: create - type: string - type: object - aaaAuditLogRaw: - description: Provides raw information about the request and response. - properties: - cf_ray_id: - description: The Cloudflare Ray ID for the request. - example: 8e9b1c60ef9e1c9a - type: string - method: - description: The HTTP method of the request. - example: POST - type: string - status_code: - description: The HTTP response status code returned by the API. - example: 200 - type: integer - uri: - description: The URI of the request. - example: /accounts/4bb334f7c94c4a29a045f03944f072e5/members - type: string - user_agent: - description: The client's user agent string sent with the request. - example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) Safari/605.1.15 - type: string - type: object - aaaAuditLogsV2: - properties: - account: - description: Contains account related information. - properties: - id: - description: A unique identifier for the account. - example: 4bb334f7c94c4a29a045f03944f072e5 - type: string - name: - description: A string that identifies the account name. - example: Example Account - type: string - type: object - action: - $ref: '#/components/schemas/aaaAuditLogAction' - actor: - description: Provides details about the actor who performed the action. - properties: - context: - enum: - - api_key - - api_token - - dash - - oauth - - origin_ca_key - example: dash - type: string - email: - description: The email of the actor who performed the action. - example: alice@example.com - format: email - type: string - id: - description: >- - The ID of the actor who performed the action. If a user - performed the action, this will be their User ID. - example: f6b5de0326bb5182b8a4840ee01ec774 - type: string - ip_address: - description: The IP address of the request that performed the action. - example: 198.41.129.166 - type: string - token_id: - description: >- - The API token ID when the actor context is an api_token or - oauth. - type: string - token_name: - description: >- - The API token name when the actor context is an api_token or - oauth. - type: string - type: - description: The type of actor. - enum: - - account - - cloudflare_admin - - system - - user - example: user - type: string - type: object - id: - $ref: '#/components/schemas/aaaSchemasIdentifier' - raw: - $ref: '#/components/schemas/aaaAuditLogRaw' - resource: - description: Provides details about the affected resource. - properties: - id: - description: The unique identifier for the affected resource. - type: string - product: - description: The Cloudflare product associated with the resource. - example: members - type: string - request: - type: object - response: - type: object - scope: - description: The scope of the resource. - type: object - type: - description: The type of the resource. - type: string - type: object - zone: - description: Provides details about the zone affected by the action. - properties: - id: - description: A string that identifies the zone id. - type: string - name: - description: A string that identifies the zone name. - example: example.com - type: string - type: object - type: object - aaaAuditLogsV2ResponseCollection: - properties: - errors: - $ref: '#/components/schemas/aaaSchemasMessages' - result_info: - $ref: '#/components/schemas/aaaResultInfo' - success: - description: Indicates whether the API call was successful - enum: - - true - example: true - type: boolean - result: - items: - $ref: '#/components/schemas/aaaAuditLogsV2' - type: array - type: object - aaaResultInfo: - description: >- - Provides information about the result of the request, including count - and cursor. - properties: - count: - description: The number of records returned in the response. - example: '1' - type: string - cursor: - description: The cursor token used for pagination. - example: >- - ASqdKd7dKgxh-aZ8bm0mZos1BtW4BdEqifCzNkEeGRzi_5SN_-362Y8sF-C1TRn60_6rd3z2dIajf9EAPyQ_NmIeAMkacmaJPXipqvP7PLU4t72wyqBeJfjmjdE= - type: string - type: object - aaaSchemasApiResponseCommonFailure: - properties: - errors: - description: A list of error messages. - items: - properties: - message: - description: A text description of this message. - example: No route for the URI - type: string - required: - - message - type: object - uniqueItems: true - type: array - messages: - example: [] - items: - properties: - message: - type: string - type: object - uniqueItems: true - type: array - success: - description: Indicates whether the API call was failed - enum: - - false - example: false - type: boolean - required: - - success - - errors - type: object - aaaSchemasIdentifier: - description: A unique identifier for the audit log entry. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - readOnly: true - type: string - aaaSchemasMessages: - example: [] - items: - properties: - message: - type: string - required: - - message - type: object - uniqueItems: true - type: array - billSubsApiAccountSubscriptionResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - items: - $ref: '#/components/schemas/billSubsApiSubscription' - nullable: true - type: array - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/billSubsApiResultInfo' - required: - - success - - errors - - messages - - result - billSubsApiAccountSubscriptionResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - $ref: '#/components/schemas/billSubsApiSubscription' - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - billSubsApiCurrency: - description: The monetary unit in which pricing information is displayed. - example: USD - readOnly: true - type: string - x-auditable: true - billSubsApiCurrentPeriodEnd: - description: The end of the current period and also when the next billing is due. - example: '2014-03-31T12:20:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - billSubsApiCurrentPeriodStart: - description: >- - When the current billing period started. May match initial_period_start - if this is the first period. - example: '2014-05-11T12:20:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - billSubsApiFrequency: - description: How often the subscription is renewed automatically. - enum: - - weekly - - monthly - - quarterly - - yearly - example: monthly - type: string - x-auditable: true - billSubsApiMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - billSubsApiPrice: - description: The price of the subscription that will be billed, in US dollars. - example: 20 - readOnly: true - type: number - x-auditable: true - billSubsApiRatePlan_2: - description: The rate plan applied to the subscription. - properties: - currency: - description: The currency applied to the rate plan subscription. - example: USD - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - externally_managed: - description: Whether this rate plan is managed externally from Cloudflare. - example: false - type: boolean - x-auditable: true - x-stainless-terraform-configurability: computed_optional - id: - description: The ID of the rate plan. - example: free - type: string - x-auditable: true - enum: - - free - - lite - - pro - - pro_plus - - business - - enterprise - - partners_free - - partners_pro - - partners_business - - partners_enterprise - is_contract: - description: >- - Whether a rate plan is enterprise-based (or newly adopted term - contract). - example: false - type: boolean - x-auditable: true - x-stainless-terraform-configurability: computed_optional - public_name: - description: The full name of the rate plan. - example: Business Plan - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - scope: - description: The scope that this rate plan applies to. - example: zone - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - sets: - description: >- - The list of sets this rate plan applies to. Returns array of - strings. - example: [] - items: - type: string - x-auditable: true - type: array - x-stainless-terraform-configurability: optional - type: object - billSubsApiResultInfo: - properties: - count: - description: Total number of results for the requested service - example: 1 - type: number - page: - description: Current page within paginated list of results - example: 1 - type: number - per_page: - description: Number of results per page of results - example: 20 - type: number - total_count: - description: Total results available without any search parameters - example: 2000 - type: number - type: object - billSubsApiSchemasIdentifier: - description: Subscription identifier tag. - example: 506e3185e9c882d175a2d0cb0093d9f2 - maxLength: 32 - readOnly: true - type: string - x-auditable: true - billSubsApiState: - description: The state that the subscription is in. - enum: - - Trial - - Provisioned - - Paid - - AwaitingPayment - - Cancelled - - Failed - - Expired - example: Paid - readOnly: true - type: string - x-auditable: true - billSubsApiSubscription: - type: object - $ref: '#/components/schemas/billSubsApiSubscriptionV2' - billSubsApiSubscriptionV2: - properties: - currency: - $ref: '#/components/schemas/billSubsApiCurrency' - current_period_end: - $ref: '#/components/schemas/billSubsApiCurrentPeriodEnd' - current_period_start: - $ref: '#/components/schemas/billSubsApiCurrentPeriodStart' - frequency: - $ref: '#/components/schemas/billSubsApiFrequency' - id: - $ref: '#/components/schemas/billSubsApiSchemasIdentifier' - price: - $ref: '#/components/schemas/billSubsApiPrice' - rate_plan: - $ref: '#/components/schemas/billSubsApiRatePlan_2' - state: - $ref: '#/components/schemas/billSubsApiState' - type: object - emailMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - emailSendingLimitsProperties: - properties: - quota: - description: >- - The resolved daily sending quota for the account. Null when the - quota is not yet available. - nullable: true - properties: - unit: - description: The time period for the quota. - enum: - - day - - hour - example: day - type: string - value: - description: The quota limit. - example: 1000 - type: integer - readOnly: true - type: object - type: object - emailSendingLimitsResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/emailMessages' - messages: - $ref: '#/components/schemas/emailMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/emailSendingLimitsProperties' - required: - - success - - errors - - messages - iamAccess: - description: Allow or deny operations against the resources. - enum: - - allow - - deny - example: allow - type: string - x-auditable: true - iamAccount: - properties: - created_on: - description: Timestamp for the creation of the account - example: '2014-03-01T12:21:02.0000Z' - format: date-time - readOnly: true - type: string - x-auditable: true - id: - $ref: '#/components/schemas/iamCommonComponentsSchemasIdentifier' - managed_by: - description: Parent container details - properties: - parent_org_id: - description: ID of the parent Organization, if one exists - example: 4536bcfad5faccb111b47003c79917fa - maxLength: 32 - readOnly: true - type: string - x-auditable: true - parent_org_name: - description: Name of the parent Organization, if one exists - example: Demo Parent Organization - readOnly: true - type: string - x-auditable: true - type: object - name: - description: Account name - example: Demo Account - maxLength: 100 - type: string - x-auditable: true - settings: - description: Account settings - properties: - abuse_contact_email: - description: Sets an abuse contact email to notify for abuse reports. - type: string - x-auditable: true - enforce_twofactor: - default: false - description: >- - Indicates whether membership in this account requires that - Two-Factor Authentication is enabled - type: boolean - x-auditable: true - x-stainless-terraform-configurability: computed_optional - type: object - type: - $ref: '#/components/schemas/iamAccountType' - required: - - id - - name - - type - type: object - iamAccountType: - enum: - - standard - - enterprise - type: string - iamApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/iamSchemasMessages' - messages: - example: [] - $ref: '#/components/schemas/iamSchemasMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - iamApiResponseSingleId: - type: object - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - nullable: true - properties: - id: - $ref: '#/components/schemas/iamCommonComponentsSchemasIdentifier' - required: - - id - type: object - required: - - success - - errors - - messages - iamCidrList: - description: List of IPv4/IPv6 CIDR addresses. - example: - - 199.27.128.0/21 - - 2400:cb00::/32 - items: - description: IPv4/IPv6 CIDR. - example: 199.27.128.0/21 - type: string - x-auditable: true - type: array - iamCollectionMemberResponseWithPolicies: - title: Members with Policies - type: object - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/iamResultInfo' - result: - items: - $ref: '#/components/schemas/iamMemberWithPolicies' - type: array - required: - - success - - errors - - messages - iamCollectionRoleResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/iamResultInfo' - result: - items: - $ref: '#/components/schemas/iamRole' - type: array - required: - - success - - errors - - messages - iamCollectionTokensResponse: - title: Response with a list of tokens - type: object - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/iamResultInfo' - result: - items: - $ref: '#/components/schemas/iamTokenBase' - type: array - required: - - success - - errors - - messages - iamCommonComponentsSchemasIdentifier: - description: Identifier - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - minLength: 32 - type: string - x-auditable: true - iamComponentsSchemasAccount: - $ref: '#/components/schemas/iamAccount' - iamCondition: - properties: - request_ip: - $ref: '#/components/schemas/iamRequestIp' - type: object - iamCreateAccount: - properties: - name: - description: Account name - type: string - type: - $ref: '#/components/schemas/iamAccountType' - unit: - description: >- - information related to the tenant unit, and optionally, an id of the - unit to create the account on. see - https://developers.cloudflare.com/tenant/how-to/manage-accounts/ - properties: - id: - description: Tenant unit ID - example: f267e341f3dd4697bd3b9f71dd96247f - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - type: object - x-stainless-terraform-configurability: computed_optional - required: - - name - title: Create account - type: object - iamCreateMemberPolicy: - properties: - access: - $ref: '#/components/schemas/iamAccess' - id: - $ref: '#/components/schemas/iamPolicyIdentifier' - permission_groups: - $ref: '#/components/schemas/iamMemberPermissionGroups' - resource_groups: - $ref: '#/components/schemas/iamMemberResourceGroups' - required: - - id - - access - - permission_groups - - resource_groups - title: create_member_policy - type: object - iamCreatePayload: - properties: - condition: - $ref: '#/components/schemas/iamCondition' - expires_on: - $ref: '#/components/schemas/iamExpiresOn' - name: - $ref: '#/components/schemas/iamName' - not_before: - $ref: '#/components/schemas/iamNotBefore' - policies: - $ref: '#/components/schemas/iamTokenPolicies' - required: - - name - - policies - type: object - iamEffect: - description: Allow or deny operations against the resources. - enum: - - allow - - deny - example: allow - type: string - x-auditable: true - iamEmail: - description: The contact email address of the user. - example: user@example.com - maxLength: 90 - type: string - x-auditable: true - iamExpiresOn: - description: >- - The expiration time on or after which the JWT MUST NOT be accepted for - processing. - example: '2020-01-01T00:00:00Z' - format: date-time - type: string - x-auditable: true - iamFirstName: - description: User's first name - example: John - maxLength: 60 - nullable: true - type: string - x-auditable: true - iamGrants: - example: - read: true - write: false - properties: - read: - example: true - type: boolean - x-auditable: true - write: - example: true - type: boolean - x-auditable: true - type: object - iamIssuedOn: - description: The time on which the token was created. - example: '2018-07-01T05:20:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - iamLastName: - description: User's last name - example: Appleseed - maxLength: 60 - nullable: true - type: string - x-auditable: true - iamLastUsedOn: - description: Last time the token was used. - example: '2020-01-02T12:34:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - iamListMemberPolicy: - properties: - access: - $ref: '#/components/schemas/iamAccess' - id: - $ref: '#/components/schemas/iamPolicyIdentifier' - permission_groups: - $ref: '#/components/schemas/iamPermissionGroups' - resource_groups: - $ref: '#/components/schemas/iamResourceGroups' - title: list_member_policy - type: object - iamMemberInvitationStatus: - description: >- - Status of the member invitation. If not provided during creation, - defaults to 'pending'. Changing from 'accepted' back to 'pending' will - trigger a replacement of the member resource in Terraform. - enum: - - accepted - - pending - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - iamMemberPermissionGroup: - description: A group of permissions. - properties: - id: - description: Identifier of the group. - example: c8fed203ed3043cba015a93ad1616f1f - type: string - x-auditable: true - required: - - id - type: object - iamMemberPermissionGroups: - description: A set of permission groups that are specified to the policy. - example: - - id: c8fed203ed3043cba015a93ad1616f1f - - id: 82e64a83756745bbbb1c9c2701bf816b - items: - $ref: '#/components/schemas/iamMemberPermissionGroup' - type: array - iamMemberResourceGroup: - description: A group of scoped resources. - properties: - id: - description: Identifier of the group. - example: 6d7f2f5f5b1d4a0e9081fdc98d432fd1 - type: string - x-auditable: true - required: - - id - type: object - iamMemberResourceGroups: - description: A list of resource groups that the policy applies to. - items: - $ref: '#/components/schemas/iamMemberResourceGroup' - type: array - iamMemberWithPolicies: - properties: - email: - $ref: '#/components/schemas/iamEmail' - id: - $ref: '#/components/schemas/iamMembershipComponentsSchemasIdentifier' - policies: - description: Access policy for the membership - items: - $ref: '#/components/schemas/iamListMemberPolicy' - type: array - roles: - description: Roles assigned to this Member. - items: - $ref: '#/components/schemas/iamRole' - type: array - status: - description: A member's status in the account. - enum: - - accepted - - pending - example: accepted - readOnly: true - x-auditable: true - type: string - user: - description: Details of the user associated to the membership. - properties: - email: - $ref: '#/components/schemas/iamEmail' - first_name: - $ref: '#/components/schemas/iamFirstName' - id: - $ref: '#/components/schemas/iamCommonComponentsSchemasIdentifier' - last_name: - $ref: '#/components/schemas/iamLastName' - two_factor_authentication_enabled: - $ref: '#/components/schemas/iamTwoFactorAuthenticationEnabled' - readOnly: true - required: - - email - type: object - type: object - iamMembershipComponentsSchemasIdentifier: - description: Membership identifier tag. - example: 4536bcfad5faccb111b47003c79917fa - maxLength: 32 - readOnly: true - type: string - x-auditable: true - iamModifiedOn: - description: Last time the token was modified. - example: '2018-07-02T05:20:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - iamName: - description: Token name. - example: readonly token - maxLength: 120 - type: string - x-auditable: true - iamNotBefore: - description: The time before which the token MUST NOT be accepted for processing. - example: '2018-07-01T05:20:00Z' - format: date-time - type: string - x-auditable: true - iamPermissionGroup: - description: >- - A named group of permissions that map to a group of operations against - resources. - properties: - id: - description: Identifier of the permission group. - example: 6d7f2f5f5b1d4a0e9081fdc98d432fd1 - type: string - x-auditable: true - meta: - description: Attributes associated to the permission group. - example: - label: load_balancer_admin - scopes: com.cloudflare.api.account - properties: - key: - type: string - x-auditable: true - value: - type: string - x-auditable: true - type: object - name: - description: Name of the permission group. - example: Load Balancer - readOnly: true - type: string - x-auditable: true - required: - - id - type: object - iamPermissionGroups: - description: A set of permission groups that are specified to the policy. - example: - - id: c8fed203ed3043cba015a93ad1616f1f - meta: - label: load_balancer_admin - scopes: com.cloudflare.api.account - name: Zone Read - - id: 82e64a83756745bbbb1c9c2701bf816b - meta: - label: fbm_user - scopes: com.cloudflare.api.account - name: Magic Network Monitoring - items: - $ref: '#/components/schemas/iamPermissionGroup' - type: array - iamPermissions: - example: - analytics: - read: true - write: false - zones: - read: true - write: true - properties: - analytics: - $ref: '#/components/schemas/iamGrants' - billing: - $ref: '#/components/schemas/iamGrants' - cache_purge: - $ref: '#/components/schemas/iamGrants' - dns: - $ref: '#/components/schemas/iamGrants' - dns_records: - $ref: '#/components/schemas/iamGrants' - lb: - $ref: '#/components/schemas/iamGrants' - logs: - $ref: '#/components/schemas/iamGrants' - organization: - $ref: '#/components/schemas/iamGrants' - ssl: - $ref: '#/components/schemas/iamGrants' - waf: - $ref: '#/components/schemas/iamGrants' - zone_settings: - $ref: '#/components/schemas/iamGrants' - zones: - $ref: '#/components/schemas/iamGrants' - type: object - iamPermissionsGroupResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/iamResultInfo' - result: - example: - - id: 7cf72faf220841aabcfdfab81c43c4f6 - name: Billing Read - scopes: - - com.cloudflare.api.account - - id: 9d24387c6e8544e2bc4024a03991339f - name: 'Load Balancing: Monitors and Pools Read' - scopes: - - com.cloudflare.api.account - - id: d2a1802cc9a34e30852f8b33869b2f3c - name: 'Load Balancing: Monitors and Pools Write' - scopes: - - com.cloudflare.api.account - - id: 8b47d2786a534c08a1f94ee8f9f599ef - name: Workers KV Storage Read - scopes: - - com.cloudflare.api.account - - id: f7f0eda5697f475c90846e879bab8666 - name: Workers KV Storage Write - scopes: - - com.cloudflare.api.account - - id: 1a71c399035b4950a1bd1466bbe4f420 - name: Workers Scripts Read - scopes: - - com.cloudflare.api.account - - id: e086da7e2179491d91ee5f35b3ca210a - name: Workers Scripts Write - scopes: - - com.cloudflare.api.account - items: - $ref: >- - #/components/schemas/iamPermissionsGroupResponseCollection_result_item - type: array - required: - - success - - errors - - messages - iamPermissionsGroupResponseCollection_result_item: - properties: - id: - description: Public ID. - type: string - x-auditable: true - name: - description: Permission Group Name - type: string - x-auditable: true - scopes: - description: Resources to which the Permission Group is scoped - items: - enum: - - com.cloudflare.api.account - - com.cloudflare.api.account.zone - - com.cloudflare.api.user - - com.cloudflare.edge.r2.bucket - type: string - x-auditable: true - type: array - type: object - iamPolicyIdentifier: - description: Policy identifier. - example: f267e341f3dd4697bd3b9f71dd96247f - readOnly: true - type: string - x-auditable: true - x-stainless-terraform-always-send: true - iamPolicyWithPermissionGroupsAndResources: - properties: - effect: - $ref: '#/components/schemas/iamEffect' - id: - $ref: '#/components/schemas/iamPolicyIdentifier' - permission_groups: - $ref: '#/components/schemas/iamPermissionGroups' - resources: - $ref: '#/components/schemas/iamResources' - required: - - id - - effect - - permission_groups - - resources - title: Policy with Permission Groups and Resources - type: object - iamRequestIp: - description: Client IP restrictions. - example: - in: - - 123.123.123.0/24 - - 2606:4700::/32 - not_in: - - 123.123.123.100/24 - - 2606:4700:4700::/48 - properties: - in: - $ref: '#/components/schemas/iamCidrList' - not_in: - $ref: '#/components/schemas/iamCidrList' - type: object - iamResourceGroup: - description: A group of scoped resources. - properties: - id: - description: Identifier of the resource group. - example: 6d7f2f5f5b1d4a0e9081fdc98d432fd1 - readOnly: true - type: string - x-auditable: true - meta: - description: Attributes associated to the resource group. - example: - editable: 'false' - properties: - key: - type: string - value: - type: string - type: object - name: - description: Name of the resource group. - example: com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4 - readOnly: true - type: string - x-auditable: true - scope: - description: The scope associated to the resource group - items: - $ref: '#/components/schemas/iamScope' - type: array - required: - - id - - scope - type: object - iamResourceGroups: - description: A list of resource groups that the policy applies to. - items: - $ref: '#/components/schemas/iamResourceGroup' - type: array - iamResources: - description: A list of resource names that the policy applies to. - x-auditable: true - type: object - iamResponseCollectionAccounts: - title: Response with a list of accounts - type: object - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/iamResultInfo' - result: - items: - $ref: '#/components/schemas/iamAccount' - type: array - required: - - success - - errors - - messages - iamResponseSingleAccount: - title: Response with a single account - type: object - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/iamAccount' - required: - - success - - errors - - messages - iamResponseSingleValue: - type: object - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/iamValue' - required: - - success - - errors - - messages - iamResultInfo: - properties: - count: - description: Total number of results for the requested service - example: 1 - type: number - page: - description: Current page within paginated list of results - example: 1 - type: number - per_page: - description: Number of results per page of results - example: 20 - type: number - total_count: - description: Total results available without any search parameters - example: 2000 - type: number - type: object - iamRole: - properties: - description: - description: Description of role's permissions. - example: Administrative access to the entire Account - readOnly: true - type: string - x-auditable: true - id: - $ref: '#/components/schemas/iamRoleComponentsSchemasIdentifier' - name: - description: Role name. - example: Account Administrator - maxLength: 120 - readOnly: true - type: string - x-auditable: true - permissions: - $ref: '#/components/schemas/iamPermissions' - readOnly: true - required: - - id - - name - - description - - permissions - type: object - iamRoleComponentsSchemasIdentifier: - description: Role identifier tag. - example: 3536bcfad5faccb999b47003c79917fb - maxLength: 32 - type: string - x-auditable: true - iamSchemasMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - iamScope: - description: >- - A scope is a combination of scope objects which provides additional - context. - properties: - key: - $ref: '#/components/schemas/iamScopeKey' - objects: - description: A list of scope objects for additional context. - items: - $ref: '#/components/schemas/iamScopeObject' - type: array - required: - - key - - objects - type: object - iamScopeKey: - description: >- - This is a combination of pre-defined resource name and identifier (like - Account ID etc.) - example: com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4 - readOnly: true - x-auditable: true - type: string - iamScopeObject: - description: >- - A scope object represents any resource that can have actions applied - against invite. - properties: - key: - $ref: '#/components/schemas/iamScopeObjectKey' - required: - - key - type: object - iamScopeObjectKey: - description: >- - This is a combination of pre-defined resource name and identifier (like - Zone ID etc.) - example: com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5 - readOnly: true - x-auditable: true - type: string - iamSingleMemberResponseWithPolicies: - title: Response with Policies - type: object - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/iamMemberWithPolicies' - required: - - success - - errors - - messages - iamSingleRoleResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/iamRole' - required: - - success - - errors - - messages - iamSingleTokenCreateResponse: - title: Response of a create request with a single token - type: object - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/iamTokenWithValue' - required: - - success - - errors - - messages - iamSingleTokenResponse: - title: Response with a single token - type: object - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/iamTokenBase' - required: - - success - - errors - - messages - iamTokenBase: - properties: - condition: - $ref: '#/components/schemas/iamCondition' - expires_on: - $ref: '#/components/schemas/iamExpiresOn' - id: - $ref: '#/components/schemas/iamTokenIdentifier' - issued_on: - $ref: '#/components/schemas/iamIssuedOn' - last_used_on: - $ref: '#/components/schemas/iamLastUsedOn' - modified_on: - $ref: '#/components/schemas/iamModifiedOn' - readOnly: true - name: - $ref: '#/components/schemas/iamName' - not_before: - $ref: '#/components/schemas/iamNotBefore' - policies: - $ref: '#/components/schemas/iamTokenPolicies' - status: - $ref: '#/components/schemas/iamTokenStatus' - type: object - iamTokenBody: - title: Token defined in a request body - $ref: '#/components/schemas/iamTokenBase' - type: object - iamTokenIdentifier: - description: Token identifier tag. - example: ed17574386854bf78a67040be0a770b0 - maxLength: 32 - readOnly: true - type: string - x-auditable: true - iamTokenPolicies: - description: List of access policies assigned to the token. - items: - $ref: '#/components/schemas/iamPolicyWithPermissionGroupsAndResources' - type: array - iamTokenStatus: - description: Status of the token. - enum: - - active - - disabled - - expired - example: active - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - iamTokenVerifyResponseSingleSegment: - type: object - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - properties: - expires_on: - $ref: '#/components/schemas/iamExpiresOn' - id: - $ref: '#/components/schemas/iamTokenIdentifier' - not_before: - $ref: '#/components/schemas/iamNotBefore' - status: - $ref: '#/components/schemas/iamTokenStatus' - required: - - id - - status - type: object - required: - - success - - errors - - messages - iamTokenWithValue: - title: Create token response, with the token value - properties: - condition: - $ref: '#/components/schemas/iamCondition' - expires_on: - $ref: '#/components/schemas/iamExpiresOn' - id: - $ref: '#/components/schemas/iamTokenIdentifier' - issued_on: - $ref: '#/components/schemas/iamIssuedOn' - last_used_on: - $ref: '#/components/schemas/iamLastUsedOn' - modified_on: - $ref: '#/components/schemas/iamModifiedOn' - readOnly: true - name: - $ref: '#/components/schemas/iamName' - not_before: - $ref: '#/components/schemas/iamNotBefore' - policies: - $ref: '#/components/schemas/iamTokenPolicies' - status: - $ref: '#/components/schemas/iamTokenStatus' - value: - $ref: '#/components/schemas/iamValue' - type: object - iamTwoFactorAuthenticationEnabled: - default: false - description: >- - Indicates whether two-factor authentication is enabled for the user - account. Does not apply to API authentication. - readOnly: true - type: boolean - iamValue: - description: The token value. - example: 8M7wS6hCpXVc-DoRnPPY_UCWPgy8aea4Wy6kCe5T - maxLength: 80 - minLength: 40 - readOnly: true - type: string - x-sensitive: true - organizationsApiBatchAccountMoveResponse: - properties: - statuses: - properties: - message: - type: string - moved: - type: boolean - tag: - type: string - required: - - tag - - moved - type: object - required: - - statuses - type: object - organizationsApiMoveAccountResponse: - properties: - account_id: - type: string - destination_organization_id: - type: string - source_organization_id: - type: string - required: - - account_id - - source_organization_id - - destination_organization_id - type: object - organizationsApiV4ErrorResponse: - properties: - errors: - items: - $ref: '#/components/schemas/organizationsApiV4Message' - type: array - messages: - items: - $ref: '#/components/schemas/organizationsApiV4Message' - type: array - result: - type: object - success: - enum: - - false - type: boolean - required: - - success - - errors - - messages - type: object - organizationsApiV4Message: - $ref: '#/components/schemas/responseInfo' - responseInfo: - properties: - code: - minimum: 1000 - type: integer - message: - type: string - documentation_url: - type: string - source: - type: object - properties: - pointer: - type: string - required: - - code - - message - type: object - uniqueItems: true - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - accounts: - id: cloudflare.accounts.accounts - name: accounts - title: Accounts - methods: - list: - operation: - $ref: '#/paths/~1accounts/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts/post' - response: - mediaType: application/json - openAPIDocKey: '200' - accounts_batch_move_accounts: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1move/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: '#/paths/~1accounts~1{account_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1accounts~1{account_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - accounts_move_accounts: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1move/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/accounts/methods/get' - - $ref: '#/components/x-stackQL-resources/accounts/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/accounts/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/accounts/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/accounts/methods/update' - feedback: - id: cloudflare.accounts.feedback - name: feedback - title: Feedback - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1email~1sending~1feedback/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/feedback/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - limits: - id: cloudflare.accounts.limits - name: limits - title: Limits - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1email~1sending~1limits/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/limits/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - audit: - id: cloudflare.accounts.audit - name: audit - title: Audit - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1logs~1audit/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/audit/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - members: - id: cloudflare.accounts.members - name: members - title: Members - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1members/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1members/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1members~1{member_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1members~1{member_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1members~1{member_id}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/members/methods/get' - - $ref: '#/components/x-stackQL-resources/members/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/members/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/members/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/members/methods/update' - roles: - id: cloudflare.accounts.roles - name: roles - title: Roles - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1roles/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - get: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1roles~1{role_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/roles/methods/get' - - $ref: '#/components/x-stackQL-resources/roles/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - subscriptions: - id: cloudflare.accounts.subscriptions - name: subscriptions - title: Subscriptions - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1subscriptions/get' - response: - mediaType: application/json - openAPIDocKey: '200' - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1subscriptions/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1subscriptions~1{subscription_identifier}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1subscriptions~1{subscription_identifier}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/subscriptions/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/subscriptions/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/subscriptions/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/subscriptions/methods/update' - account_tokens: - id: cloudflare.accounts.account_tokens - name: account_tokens - title: Account Tokens - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1tokens/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/account_tokens/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - tokens: - id: cloudflare.accounts.tokens - name: tokens - title: Tokens - methods: - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1tokens/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1tokens~1{token_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1tokens~1{token_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1tokens~1{token_id}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - roll_token: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1tokens~1{token_id}~1value/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/tokens/methods/get' - insert: - - $ref: '#/components/x-stackQL-resources/tokens/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/tokens/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/tokens/methods/update' - permission_groups: - id: cloudflare.accounts.permission_groups - name: permission_groups - title: Permission Groups - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1tokens~1permission_groups/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/permission_groups/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - tokens_verify: - id: cloudflare.accounts.tokens_verify - name: tokens_verify - title: Tokens Verify - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1tokens~1verify/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/tokens_verify/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - routing_suppression: - id: cloudflare.accounts.routing_suppression - name: routing_suppression - title: Routing Suppression - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1email~1routing~1suppression/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - post_accounts_account_id_email_routing_suppression: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1email~1routing~1suppression/post' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email~1routing~1suppression~1{suppression_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - delete_accounts_account_id_email_routing_suppression_suppression_id: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email~1routing~1suppression~1{suppression_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/routing_suppression/methods/get' - - $ref: '#/components/x-stackQL-resources/routing_suppression/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/routing_suppression/methods/post_accounts_account_id_email_routing_suppression - update: [] - delete: - - $ref: >- - #/components/x-stackQL-resources/routing_suppression/methods/delete_accounts_account_id_email_routing_suppression_suppression_id - replace: [] - sending_suppression: - id: cloudflare.accounts.sending_suppression - name: sending_suppression - title: Sending Suppression - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1email~1sending~1suppression/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - post_accounts_account_id_email_sending_suppression: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1email~1sending~1suppression/post' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email~1sending~1suppression~1{suppression_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - delete_accounts_account_id_email_sending_suppression_suppression_id: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email~1sending~1suppression~1{suppression_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/sending_suppression/methods/get' - - $ref: '#/components/x-stackQL-resources/sending_suppression/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/sending_suppression/methods/post_accounts_account_id_email_sending_suppression - update: [] - delete: - - $ref: >- - #/components/x-stackQL-resources/sending_suppression/methods/delete_accounts_account_id_email_sending_suppression_suppression_id - replace: [] +openapi: 3.0.3 +info: + title: accounts API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts: + get: + description: List all accounts you have ownership or verified access to. + operationId: accounts-list-accounts + parameters: + - in: query + name: name + schema: + description: Name of the account. + type: string + - in: query + name: page + schema: + default: 1 + description: Page number of paginated results. + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 20 + description: Maximum number of results per page. + maximum: 50 + minimum: 5 + type: number + - in: query + name: direction + schema: + description: Direction to order results. + enum: + - asc + - desc + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamResponseCollectionAccounts' + description: List Accounts response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: List Accounts response failure + security: + - api_email: [] + api_key: [] + summary: List Accounts + tags: + - Accounts + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: accounts + resource_chain: [] + method: list + post: + description: Create an account (only available for tenant admins at this time) + operationId: account-creation + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/iamCreateAccount' + description: Parameters for account creation + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamResponseSingleAccount' + description: Account Creation Success Response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Account Creation Failure Response + security: + - api_email: [] + api_key: [] + summary: Create an account + tags: + - Accounts + x-cfPlanAvailability: + business: false + enterprise: false + free: false + pro: false + x-stackql-sdk: + service: accounts + resource_chain: [] + method: create + /accounts/move: + post: + description: "Batch move a collection of accounts to a specific organization. \u26A0\uFE0F Not implemented." + operationId: Accounts_batchMoveAccounts + requestBody: + content: + application/json: + schema: + properties: + account_ids: + description: Move these accounts to the destination organization. + items: + type: string + type: array + destination_organization_id: + description: Move accounts to this organization ID. + type: string + required: + - account_ids + - destination_organization_id + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + type: object + maxItems: 0 + type: array + messages: + items: + $ref: '#/components/schemas/organizationsApiV4Message' + type: array + result: + $ref: '#/components/schemas/organizationsApiBatchAccountMoveResponse' + success: + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: The request has succeeded. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/organizationsApiV4ErrorResponse' + description: An unexpected error response. + security: + - api_email: [] + api_key: [] + summary: Batch move accounts + tags: + - Accounts + /accounts/{account_id}: + delete: + description: Delete a specific account (only available for tenant admins at this time). This is a permanent operation that will delete any zones or other resources under the account + operationId: account-deletion + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseSingleId' + description: Account Deletion Success Response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Account Deletion Failure Response + security: + - api_email: [] + api_key: [] + summary: Delete a specific account + tags: + - Accounts + x-api-token-group: + - Account Settings Write + x-cfPermissionsRequired: + enum: + - '#organization:edit' + x-cfPlanAvailability: + business: false + enterprise: false + free: false + pro: false + x-stackql-sdk: + service: accounts + resource_chain: [] + method: delete + get: + description: Get information about a specific account that you are a member of. + operationId: accounts-account-details + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamResponseSingleAccount' + description: Account Details response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Account Details response failure + security: + - api_email: [] + api_key: [] + summary: Account Details + tags: + - Accounts + x-api-token-group: + - Trust and Safety Write + - Trust and Safety Read + - DNS View Write + - DNS View Read + - SCIM Provisioning + - Load Balancers Account Write + - Load Balancers Account Read + - 'Zero Trust: PII Read' + - DDoS Botnet Feed Write + - DDoS Botnet Feed Read + - Workers R2 Storage Write + - Workers R2 Storage Read + - DDoS Protection Write + - DDoS Protection Read + - Workers Tail Read + - Workers KV Storage Write + - Workers KV Storage Read + - Workers Scripts Write + - Workers Scripts Read + - 'Load Balancing: Monitors and Pools Write' + - 'Load Balancing: Monitors and Pools Read' + - Account Firewall Access Rules Write + - Account Firewall Access Rules Read + - DNS Firewall Write + - DNS Firewall Read + - Billing Write + - Billing Read + - Account Settings Write + - Account Settings Read + x-cfPermissionsRequired: + enum: + - '#organization:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: accounts + resource_chain: [] + method: get + put: + description: Update an existing account. + operationId: accounts-update-account + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/iamComponentsSchemasAccount' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamResponseSingleAccount' + description: Update Account response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Update Account response failure + security: + - api_email: [] + api_key: [] + summary: Update Account + tags: + - Accounts + x-api-token-group: + - Account Settings Write + x-cfPermissionsRequired: + enum: + - '#organization:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: accounts + resource_chain: [] + method: update + /accounts/{account_id}/email/sending/feedback: + get: + operationId: get_publicFeedbackStatus + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: start_at + schema: + format: date-time + type: string + - in: query + name: end_at + schema: + format: date-time + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + count: + type: number + end_at: + format: date-time + type: string + start_at: + format: date-time + type: string + required: + - count + - start_at + - end_at + type: object + required: + - result + type: object + description: Returns feedback statistics. + security: + - bearerAuth: [] + summary: Get feedback emails statistics + tags: + - Public + /accounts/{account_id}/email/sending/limits: + get: + description: Returns the current daily sending quota for the account. Null when the quota is not yet available. + operationId: email-sending-get-sending-limits + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/emailSendingLimitsResponseSingle' + description: Get sending limits response + security: + - api_email: [] + api_key: [] + summary: Get sending limits + tags: + - Email Sending + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.email.sending.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/logs/audit: + get: + description: Gets a list of audit logs for an account. + operationId: audit-logs-v2-get-account-audit-logs + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: account_name + schema: + description: Filters by the account name. + items: + type: string + type: array + explode: true + - in: query + name: action_result + schema: + description: Filters by whether the action was successful or not. + items: + enum: + - success + - failure + type: string + type: array + explode: true + - in: query + name: action_type + schema: + description: Filters by the action type. + items: + enum: + - create + - delete + - view + - update + type: string + type: array + explode: true + - in: query + name: actor_context + schema: + description: Filters by the actor context. + items: + enum: + - api_key + - api_token + - dash + - oauth + - origin_ca_key + type: string + type: array + explode: true + - in: query + name: actor_email + schema: + description: Filters by the actor's email address. + items: + format: email + type: string + type: array + explode: true + - in: query + name: actor_id + schema: + description: Filters by the actor ID. This can be either the Account ID or User ID. + items: + type: string + type: array + explode: true + - in: query + name: actor_ip_address + schema: + description: The IP address where the action was initiated. + items: + type: string + type: array + explode: true + - in: query + name: actor_token_id + schema: + description: Filters by the API token ID when the actor context is an api_token or oauth. + items: + type: string + type: array + explode: true + - in: query + name: actor_token_name + schema: + description: Filters by the API token name when the actor context is an api_token or oauth. + items: + type: string + type: array + explode: true + - in: query + name: actor_type + schema: + description: Filters by the actor type. + items: + enum: + - account + - cloudflare_admin + - system + - user + type: string + type: array + explode: true + - in: query + name: audit_log_id + schema: + deprecated: true + description: Finds a specific log by its ID. + items: + type: string + type: array + explode: true + - in: query + name: id + schema: + description: Finds a specific log by its ID. + items: + type: string + type: array + explode: true + - in: query + name: raw_cf_ray_id + schema: + description: Filters by the response CF Ray ID. + items: + type: string + type: array + explode: true + - in: query + name: raw_method + schema: + description: The HTTP method for the API call. + items: + type: string + type: array + explode: true + - in: query + name: raw_status_code + schema: + description: The response status code that was returned. + items: + type: integer + type: array + explode: true + - in: query + name: raw_uri + schema: + description: Filters by the request URI. + items: + type: string + type: array + explode: true + - in: query + name: resource_id + schema: + description: Filters by the resource ID. + items: + type: string + type: array + explode: true + - in: query + name: resource_product + schema: + description: Filters audit logs by the Cloudflare product associated with the changed resource. + items: + type: string + type: array + explode: true + - in: query + name: resource_type + schema: + description: Filters audit logs based on the unique type of resource changed by the action. + items: + type: string + type: array + explode: true + - in: query + name: resource_scope + schema: + description: Filters by the resource scope, specifying whether the resource is associated with an user, an account, a zone, or a membership. + items: + enum: + - accounts + - user + - zones + - memberships + type: string + type: array + explode: true + - in: query + name: zone_id + schema: + description: Filters by the zone ID. + items: + type: string + type: array + explode: true + - in: query + name: zone_name + schema: + description: Filters by the zone name associated with the change. + items: + type: string + type: array + explode: true + - in: query + name: account_name.not + schema: + description: Filters out audit logs by the account name. + items: + type: string + type: array + explode: true + - in: query + name: action_result.not + schema: + description: Filters out audit logs by whether the action was successful or not. + items: + enum: + - success + - failure + type: string + type: array + explode: true + - in: query + name: action_type.not + schema: + description: Filters out audit logs by the action type. + items: + enum: + - create + - delete + - view + - update + type: string + type: array + explode: true + - in: query + name: actor_context.not + schema: + description: Filters out audit logs by the actor context. + items: + enum: + - api_key + - api_token + - dash + - oauth + - origin_ca_key + type: string + type: array + explode: true + - in: query + name: actor_email.not + schema: + description: Filters out audit logs by the actor's email address. + items: + format: email + type: string + type: array + explode: true + - in: query + name: actor_id.not + schema: + description: Filters out audit logs by the actor ID. This can be either the Account ID or User ID. + items: + type: string + type: array + explode: true + - in: query + name: actor_ip_address.not + schema: + description: Filters out audit logs IP address where the action was initiated. + items: + type: string + type: array + explode: true + - in: query + name: actor_token_id.not + schema: + description: Filters out audit logs by the API token ID when the actor context is an api_token or oauth. + items: + type: string + type: array + explode: true + - in: query + name: actor_token_name.not + schema: + description: Filters out audit logs by the API token name when the actor context is an api_token or oauth. + items: + type: string + type: array + explode: true + - in: query + name: actor_type.not + schema: + description: Filters out audit logs by the actor type. + items: + enum: + - account + - cloudflare_admin + - system + - user + type: string + type: array + explode: true + - in: query + name: audit_log_id.not + schema: + deprecated: true + description: Filters out audit logs by their IDs. + items: + type: string + type: array + explode: true + - in: query + name: id.not + schema: + description: Filters out audit logs by their IDs. + items: + type: string + type: array + explode: true + - in: query + name: raw_cf_ray_id.not + schema: + description: Filters out audit logs by the response CF Ray ID. + items: + type: string + type: array + explode: true + - in: query + name: raw_method.not + schema: + description: Filters out audit logs by the HTTP method for the API call. + items: + type: string + type: array + explode: true + - in: query + name: raw_status_code.not + schema: + description: Filters out audit logs by the response status code that was returned. + items: + type: integer + type: array + explode: true + - in: query + name: raw_uri.not + schema: + description: Filters out audit logs by the request URI. + items: + type: string + type: array + explode: true + - in: query + name: resource_id.not + schema: + description: Filters out audit logs by the resource ID. + items: + type: string + type: array + explode: true + - in: query + name: resource_product.not + schema: + description: Filters out audit logs by the Cloudflare product associated with the changed resource. + items: + type: string + type: array + explode: true + - in: query + name: resource_type.not + schema: + description: Filters out audit logs based on the unique type of resource changed by the action. + items: + type: string + type: array + explode: true + - in: query + name: resource_scope.not + schema: + description: Filters out audit logs by the resource scope, specifying whether the resource is associated with an user, an account, a zone, or a membership. + items: + enum: + - accounts + - user + - zones + - memberships + type: string + type: array + explode: true + - in: query + name: zone_id.not + schema: + description: Filters out audit logs by the zone ID. + items: + type: string + type: array + explode: true + - in: query + name: zone_name.not + schema: + description: Filters out audit logs by the zone name associated with the change. + items: + type: string + type: array + explode: true + - description: Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339. + in: query + name: since + schema: + format: date + type: string + - description: Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339. + in: query + name: before + schema: + format: date + type: string + - in: query + name: direction + schema: + default: desc + description: Sets sorting order. + enum: + - desc + - asc + type: string + - in: query + name: limit + schema: + default: 100 + description: The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit. + maximum: 1000 + minimum: 1 + type: number + - in: query + name: cursor + schema: + description: The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result_info structure of a previous response. + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/aaaAuditLogsV2ResponseCollection' + description: Get account audit logs successful response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/aaaSchemasApiResponseCommonFailure' + description: Get account audit logs failed response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get account audit logs (Version 2) + tags: + - Audit Logs + x-api-token-group: + - Account Settings Write + - Account Settings Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: accounts + resource_chain: + - logs + - audit + method: list + /accounts/{account_id}/members: + get: + description: List all members of an account. + operationId: account-members-list-members + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: order + schema: + description: Field to order results by. + enum: + - user.first_name + - user.last_name + - user.email + - status + type: string + - in: query + name: status + schema: + description: A member's status in the account. + enum: + - accepted + - pending + - rejected + type: string + - in: query + name: page + schema: + default: 1 + description: Page number of paginated results. + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 20 + description: Maximum number of results per page. + maximum: 50 + minimum: 5 + type: number + - in: query + name: direction + schema: + description: Direction to order results. + enum: + - asc + - desc + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamCollectionMemberResponseWithPolicies' + description: List Members response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: List Members response failure + security: + - api_email: [] + api_key: [] + summary: List Members + tags: + - Account Members + x-api-token-group: + - SCIM Provisioning + - Account Settings Write + - Account Settings Read + x-cfPermissionsRequired: + enum: + - '#organization:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: accounts + resource_chain: + - members + method: list + post: + description: Add a user to the list of members for this account. + operationId: account-members-add-member + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Add Member with Account Roles + properties: + email: + $ref: '#/components/schemas/iamEmail' + roles: + description: Array of roles associated with this member. + items: + $ref: '#/components/schemas/iamRoleComponentsSchemasIdentifier' + type: array + status: + $ref: '#/components/schemas/iamMemberInvitationStatus' + policies: + description: Array of policies associated with this member. + items: + properties: + access: + $ref: '#/components/schemas/iamAccess' + id: + $ref: '#/components/schemas/iamPolicyIdentifier' + permission_groups: + $ref: '#/components/schemas/iamMemberPermissionGroups' + resource_groups: + $ref: '#/components/schemas/iamMemberResourceGroups' + required: + - access + - permission_groups + - resource_groups + title: create_member_policy + type: object + type: array + required: + - email + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamSingleMemberResponseWithPolicies' + description: Add Member response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Add Member response failure + security: + - api_email: [] + api_key: [] + summary: Add Member + tags: + - Account Members + x-api-token-group: + - SCIM Provisioning + - Account Settings Write + x-cfPermissionsRequired: + enum: + - '#organization:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: accounts + resource_chain: + - members + method: create + /accounts/{account_id}/members/{member_id}: + delete: + description: Remove a member from an account. + operationId: account-members-remove-member + parameters: + - name: member_id + in: path + required: true + description: The account member ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseSingleId' + description: Remove Member response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Remove Member response failure + security: + - api_email: [] + api_key: [] + summary: Remove Member + tags: + - Account Members + x-api-token-group: + - SCIM Provisioning + - Account Settings Write + x-cfPermissionsRequired: + enum: + - '#organization:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: accounts + resource_chain: + - members + method: delete + get: + description: Get information about a specific member of an account. + operationId: account-members-member-details + parameters: + - name: member_id + in: path + required: true + description: The account member ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamSingleMemberResponseWithPolicies' + description: Member Details response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Member Details response failure + security: + - api_email: [] + api_key: [] + summary: Member Details + tags: + - Account Members + x-api-token-group: + - SCIM Provisioning + - Account Settings Write + - Account Settings Read + x-cfPermissionsRequired: + enum: + - '#organization:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: accounts + resource_chain: + - members + method: get + put: + description: Modify an account member. + operationId: account-members-update-member + parameters: + - name: member_id + in: path + required: true + description: The account member ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Update Member with Account Roles + properties: + id: + $ref: '#/components/schemas/iamMembershipComponentsSchemasIdentifier' + roles: + description: Roles assigned to this member. + items: + properties: + description: + description: Description of role's permissions. + readOnly: true + type: string + x-auditable: true + id: + $ref: '#/components/schemas/iamRoleComponentsSchemasIdentifier' + name: + description: Role name. + maxLength: 120 + readOnly: true + type: string + x-auditable: true + permissions: + $ref: '#/components/schemas/iamPermissions' + readOnly: true + required: + - id + type: object + type: array + status: + description: A member's status in the account. + enum: + - accepted + - pending + readOnly: true + x-auditable: true + type: string + user: + description: Details of the user associated to the membership. + properties: + email: + $ref: '#/components/schemas/iamEmail' + first_name: + $ref: '#/components/schemas/iamFirstName' + id: + $ref: '#/components/schemas/iamCommonComponentsSchemasIdentifier' + last_name: + $ref: '#/components/schemas/iamLastName' + two_factor_authentication_enabled: + $ref: '#/components/schemas/iamTwoFactorAuthenticationEnabled' + readOnly: true + required: + - email + type: object + policies: + description: Array of policies associated with this member. + items: + properties: + access: + $ref: '#/components/schemas/iamAccess' + id: + $ref: '#/components/schemas/iamPolicyIdentifier' + permission_groups: + $ref: '#/components/schemas/iamMemberPermissionGroups' + resource_groups: + $ref: '#/components/schemas/iamMemberResourceGroups' + required: + - access + - permission_groups + - resource_groups + title: create_member_policy + type: object + type: array + required: + - policies + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamSingleMemberResponseWithPolicies' + description: Update Member response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Update Member response failure + security: + - api_email: [] + api_key: [] + summary: Update Member + tags: + - Account Members + x-api-token-group: + - SCIM Provisioning + - Account Settings Write + x-cfPermissionsRequired: + enum: + - '#organization:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: accounts + resource_chain: + - members + method: update + /accounts/{account_id}/move: + post: + description: Move an account within an organization hierarchy or an account outside an organization. (Currently in Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/) + operationId: Accounts_moveAccounts + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + destination_organization_id: + type: string + required: + - destination_organization_id + type: object + description: The destination organization ID is where the account is to be moved. + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + type: object + maxItems: 0 + type: array + messages: + items: + $ref: '#/components/schemas/organizationsApiV4Message' + type: array + result: + $ref: '#/components/schemas/organizationsApiMoveAccountResponse' + success: + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: The request has succeeded. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/organizationsApiV4ErrorResponse' + description: An unexpected error response. + security: + - api_email: [] + api_key: [] + summary: Move account + tags: + - Accounts + x-api-token-group: null + /accounts/{account_id}/roles: + get: + description: Get all available roles for an account. + operationId: account-roles-list-roles + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: page + schema: + default: 1 + description: Page number of paginated results. + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 20 + description: Number of roles per page. + maximum: 50 + minimum: 5 + type: number + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamCollectionRoleResponse' + description: List Roles response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: List Roles response failure + security: + - api_email: [] + api_key: [] + summary: List Roles + tags: + - Account Roles + x-api-token-group: + - SCIM Provisioning + - Account Settings Write + - Account Settings Read + x-cfPermissionsRequired: + enum: + - '#organization:read' + x-stackql-sdk: + service: accounts + resource_chain: + - roles + method: list + /accounts/{account_id}/roles/{role_id}: + get: + description: Get information about a specific role for an account. + operationId: account-roles-role-details + parameters: + - name: role_id + in: path + required: true + description: The role ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamSingleRoleResponse' + description: Role Details response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Role Details response failure + security: + - api_email: [] + api_key: [] + summary: Role Details + tags: + - Account Roles + x-api-token-group: + - SCIM Provisioning + - Account Settings Write + - Account Settings Read + x-cfPermissionsRequired: + enum: + - '#organization:read' + x-stackql-sdk: + service: accounts + resource_chain: + - roles + method: get + /accounts/{account_id}/subscriptions: + get: + description: Lists all of an account's subscriptions. + operationId: account-subscriptions-list-subscriptions + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/billSubsApiAccountSubscriptionResponseCollection' + description: List Subscriptions response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + items: + $ref: '#/components/schemas/billSubsApiSubscription' + nullable: true + type: array + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/billSubsApiResultInfo' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: List Subscriptions response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Subscriptions + tags: + - Account Subscriptions + x-api-token-group: + - Billing Write + - Billing Read + x-cfPermissionsRequired: + enum: + - '#billing:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: accounts + resource_chain: + - subscriptions + method: get + post: + description: Creates an account subscription. + operationId: account-subscriptions-create-subscription + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/billSubsApiSubscriptionV2' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/billSubsApiAccountSubscriptionResponseSingle' + description: Create Subscription response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + type: object + properties: + currency: + $ref: '#/components/schemas/billSubsApiCurrency' + current_period_end: + $ref: '#/components/schemas/billSubsApiCurrentPeriodEnd' + current_period_start: + $ref: '#/components/schemas/billSubsApiCurrentPeriodStart' + frequency: + $ref: '#/components/schemas/billSubsApiFrequency' + id: + $ref: '#/components/schemas/billSubsApiSchemasIdentifier' + price: + $ref: '#/components/schemas/billSubsApiPrice' + rate_plan: + $ref: '#/components/schemas/billSubsApiRatePlan_2' + state: + $ref: '#/components/schemas/billSubsApiState' + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Create Subscription response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Subscription + tags: + - Account Subscriptions + x-api-token-group: + - Billing Write + x-cfPermissionsRequired: + enum: + - '#billing:read' + - '#billing:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: accounts + resource_chain: + - subscriptions + method: create + /accounts/{account_id}/subscriptions/{subscription_identifier}: + delete: + description: Deletes an account's subscription. + operationId: account-subscriptions-delete-subscription + parameters: + - in: path + name: subscription_identifier + schema: + $ref: '#/components/schemas/billSubsApiSchemasIdentifier' + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + properties: + subscription_id: + $ref: '#/components/schemas/billSubsApiSchemasIdentifier' + type: object + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Delete Subscription response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + properties: + subscription_id: + $ref: '#/components/schemas/billSubsApiSchemasIdentifier' + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Delete Subscription response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Subscription + tags: + - Account Subscriptions + x-api-token-group: + - Billing Write + x-cfPermissionsRequired: + enum: + - '#billing:edit' + x-stackql-sdk: + service: accounts + resource_chain: + - subscriptions + method: delete + put: + description: Updates an account subscription. + operationId: account-subscriptions-update-subscription + parameters: + - in: path + name: subscription_identifier + schema: + $ref: '#/components/schemas/billSubsApiSchemasIdentifier' + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/billSubsApiSubscriptionV2' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/billSubsApiAccountSubscriptionResponseSingle' + description: Update Subscription response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + type: object + properties: + currency: + $ref: '#/components/schemas/billSubsApiCurrency' + current_period_end: + $ref: '#/components/schemas/billSubsApiCurrentPeriodEnd' + current_period_start: + $ref: '#/components/schemas/billSubsApiCurrentPeriodStart' + frequency: + $ref: '#/components/schemas/billSubsApiFrequency' + id: + $ref: '#/components/schemas/billSubsApiSchemasIdentifier' + price: + $ref: '#/components/schemas/billSubsApiPrice' + rate_plan: + $ref: '#/components/schemas/billSubsApiRatePlan_2' + state: + $ref: '#/components/schemas/billSubsApiState' + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Update Subscription response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Subscription + tags: + - Account Subscriptions + x-api-token-group: + - Billing Write + x-cfPermissionsRequired: + enum: + - '#billing:read' + - '#billing:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: accounts + resource_chain: + - subscriptions + method: update + /accounts/{account_id}/tokens: + get: + description: List all Account Owned API tokens created for this account. + operationId: account-api-tokens-list-tokens + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: page + schema: + default: 1 + description: Page number of paginated results. + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 20 + description: Maximum number of results per page. + maximum: 50 + minimum: 5 + type: number + - in: query + name: direction + schema: + description: Direction to order results. + enum: + - asc + - desc + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamCollectionTokensResponse' + description: List Tokens response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: List Tokens response failure + security: + - api_token: [] + summary: List Tokens + tags: + - Account Owned API Tokens + x-api-token-group: + - Account API Tokens Write + - Account API Tokens Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.token.list + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: accounts + resource_chain: + - tokens + method: list + post: + description: Create a new Account Owned API token. + operationId: account-api-tokens-create-token + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/iamCreatePayload' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamSingleTokenCreateResponse' + description: Create Token response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Create Token response failure + security: + - api_token: [] + summary: Create Token + tags: + - Account Owned API Tokens + x-api-token-group: + - Account API Tokens Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.token.create + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: accounts + resource_chain: + - tokens + method: create + /accounts/{account_id}/tokens/permission_groups: + get: + description: Find all available permission groups for Account Owned API Tokens + operationId: account-api-tokens-list-permission-groups + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Filter by the name of the permission group. The value must be URL-encoded. + in: query + name: name + schema: + type: string + - description: Filter by the scope of the permission group. The value must be URL-encoded. + in: query + name: scope + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamPermissionsGroupResponseCollection' + description: List Account Owned API Token Permission Groups response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: List Account Owned API Token Permission Groups response failure + security: + - api_token: [] + summary: List Permission Groups + tags: + - Account Owned API Tokens + x-api-token-group: + - Account API Tokens Write + - Account API Tokens Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.token.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: accounts + resource_chain: + - tokens + - permission_groups + method: list + /accounts/{account_id}/tokens/verify: + get: + description: Test whether a token works. + operationId: account-api-tokens-verify-token + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamTokenVerifyResponseSingleSegment' + description: Verify Token response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Verify Token response failure + security: + - api_token: [] + summary: Verify Token + tags: + - Account Owned API Tokens + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: accounts + resource_chain: + - tokens + method: verify + /accounts/{account_id}/tokens/{token_id}: + delete: + description: Destroy an Account Owned API token. + operationId: account-api-tokens-delete-token + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: token_id + in: path + required: true + description: The API token ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseSingleId' + description: Delete Token response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Delete Token response failure + security: + - api_token: [] + summary: Delete Token + tags: + - Account Owned API Tokens + x-api-token-group: + - Account API Tokens Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.token.delete + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: accounts + resource_chain: + - tokens + method: delete + get: + description: Get information about a specific Account Owned API token. + operationId: account-api-tokens-token-details + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: token_id + in: path + required: true + description: The API token ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamSingleTokenResponse' + description: Token Details response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Token Details response failure + security: + - api_token: [] + summary: Token Details + tags: + - Account Owned API Tokens + x-api-token-group: + - Account API Tokens Write + - Account API Tokens Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.token.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: accounts + resource_chain: + - tokens + method: get + put: + description: Update an existing token. + operationId: account-api-tokens-update-token + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: token_id + in: path + required: true + description: The API token ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/iamTokenBody' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamSingleTokenResponse' + description: Update Token response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Update Token response failure + security: + - api_token: [] + summary: Update Token + tags: + - Account Owned API Tokens + x-api-token-group: + - Account API Tokens Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.token.update + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: accounts + resource_chain: + - tokens + method: update + /accounts/{account_id}/tokens/{token_id}/value: + put: + description: Roll the Account Owned API token secret. + operationId: account-api-tokens-roll-token + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: token_id + in: path + required: true + description: The API token ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamResponseSingleValue' + description: Roll Token response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Roll Token response failure + security: + - api_token: [] + summary: Roll Token + tags: + - Account Owned API Tokens + x-api-token-group: + - Account API Tokens Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.token.update + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: accounts + resource_chain: + - tokens + - value + method: update + /accounts/{account_id}/email/routing/suppression: + get: + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: page + schema: + default: 1 + minimum: 0 + type: integer + - in: query + name: per_page + schema: + default: 100 + maximum: 1000 + minimum: 0 + type: integer + - in: query + name: order + schema: + default: created_at + enum: + - email + - expires_at + - created_at + type: string + - in: query + name: direction + schema: + default: desc + enum: + - asc + - desc + type: string + responses: + '200': + content: + application/json: + schema: + properties: + page: + type: integer + per_page: + type: integer + result: + items: + properties: + created_at: + format: date-time + type: string + readOnly: true + email: + format: email + type: string + expires_at: + format: date-time + nullable: true + type: string + id: + format: uuid + type: string + reason: + type: string + zones: + default: [] + items: + type: string + type: array + required: + - id + - email + - reason + - created_at + - expires_at + type: object + type: array + total: + type: integer + required: + - page + - per_page + - total + - result + type: object + description: Returns suppressed emails. + '400': + content: + application/json: + schema: + properties: + errors: + items: + type: string + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Bad request. + security: + - bearerAuth: [] + summary: List account or zone email suppressions + tags: [] + operationId: get_accounts_account_id_email_routing_suppression + post: + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + email: + format: email + type: string + expires_at: + format: date-time + nullable: true + type: string + required: + - email + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + id: + format: uuid + type: string + required: + - id + type: object + required: + - result + type: object + description: Returns suppression. + '400': + content: + application/json: + schema: + properties: + errors: + items: + type: string + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Bad request. + security: + - bearerAuth: [] + summary: Create account or zone email suppression + tags: [] + operationId: post_accounts_account_id_email_routing_suppression + /accounts/{account_id}/email/routing/suppression/{suppression_id}: + get: + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: suppression_id + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + created_at: + format: date-time + type: string + readOnly: true + email: + format: email + type: string + expires_at: + format: date-time + nullable: true + type: string + id: + format: uuid + type: string + reason: + type: string + zones: + default: [] + items: + type: string + type: array + required: + - id + - email + - reason + - created_at + - expires_at + type: object + required: + - result + type: object + description: Returns suppression. + '404': + content: + application/json: + schema: + properties: + error: + type: string + success: + type: boolean + required: + - success + - error + type: object + description: Suppression not found. + security: + - bearerAuth: [] + summary: Get account or zone email suppression + tags: [] + operationId: get_accounts_account_id_email_routing_suppression_suppression_id + delete: + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: suppression_id + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + success: + type: boolean + required: + - success + type: object + description: Deletes suppression. + '404': + content: + application/json: + schema: + properties: + error: + type: string + success: + type: boolean + required: + - success + - error + type: object + description: Suppression not found. + security: + - bearerAuth: [] + summary: Delete account or zone email suppression + tags: [] + operationId: delete_accounts_account_id_email_routing_suppression_suppression_id + /accounts/{account_id}/email/sending/suppression: + get: + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: page + schema: + default: 1 + minimum: 0 + type: integer + - in: query + name: per_page + schema: + default: 100 + maximum: 1000 + minimum: 0 + type: integer + - in: query + name: order + schema: + default: created_at + enum: + - email + - expires_at + - created_at + type: string + - in: query + name: direction + schema: + default: desc + enum: + - asc + - desc + type: string + responses: + '200': + content: + application/json: + schema: + properties: + page: + type: integer + per_page: + type: integer + result: + items: + properties: + created_at: + format: date-time + type: string + readOnly: true + email: + format: email + type: string + expires_at: + format: date-time + nullable: true + type: string + id: + format: uuid + type: string + reason: + type: string + zones: + default: [] + items: + type: string + type: array + required: + - id + - email + - reason + - created_at + - expires_at + type: object + type: array + total: + type: integer + required: + - page + - per_page + - total + - result + type: object + description: Returns suppressed emails. + '400': + content: + application/json: + schema: + properties: + errors: + items: + type: string + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Bad request. + security: + - bearerAuth: [] + summary: List account or zone email suppressions + tags: [] + operationId: get_accounts_account_id_email_sending_suppression + post: + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + email: + format: email + type: string + expires_at: + format: date-time + nullable: true + type: string + required: + - email + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + id: + format: uuid + type: string + required: + - id + type: object + required: + - result + type: object + description: Returns suppression. + '400': + content: + application/json: + schema: + properties: + errors: + items: + type: string + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Bad request. + security: + - bearerAuth: [] + summary: Create account or zone email suppression + tags: [] + operationId: post_accounts_account_id_email_sending_suppression + /accounts/{account_id}/email/sending/suppression/{suppression_id}: + get: + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: suppression_id + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + created_at: + format: date-time + type: string + readOnly: true + email: + format: email + type: string + expires_at: + format: date-time + nullable: true + type: string + id: + format: uuid + type: string + reason: + type: string + zones: + default: [] + items: + type: string + type: array + required: + - id + - email + - reason + - created_at + - expires_at + type: object + required: + - result + type: object + description: Returns suppression. + '404': + content: + application/json: + schema: + properties: + error: + type: string + success: + type: boolean + required: + - success + - error + type: object + description: Suppression not found. + security: + - bearerAuth: [] + summary: Get account or zone email suppression + tags: [] + operationId: get_accounts_account_id_email_sending_suppression_suppression_id + delete: + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: suppression_id + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + success: + type: boolean + required: + - success + type: object + description: Deletes suppression. + '404': + content: + application/json: + schema: + properties: + error: + type: string + success: + type: boolean + required: + - success + - error + type: object + description: Suppression not found. + security: + - bearerAuth: [] + summary: Delete account or zone email suppression + tags: [] + operationId: delete_accounts_account_id_email_sending_suppression_suppression_id +components: + schemas: + aaaAuditLogAction: + description: Provides information about the action performed. + properties: + description: + description: A short description of the action performed. + example: Add Member + type: string + result: + description: The result of the action, indicating success or failure. + example: success + type: string + time: + description: A timestamp indicating when the action was logged. + example: '2024-04-26T17:31:07Z' + format: date-time + type: string + type: + description: A short string that describes the action that was performed. + example: create + type: string + type: object + aaaAuditLogRaw: + description: Provides raw information about the request and response. + properties: + cf_ray_id: + description: The Cloudflare Ray ID for the request. + example: 8e9b1c60ef9e1c9a + type: string + method: + description: The HTTP method of the request. + example: POST + type: string + status_code: + description: The HTTP response status code returned by the API. + example: 200 + type: integer + uri: + description: The URI of the request. + example: /accounts/4bb334f7c94c4a29a045f03944f072e5/members + type: string + user_agent: + description: The client's user agent string sent with the request. + example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) Safari/605.1.15 + type: string + type: object + aaaAuditLogsV2: + properties: + account: + description: Contains account related information. + properties: + id: + description: A unique identifier for the account. + example: 4bb334f7c94c4a29a045f03944f072e5 + type: string + name: + description: A string that identifies the account name. + example: Example Account + type: string + type: object + action: + $ref: '#/components/schemas/aaaAuditLogAction' + actor: + description: Provides details about the actor who performed the action. + properties: + context: + enum: + - api_key + - api_token + - dash + - oauth + - origin_ca_key + example: dash + type: string + email: + description: The email of the actor who performed the action. + example: alice@example.com + format: email + type: string + id: + description: The ID of the actor who performed the action. If a user performed the action, this will be their User ID. + example: f6b5de0326bb5182b8a4840ee01ec774 + type: string + ip_address: + description: The IP address of the request that performed the action. + example: 198.41.129.166 + type: string + token_id: + description: The API token ID when the actor context is an api_token or oauth. + type: string + token_name: + description: The API token name when the actor context is an api_token or oauth. + type: string + type: + description: The type of actor. + enum: + - account + - cloudflare_admin + - system + - user + example: user + type: string + type: object + id: + $ref: '#/components/schemas/aaaSchemasIdentifier' + raw: + $ref: '#/components/schemas/aaaAuditLogRaw' + resource: + description: Provides details about the affected resource. + properties: + id: + description: The unique identifier for the affected resource. + type: string + product: + description: The Cloudflare product associated with the resource. + example: members + type: string + request: + type: object + response: + type: object + scope: + description: The scope of the resource. + type: object + type: + description: The type of the resource. + type: string + type: object + zone: + description: Provides details about the zone affected by the action. + properties: + id: + description: A string that identifies the zone id. + type: string + name: + description: A string that identifies the zone name. + example: example.com + type: string + type: object + type: object + aaaAuditLogsV2ResponseCollection: + properties: + errors: + $ref: '#/components/schemas/aaaSchemasMessages' + result_info: + $ref: '#/components/schemas/aaaResultInfo' + success: + description: Indicates whether the API call was successful + enum: + - true + example: true + type: boolean + result: + items: + $ref: '#/components/schemas/aaaAuditLogsV2' + type: array + type: object + aaaResultInfo: + description: Provides information about the result of the request, including count and cursor. + properties: + count: + description: The number of records returned in the response. + example: '1' + type: string + cursor: + description: The cursor token used for pagination. + example: ASqdKd7dKgxh-aZ8bm0mZos1BtW4BdEqifCzNkEeGRzi_5SN_-362Y8sF-C1TRn60_6rd3z2dIajf9EAPyQ_NmIeAMkacmaJPXipqvP7PLU4t72wyqBeJfjmjdE= + type: string + type: object + aaaSchemasApiResponseCommonFailure: + properties: + errors: + description: A list of error messages. + items: + properties: + message: + description: A text description of this message. + example: No route for the URI + type: string + required: + - message + type: object + uniqueItems: true + type: array + messages: + example: [] + items: + properties: + message: + type: string + type: object + uniqueItems: true + type: array + success: + description: Indicates whether the API call was failed + enum: + - false + example: false + type: boolean + required: + - success + - errors + type: object + aaaSchemasIdentifier: + description: A unique identifier for the audit log entry. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + readOnly: true + type: string + aaaSchemasMessages: + example: [] + items: + properties: + message: + type: string + required: + - message + type: object + uniqueItems: true + type: array + billSubsApiAccountSubscriptionResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + items: + $ref: '#/components/schemas/billSubsApiSubscription' + nullable: true + type: array + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/billSubsApiResultInfo' + required: + - success + - errors + - messages + - result + billSubsApiAccountSubscriptionResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + $ref: '#/components/schemas/billSubsApiSubscription' + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + billSubsApiCurrency: + description: The monetary unit in which pricing information is displayed. + example: USD + readOnly: true + type: string + x-auditable: true + billSubsApiCurrentPeriodEnd: + description: The end of the current period and also when the next billing is due. + example: '2014-03-31T12:20:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + billSubsApiCurrentPeriodStart: + description: When the current billing period started. May match initial_period_start if this is the first period. + example: '2014-05-11T12:20:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + billSubsApiFrequency: + description: How often the subscription is renewed automatically. + enum: + - weekly + - monthly + - quarterly + - yearly + example: monthly + type: string + x-auditable: true + billSubsApiMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + billSubsApiPrice: + description: The price of the subscription that will be billed, in US dollars. + example: 20 + readOnly: true + type: number + x-auditable: true + billSubsApiRatePlan_2: + description: The rate plan applied to the subscription. + properties: + currency: + description: The currency applied to the rate plan subscription. + example: USD + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + externally_managed: + description: Whether this rate plan is managed externally from Cloudflare. + example: false + type: boolean + x-auditable: true + x-stainless-terraform-configurability: computed_optional + id: + description: The ID of the rate plan. + example: free + type: string + x-auditable: true + enum: + - free + - lite + - pro + - pro_plus + - business + - enterprise + - partners_free + - partners_pro + - partners_business + - partners_enterprise + is_contract: + description: Whether a rate plan is enterprise-based (or newly adopted term contract). + example: false + type: boolean + x-auditable: true + x-stainless-terraform-configurability: computed_optional + public_name: + description: The full name of the rate plan. + example: Business Plan + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + scope: + description: The scope that this rate plan applies to. + example: zone + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + sets: + description: The list of sets this rate plan applies to. Returns array of strings. + example: [] + items: + type: string + x-auditable: true + type: array + x-stainless-terraform-configurability: optional + type: object + billSubsApiResultInfo: + properties: + count: + description: Total number of results for the requested service + example: 1 + type: number + page: + description: Current page within paginated list of results + example: 1 + type: number + per_page: + description: Number of results per page of results + example: 20 + type: number + total_count: + description: Total results available without any search parameters + example: 2000 + type: number + type: object + billSubsApiSchemasIdentifier: + description: Subscription identifier tag. + example: 506e3185e9c882d175a2d0cb0093d9f2 + maxLength: 32 + readOnly: true + type: string + x-auditable: true + billSubsApiState: + description: The state that the subscription is in. + enum: + - Trial + - Provisioned + - Paid + - AwaitingPayment + - Cancelled + - Failed + - Expired + example: Paid + readOnly: true + type: string + x-auditable: true + billSubsApiSubscription: + type: object + $ref: '#/components/schemas/billSubsApiSubscriptionV2' + billSubsApiSubscriptionV2: + properties: + currency: + $ref: '#/components/schemas/billSubsApiCurrency' + current_period_end: + $ref: '#/components/schemas/billSubsApiCurrentPeriodEnd' + current_period_start: + $ref: '#/components/schemas/billSubsApiCurrentPeriodStart' + frequency: + $ref: '#/components/schemas/billSubsApiFrequency' + id: + $ref: '#/components/schemas/billSubsApiSchemasIdentifier' + price: + $ref: '#/components/schemas/billSubsApiPrice' + rate_plan: + $ref: '#/components/schemas/billSubsApiRatePlan_2' + state: + $ref: '#/components/schemas/billSubsApiState' + type: object + emailMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + emailSendingLimitsProperties: + properties: + quota: + description: The resolved daily sending quota for the account. Null when the quota is not yet available. + nullable: true + properties: + unit: + description: The time period for the quota. + enum: + - day + - hour + example: day + type: string + value: + description: The quota limit. + example: 1000 + type: integer + readOnly: true + type: object + type: object + emailSendingLimitsResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/emailMessages' + messages: + $ref: '#/components/schemas/emailMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/emailSendingLimitsProperties' + required: + - success + - errors + - messages + iamAccess: + description: Allow or deny operations against the resources. + enum: + - allow + - deny + example: allow + type: string + x-auditable: true + iamAccount: + properties: + created_on: + description: Timestamp for the creation of the account + example: '2014-03-01T12:21:02.0000Z' + format: date-time + readOnly: true + type: string + x-auditable: true + id: + $ref: '#/components/schemas/iamCommonComponentsSchemasIdentifier' + managed_by: + description: Parent container details + properties: + parent_org_id: + description: ID of the parent Organization, if one exists + example: 4536bcfad5faccb111b47003c79917fa + maxLength: 32 + readOnly: true + type: string + x-auditable: true + parent_org_name: + description: Name of the parent Organization, if one exists + example: Demo Parent Organization + readOnly: true + type: string + x-auditable: true + type: object + name: + description: Account name + example: Demo Account + maxLength: 100 + type: string + x-auditable: true + settings: + description: Account settings + properties: + abuse_contact_email: + description: Sets an abuse contact email to notify for abuse reports. + type: string + x-auditable: true + enforce_twofactor: + default: false + description: Indicates whether membership in this account requires that Two-Factor Authentication is enabled + type: boolean + x-auditable: true + x-stainless-terraform-configurability: computed_optional + type: object + type: + $ref: '#/components/schemas/iamAccountType' + required: + - id + - name + - type + type: object + iamAccountType: + enum: + - standard + - enterprise + type: string + iamApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/iamSchemasMessages' + messages: + example: [] + $ref: '#/components/schemas/iamSchemasMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + iamApiResponseSingleId: + type: object + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + nullable: true + properties: + id: + $ref: '#/components/schemas/iamCommonComponentsSchemasIdentifier' + required: + - id + type: object + required: + - success + - errors + - messages + iamCidrList: + description: List of IPv4/IPv6 CIDR addresses. + example: + - 199.27.128.0/21 + - 2400:cb00::/32 + items: + description: IPv4/IPv6 CIDR. + example: 199.27.128.0/21 + type: string + x-auditable: true + type: array + iamCollectionMemberResponseWithPolicies: + title: Members with Policies + type: object + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/iamResultInfo' + result: + items: + $ref: '#/components/schemas/iamMemberWithPolicies' + type: array + required: + - success + - errors + - messages + iamCollectionRoleResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/iamResultInfo' + result: + items: + $ref: '#/components/schemas/iamRole' + type: array + required: + - success + - errors + - messages + iamCollectionTokensResponse: + title: Response with a list of tokens + type: object + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/iamResultInfo' + result: + items: + $ref: '#/components/schemas/iamTokenBase' + type: array + required: + - success + - errors + - messages + iamCommonComponentsSchemasIdentifier: + description: Identifier + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + minLength: 32 + type: string + x-auditable: true + iamComponentsSchemasAccount: + $ref: '#/components/schemas/iamAccount' + iamCondition: + properties: + request_ip: + $ref: '#/components/schemas/iamRequestIp' + type: object + iamCreateAccount: + properties: + name: + description: Account name + type: string + type: + $ref: '#/components/schemas/iamAccountType' + unit: + description: information related to the tenant unit, and optionally, an id of the unit to create the account on. see https://developers.cloudflare.com/tenant/how-to/manage-accounts/ + properties: + id: + description: Tenant unit ID + example: f267e341f3dd4697bd3b9f71dd96247f + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + type: object + x-stainless-terraform-configurability: computed_optional + required: + - name + title: Create account + type: object + iamCreatePayload: + properties: + condition: + $ref: '#/components/schemas/iamCondition' + expires_on: + $ref: '#/components/schemas/iamExpiresOn' + name: + $ref: '#/components/schemas/iamName' + not_before: + $ref: '#/components/schemas/iamNotBefore' + policies: + $ref: '#/components/schemas/iamTokenPolicies' + required: + - name + - policies + type: object + iamEffect: + description: Allow or deny operations against the resources. + enum: + - allow + - deny + example: allow + type: string + x-auditable: true + iamEmail: + description: The contact email address of the user. + example: user@example.com + maxLength: 90 + type: string + x-auditable: true + iamExpiresOn: + description: The expiration time on or after which the JWT MUST NOT be accepted for processing. + example: '2020-01-01T00:00:00Z' + format: date-time + type: string + x-auditable: true + iamFirstName: + description: User's first name + example: John + maxLength: 60 + nullable: true + type: string + x-auditable: true + iamGrants: + example: + read: true + write: false + properties: + read: + example: true + type: boolean + x-auditable: true + write: + example: true + type: boolean + x-auditable: true + type: object + iamIssuedOn: + description: The time on which the token was created. + example: '2018-07-01T05:20:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + iamLastName: + description: User's last name + example: Appleseed + maxLength: 60 + nullable: true + type: string + x-auditable: true + iamLastUsedOn: + description: Last time the token was used. + example: '2020-01-02T12:34:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + iamListMemberPolicy: + properties: + access: + $ref: '#/components/schemas/iamAccess' + id: + $ref: '#/components/schemas/iamPolicyIdentifier' + permission_groups: + $ref: '#/components/schemas/iamPermissionGroups' + resource_groups: + $ref: '#/components/schemas/iamResourceGroups' + title: list_member_policy + type: object + iamMemberInvitationStatus: + description: Status of the member invitation. If not provided during creation, defaults to 'pending'. Changing from 'accepted' back to 'pending' will trigger a replacement of the member resource in Terraform. + enum: + - accepted + - pending + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + iamMemberPermissionGroup: + description: A group of permissions. + properties: + id: + description: Identifier of the group. + example: c8fed203ed3043cba015a93ad1616f1f + type: string + x-auditable: true + required: + - id + type: object + iamMemberPermissionGroups: + description: A set of permission groups that are specified to the policy. + example: + - id: c8fed203ed3043cba015a93ad1616f1f + - id: 82e64a83756745bbbb1c9c2701bf816b + items: + $ref: '#/components/schemas/iamMemberPermissionGroup' + type: array + iamMemberResourceGroup: + description: A group of scoped resources. + properties: + id: + description: Identifier of the group. + example: 6d7f2f5f5b1d4a0e9081fdc98d432fd1 + type: string + x-auditable: true + required: + - id + type: object + iamMemberResourceGroups: + description: A list of resource groups that the policy applies to. + items: + $ref: '#/components/schemas/iamMemberResourceGroup' + type: array + iamMemberWithPolicies: + properties: + email: + $ref: '#/components/schemas/iamEmail' + id: + $ref: '#/components/schemas/iamMembershipComponentsSchemasIdentifier' + policies: + description: Access policy for the membership + items: + $ref: '#/components/schemas/iamListMemberPolicy' + type: array + roles: + description: Roles assigned to this Member. + items: + $ref: '#/components/schemas/iamRole' + type: array + status: + description: A member's status in the account. + enum: + - accepted + - pending + example: accepted + readOnly: true + x-auditable: true + type: string + user: + description: Details of the user associated to the membership. + properties: + email: + $ref: '#/components/schemas/iamEmail' + first_name: + $ref: '#/components/schemas/iamFirstName' + id: + $ref: '#/components/schemas/iamCommonComponentsSchemasIdentifier' + last_name: + $ref: '#/components/schemas/iamLastName' + two_factor_authentication_enabled: + $ref: '#/components/schemas/iamTwoFactorAuthenticationEnabled' + readOnly: true + required: + - email + type: object + type: object + iamMembershipComponentsSchemasIdentifier: + description: Membership identifier tag. + example: 4536bcfad5faccb111b47003c79917fa + maxLength: 32 + readOnly: true + type: string + x-auditable: true + iamModifiedOn: + description: Last time the token was modified. + example: '2018-07-02T05:20:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + iamName: + description: Token name. + example: readonly token + maxLength: 120 + type: string + x-auditable: true + iamNotBefore: + description: The time before which the token MUST NOT be accepted for processing. + example: '2018-07-01T05:20:00Z' + format: date-time + type: string + x-auditable: true + iamPermissionGroup: + description: A named group of permissions that map to a group of operations against resources. + properties: + id: + description: Identifier of the permission group. + example: 6d7f2f5f5b1d4a0e9081fdc98d432fd1 + type: string + x-auditable: true + meta: + description: Attributes associated to the permission group. + example: + label: load_balancer_admin + scopes: com.cloudflare.api.account + properties: + key: + type: string + x-auditable: true + value: + type: string + x-auditable: true + type: object + name: + description: Name of the permission group. + example: Load Balancer + readOnly: true + type: string + x-auditable: true + required: + - id + type: object + iamPermissionGroups: + description: A set of permission groups that are specified to the policy. + example: + - id: c8fed203ed3043cba015a93ad1616f1f + meta: + label: load_balancer_admin + scopes: com.cloudflare.api.account + name: Zone Read + - id: 82e64a83756745bbbb1c9c2701bf816b + meta: + label: fbm_user + scopes: com.cloudflare.api.account + name: Magic Network Monitoring + items: + $ref: '#/components/schemas/iamPermissionGroup' + type: array + iamPermissions: + example: + analytics: + read: true + write: false + zones: + read: true + write: true + properties: + analytics: + $ref: '#/components/schemas/iamGrants' + billing: + $ref: '#/components/schemas/iamGrants' + cache_purge: + $ref: '#/components/schemas/iamGrants' + dns: + $ref: '#/components/schemas/iamGrants' + dns_records: + $ref: '#/components/schemas/iamGrants' + lb: + $ref: '#/components/schemas/iamGrants' + logs: + $ref: '#/components/schemas/iamGrants' + organization: + $ref: '#/components/schemas/iamGrants' + ssl: + $ref: '#/components/schemas/iamGrants' + waf: + $ref: '#/components/schemas/iamGrants' + zone_settings: + $ref: '#/components/schemas/iamGrants' + zones: + $ref: '#/components/schemas/iamGrants' + type: object + iamPermissionsGroupResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/iamResultInfo' + result: + example: + - id: 7cf72faf220841aabcfdfab81c43c4f6 + name: Billing Read + scopes: + - com.cloudflare.api.account + - id: 9d24387c6e8544e2bc4024a03991339f + name: 'Load Balancing: Monitors and Pools Read' + scopes: + - com.cloudflare.api.account + - id: d2a1802cc9a34e30852f8b33869b2f3c + name: 'Load Balancing: Monitors and Pools Write' + scopes: + - com.cloudflare.api.account + - id: 8b47d2786a534c08a1f94ee8f9f599ef + name: Workers KV Storage Read + scopes: + - com.cloudflare.api.account + - id: f7f0eda5697f475c90846e879bab8666 + name: Workers KV Storage Write + scopes: + - com.cloudflare.api.account + - id: 1a71c399035b4950a1bd1466bbe4f420 + name: Workers Scripts Read + scopes: + - com.cloudflare.api.account + - id: e086da7e2179491d91ee5f35b3ca210a + name: Workers Scripts Write + scopes: + - com.cloudflare.api.account + items: + $ref: '#/components/schemas/iamPermissionsGroupResponseCollection_result_item' + type: array + required: + - success + - errors + - messages + iamPermissionsGroupResponseCollection_result_item: + properties: + id: + description: Public ID. + type: string + x-auditable: true + name: + description: Permission Group Name + type: string + x-auditable: true + scopes: + description: Resources to which the Permission Group is scoped + items: + enum: + - com.cloudflare.api.account + - com.cloudflare.api.account.zone + - com.cloudflare.api.user + - com.cloudflare.edge.r2.bucket + type: string + x-auditable: true + type: array + type: object + iamPolicyIdentifier: + description: Policy identifier. + example: f267e341f3dd4697bd3b9f71dd96247f + readOnly: true + type: string + x-auditable: true + x-stainless-terraform-always-send: true + iamPolicyWithPermissionGroupsAndResources: + properties: + effect: + $ref: '#/components/schemas/iamEffect' + id: + $ref: '#/components/schemas/iamPolicyIdentifier' + permission_groups: + $ref: '#/components/schemas/iamPermissionGroups' + resources: + $ref: '#/components/schemas/iamResources' + required: + - id + - effect + - permission_groups + - resources + title: Policy with Permission Groups and Resources + type: object + iamRequestIp: + description: Client IP restrictions. + example: + in: + - 123.123.123.0/24 + - 2606:4700::/32 + not_in: + - 123.123.123.100/24 + - 2606:4700:4700::/48 + properties: + in: + $ref: '#/components/schemas/iamCidrList' + not_in: + $ref: '#/components/schemas/iamCidrList' + type: object + iamResourceGroup: + description: A group of scoped resources. + properties: + id: + description: Identifier of the resource group. + example: 6d7f2f5f5b1d4a0e9081fdc98d432fd1 + readOnly: true + type: string + x-auditable: true + meta: + description: Attributes associated to the resource group. + example: + editable: 'false' + properties: + key: + type: string + value: + type: string + type: object + name: + description: Name of the resource group. + example: com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4 + readOnly: true + type: string + x-auditable: true + scope: + description: The scope associated to the resource group + items: + $ref: '#/components/schemas/iamScope' + type: array + required: + - id + - scope + type: object + iamResourceGroups: + description: A list of resource groups that the policy applies to. + items: + $ref: '#/components/schemas/iamResourceGroup' + type: array + iamResources: + description: A list of resource names that the policy applies to. + x-auditable: true + type: object + iamResponseCollectionAccounts: + title: Response with a list of accounts + type: object + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/iamResultInfo' + result: + items: + $ref: '#/components/schemas/iamAccount' + type: array + required: + - success + - errors + - messages + iamResponseSingleAccount: + title: Response with a single account + type: object + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/iamAccount' + required: + - success + - errors + - messages + iamResponseSingleValue: + type: object + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/iamValue' + required: + - success + - errors + - messages + iamResultInfo: + properties: + count: + description: Total number of results for the requested service + example: 1 + type: number + page: + description: Current page within paginated list of results + example: 1 + type: number + per_page: + description: Number of results per page of results + example: 20 + type: number + total_count: + description: Total results available without any search parameters + example: 2000 + type: number + type: object + iamRole: + properties: + description: + description: Description of role's permissions. + example: Administrative access to the entire Account + readOnly: true + type: string + x-auditable: true + id: + $ref: '#/components/schemas/iamRoleComponentsSchemasIdentifier' + name: + description: Role name. + example: Account Administrator + maxLength: 120 + readOnly: true + type: string + x-auditable: true + permissions: + $ref: '#/components/schemas/iamPermissions' + readOnly: true + required: + - id + - name + - description + - permissions + type: object + iamRoleComponentsSchemasIdentifier: + description: Role identifier tag. + example: 3536bcfad5faccb999b47003c79917fb + maxLength: 32 + type: string + x-auditable: true + iamSchemasMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + iamScope: + description: A scope is a combination of scope objects which provides additional context. + properties: + key: + $ref: '#/components/schemas/iamScopeKey' + objects: + description: A list of scope objects for additional context. + items: + $ref: '#/components/schemas/iamScopeObject' + type: array + required: + - key + - objects + type: object + iamScopeKey: + description: This is a combination of pre-defined resource name and identifier (like Account ID etc.) + example: com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4 + readOnly: true + x-auditable: true + type: string + iamScopeObject: + description: A scope object represents any resource that can have actions applied against invite. + properties: + key: + $ref: '#/components/schemas/iamScopeObjectKey' + required: + - key + type: object + iamScopeObjectKey: + description: This is a combination of pre-defined resource name and identifier (like Zone ID etc.) + example: com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5 + readOnly: true + x-auditable: true + type: string + iamSingleMemberResponseWithPolicies: + title: Response with Policies + type: object + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/iamMemberWithPolicies' + required: + - success + - errors + - messages + iamSingleRoleResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/iamRole' + required: + - success + - errors + - messages + iamSingleTokenCreateResponse: + title: Response of a create request with a single token + type: object + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/iamTokenWithValue' + required: + - success + - errors + - messages + iamSingleTokenResponse: + title: Response with a single token + type: object + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/iamTokenBase' + required: + - success + - errors + - messages + iamTokenBase: + properties: + condition: + $ref: '#/components/schemas/iamCondition' + expires_on: + $ref: '#/components/schemas/iamExpiresOn' + id: + $ref: '#/components/schemas/iamTokenIdentifier' + issued_on: + $ref: '#/components/schemas/iamIssuedOn' + last_used_on: + $ref: '#/components/schemas/iamLastUsedOn' + modified_on: + $ref: '#/components/schemas/iamModifiedOn' + readOnly: true + name: + $ref: '#/components/schemas/iamName' + not_before: + $ref: '#/components/schemas/iamNotBefore' + policies: + $ref: '#/components/schemas/iamTokenPolicies' + status: + $ref: '#/components/schemas/iamTokenStatus' + type: object + iamTokenBody: + title: Token defined in a request body + $ref: '#/components/schemas/iamTokenBase' + type: object + iamTokenIdentifier: + description: Token identifier tag. + example: ed17574386854bf78a67040be0a770b0 + maxLength: 32 + readOnly: true + type: string + x-auditable: true + iamTokenPolicies: + description: List of access policies assigned to the token. + items: + $ref: '#/components/schemas/iamPolicyWithPermissionGroupsAndResources' + type: array + iamTokenStatus: + description: Status of the token. + enum: + - active + - disabled + - expired + example: active + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + iamTokenVerifyResponseSingleSegment: + type: object + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + properties: + expires_on: + $ref: '#/components/schemas/iamExpiresOn' + id: + $ref: '#/components/schemas/iamTokenIdentifier' + not_before: + $ref: '#/components/schemas/iamNotBefore' + status: + $ref: '#/components/schemas/iamTokenStatus' + required: + - id + - status + type: object + required: + - success + - errors + - messages + iamTokenWithValue: + title: Create token response, with the token value + properties: + condition: + $ref: '#/components/schemas/iamCondition' + expires_on: + $ref: '#/components/schemas/iamExpiresOn' + id: + $ref: '#/components/schemas/iamTokenIdentifier' + issued_on: + $ref: '#/components/schemas/iamIssuedOn' + last_used_on: + $ref: '#/components/schemas/iamLastUsedOn' + modified_on: + $ref: '#/components/schemas/iamModifiedOn' + readOnly: true + name: + $ref: '#/components/schemas/iamName' + not_before: + $ref: '#/components/schemas/iamNotBefore' + policies: + $ref: '#/components/schemas/iamTokenPolicies' + status: + $ref: '#/components/schemas/iamTokenStatus' + value: + $ref: '#/components/schemas/iamValue' + type: object + iamTwoFactorAuthenticationEnabled: + default: false + description: Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication. + readOnly: true + type: boolean + iamValue: + description: The token value. + example: 8M7wS6hCpXVc-DoRnPPY_UCWPgy8aea4Wy6kCe5T + maxLength: 80 + minLength: 40 + readOnly: true + type: string + x-sensitive: true + organizationsApiBatchAccountMoveResponse: + properties: + statuses: + properties: + message: + type: string + moved: + type: boolean + tag: + type: string + required: + - tag + - moved + type: object + required: + - statuses + type: object + organizationsApiMoveAccountResponse: + properties: + account_id: + type: string + destination_organization_id: + type: string + source_organization_id: + type: string + required: + - account_id + - source_organization_id + - destination_organization_id + type: object + organizationsApiV4ErrorResponse: + properties: + errors: + items: + $ref: '#/components/schemas/organizationsApiV4Message' + type: array + messages: + items: + $ref: '#/components/schemas/organizationsApiV4Message' + type: array + result: + type: object + success: + enum: + - false + type: boolean + required: + - success + - errors + - messages + type: object + organizationsApiV4Message: + $ref: '#/components/schemas/responseInfo' + responseInfo: + properties: + code: + minimum: 1000 + type: integer + message: + type: string + documentation_url: + type: string + source: + type: object + properties: + pointer: + type: string + required: + - code + - message + type: object + uniqueItems: true + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + accounts: + id: cloudflare.accounts.accounts + name: accounts + title: Accounts + methods: + list: + operation: + $ref: '#/paths/~1accounts/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + {{- if .unit }}{{ $sep }}"unit": {{ if eq (kindOf .unit) "string" }}{{ .unit }}{{ else }}{{ toJson .unit }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + accounts_batch_move_accounts: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1move/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .account_ids }}{{ $sep }}"account_ids": {{ if eq (kindOf .account_ids) "string" }}{{ .account_ids }}{{ else }}{{ toJson .account_ids }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .destination_organization_id }}{{ $sep }}"destination_organization_id": {{ toJson .destination_organization_id }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + accounts_move_accounts: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1move/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/accounts/methods/get' + - $ref: '#/components/x-stackQL-resources/accounts/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/accounts/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/accounts/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/accounts/methods/update' + feedback: + id: cloudflare.accounts.feedback + name: feedback + title: Feedback + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email~1sending~1feedback/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/feedback/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + limits: + id: cloudflare.accounts.limits + name: limits + title: Limits + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email~1sending~1limits/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/limits/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + audit: + id: cloudflare.accounts.audit + name: audit + title: Audit + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1logs~1audit/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/audit/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + members: + id: cloudflare.accounts.members + name: members + title: Members + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1members/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1members/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .email }}{{ $sep }}"email": {{ toJson .email }}{{- $sep = "," -}}{{ end }} + + {{- if .roles }}{{ $sep }}"roles": {{ if eq (kindOf .roles) "string" }}{{ .roles }}{{ else }}{{ toJson .roles }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .status }}{{ $sep }}"status": {{ toJson .status }}{{- $sep = "," -}}{{ end }} + + {{- if .policies }}{{ $sep }}"policies": {{ if eq (kindOf .policies) "string" }}{{ .policies }}{{ else }}{{ toJson .policies }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1members~1{member_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1members~1{member_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1members~1{member_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .roles }}{{ $sep }}"roles": {{ if eq (kindOf .roles) "string" }}{{ .roles }}{{ else }}{{ toJson .roles }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .policies }}{{ $sep }}"policies": {{ if eq (kindOf .policies) "string" }}{{ .policies }}{{ else }}{{ toJson .policies }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/members/methods/get' + - $ref: '#/components/x-stackQL-resources/members/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/members/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/members/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/members/methods/update' + roles: + id: cloudflare.accounts.roles + name: roles + title: Roles + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1roles/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1roles~1{role_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/roles/methods/get' + - $ref: '#/components/x-stackQL-resources/roles/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + subscriptions: + id: cloudflare.accounts.subscriptions + name: subscriptions + title: Subscriptions + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1subscriptions/get' + response: + mediaType: application/json + openAPIDocKey: '200' + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1subscriptions/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency }}{{ $sep }}"frequency": {{ toJson .frequency }}{{- $sep = "," -}}{{ end }} + + {{- if .rate_plan }}{{ $sep }}"rate_plan": {{ if eq (kindOf .rate_plan) "string" }}{{ .rate_plan }}{{ else }}{{ toJson .rate_plan }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1subscriptions~1{subscription_identifier}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1subscriptions~1{subscription_identifier}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency }}{{ $sep }}"frequency": {{ toJson .frequency }}{{- $sep = "," -}}{{ end }} + + {{- if .rate_plan }}{{ $sep }}"rate_plan": {{ if eq (kindOf .rate_plan) "string" }}{{ .rate_plan }}{{ else }}{{ toJson .rate_plan }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/subscriptions/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/subscriptions/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/subscriptions/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/subscriptions/methods/update' + account_tokens: + id: cloudflare.accounts.account_tokens + name: account_tokens + title: Account Tokens + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1tokens/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/account_tokens/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + tokens: + id: cloudflare.accounts.tokens + name: tokens + title: Tokens + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1tokens/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .condition }}{{ $sep }}"condition": {{ if eq (kindOf .condition) "string" }}{{ .condition }}{{ else }}{{ toJson .condition }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .expires_on }}{{ $sep }}"expires_on": {{ toJson .expires_on }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .not_before }}{{ $sep }}"not_before": {{ toJson .not_before }}{{- $sep = "," -}}{{ end }} + + {{- if .policies }}{{ $sep }}"policies": {{ if eq (kindOf .policies) "string" }}{{ .policies }}{{ else }}{{ toJson .policies }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1tokens~1{token_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1tokens~1{token_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1tokens~1{token_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + roll_token: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1tokens~1{token_id}~1value/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/tokens/methods/get' + insert: + - $ref: '#/components/x-stackQL-resources/tokens/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/tokens/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/tokens/methods/update' + permission_groups: + id: cloudflare.accounts.permission_groups + name: permission_groups + title: Permission Groups + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1tokens~1permission_groups/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/permission_groups/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + tokens_verify: + id: cloudflare.accounts.tokens_verify + name: tokens_verify + title: Tokens Verify + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1tokens~1verify/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/tokens_verify/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + routing_suppression: + id: cloudflare.accounts.routing_suppression + name: routing_suppression + title: Routing Suppression + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email~1routing~1suppression/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + post_accounts_account_id_email_routing_suppression: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email~1routing~1suppression/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email~1routing~1suppression~1{suppression_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete_accounts_account_id_email_routing_suppression_suppression_id: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email~1routing~1suppression~1{suppression_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/routing_suppression/methods/get' + - $ref: '#/components/x-stackQL-resources/routing_suppression/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/routing_suppression/methods/post_accounts_account_id_email_routing_suppression' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/routing_suppression/methods/delete_accounts_account_id_email_routing_suppression_suppression_id' + replace: [] + sending_suppression: + id: cloudflare.accounts.sending_suppression + name: sending_suppression + title: Sending Suppression + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email~1sending~1suppression/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + post_accounts_account_id_email_sending_suppression: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email~1sending~1suppression/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email~1sending~1suppression~1{suppression_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete_accounts_account_id_email_sending_suppression_suppression_id: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email~1sending~1suppression~1{suppression_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/sending_suppression/methods/get' + - $ref: '#/components/x-stackQL-resources/sending_suppression/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/sending_suppression/methods/post_accounts_account_id_email_sending_suppression' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/sending_suppression/methods/delete_accounts_account_id_email_sending_suppression_suppression_id' + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/addressing.yaml b/providers/src/cloudflare/v00.00.00000/services/addressing.yaml index 30a00b63..dde40efd 100644 --- a/providers/src/cloudflare/v00.00.00000/services/addressing.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/addressing.yaml @@ -4504,6 +4504,25 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .ips }}{{ $sep }}"ips": {{ if eq (kindOf .ips) "string" }}{{ .ips }}{{ else }}{{ toJson .ips }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .memberships }}{{ $sep }}"memberships": {{ if eq (kindOf .memberships) "string" }}{{ .memberships }}{{ else }}{{ toJson .memberships }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1addressing~1address_maps~1{address_map_id}/delete' @@ -4770,6 +4789,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .asn_prepend_count }}{{ $sep }}"asn_prepend_count": {{ toJson .asn_prepend_count }}{{- $sep = "," -}}{{ end }} + + {{- if .auto_advertise_withdraw }}{{ $sep }}"auto_advertise_withdraw": {{ toJson .auto_advertise_withdraw }}{{- $sep = "," -}}{{ end }} + + {{- if .on_demand }}{{ $sep }}"on_demand": {{ if eq (kindOf .on_demand) "string" }}{{ .on_demand }}{{ else }}{{ toJson .on_demand }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/bgp_prefixes/methods/get' diff --git a/providers/src/cloudflare/v00.00.00000/services/ai.yaml b/providers/src/cloudflare/v00.00.00000/services/ai.yaml index ebfbc3ef..0267d2fe 100644 --- a/providers/src/cloudflare/v00.00.00000/services/ai.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/ai.yaml @@ -1,27892 +1,28257 @@ -openapi: 3.0.3 -info: - title: ai API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/ai/authors/search: - get: - description: Searches Workers AI models by author or organization name. - operationId: workers-ai-search-author - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - type: object - type: array - messages: - items: - type: string - type: array - result: - items: - type: object - type: array - success: - type: boolean - required: - - success - - result - - errors - - messages - type: object - description: Returns a list of authors - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Author Search - tags: - - Workers AI - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai - resource_chain: - - authors - method: list - /accounts/{account_id}/ai/finetunes: - get: - description: >- - Lists all fine-tuning jobs created by the account, including status and - metrics. - operationId: workers-ai-list-finetunes - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - created_at: - format: date-time - type: string - readOnly: true - description: - type: string - id: - format: uuid - type: string - x-auditable: true - model: - type: string - x-auditable: true - modified_at: - format: date-time - type: string - readOnly: true - name: - type: string - x-auditable: true - required: - - id - - model - - name - - created_at - - modified_at - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Returns all finetunes - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Finetunes - tags: - - Workers AI Finetune - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai - resource_chain: - - finetunes - method: list - post: - description: >- - Creates a new fine-tuning job for a Workers AI model using custom - training data. - operationId: workers-ai-create-finetune - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - description: - type: string - model: - type: string - x-auditable: true - name: - type: string - x-auditable: true - public: - default: false - type: boolean - x-auditable: true - required: - - model - - name - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - created_at: - format: date-time - type: string - readOnly: true - description: - type: string - id: - format: uuid - type: string - x-auditable: true - model: - type: string - x-auditable: true - modified_at: - format: date-time - type: string - readOnly: true - name: - type: string - x-auditable: true - public: - type: boolean - x-auditable: true - required: - - id - - created_at - - modified_at - - public - - name - - model - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Returns the created finetune - '400': - content: - application/json: - schema: - properties: - errors: - items: - type: object - type: array - success: - type: boolean - required: - - errors - - success - type: object - description: Finetune creation failed - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a new Finetune - tags: - - Workers AI Finetune - x-api-token-group: - - Workers AI Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai - resource_chain: - - finetunes - method: create - /accounts/{account_id}/ai/finetunes/public: - get: - description: >- - Lists publicly available fine-tuned models that can be used with Workers - AI. - operationId: workers-ai-list-public-finetunes - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Pagination Limit - in: query - name: limit - schema: - default: 20 - description: Pagination Limit - type: number - - description: Pagination Offset - in: query - name: offset - schema: - default: 0 - description: Pagination Offset - type: number - - description: Order By Column Name - in: query - name: orderBy - schema: - description: Order By Column Name - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - items: - properties: - created_at: - format: date-time - type: string - readOnly: true - description: - type: string - id: - format: uuid - type: string - x-auditable: true - model: - type: string - x-auditable: true - modified_at: - format: date-time - type: string - readOnly: true - name: - type: string - x-auditable: true - public: - type: boolean - x-auditable: true - required: - - id - - model - - name - - public - - created_at - - modified_at - type: object - type: array - success: - type: boolean - required: - - success - - result - type: object - description: Returns all public finetunes - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Public Finetunes - tags: - - Workers AI Finetune - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai - resource_chain: - - finetunes - - public - method: list - /accounts/{account_id}/ai/finetunes/{finetune_id}/finetune-assets: - post: - description: Uploads training data assets for a Workers AI fine-tuning job. - operationId: workers-ai-upload-finetune-asset - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: finetune_id - schema: - type: string - required: true - requestBody: - content: - multipart/form-data: - schema: - properties: - file: - description: File to upload - format: binary - type: string - file_name: - description: >- - Name of the file (adapter_config.json or - adapter_model.safetensors) - type: string - required: - - file_name - - file - type: object - description: Finetune asset file upload - responses: - '200': - content: - application/json: - schema: - properties: - success: - type: boolean - required: - - success - type: object - description: Returns successfully if finetunes were uploaded - '400': - content: - application/json: - schema: - properties: - errors: - items: - type: object - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Finetune creation failed - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Upload a Finetune Asset - tags: - - Workers AI Finetune - x-api-token-group: - - Workers AI Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai - resource_chain: - - finetunes - - assets - method: create - /accounts/{account_id}/ai/models/schema: - get: - description: >- - Retrieves the input and output JSON schema definition for a Workers AI - model. - operationId: workers-ai-get-model-schema - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Model Name - in: query - name: model - schema: - description: Model Name - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - input: - properties: - additionalProperties: - type: boolean - description: - type: string - type: - type: string - required: - - type - - description - - additionalProperties - type: object - output: - properties: - additionalProperties: - type: boolean - description: - type: string - type: - type: string - required: - - type - - description - - additionalProperties - type: object - required: - - input - - output - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Model Schema - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Model Schema - tags: - - Workers AI - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai - resource_chain: - - models - - schema - method: get - /accounts/{account_id}/ai/models/search: - get: - description: Searches Workers AI models by name or description. - operationId: workers-ai-search-model - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: per_page - schema: - default: 100 - type: integer - - in: query - name: page - schema: - default: 1 - type: integer - - description: Filter by Task Name - in: query - name: task - schema: - default: '' - description: Filter by Task Name - type: string - - description: Filter by Author - in: query - name: author - schema: - default: '' - description: Filter by Author - type: string - - description: Filter by Source Id - in: query - name: source - schema: - description: Filter by Source Id - type: number - - description: Filter to hide experimental models - in: query - name: hide_experimental - schema: - default: false - description: Filter to hide experimental models - type: boolean - - description: Search - in: query - name: search - schema: - default: '' - description: Search - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - type: object - type: array - messages: - items: - type: string - type: array - result: - items: - type: object - type: array - success: - type: boolean - required: - - success - - result - - errors - - messages - type: object - description: Returns a list of models - '404': - content: - application/json: - schema: - properties: - errors: - items: - type: object - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Object not found - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Model Search - tags: - - Workers AI - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai - resource_chain: - - models - method: list - /accounts/{account_id}/ai/run/@cf/ai4bharat/indictrans2-en-indic-1B: - post: - description: Runs inference on the @cf/ai4bharat/indictrans2-en-indic-1B model. - operationId: workers-ai-post-run-cf-ai4bharat-indictrans2-en-indic-1B - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - target_language: - default: hin_Deva - description: Target langauge to translate to - enum: - - asm_Beng - - awa_Deva - - ben_Beng - - bho_Deva - - brx_Deva - - doi_Deva - - eng_Latn - - gom_Deva - - gon_Deva - - guj_Gujr - - hin_Deva - - hne_Deva - - kan_Knda - - kas_Arab - - kas_Deva - - kha_Latn - - lus_Latn - - mag_Deva - - mai_Deva - - mal_Mlym - - mar_Deva - - mni_Beng - - mni_Mtei - - npi_Deva - - ory_Orya - - pan_Guru - - san_Deva - - sat_Olck - - snd_Arab - - snd_Deva - - tam_Taml - - tel_Telu - - urd_Arab - - unr_Deva - type: string - text: - description: >- - Input text to translate. Can be a single string or a list of - strings. - type: string - items: - type: string - required: - - text - - target_language - type: object - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/ai4bharat/indictrans2-en-indic-1B model. - tags: - - Workers AI Translation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/ai4bharat/nonomni-indictrans2-en-indic-1b: - post: - description: >- - Runs inference on the @cf/ai4bharat/nonomni-indictrans2-en-indic-1b - model. - operationId: workers-ai-post-run-cf-ai4bharat-nonomni-indictrans2-en-indic-1b - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - target_language: - default: hin_Deva - description: Target langauge to translate to - enum: - - asm_Beng - - awa_Deva - - ben_Beng - - bho_Deva - - brx_Deva - - doi_Deva - - eng_Latn - - gom_Deva - - gon_Deva - - guj_Gujr - - hin_Deva - - hne_Deva - - kan_Knda - - kas_Arab - - kas_Deva - - kha_Latn - - lus_Latn - - mag_Deva - - mai_Deva - - mal_Mlym - - mar_Deva - - mni_Beng - - mni_Mtei - - npi_Deva - - ory_Orya - - pan_Guru - - san_Deva - - sat_Olck - - snd_Arab - - snd_Deva - - tam_Taml - - tel_Telu - - urd_Arab - - unr_Deva - type: string - text: - description: >- - Input text to translate. Can be a single string or a list of - strings. - type: string - items: - type: string - required: - - text - - target_language - type: object - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/ai4bharat/nonomni-indictrans2-en-indic-1b model. - tags: - - Workers AI Translation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/aisingapore/gemma-sea-lion-v4-27b-it: - post: - description: Runs inference on the @cf/aisingapore/gemma-sea-lion-v4-27b-it model. - operationId: workers-ai-post-run-cf-aisingapore-gemma-sea-lion-v4-27b-it - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 2000 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - requests: - items: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the - same lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to - fine-tune the base model. - type: string - max_tokens: - default: 256 - description: >- - The maximum number of tokens to generate in the - response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: >- - The input text prompt for the model to generate a - response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must - adhere to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back - incrementally using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values - produce more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; - higher values introduce more variety and potential - surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by - controlling how many possible words it considers. - Lower values make outputs more predictable; higher - values allow for more varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the - conversation history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: >- - The name of the tool. More descriptive the - better. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: >- - A brief description of what the function - does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by - the function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object - (usually 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/aisingapore/gemma-sea-lion-v4-27b-it model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/baai/bge-base-en-v1.5: - post: - description: Runs inference on the @cf/baai/bge-base-en-v1.5 model. - operationId: workers-ai-post-run-cf-baai-bge-base-en-v1-5 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - properties: - pooling: - default: mean - description: >- - The pooling method used in the embedding process. `cls` - pooling will generate more accurate embeddings on larger - inputs - however, embeddings created with cls pooling are - not compatible with embeddings generated with mean pooling. - The default pooling method is `mean` in order for this to - not be a breaking change, but we highly suggest using the - new `cls` pooling for better accuracy. - enum: - - mean - - cls - type: string - text: - type: string - description: The text to embed - items: - description: The text to embed - minLength: 1 - type: string - requests: - description: Batch of the embeddings requests to run using async-queue - items: - properties: - pooling: - default: mean - description: >- - The pooling method used in the embedding process. - `cls` pooling will generate more accurate embeddings - on larger inputs - however, embeddings created with - cls pooling are not compatible with embeddings - generated with mean pooling. The default pooling - method is `mean` in order for this to not be a - breaking change, but we highly suggest using the new - `cls` pooling for better accuracy. - enum: - - mean - - cls - type: string - text: - type: string - description: The text to embed - items: - description: The text to embed - minLength: 1 - type: string - required: - - text - type: object - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/baai/bge-base-en-v1.5 model. - tags: - - Workers AI Text Embeddings - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/baai/bge-large-en-v1.5: - post: - description: Runs inference on the @cf/baai/bge-large-en-v1.5 model. - operationId: workers-ai-post-run-cf-baai-bge-large-en-v1-5 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - properties: - pooling: - default: mean - description: >- - The pooling method used in the embedding process. `cls` - pooling will generate more accurate embeddings on larger - inputs - however, embeddings created with cls pooling are - not compatible with embeddings generated with mean pooling. - The default pooling method is `mean` in order for this to - not be a breaking change, but we highly suggest using the - new `cls` pooling for better accuracy. - enum: - - mean - - cls - type: string - text: - type: string - description: The text to embed - items: - description: The text to embed - minLength: 1 - type: string - requests: - description: Batch of the embeddings requests to run using async-queue - items: - properties: - pooling: - default: mean - description: >- - The pooling method used in the embedding process. - `cls` pooling will generate more accurate embeddings - on larger inputs - however, embeddings created with - cls pooling are not compatible with embeddings - generated with mean pooling. The default pooling - method is `mean` in order for this to not be a - breaking change, but we highly suggest using the new - `cls` pooling for better accuracy. - enum: - - mean - - cls - type: string - text: - type: string - description: The text to embed - items: - description: The text to embed - minLength: 1 - type: string - required: - - text - type: object - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/baai/bge-large-en-v1.5 model. - tags: - - Workers AI Text Embeddings - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/baai/bge-m3: - post: - description: Runs inference on the @cf/baai/bge-m3 model. - operationId: workers-ai-post-run-cf-baai-bge-m3 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Input Query and Contexts - properties: - contexts: - description: >- - List of provided contexts. Note that the index in this array - is important, as the response will refer to it. - items: - properties: - text: - description: One of the provided context content - minLength: 1 - type: string - type: object - type: array - query: - description: >- - A query you wish to perform against the provided contexts. - If no query is provided the model with respond with - embeddings for contexts - minLength: 1 - type: string - truncate_inputs: - default: false - description: >- - When provided with too long context should the model error - out or truncate the context to fit? - type: boolean - text: - type: string - description: The text to embed - items: - description: The text to embed - minLength: 1 - type: string - requests: - description: Batch of the embeddings requests to run using async-queue - items: - type: object - title: Input Query and Contexts - properties: - contexts: - description: >- - List of provided contexts. Note that the index in this - array is important, as the response will refer to it. - items: - properties: - text: - description: One of the provided context content - minLength: 1 - type: string - type: object - type: array - query: - description: >- - A query you wish to perform against the provided - contexts. If no query is provided the model with - respond with embeddings for contexts - minLength: 1 - type: string - truncate_inputs: - default: false - description: >- - When provided with too long context should the model - error out or truncate the context to fit? - type: boolean - text: - type: string - description: The text to embed - items: - description: The text to embed - minLength: 1 - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/baai/bge-m3 model. - tags: - - Workers AI Text Embeddings - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/baai/bge-reranker-base: - post: - description: Runs inference on the @cf/baai/bge-reranker-base model. - operationId: workers-ai-post-run-cf-baai-bge-reranker-base - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - contexts: - description: >- - List of provided contexts. Note that the index in this array - is important, as the response will refer to it. - items: - properties: - text: - description: One of the provided context content - minLength: 1 - type: string - type: object - type: array - query: - description: A query you wish to perform against the provided contexts. - minLength: 1 - type: string - top_k: - description: Number of returned results starting with the best score. - minimum: 1 - type: integer - required: - - query - - contexts - type: object - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/baai/bge-reranker-base model. - tags: - - Workers AI Text Classification - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/baai/bge-small-en-v1.5: - post: - description: Runs inference on the @cf/baai/bge-small-en-v1.5 model. - operationId: workers-ai-post-run-cf-baai-bge-small-en-v1-5 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - properties: - pooling: - default: mean - description: >- - The pooling method used in the embedding process. `cls` - pooling will generate more accurate embeddings on larger - inputs - however, embeddings created with cls pooling are - not compatible with embeddings generated with mean pooling. - The default pooling method is `mean` in order for this to - not be a breaking change, but we highly suggest using the - new `cls` pooling for better accuracy. - enum: - - mean - - cls - type: string - text: - type: string - description: The text to embed - items: - description: The text to embed - minLength: 1 - type: string - requests: - description: Batch of the embeddings requests to run using async-queue - items: - properties: - pooling: - default: mean - description: >- - The pooling method used in the embedding process. - `cls` pooling will generate more accurate embeddings - on larger inputs - however, embeddings created with - cls pooling are not compatible with embeddings - generated with mean pooling. The default pooling - method is `mean` in order for this to not be a - breaking change, but we highly suggest using the new - `cls` pooling for better accuracy. - enum: - - mean - - cls - type: string - text: - type: string - description: The text to embed - items: - description: The text to embed - minLength: 1 - type: string - required: - - text - type: object - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/baai/bge-small-en-v1.5 model. - tags: - - Workers AI Text Embeddings - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/baai/nonomni-bge-base-en-v1.5: - post: - description: Runs inference on the @cf/baai/nonomni-bge-base-en-v1.5 model. - operationId: workers-ai-post-run-cf-baai-nonomni-bge-base-en-v1-5 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - properties: - pooling: - default: mean - description: >- - The pooling method used in the embedding process. `cls` - pooling will generate more accurate embeddings on larger - inputs - however, embeddings created with cls pooling are - not compatible with embeddings generated with mean pooling. - The default pooling method is `mean` in order for this to - not be a breaking change, but we highly suggest using the - new `cls` pooling for better accuracy. - enum: - - mean - - cls - type: string - text: - type: string - description: The text to embed - items: - description: The text to embed - minLength: 1 - type: string - requests: - description: Batch of the embeddings requests to run using async-queue - items: - properties: - pooling: - default: mean - description: >- - The pooling method used in the embedding process. - `cls` pooling will generate more accurate embeddings - on larger inputs - however, embeddings created with - cls pooling are not compatible with embeddings - generated with mean pooling. The default pooling - method is `mean` in order for this to not be a - breaking change, but we highly suggest using the new - `cls` pooling for better accuracy. - enum: - - mean - - cls - type: string - text: - type: string - description: The text to embed - items: - description: The text to embed - minLength: 1 - type: string - required: - - text - type: object - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/baai/nonomni-bge-base-en-v1.5 model. - tags: - - Workers AI Text Embeddings - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/baai/nonomni-bge-large-en-v1.5: - post: - description: Runs inference on the @cf/baai/nonomni-bge-large-en-v1.5 model. - operationId: workers-ai-post-run-cf-baai-nonomni-bge-large-en-v1-5 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - properties: - pooling: - default: mean - description: >- - The pooling method used in the embedding process. `cls` - pooling will generate more accurate embeddings on larger - inputs - however, embeddings created with cls pooling are - not compatible with embeddings generated with mean pooling. - The default pooling method is `mean` in order for this to - not be a breaking change, but we highly suggest using the - new `cls` pooling for better accuracy. - enum: - - mean - - cls - type: string - text: - type: string - description: The text to embed - items: - description: The text to embed - minLength: 1 - type: string - requests: - description: Batch of the embeddings requests to run using async-queue - items: - properties: - pooling: - default: mean - description: >- - The pooling method used in the embedding process. - `cls` pooling will generate more accurate embeddings - on larger inputs - however, embeddings created with - cls pooling are not compatible with embeddings - generated with mean pooling. The default pooling - method is `mean` in order for this to not be a - breaking change, but we highly suggest using the new - `cls` pooling for better accuracy. - enum: - - mean - - cls - type: string - text: - type: string - description: The text to embed - items: - description: The text to embed - minLength: 1 - type: string - required: - - text - type: object - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/baai/nonomni-bge-large-en-v1.5 model. - tags: - - Workers AI Text Embeddings - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/baai/nonomni-bge-m3: - post: - description: Runs inference on the @cf/baai/nonomni-bge-m3 model. - operationId: workers-ai-post-run-cf-baai-nonomni-bge-m3 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Input Query and Contexts - properties: - contexts: - description: >- - List of provided contexts. Note that the index in this array - is important, as the response will refer to it. - items: - properties: - text: - description: One of the provided context content - minLength: 1 - type: string - type: object - type: array - query: - description: >- - A query you wish to perform against the provided contexts. - If no query is provided the model with respond with - embeddings for contexts - minLength: 1 - type: string - truncate_inputs: - default: false - description: >- - When provided with too long context should the model error - out or truncate the context to fit? - type: boolean - text: - type: string - description: The text to embed - items: - description: The text to embed - minLength: 1 - type: string - requests: - description: Batch of the embeddings requests to run using async-queue - items: - type: object - title: Input Query and Contexts - properties: - contexts: - description: >- - List of provided contexts. Note that the index in this - array is important, as the response will refer to it. - items: - properties: - text: - description: One of the provided context content - minLength: 1 - type: string - type: object - type: array - query: - description: >- - A query you wish to perform against the provided - contexts. If no query is provided the model with - respond with embeddings for contexts - minLength: 1 - type: string - truncate_inputs: - default: false - description: >- - When provided with too long context should the model - error out or truncate the context to fit? - type: boolean - text: - type: string - description: The text to embed - items: - description: The text to embed - minLength: 1 - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/baai/nonomni-bge-m3 model. - tags: - - Workers AI Text Embeddings - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/baai/nonomni-bge-small-en-v1.5: - post: - description: Runs inference on the @cf/baai/nonomni-bge-small-en-v1.5 model. - operationId: workers-ai-post-run-cf-baai-nonomni-bge-small-en-v1-5 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - properties: - pooling: - default: mean - description: >- - The pooling method used in the embedding process. `cls` - pooling will generate more accurate embeddings on larger - inputs - however, embeddings created with cls pooling are - not compatible with embeddings generated with mean pooling. - The default pooling method is `mean` in order for this to - not be a breaking change, but we highly suggest using the - new `cls` pooling for better accuracy. - enum: - - mean - - cls - type: string - text: - type: string - description: The text to embed - items: - description: The text to embed - minLength: 1 - type: string - requests: - description: Batch of the embeddings requests to run using async-queue - items: - properties: - pooling: - default: mean - description: >- - The pooling method used in the embedding process. - `cls` pooling will generate more accurate embeddings - on larger inputs - however, embeddings created with - cls pooling are not compatible with embeddings - generated with mean pooling. The default pooling - method is `mean` in order for this to not be a - breaking change, but we highly suggest using the new - `cls` pooling for better accuracy. - enum: - - mean - - cls - type: string - text: - type: string - description: The text to embed - items: - description: The text to embed - minLength: 1 - type: string - required: - - text - type: object - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/baai/nonomni-bge-small-en-v1.5 model. - tags: - - Workers AI Text Embeddings - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/black-forest-labs/flux-1-schnell: - post: - description: Runs inference on the @cf/black-forest-labs/flux-1-schnell model. - operationId: workers-ai-post-run-cf-black-forest-labs-flux-1-schnell - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - prompt: - description: A text description of the image you want to generate. - maxLength: 2048 - minLength: 1 - type: string - steps: - default: 4 - description: >- - The number of diffusion steps; higher values can improve - quality but take longer. - maximum: 8 - type: integer - required: - - prompt - type: object - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/black-forest-labs/flux-1-schnell model. - tags: - - Workers AI Text To Image - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/black-forest-labs/flux-2-dev: - post: - description: Runs inference on the @cf/black-forest-labs/flux-2-dev model. - operationId: workers-ai-post-run-cf-black-forest-labs-flux-2-dev - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - multipart: - properties: - body: - type: object - contentType: - type: string - type: object - required: - - multipart - type: object - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/black-forest-labs/flux-2-dev model. - tags: - - Workers AI Text To Image - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/black-forest-labs/flux-2-klein-4b: - post: - description: Runs inference on the @cf/black-forest-labs/flux-2-klein-4b model. - operationId: workers-ai-post-run-cf-black-forest-labs-flux-2-klein-4b - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - multipart: - properties: - body: - type: object - contentType: - type: string - type: object - required: - - multipart - type: object - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/black-forest-labs/flux-2-klein-4b model. - tags: - - Workers AI Text To Image - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/black-forest-labs/flux-2-klein-9b: - post: - description: Runs inference on the @cf/black-forest-labs/flux-2-klein-9b model. - operationId: workers-ai-post-run-cf-black-forest-labs-flux-2-klein-9b - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - multipart: - properties: - body: - type: object - contentType: - type: string - type: object - required: - - multipart - type: object - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/black-forest-labs/flux-2-klein-9b model. - tags: - - Workers AI Text To Image - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/bytedance/stable-diffusion-xl-lightning: - post: - description: Runs inference on the @cf/bytedance/stable-diffusion-xl-lightning model. - operationId: workers-ai-post-run-cf-bytedance-stable-diffusion-xl-lightning - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - guidance: - default: 7.5 - description: >- - Controls how closely the generated image should adhere to - the prompt; higher values make the image more aligned with - the prompt - type: number - height: - description: The height of the generated image in pixels - maximum: 2048 - minimum: 256 - type: integer - image: - description: >- - For use with img2img tasks. An array of integers that - represent the image data constrained to 8-bit unsigned - integer values - items: - description: A value between 0 and 255 - type: number - type: array - image_b64: - description: >- - For use with img2img tasks. A base64-encoded string of the - input image - type: string - mask: - description: >- - An array representing An array of integers that represent - mask image data for inpainting constrained to 8-bit unsigned - integer values - items: - description: A value between 0 and 255 - type: number - type: array - negative_prompt: - description: Text describing elements to avoid in the generated image - type: string - num_steps: - default: 20 - description: >- - The number of diffusion steps; higher values can improve - quality but take longer - maximum: 20 - type: integer - prompt: - description: A text description of the image you want to generate - minLength: 1 - type: string - seed: - description: Random seed for reproducibility of the image generation - type: integer - strength: - default: 1 - description: >- - A value between 0 and 1 indicating how strongly to apply the - transformation during img2img tasks; lower values make the - output closer to the input image - type: number - width: - description: The width of the generated image in pixels - maximum: 2048 - minimum: 256 - type: integer - required: - - prompt - type: object - responses: - '200': - content: - application/json: - schema: - type: object - image/png: - schema: - format: binary - type: string - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/bytedance/stable-diffusion-xl-lightning model. - tags: - - Workers AI Text To Image - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/deepgram/aura-1: - post: - description: Runs inference on the @cf/deepgram/aura-1 model. - operationId: workers-ai-post-run-cf-deepgram-aura-1 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - bit_rate: - description: >- - The bitrate of the audio in bits per second. Choose from - predefined ranges or specific values based on the encoding - type. - type: number - container: - description: >- - Container specifies the file format wrapper for the output - audio. The available options depend on the encoding type.. - enum: - - none - - wav - - ogg - type: string - encoding: - description: Encoding of the output audio. - enum: - - linear16 - - flac - - mulaw - - alaw - - mp3 - - opus - - aac - type: string - sample_rate: - description: >- - Sample Rate specifies the sample rate for the output audio. - Based on the encoding, different sample rates are supported. - For some encodings, the sample rate is not configurable - type: number - speaker: - default: angus - description: Speaker used to produce the audio. - enum: - - angus - - asteria - - arcas - - orion - - orpheus - - athena - - luna - - zeus - - perseus - - helios - - hera - - stella - type: string - text: - description: The text content to be converted to speech - type: string - required: - - text - type: object - responses: - '200': - content: - application/json: - schema: - type: object - audio/mpeg: - schema: - format: binary - type: string - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/deepgram/aura-1 model. - tags: - - Workers AI Text To Speech - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/deepgram/aura-2-en: - post: - description: Runs inference on the @cf/deepgram/aura-2-en model. - operationId: workers-ai-post-run-cf-deepgram-aura-2-en - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - bit_rate: - description: >- - The bitrate of the audio in bits per second. Choose from - predefined ranges or specific values based on the encoding - type. - type: number - container: - description: >- - Container specifies the file format wrapper for the output - audio. The available options depend on the encoding type.. - enum: - - none - - wav - - ogg - type: string - encoding: - description: Encoding of the output audio. - enum: - - linear16 - - flac - - mulaw - - alaw - - mp3 - - opus - - aac - type: string - sample_rate: - description: >- - Sample Rate specifies the sample rate for the output audio. - Based on the encoding, different sample rates are supported. - For some encodings, the sample rate is not configurable - type: number - speaker: - default: luna - description: Speaker used to produce the audio. - enum: - - amalthea - - andromeda - - apollo - - arcas - - aries - - asteria - - athena - - atlas - - aurora - - callista - - cora - - cordelia - - delia - - draco - - electra - - harmonia - - helena - - hera - - hermes - - hyperion - - iris - - janus - - juno - - jupiter - - luna - - mars - - minerva - - neptune - - odysseus - - ophelia - - orion - - orpheus - - pandora - - phoebe - - pluto - - saturn - - thalia - - theia - - vesta - - zeus - type: string - text: - description: The text content to be converted to speech - type: string - required: - - text - type: object - responses: - '200': - content: - application/json: - schema: - type: object - audio/mpeg: - schema: - format: binary - type: string - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/deepgram/aura-2-en model. - tags: - - Workers AI Text To Speech - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/deepgram/aura-2-es: - post: - description: Runs inference on the @cf/deepgram/aura-2-es model. - operationId: workers-ai-post-run-cf-deepgram-aura-2-es - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - bit_rate: - description: >- - The bitrate of the audio in bits per second. Choose from - predefined ranges or specific values based on the encoding - type. - type: number - container: - description: >- - Container specifies the file format wrapper for the output - audio. The available options depend on the encoding type.. - enum: - - none - - wav - - ogg - type: string - encoding: - description: Encoding of the output audio. - enum: - - linear16 - - flac - - mulaw - - alaw - - mp3 - - opus - - aac - type: string - sample_rate: - description: >- - Sample Rate specifies the sample rate for the output audio. - Based on the encoding, different sample rates are supported. - For some encodings, the sample rate is not configurable - type: number - speaker: - default: aquila - description: Speaker used to produce the audio. - enum: - - sirio - - nestor - - carina - - celeste - - alvaro - - diana - - aquila - - selena - - estrella - - javier - type: string - text: - description: The text content to be converted to speech - type: string - required: - - text - type: object - responses: - '200': - content: - application/json: - schema: - type: object - audio/mpeg: - schema: - format: binary - type: string - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/deepgram/aura-2-es model. - tags: - - Workers AI Text To Speech - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/deepgram/flux: - post: - description: Runs inference on the @cf/deepgram/flux model. - operationId: workers-ai-post-run-cf-deepgram-flux - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - eager_eot_threshold: - description: >- - End-of-turn confidence required to fire an eager end-of-turn - event. When set, enables EagerEndOfTurn and TurnResumed - events. Valid Values 0.3 - 0.9. - type: string - encoding: - description: >- - Encoding of the audio stream. Currently only supports raw - signed little-endian 16-bit PCM. - enum: - - linear16 - type: string - eot_threshold: - default: '0.7' - description: >- - End-of-turn confidence required to finish a turn. Valid - Values 0.5 - 0.9. - type: string - eot_timeout_ms: - default: '5000' - description: >- - A turn will be finished when this much time has passed after - speech, regardless of EOT confidence. - type: string - keyterm: - description: >- - Keyterm prompting can improve recognition of specialized - terminology. Pass multiple keyterm query parameters to boost - multiple keyterms. - type: string - mip_opt_out: - default: 'false' - description: >- - Opts out requests from the Deepgram Model Improvement - Program. Refer to Deepgram Docs for pricing impacts before - setting this to true. https://dpgr.am/deepgram-mip - enum: - - 'true' - - 'false' - type: string - sample_rate: - description: Sample rate of the audio stream in Hz. - type: string - tag: - description: >- - Label your requests for the purpose of identification during - usage reporting - type: string - required: - - sample_rate - - encoding - type: object - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/deepgram/flux model. - tags: - - Workers AI Automatic Speech Recognition - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/deepgram/nova-3: - post: - description: Runs inference on the @cf/deepgram/nova-3 model. - operationId: workers-ai-post-run-cf-deepgram-nova-3 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - audio: - properties: - body: - type: object - contentType: - type: string - required: - - body - - contentType - type: object - channels: - description: The number of channels in the submitted audio - type: number - custom_intent: - description: >- - Custom intents you want the model to detect within your - input audio if present - type: string - custom_intent_mode: - description: >- - Sets how the model will interpret intents submitted to the - custom_intent param. When strict, the model will only return - intents submitted using the custom_intent param. When - extended, the model will return its own detected intents in - addition those submitted using the custom_intents param - enum: - - extended - - strict - type: string - custom_topic: - description: >- - Custom topics you want the model to detect within your input - audio or text if present Submit up to 100 - type: string - custom_topic_mode: - description: >- - Sets how the model will interpret strings submitted to the - custom_topic param. When strict, the model will only return - topics submitted using the custom_topic param. When - extended, the model will return its own detected topics in - addition to those submitted using the custom_topic param. - enum: - - extended - - strict - type: string - detect_entities: - description: >- - Identifies and extracts key entities from content in - submitted audio - type: boolean - detect_language: - description: Identifies the dominant language spoken in submitted audio - type: boolean - diarize: - description: >- - Recognize speaker changes. Each word in the transcript will - be assigned a speaker number starting at 0 - type: boolean - dictation: - description: >- - Identify and extract key entities from content in submitted - audio - type: boolean - encoding: - description: Specify the expected encoding of your submitted audio - enum: - - linear16 - - flac - - mulaw - - amr-nb - - amr-wb - - opus - - speex - - g729 - type: string - endpointing: - description: >- - Indicates how long model will wait to detect whether a - speaker has finished speaking or pauses for a significant - period of time. When set to a value, the streaming endpoint - immediately finalizes the transcription for the processed - time range and returns the transcript with a speech_final - parameter set to true. Can also be set to false to disable - endpointing - type: string - extra: - description: >- - Arbitrary key-value pairs that are attached to the API - response for usage in downstream processing - type: string - filler_words: - description: >- - Filler Words can help transcribe interruptions in your - audio, like 'uh' and 'um' - type: boolean - interim_results: - description: >- - Specifies whether the streaming endpoint should provide - ongoing transcription updates as more audio is received. - When set to true, the endpoint sends continuous updates, - meaning transcription results may evolve over time. Note: - Supported only for webosockets. - type: boolean - keyterm: - description: >- - Key term prompting can boost or suppress specialized - terminology and brands. - type: string - keywords: - description: >- - Keywords can boost or suppress specialized terminology and - brands. - type: string - language: - description: >- - The BCP-47 language tag that hints at the primary spoken - language. Depending on the Model and API endpoint you choose - only certain languages are available. - type: string - measurements: - description: >- - Spoken measurements will be converted to their corresponding - abbreviations. - type: boolean - mip_opt_out: - description: >- - Opts out requests from the Deepgram Model Improvement - Program. Refer to our Docs for pricing impacts before - setting this to true. https://dpgr.am/deepgram-mip. - type: boolean - mode: - description: >- - Mode of operation for the model representing broad area of - topic that will be talked about in the supplied audio - enum: - - general - - medical - - finance - type: string - multichannel: - description: Transcribe each audio channel independently. - type: boolean - numerals: - description: >- - Numerals converts numbers from written format to numerical - format. - type: boolean - paragraphs: - description: >- - Splits audio into paragraphs to improve transcript - readability. - type: boolean - profanity_filter: - description: >- - Profanity Filter looks for recognized profanity and converts - it to the nearest recognized non-profane word or removes it - from the transcript completely. - type: boolean - punctuate: - description: Add punctuation and capitalization to the transcript. - type: boolean - redact: - description: >- - Redaction removes sensitive information from your - transcripts. - type: string - replace: - description: >- - Search for terms or phrases in submitted audio and replaces - them. - type: string - search: - description: Search for terms or phrases in submitted audio. - type: string - sentiment: - description: Recognizes the sentiment throughout a transcript or text. - type: boolean - smart_format: - description: >- - Apply formatting to transcript output. When set to true, - additional formatting will be applied to transcripts to - improve readability. - type: boolean - topics: - description: Detect topics throughout a transcript or text. - type: boolean - utt_split: - description: >- - Seconds to wait before detecting a pause between words in - submitted audio. - type: number - utterance_end_ms: - description: >- - Indicates how long model will wait to send an UtteranceEnd - message after a word has been transcribed. Use with - interim_results. Note: Supported only for webosockets. - type: boolean - utterances: - description: Segments speech into meaningful semantic units. - type: boolean - vad_events: - description: >- - Indicates that speech has started. You'll begin receiving - Speech Started messages upon speech starting. Note: - Supported only for webosockets. - type: boolean - required: - - audio - type: object - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/deepgram/nova-3 model. - tags: - - Workers AI Automatic Speech Recognition - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/deepseek-ai/deepseek-math-7b-instruct: - post: - description: Runs inference on the @cf/deepseek-ai/deepseek-math-7b-instruct model. - operationId: workers-ai-post-run-cf-deepseek-ai-deepseek-math-7b-instruct - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/deepseek-ai/deepseek-math-7b-instruct model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/deepseek-ai/deepseek-r1-distill-qwen-32b: - post: - description: >- - Runs inference on the @cf/deepseek-ai/deepseek-r1-distill-qwen-32b - model. - operationId: workers-ai-post-run-cf-deepseek-ai-deepseek-r1-distill-qwen-32b - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/deepseek-ai/deepseek-r1-distill-qwen-32b model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/defog/sqlcoder-7b-2: - post: - description: Runs inference on the @cf/defog/sqlcoder-7b-2 model. - operationId: workers-ai-post-run-cf-defog-sqlcoder-7b-2 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/defog/sqlcoder-7b-2 model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/facebook/bart-large-cnn: - post: - description: Runs inference on the @cf/facebook/bart-large-cnn model. - operationId: workers-ai-post-run-cf-facebook-bart-large-cnn - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - input_text: - description: The text that you want the model to summarize - minLength: 1 - type: string - max_length: - default: 1024 - description: The maximum length of the generated summary in tokens - type: integer - required: - - input_text - type: object - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/facebook/bart-large-cnn model. - tags: - - Workers AI Summarization - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/facebook/nonomni-bart-large-cnn: - post: - description: Runs inference on the @cf/facebook/nonomni-bart-large-cnn model. - operationId: workers-ai-post-run-cf-facebook-nonomni-bart-large-cnn - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - input_text: - description: The text that you want the model to summarize - minLength: 1 - type: string - max_length: - default: 1024 - description: The maximum length of the generated summary in tokens - type: integer - required: - - input_text - type: object - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/facebook/nonomni-bart-large-cnn model. - tags: - - Workers AI Summarization - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/facebook/nonomni-detr-resnet-50: - post: - description: Runs inference on the @cf/facebook/nonomni-detr-resnet-50 model. - operationId: workers-ai-post-run-cf-facebook-nonomni-detr-resnet-50 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/octet-stream: - schema: - format: binary - type: string - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/facebook/nonomni-detr-resnet-50 model. - tags: - - Workers AI Object Detection - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/fblgit/una-cybertron-7b-v2-bf16: - post: - description: Runs inference on the @cf/fblgit/una-cybertron-7b-v2-bf16 model. - operationId: workers-ai-post-run-cf-fblgit-una-cybertron-7b-v2-bf16 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/fblgit/una-cybertron-7b-v2-bf16 model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/google/embeddinggemma-300m: - post: - description: Runs inference on the @cf/google/embeddinggemma-300m model. - operationId: workers-ai-post-run-cf-google-embeddinggemma-300m - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - text: - type: string - description: The text to embed - items: - description: The text to embed - minLength: 1 - type: string - required: - - text - type: object - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/google/embeddinggemma-300m model. - tags: - - Workers AI Text Embeddings - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/google/gemma-2b-it-lora: - post: - description: Runs inference on the @cf/google/gemma-2b-it-lora model. - operationId: workers-ai-post-run-cf-google-gemma-2b-it-lora - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/google/gemma-2b-it-lora model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/google/gemma-3-12b-it: - post: - description: Runs inference on the @cf/google/gemma-3-12b-it model. - operationId: workers-ai-post-run-cf-google-gemma-3-12b-it - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: 0 - type: number - guided_json: - description: JSON schema that should be fufilled for the response. - type: object - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: 0 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 2 - minimum: 0 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - image_url: - properties: - url: - description: >- - image uri with data (e.g. - data:image/jpeg;base64,/9j/...). HTTP URL - will not be accepted - type: string - type: object - text: - type: string - type: - description: Type of the content provided - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/google/gemma-3-12b-it model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/google/gemma-7b-it-lora: - post: - description: Runs inference on the @cf/google/gemma-7b-it-lora model. - operationId: workers-ai-post-run-cf-google-gemma-7b-it-lora - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/google/gemma-7b-it-lora model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/google/nonomni-embeddinggemma-300m: - post: - description: Runs inference on the @cf/google/nonomni-embeddinggemma-300m model. - operationId: workers-ai-post-run-cf-google-nonomni-embeddinggemma-300m - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - text: - description: >- - Input text to embed. Can be a single string or a list of - strings. - type: string - items: - type: string - required: - - text - type: object - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/google/nonomni-embeddinggemma-300m model. - tags: - - Workers AI Text Embeddings - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/huggingface/distilbert-sst-2-int8: - post: - description: Runs inference on the @cf/huggingface/distilbert-sst-2-int8 model. - operationId: workers-ai-post-run-cf-huggingface-distilbert-sst-2-int8 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - text: - description: The text that you want to classify - minLength: 1 - type: string - required: - - text - type: object - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/huggingface/distilbert-sst-2-int8 model. - tags: - - Workers AI Text Classification - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/huggingface/nonomni-distilbert-sst-2-int8: - post: - description: >- - Runs inference on the @cf/huggingface/nonomni-distilbert-sst-2-int8 - model. - operationId: workers-ai-post-run-cf-huggingface-nonomni-distilbert-sst-2-int8 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - text: - description: The text that you want to classify - minLength: 1 - type: string - required: - - text - type: object - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/huggingface/nonomni-distilbert-sst-2-int8 model. - tags: - - Workers AI Text Classification - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/ibm-granite/granite-4.0-h-micro: - post: - description: Runs inference on the @cf/ibm-granite/granite-4.0-h-micro model. - operationId: workers-ai-post-run-cf-ibm-granite-granite-4-0-h-micro - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/ibm-granite/granite-4.0-h-micro model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/leonardo/lucid-origin: - post: - description: Runs inference on the @cf/leonardo/lucid-origin model. - operationId: workers-ai-post-run-cf-leonardo-lucid-origin - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - guidance: - default: 4.5 - description: >- - Controls how closely the generated image should adhere to - the prompt; higher values make the image more aligned with - the prompt - maximum: 10 - minimum: 0 - type: number - height: - default: 1120 - description: The height of the generated image in pixels - maximum: 2500 - minimum: 0 - type: integer - num_steps: - description: >- - The number of diffusion steps; higher values can improve - quality but take longer - maximum: 40 - minimum: 1 - type: integer - prompt: - description: A text description of the image you want to generate. - minLength: 1 - type: string - seed: - description: Random seed for reproducibility of the image generation - minimum: 0 - type: integer - steps: - description: >- - The number of diffusion steps; higher values can improve - quality but take longer - maximum: 40 - minimum: 1 - type: integer - width: - default: 1120 - description: The width of the generated image in pixels - maximum: 2500 - minimum: 0 - type: integer - required: - - prompt - type: object - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/leonardo/lucid-origin model. - tags: - - Workers AI Text To Image - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/leonardo/phoenix-1.0: - post: - description: Runs inference on the @cf/leonardo/phoenix-1.0 model. - operationId: workers-ai-post-run-cf-leonardo-phoenix-1-0 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - guidance: - default: 2 - description: >- - Controls how closely the generated image should adhere to - the prompt; higher values make the image more aligned with - the prompt - maximum: 10 - minimum: 2 - type: number - height: - default: 1024 - description: The height of the generated image in pixels - maximum: 2048 - minimum: 0 - type: integer - negative_prompt: - description: Specify what to exclude from the generated images - minLength: 1 - type: string - num_steps: - default: 25 - description: >- - The number of diffusion steps; higher values can improve - quality but take longer - maximum: 50 - minimum: 1 - type: integer - prompt: - description: A text description of the image you want to generate. - minLength: 1 - type: string - seed: - description: Random seed for reproducibility of the image generation - minimum: 0 - type: integer - width: - default: 1024 - description: The width of the generated image in pixels - maximum: 2048 - minimum: 0 - type: integer - required: - - prompt - type: object - responses: - '200': - content: - application/json: - schema: - type: object - image/jpeg: - schema: - format: binary - type: string - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/leonardo/phoenix-1.0 model. - tags: - - Workers AI Text To Image - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/lykon/dreamshaper-8-lcm: - post: - description: Runs inference on the @cf/lykon/dreamshaper-8-lcm model. - operationId: workers-ai-post-run-cf-lykon-dreamshaper-8-lcm - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - guidance: - default: 7.5 - description: >- - Controls how closely the generated image should adhere to - the prompt; higher values make the image more aligned with - the prompt - type: number - height: - description: The height of the generated image in pixels - maximum: 2048 - minimum: 256 - type: integer - image: - description: >- - For use with img2img tasks. An array of integers that - represent the image data constrained to 8-bit unsigned - integer values - items: - description: A value between 0 and 255 - type: number - type: array - image_b64: - description: >- - For use with img2img tasks. A base64-encoded string of the - input image - type: string - mask: - description: >- - An array representing An array of integers that represent - mask image data for inpainting constrained to 8-bit unsigned - integer values - items: - description: A value between 0 and 255 - type: number - type: array - negative_prompt: - description: Text describing elements to avoid in the generated image - type: string - num_steps: - default: 20 - description: >- - The number of diffusion steps; higher values can improve - quality but take longer - maximum: 20 - type: integer - prompt: - description: A text description of the image you want to generate - minLength: 1 - type: string - seed: - description: Random seed for reproducibility of the image generation - type: integer - strength: - default: 1 - description: >- - A value between 0 and 1 indicating how strongly to apply the - transformation during img2img tasks; lower values make the - output closer to the input image - type: number - width: - description: The width of the generated image in pixels - maximum: 2048 - minimum: 256 - type: integer - required: - - prompt - type: object - responses: - '200': - content: - application/json: - schema: - type: object - image/png: - schema: - format: binary - type: string - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/lykon/dreamshaper-8-lcm model. - tags: - - Workers AI Text To Image - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/meta-llama/llama-2-7b-chat-hf-lora: - post: - description: Runs inference on the @cf/meta-llama/llama-2-7b-chat-hf-lora model. - operationId: workers-ai-post-run-cf-meta-llama-llama-2-7b-chat-hf-lora - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/meta-llama/llama-2-7b-chat-hf-lora model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/meta/llama-2-7b-chat-fp16: - post: - description: Runs inference on the @cf/meta/llama-2-7b-chat-fp16 model. - operationId: workers-ai-post-run-cf-meta-llama-2-7b-chat-fp16 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/meta/llama-2-7b-chat-fp16 model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/meta/llama-2-7b-chat-int8: - post: - description: Runs inference on the @cf/meta/llama-2-7b-chat-int8 model. - operationId: workers-ai-post-run-cf-meta-llama-2-7b-chat-int8 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/meta/llama-2-7b-chat-int8 model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/meta/llama-3-8b-instruct: - post: - description: Runs inference on the @cf/meta/llama-3-8b-instruct model. - operationId: workers-ai-post-run-cf-meta-llama-3-8b-instruct - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/meta/llama-3-8b-instruct model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/meta/llama-3-8b-instruct-awq: - post: - description: Runs inference on the @cf/meta/llama-3-8b-instruct-awq model. - operationId: workers-ai-post-run-cf-meta-llama-3-8b-instruct-awq - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/meta/llama-3-8b-instruct-awq model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/meta/llama-3.1-70b-instruct-fp8-fast: - post: - description: Runs inference on the @cf/meta/llama-3.1-70b-instruct-fp8-fast model. - operationId: workers-ai-post-run-cf-meta-llama-3-1-70b-instruct-fp8-fast - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/meta/llama-3.1-70b-instruct-fp8-fast model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/meta/llama-3.1-8b-instruct-awq: - post: - description: Runs inference on the @cf/meta/llama-3.1-8b-instruct-awq model. - operationId: workers-ai-post-run-cf-meta-llama-3-1-8b-instruct-awq - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/meta/llama-3.1-8b-instruct-awq model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/meta/llama-3.1-8b-instruct-fp8: - post: - description: Runs inference on the @cf/meta/llama-3.1-8b-instruct-fp8 model. - operationId: workers-ai-post-run-cf-meta-llama-3-1-8b-instruct-fp8 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/meta/llama-3.1-8b-instruct-fp8 model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/meta/llama-3.1-8b-instruct-fp8-fast: - post: - description: Runs inference on the @cf/meta/llama-3.1-8b-instruct-fp8-fast model. - operationId: workers-ai-post-run-cf-meta-llama-3-1-8b-instruct-fp8-fast - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/meta/llama-3.1-8b-instruct-fp8-fast model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/meta/llama-3.2-11b-vision-instruct: - post: - description: Runs inference on the @cf/meta/llama-3.2-11b-vision-instruct model. - operationId: workers-ai-post-run-cf-meta-llama-3-2-11b-vision-instruct - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: 0 - type: number - image: - type: array - description: >- - An array of integers that represent the image data - constrained to 8-bit unsigned integer values. Deprecated, - use image as a part of messages now. - items: - description: A value between 0 and 255 - type: number - format: binary - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: 0 - type: number - prompt: - description: The input text prompt for the model to generate a response. - maxLength: 131072 - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 2 - minimum: 0 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - image_url: - properties: - url: - description: >- - image uri with data (e.g. - data:image/jpeg;base64,/9j/...). HTTP URL - will not be accepted - type: string - type: object - text: - type: string - type: - description: Type of the content provided - type: string - type: object - properties: - image_url: - properties: - url: - description: >- - image uri with data (e.g. - data:image/jpeg;base64,/9j/...). HTTP URL will - not be accepted - type: string - type: object - text: - type: string - type: - description: Type of the content provided - type: string - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - tool_call_id: - description: >- - The tool call id. If you don't know what to put here - you can fall back to 000000001 - type: string - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/meta/llama-3.2-11b-vision-instruct model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/meta/llama-3.2-1b-instruct: - post: - description: Runs inference on the @cf/meta/llama-3.2-1b-instruct model. - operationId: workers-ai-post-run-cf-meta-llama-3-2-1b-instruct - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/meta/llama-3.2-1b-instruct model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/meta/llama-3.2-3b-instruct: - post: - description: Runs inference on the @cf/meta/llama-3.2-3b-instruct model. - operationId: workers-ai-post-run-cf-meta-llama-3-2-3b-instruct - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/meta/llama-3.2-3b-instruct model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/meta/llama-3.3-70b-instruct-fp8-fast: - post: - description: Runs inference on the @cf/meta/llama-3.3-70b-instruct-fp8-fast model. - operationId: workers-ai-post-run-cf-meta-llama-3-3-70b-instruct-fp8-fast - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - requests: - items: - properties: - external_reference: - description: >- - User-supplied reference. This field will be present in - the response as well it can be used to reference the - request and response. It's NOT validated to be unique. - type: string - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the - same lines verbatim. - maximum: 2 - minimum: 0 - type: number - max_tokens: - default: 256 - description: >- - The maximum number of tokens to generate in the - response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: 0 - type: number - prompt: - description: Prompt for the text generation model - minLength: 1 - type: string - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back - incrementally using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values - produce more random results. - maximum: 5 - minimum: 0 - type: number - top_p: - description: >- - Adjusts the creativity of the AI's responses by - controlling how many possible words it considers. - Lower values make outputs more predictable; higher - values allow for more varied and creative responses. - maximum: 2 - minimum: 0 - type: number - type: object - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/meta/llama-3.3-70b-instruct-fp8-fast model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/meta/llama-4-scout-17b-16e-instruct: - post: - description: Runs inference on the @cf/meta/llama-4-scout-17b-16e-instruct model. - operationId: workers-ai-post-run-cf-meta-llama-4-scout-17b-16e-instruct - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: 0 - type: number - guided_json: - description: JSON schema that should be fulfilled for the response. - type: object - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: 0 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.15 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 2 - minimum: 0 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - image_url: - properties: - url: - description: >- - image uri with data (e.g. - data:image/jpeg;base64,/9j/...). HTTP URL - will not be accepted - type: string - type: object - text: - type: string - type: - description: Type of the content provided - type: string - type: object - properties: - image_url: - properties: - url: - description: >- - image uri with data (e.g. - data:image/jpeg;base64,/9j/...). HTTP URL will - not be accepted - type: string - type: object - text: - type: string - type: - description: Type of the content provided - type: string - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - tool_call_id: - description: >- - The tool call id. If you don't know what to put here - you can fall back to 000000001 - type: string - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - requests: - items: - type: object - title: Prompt_Inner - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the - same lines verbatim. - maximum: 2 - minimum: 0 - type: number - guided_json: - description: JSON schema that should be fulfilled for the response. - type: object - max_tokens: - default: 256 - description: >- - The maximum number of tokens to generate in the - response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: 0 - type: number - prompt: - description: >- - The input text prompt for the model to generate a - response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must - adhere to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back - incrementally using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.15 - description: >- - Controls the randomness of the output; higher values - produce more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; - higher values introduce more variety and potential - surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by - controlling how many possible words it considers. - Lower values make outputs more predictable; higher - values allow for more varied and creative responses. - maximum: 2 - minimum: 0 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the - conversation history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - image_url: - properties: - url: - description: >- - image uri with data (e.g. - data:image/jpeg;base64,/9j/...). HTTP - URL will not be accepted - type: string - type: object - text: - type: string - type: - description: Type of the content provided - type: string - type: object - properties: - image_url: - properties: - url: - description: >- - image uri with data (e.g. - data:image/jpeg;base64,/9j/...). HTTP - URL will not be accepted - type: string - type: object - text: - type: string - type: - description: Type of the content provided - type: string - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - tool_call_id: - description: >- - The tool call id. If you don't know what to put - here you can fall back to 000000001 - type: string - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: >- - The name of the tool. More descriptive the - better. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: >- - A brief description of what the function - does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by - the function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object - (usually 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/meta/llama-4-scout-17b-16e-instruct model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/meta/llama-guard-3-8b: - post: - description: Runs inference on the @cf/meta/llama-guard-3-8b model. - operationId: workers-ai-post-run-cf-meta-llama-guard-3-8b - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - description: The content of the message as a string. - type: string - role: - description: >- - The role of the message sender must alternate between - 'user' and 'assistant'. - enum: - - user - - assistant - type: string - required: - - role - - content - type: object - type: array - response_format: - description: Dictate the output format of the generated response. - properties: - type: - description: >- - Set to json_object to process and output generated text - as JSON. - type: string - type: object - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - required: - - messages - type: object - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/meta/llama-guard-3-8b model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/meta/m2m100-1.2b: - post: - description: Runs inference on the @cf/meta/m2m100-1.2b model. - operationId: workers-ai-post-run-cf-meta-m2m100-1-2b - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - properties: - source_lang: - default: en - description: >- - The language code of the source text (e.g., 'en' for - English). Defaults to 'en' if not specified - type: string - target_lang: - description: >- - The language code to translate the text into (e.g., 'es' for - Spanish) - type: string - text: - description: The text to be translated - minLength: 1 - type: string - requests: - description: Batch of the embeddings requests to run using async-queue - items: - properties: - source_lang: - default: en - description: >- - The language code of the source text (e.g., 'en' for - English). Defaults to 'en' if not specified - type: string - target_lang: - description: >- - The language code to translate the text into (e.g., - 'es' for Spanish) - type: string - text: - description: The text to be translated - minLength: 1 - type: string - required: - - text - - target_lang - type: object - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/meta/m2m100-1.2b model. - tags: - - Workers AI Translation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/microsoft/nonomni-resnet-50: - post: - description: Runs inference on the @cf/microsoft/nonomni-resnet-50 model. - operationId: workers-ai-post-run-cf-microsoft-nonomni-resnet-50 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/octet-stream: - schema: - format: binary - type: string - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/microsoft/nonomni-resnet-50 model. - tags: - - Workers AI Image Classification - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/microsoft/phi-2: - post: - description: Runs inference on the @cf/microsoft/phi-2 model. - operationId: workers-ai-post-run-cf-microsoft-phi-2 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/microsoft/phi-2 model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/microsoft/resnet-50: - post: - description: Runs inference on the @cf/microsoft/resnet-50 model. - operationId: workers-ai-post-run-cf-microsoft-resnet-50 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/octet-stream: - schema: - format: binary - type: string - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/microsoft/resnet-50 model. - tags: - - Workers AI Image Classification - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/mistral/mistral-7b-instruct-v0.1: - post: - description: Runs inference on the @cf/mistral/mistral-7b-instruct-v0.1 model. - operationId: workers-ai-post-run-cf-mistral-mistral-7b-instruct-v0-1 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/mistral/mistral-7b-instruct-v0.1 model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/mistral/mistral-7b-instruct-v0.2-lora: - post: - description: Runs inference on the @cf/mistral/mistral-7b-instruct-v0.2-lora model. - operationId: workers-ai-post-run-cf-mistral-mistral-7b-instruct-v0-2-lora - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/mistral/mistral-7b-instruct-v0.2-lora model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/mistralai/mistral-small-3.1-24b-instruct: - post: - description: >- - Runs inference on the @cf/mistralai/mistral-small-3.1-24b-instruct - model. - operationId: workers-ai-post-run-cf-mistralai-mistral-small-3-1-24b-instruct - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: 0 - type: number - guided_json: - description: JSON schema that should be fulfilled for the response. - type: object - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: 0 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.15 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 2 - minimum: 0 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - image_url: - properties: - url: - description: >- - image uri with data (e.g. - data:image/jpeg;base64,/9j/...). HTTP URL - will not be accepted - type: string - type: object - text: - type: string - type: - description: Type of the content provided - type: string - type: object - properties: - image_url: - properties: - url: - description: >- - image uri with data (e.g. - data:image/jpeg;base64,/9j/...). HTTP URL will - not be accepted - type: string - type: object - text: - type: string - type: - description: Type of the content provided - type: string - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - tool_call_id: - description: >- - The tool call id. Must be supplied for tool calls for - Mistral-3. If you don't know what to put here you can - fall back to 000000001 - type: string - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/mistralai/mistral-small-3.1-24b-instruct model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/moonshotai/kimi-k2.5: - post: - description: Runs inference on the @cf/moonshotai/kimi-k2.5 model. - operationId: workers-ai-post-run-cf-moonshotai-kimi-k2-5 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - audio: - description: >- - Parameters for audio output. Required when modalities - includes 'audio'. - properties: - format: - enum: - - wav - - aac - - mp3 - - flac - - opus - - pcm16 - type: string - voice: - type: string - properties: - id: - type: string - required: - - id - required: - - voice - - format - type: object - chat_template_kwargs: - properties: - clear_thinking: - default: false - description: If false, preserves reasoning context between turns. - type: boolean - enable_thinking: - default: true - description: Whether to enable reasoning, enabled by default. - type: boolean - type: object - frequency_penalty: - maximum: 2 - minimum: -2 - nullable: true - type: number - function_call: - type: string - enum: - - none - - auto - properties: - name: - type: string - required: - - name - functions: - items: - properties: - description: - description: A description of what the function does. - type: string - name: - description: The name of the function to be called. - type: string - parameters: - description: >- - The parameters the function accepts, described as a - JSON Schema object. - type: object - strict: - nullable: true - type: boolean - required: - - name - type: object - maxItems: 128 - minItems: 1 - type: array - logit_bias: - nullable: true - type: object - logprobs: - nullable: true - type: boolean - max_completion_tokens: - nullable: true - type: integer - max_tokens: - nullable: true - type: integer - metadata: - nullable: true - type: object - modalities: - items: - enum: - - text - - audio - type: string - nullable: true - type: array - model: - description: >- - ID of the model to use (e.g. '@cf/zai-org/glm-4.7-flash, - etc'). - type: string - 'n': - maximum: 128 - minimum: 1 - nullable: true - type: integer - parallel_tool_calls: - default: true - description: Whether to enable parallel function calling during tool use. - type: boolean - prediction: - properties: - content: - type: string - items: - properties: - text: - type: string - type: - enum: - - text - type: string - required: - - type - - text - type: object - type: - enum: - - content - type: string - required: - - type - - content - type: object - presence_penalty: - maximum: 2 - minimum: -2 - nullable: true - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - reasoning_effort: - enum: - - low - - medium - - high - nullable: true - type: string - response_format: - description: Specifies the format the model must output. - type: object - properties: - type: - enum: - - text - type: string - json_schema: - properties: - description: - type: string - name: - type: string - schema: - type: object - strict: - nullable: true - type: boolean - required: - - name - type: object - required: - - type - seed: - nullable: true - type: integer - service_tier: - enum: - - auto - - default - - flex - - scale - - priority - nullable: true - type: string - stop: - type: string - items: - type: string - store: - nullable: true - type: boolean - stream: - nullable: true - type: boolean - stream_options: - properties: - include_obfuscation: - type: boolean - include_usage: - type: boolean - type: object - temperature: - maximum: 2 - minimum: 0 - nullable: true - type: number - tool_choice: - description: >- - Controls which (if any) tool is called by the model. 'none' - = no tools, 'auto' = model decides, 'required' = must call a - tool. - type: string - enum: - - none - - auto - - required - properties: - function: - properties: - name: - type: string - required: - - name - type: object - type: - enum: - - function - type: string - custom: - properties: - name: - type: string - required: - - name - type: object - allowed_tools: - properties: - mode: - enum: - - auto - - required - type: string - tools: - items: - type: object - type: array - required: - - mode - - tools - type: object - required: - - type - tools: - description: A list of tools the model may call. - items: - type: object - properties: - function: - properties: - description: - description: A description of what the function does. - type: string - name: - description: The name of the function to be called. - type: string - parameters: - description: >- - The parameters the function accepts, described as - a JSON Schema object. - type: object - strict: - nullable: true - type: boolean - required: - - name - type: object - type: - enum: - - function - type: string - custom: - properties: - description: - type: string - format: - type: object - properties: - type: - enum: - - text - type: string - grammar: - properties: - definition: - type: string - syntax: - enum: - - lark - - regex - type: string - required: - - definition - - syntax - type: object - required: - - type - name: - type: string - required: - - name - type: object - required: - - type - type: array - top_logprobs: - maximum: 20 - minimum: 0 - nullable: true - type: integer - top_p: - maximum: 1 - minimum: 0 - nullable: true - type: number - user: - description: >- - A unique identifier representing your end-user, for abuse - monitoring. - type: string - web_search_options: - description: >- - Options for the web search tool (when using built-in web - search). - properties: - search_context_size: - default: medium - enum: - - low - - medium - - high - type: string - user_location: - properties: - approximate: - properties: - city: - type: string - country: - type: string - region: - type: string - timezone: - type: string - type: object - type: - enum: - - approximate - type: string - required: - - type - - approximate - type: object - type: object - messages: - description: A list of messages comprising the conversation so far. - items: - type: object - properties: - content: - type: string - items: - properties: - text: - type: string - type: - enum: - - text - type: string - required: - - type - - text - type: object - name: - type: string - role: - enum: - - developer - type: string - audio: - properties: - id: - type: string - required: - - id - type: object - function_call: - properties: - arguments: - type: string - name: - type: string - required: - - name - - arguments - type: object - refusal: - nullable: true - type: string - tool_calls: - items: - type: object - properties: - function: - properties: - arguments: - description: JSON-encoded arguments string. - type: string - name: - type: string - required: - - name - - arguments - type: object - id: - type: string - type: - enum: - - function - type: string - custom: - properties: - input: - type: string - name: - type: string - required: - - name - - input - type: object - required: - - id - - type - type: array - tool_call_id: - type: string - required: - - role - minItems: 1 - type: array - requests: - items: - type: object - title: Prompt - properties: - audio: - description: >- - Parameters for audio output. Required when modalities - includes 'audio'. - properties: - format: - enum: - - wav - - aac - - mp3 - - flac - - opus - - pcm16 - type: string - voice: - type: string - properties: - id: - type: string - required: - - id - required: - - voice - - format - type: object - chat_template_kwargs: - properties: - clear_thinking: - default: false - description: >- - If false, preserves reasoning context between - turns. - type: boolean - enable_thinking: - default: true - description: Whether to enable reasoning, enabled by default. - type: boolean - type: object - frequency_penalty: - maximum: 2 - minimum: -2 - nullable: true - type: number - function_call: - type: string - enum: - - none - - auto - properties: - name: - type: string - required: - - name - functions: - items: - properties: - description: - description: A description of what the function does. - type: string - name: - description: The name of the function to be called. - type: string - parameters: - description: >- - The parameters the function accepts, described - as a JSON Schema object. - type: object - strict: - nullable: true - type: boolean - required: - - name - type: object - maxItems: 128 - minItems: 1 - type: array - logit_bias: - nullable: true - type: object - logprobs: - nullable: true - type: boolean - max_completion_tokens: - nullable: true - type: integer - max_tokens: - nullable: true - type: integer - metadata: - nullable: true - type: object - modalities: - items: - enum: - - text - - audio - type: string - nullable: true - type: array - model: - description: >- - ID of the model to use (e.g. - '@cf/zai-org/glm-4.7-flash, etc'). - type: string - 'n': - maximum: 128 - minimum: 1 - nullable: true - type: integer - parallel_tool_calls: - default: true - description: >- - Whether to enable parallel function calling during - tool use. - type: boolean - prediction: - properties: - content: - type: string - items: - properties: - text: - type: string - type: - enum: - - text - type: string - required: - - type - - text - type: object - type: - enum: - - content - type: string - required: - - type - - content - type: object - presence_penalty: - maximum: 2 - minimum: -2 - nullable: true - type: number - prompt: - description: >- - The input text prompt for the model to generate a - response. - minLength: 1 - type: string - reasoning_effort: - enum: - - low - - medium - - high - nullable: true - type: string - response_format: - description: Specifies the format the model must output. - type: object - properties: - type: - enum: - - text - type: string - json_schema: - properties: - description: - type: string - name: - type: string - schema: - type: object - strict: - nullable: true - type: boolean - required: - - name - type: object - required: - - type - seed: - nullable: true - type: integer - service_tier: - enum: - - auto - - default - - flex - - scale - - priority - nullable: true - type: string - stop: - type: string - items: - type: string - store: - nullable: true - type: boolean - stream: - nullable: true - type: boolean - stream_options: - properties: - include_obfuscation: - type: boolean - include_usage: - type: boolean - type: object - temperature: - maximum: 2 - minimum: 0 - nullable: true - type: number - tool_choice: - description: >- - Controls which (if any) tool is called by the model. - 'none' = no tools, 'auto' = model decides, 'required' - = must call a tool. - type: string - enum: - - none - - auto - - required - properties: - function: - properties: - name: - type: string - required: - - name - type: object - type: - enum: - - function - type: string - custom: - properties: - name: - type: string - required: - - name - type: object - allowed_tools: - properties: - mode: - enum: - - auto - - required - type: string - tools: - items: - type: object - type: array - required: - - mode - - tools - type: object - required: - - type - tools: - description: A list of tools the model may call. - items: - type: object - properties: - function: - properties: - description: - description: A description of what the function does. - type: string - name: - description: The name of the function to be called. - type: string - parameters: - description: >- - The parameters the function accepts, - described as a JSON Schema object. - type: object - strict: - nullable: true - type: boolean - required: - - name - type: object - type: - enum: - - function - type: string - custom: - properties: - description: - type: string - format: - type: object - properties: - type: - enum: - - text - type: string - grammar: - properties: - definition: - type: string - syntax: - enum: - - lark - - regex - type: string - required: - - definition - - syntax - type: object - required: - - type - name: - type: string - required: - - name - type: object - required: - - type - type: array - top_logprobs: - maximum: 20 - minimum: 0 - nullable: true - type: integer - top_p: - maximum: 1 - minimum: 0 - nullable: true - type: number - user: - description: >- - A unique identifier representing your end-user, for - abuse monitoring. - type: string - web_search_options: - description: >- - Options for the web search tool (when using built-in - web search). - properties: - search_context_size: - default: medium - enum: - - low - - medium - - high - type: string - user_location: - properties: - approximate: - properties: - city: - type: string - country: - type: string - region: - type: string - timezone: - type: string - type: object - type: - enum: - - approximate - type: string - required: - - type - - approximate - type: object - type: object - messages: - description: A list of messages comprising the conversation so far. - items: - type: object - properties: - content: - type: string - items: - properties: - text: - type: string - type: - enum: - - text - type: string - required: - - type - - text - type: object - name: - type: string - role: - enum: - - developer - type: string - audio: - properties: - id: - type: string - required: - - id - type: object - function_call: - properties: - arguments: - type: string - name: - type: string - required: - - name - - arguments - type: object - refusal: - nullable: true - type: string - tool_calls: - items: - type: object - properties: - function: - properties: - arguments: - description: JSON-encoded arguments string. - type: string - name: - type: string - required: - - name - - arguments - type: object - id: - type: string - type: - enum: - - function - type: string - custom: - properties: - input: - type: string - name: - type: string - required: - - name - - input - type: object - required: - - id - - type - type: array - tool_call_id: - type: string - required: - - role - minItems: 1 - type: array - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/moonshotai/kimi-k2.5 model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/myshell-ai/melotts: - post: - description: Runs inference on the @cf/myshell-ai/melotts model. - operationId: workers-ai-post-run-cf-myshell-ai-melotts - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - lang: - default: en - description: >- - The speech language (e.g., 'en' for English, 'fr' for - French). Defaults to 'en' if not specified - type: string - prompt: - description: A text description of the audio you want to generate - minLength: 1 - type: string - required: - - prompt - type: object - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/myshell-ai/melotts model. - tags: - - Workers AI Text To Speech - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/nvidia/nemotron-3-120b-a12b: - post: - description: Runs inference on the @cf/nvidia/nemotron-3-120b-a12b model. - operationId: workers-ai-post-run-cf-nvidia-nemotron-3-120b-a12b - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - audio: - description: >- - Parameters for audio output. Required when modalities - includes 'audio'. - properties: - format: - enum: - - wav - - aac - - mp3 - - flac - - opus - - pcm16 - type: string - voice: - type: string - properties: - id: - type: string - required: - - id - required: - - voice - - format - type: object - chat_template_kwargs: - properties: - clear_thinking: - default: false - description: If false, preserves reasoning context between turns. - type: boolean - enable_thinking: - default: true - description: Whether to enable reasoning, enabled by default. - type: boolean - type: object - frequency_penalty: - maximum: 2 - minimum: -2 - nullable: true - type: number - function_call: - type: string - enum: - - none - - auto - properties: - name: - type: string - required: - - name - functions: - items: - properties: - description: - description: A description of what the function does. - type: string - name: - description: The name of the function to be called. - type: string - parameters: - description: >- - The parameters the function accepts, described as a - JSON Schema object. - type: object - strict: - nullable: true - type: boolean - required: - - name - type: object - maxItems: 128 - minItems: 1 - type: array - logit_bias: - nullable: true - type: object - logprobs: - nullable: true - type: boolean - max_completion_tokens: - nullable: true - type: integer - max_tokens: - nullable: true - type: integer - metadata: - nullable: true - type: object - modalities: - items: - enum: - - text - - audio - type: string - nullable: true - type: array - model: - description: >- - ID of the model to use (e.g. '@cf/zai-org/glm-4.7-flash, - etc'). - type: string - 'n': - maximum: 128 - minimum: 1 - nullable: true - type: integer - parallel_tool_calls: - default: true - description: Whether to enable parallel function calling during tool use. - type: boolean - prediction: - properties: - content: - type: string - items: - properties: - text: - type: string - type: - enum: - - text - type: string - required: - - type - - text - type: object - type: - enum: - - content - type: string - required: - - type - - content - type: object - presence_penalty: - maximum: 2 - minimum: -2 - nullable: true - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - reasoning_effort: - enum: - - low - - medium - - high - nullable: true - type: string - response_format: - description: Specifies the format the model must output. - type: object - properties: - type: - enum: - - text - type: string - json_schema: - properties: - description: - type: string - name: - type: string - schema: - type: object - strict: - nullable: true - type: boolean - required: - - name - type: object - required: - - type - seed: - nullable: true - type: integer - service_tier: - enum: - - auto - - default - - flex - - scale - - priority - nullable: true - type: string - stop: - type: string - items: - type: string - store: - nullable: true - type: boolean - stream: - nullable: true - type: boolean - stream_options: - properties: - include_obfuscation: - type: boolean - include_usage: - type: boolean - type: object - temperature: - maximum: 2 - minimum: 0 - nullable: true - type: number - tool_choice: - description: >- - Controls which (if any) tool is called by the model. 'none' - = no tools, 'auto' = model decides, 'required' = must call a - tool. - type: string - enum: - - none - - auto - - required - properties: - function: - properties: - name: - type: string - required: - - name - type: object - type: - enum: - - function - type: string - custom: - properties: - name: - type: string - required: - - name - type: object - allowed_tools: - properties: - mode: - enum: - - auto - - required - type: string - tools: - items: - type: object - type: array - required: - - mode - - tools - type: object - required: - - type - tools: - description: A list of tools the model may call. - items: - type: object - properties: - function: - properties: - description: - description: A description of what the function does. - type: string - name: - description: The name of the function to be called. - type: string - parameters: - description: >- - The parameters the function accepts, described as - a JSON Schema object. - type: object - strict: - nullable: true - type: boolean - required: - - name - type: object - type: - enum: - - function - type: string - custom: - properties: - description: - type: string - format: - type: object - properties: - type: - enum: - - text - type: string - grammar: - properties: - definition: - type: string - syntax: - enum: - - lark - - regex - type: string - required: - - definition - - syntax - type: object - required: - - type - name: - type: string - required: - - name - type: object - required: - - type - type: array - top_logprobs: - maximum: 20 - minimum: 0 - nullable: true - type: integer - top_p: - maximum: 1 - minimum: 0 - nullable: true - type: number - user: - description: >- - A unique identifier representing your end-user, for abuse - monitoring. - type: string - web_search_options: - description: >- - Options for the web search tool (when using built-in web - search). - properties: - search_context_size: - default: medium - enum: - - low - - medium - - high - type: string - user_location: - properties: - approximate: - properties: - city: - type: string - country: - type: string - region: - type: string - timezone: - type: string - type: object - type: - enum: - - approximate - type: string - required: - - type - - approximate - type: object - type: object - messages: - description: A list of messages comprising the conversation so far. - items: - type: object - properties: - content: - type: string - items: - properties: - text: - type: string - type: - enum: - - text - type: string - required: - - type - - text - type: object - name: - type: string - role: - enum: - - developer - type: string - audio: - properties: - id: - type: string - required: - - id - type: object - function_call: - properties: - arguments: - type: string - name: - type: string - required: - - name - - arguments - type: object - refusal: - nullable: true - type: string - tool_calls: - items: - type: object - properties: - function: - properties: - arguments: - description: JSON-encoded arguments string. - type: string - name: - type: string - required: - - name - - arguments - type: object - id: - type: string - type: - enum: - - function - type: string - custom: - properties: - input: - type: string - name: - type: string - required: - - name - - input - type: object - required: - - id - - type - type: array - tool_call_id: - type: string - required: - - role - minItems: 1 - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/nvidia/nemotron-3-120b-a12b model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/openai/gpt-oss-120b: - post: - description: Runs inference on the @cf/openai/gpt-oss-120b model. - operationId: workers-ai-post-run-cf-openai-gpt-oss-120b - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - input: - description: >- - Responses API Input messages. Refer to OpenAI Responses API - docs to learn more about supported content types - type: string - items: {} - reasoning: - properties: - effort: - description: >- - Constrains effort on reasoning for reasoning models. - Currently supported values are low, medium, and high. - Reducing reasoning effort can result in faster responses - and fewer tokens used on reasoning in a response. - enum: - - low - - medium - - high - type: string - summary: - description: >- - A summary of the reasoning performed by the model. This - can be useful for debugging and understanding the - model's reasoning process. One of auto, concise, or - detailed. - enum: - - auto - - concise - - detailed - type: string - type: object - requests: - items: - properties: - input: - description: >- - Responses API Input messages. Refer to OpenAI - Responses API docs to learn more about supported - content types - type: string - items: {} - reasoning: - properties: - effort: - description: >- - Constrains effort on reasoning for reasoning - models. Currently supported values are low, - medium, and high. Reducing reasoning effort can - result in faster responses and fewer tokens used - on reasoning in a response. - enum: - - low - - medium - - high - type: string - summary: - description: >- - A summary of the reasoning performed by the model. - This can be useful for debugging and understanding - the model's reasoning process. One of auto, - concise, or detailed. - enum: - - auto - - concise - - detailed - type: string - type: object - required: - - input - type: object - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/openai/gpt-oss-120b model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/openai/gpt-oss-20b: - post: - description: Runs inference on the @cf/openai/gpt-oss-20b model. - operationId: workers-ai-post-run-cf-openai-gpt-oss-20b - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - input: - description: >- - Responses API Input messages. Refer to OpenAI Responses API - docs to learn more about supported content types - type: string - items: {} - reasoning: - properties: - effort: - description: >- - Constrains effort on reasoning for reasoning models. - Currently supported values are low, medium, and high. - Reducing reasoning effort can result in faster responses - and fewer tokens used on reasoning in a response. - enum: - - low - - medium - - high - type: string - summary: - description: >- - A summary of the reasoning performed by the model. This - can be useful for debugging and understanding the - model's reasoning process. One of auto, concise, or - detailed. - enum: - - auto - - concise - - detailed - type: string - type: object - requests: - items: - properties: - input: - description: >- - Responses API Input messages. Refer to OpenAI - Responses API docs to learn more about supported - content types - type: string - items: {} - reasoning: - properties: - effort: - description: >- - Constrains effort on reasoning for reasoning - models. Currently supported values are low, - medium, and high. Reducing reasoning effort can - result in faster responses and fewer tokens used - on reasoning in a response. - enum: - - low - - medium - - high - type: string - summary: - description: >- - A summary of the reasoning performed by the model. - This can be useful for debugging and understanding - the model's reasoning process. One of auto, - concise, or detailed. - enum: - - auto - - concise - - detailed - type: string - type: object - required: - - input - type: object - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/openai/gpt-oss-20b model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/openai/whisper: - post: - description: Runs inference on the @cf/openai/whisper model. - operationId: workers-ai-post-run-cf-openai-whisper - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/octet-stream: - schema: - format: binary - type: string - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/openai/whisper model. - tags: - - Workers AI Automatic Speech Recognition - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/openai/whisper-large-v3-turbo: - post: - description: Runs inference on the @cf/openai/whisper-large-v3-turbo model. - operationId: workers-ai-post-run-cf-openai-whisper-large-v3-turbo - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - audio: - type: string - description: Base64 encoded value of the audio data. - properties: - body: - type: object - contentType: - type: string - beam_size: - default: 5 - description: >- - The number of beams to use in beam search decoding. Higher - values may improve accuracy at the cost of speed. - type: integer - compression_ratio_threshold: - default: 2.4 - description: >- - Threshold for filtering out segments with high compression - ratio, which often indicate repetitive or hallucinated text. - type: number - condition_on_previous_text: - default: true - description: >- - Whether to condition on previous text during transcription. - Setting to false may help prevent hallucination loops. - type: boolean - hallucination_silence_threshold: - description: >- - Optional threshold (in seconds) to skip silent periods that - may cause hallucinations. - type: number - initial_prompt: - description: >- - A text prompt to help provide context to the model on the - contents of the audio. - type: string - language: - description: The language of the audio being transcribed or translated. - type: string - log_prob_threshold: - default: -1 - description: >- - Threshold for filtering out segments with low average log - probability, indicating low confidence. - type: number - no_speech_threshold: - default: 0.6 - description: >- - Threshold for detecting no-speech segments. Segments with - no-speech probability above this value are skipped. - type: number - prefix: - description: >- - The prefix appended to the beginning of the output of the - transcription and can guide the transcription result. - type: string - task: - default: transcribe - description: Supported tasks are 'translate' or 'transcribe'. - type: string - vad_filter: - default: false - description: Preprocess the audio with a voice activity detection model. - type: boolean - required: - - audio - type: object - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/openai/whisper-large-v3-turbo model. - tags: - - Workers AI Automatic Speech Recognition - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/openai/whisper-tiny-en: - post: - description: Runs inference on the @cf/openai/whisper-tiny-en model. - operationId: workers-ai-post-run-cf-openai-whisper-tiny-en - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/octet-stream: - schema: - format: binary - type: string - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/openai/whisper-tiny-en model. - tags: - - Workers AI Automatic Speech Recognition - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/openchat/openchat-3.5-0106: - post: - description: Runs inference on the @cf/openchat/openchat-3.5-0106 model. - operationId: workers-ai-post-run-cf-openchat-openchat-3-5-0106 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/openchat/openchat-3.5-0106 model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/pfnet/plamo-embedding-1b: - post: - description: Runs inference on the @cf/pfnet/plamo-embedding-1b model. - operationId: workers-ai-post-run-cf-pfnet-plamo-embedding-1b - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - text: - description: >- - Input text to embed. Can be a single string or a list of - strings. - type: string - items: - type: string - required: - - text - type: object - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/pfnet/plamo-embedding-1b model. - tags: - - Workers AI Text Embeddings - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/qwen/qwen1.5-0.5b-chat: - post: - description: Runs inference on the @cf/qwen/qwen1.5-0.5b-chat model. - operationId: workers-ai-post-run-cf-qwen-qwen1-5-0-5b-chat - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/qwen/qwen1.5-0.5b-chat model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/qwen/qwen1.5-1.8b-chat: - post: - description: Runs inference on the @cf/qwen/qwen1.5-1.8b-chat model. - operationId: workers-ai-post-run-cf-qwen-qwen1-5-1-8b-chat - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/qwen/qwen1.5-1.8b-chat model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/qwen/qwen1.5-14b-chat-awq: - post: - description: Runs inference on the @cf/qwen/qwen1.5-14b-chat-awq model. - operationId: workers-ai-post-run-cf-qwen-qwen1-5-14b-chat-awq - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/qwen/qwen1.5-14b-chat-awq model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/qwen/qwen1.5-7b-chat-awq: - post: - description: Runs inference on the @cf/qwen/qwen1.5-7b-chat-awq model. - operationId: workers-ai-post-run-cf-qwen-qwen1-5-7b-chat-awq - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/qwen/qwen1.5-7b-chat-awq model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/qwen/qwen2.5-coder-32b-instruct: - post: - description: Runs inference on the @cf/qwen/qwen2.5-coder-32b-instruct model. - operationId: workers-ai-post-run-cf-qwen-qwen2-5-coder-32b-instruct - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: 0 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: 0 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 2 - minimum: 0 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - description: The content of the message as a string. - type: string - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/qwen/qwen2.5-coder-32b-instruct model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/qwen/qwen3-30b-a3b-fp8: - post: - description: Runs inference on the @cf/qwen/qwen3-30b-a3b-fp8 model. - operationId: workers-ai-post-run-cf-qwen-qwen3-30b-a3b-fp8 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 2000 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - requests: - items: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the - same lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to - fine-tune the base model. - type: string - max_tokens: - default: 256 - description: >- - The maximum number of tokens to generate in the - response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: >- - The input text prompt for the model to generate a - response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must - adhere to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back - incrementally using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values - produce more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; - higher values introduce more variety and potential - surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by - controlling how many possible words it considers. - Lower values make outputs more predictable; higher - values allow for more varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the - conversation history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: >- - The name of the tool. More descriptive the - better. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: >- - A brief description of what the function - does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by - the function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object - (usually 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/qwen/qwen3-30b-a3b-fp8 model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/qwen/qwen3-embedding-0.6b: - post: - description: Runs inference on the @cf/qwen/qwen3-embedding-0.6b model. - operationId: workers-ai-post-run-cf-qwen-qwen3-embedding-0-6b - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - documents: - type: string - description: A single document string - items: - minLength: 1 - type: string - instruction: - default: >- - Given a web search query, retrieve relevant passages that - answer the query - description: Optional instruction for the task - type: string - queries: - type: string - description: A single query string - items: - minLength: 1 - type: string - text: - type: string - description: 'Alias for documents: a single text string' - items: - minLength: 1 - type: string - type: object - responses: - '200': - content: - application/json: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/qwen/qwen3-embedding-0.6b model. - tags: - - Workers AI Text Embeddings - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/qwen/qwq-32b: - post: - description: Runs inference on the @cf/qwen/qwq-32b model. - operationId: workers-ai-post-run-cf-qwen-qwq-32b - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: 0 - type: number - guided_json: - description: JSON schema that should be fulfilled for the response. - type: object - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: 0 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.15 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 2 - minimum: 0 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - image_url: - properties: - url: - description: >- - image uri with data (e.g. - data:image/jpeg;base64,/9j/...). HTTP URL - will not be accepted - type: string - type: object - text: - type: string - type: - description: Type of the content provided - type: string - type: object - properties: - image_url: - properties: - url: - description: >- - image uri with data (e.g. - data:image/jpeg;base64,/9j/...). HTTP URL will - not be accepted - type: string - type: object - text: - type: string - type: - description: Type of the content provided - type: string - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - tool_call_id: - description: >- - The tool call id. If you don't know what to put here - you can fall back to 000000001 - type: string - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/qwen/qwq-32b model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/runwayml/stable-diffusion-v1-5-img2img: - post: - description: Runs inference on the @cf/runwayml/stable-diffusion-v1-5-img2img model. - operationId: workers-ai-post-run-cf-runwayml-stable-diffusion-v1-5-img2img - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - guidance: - default: 7.5 - description: >- - Controls how closely the generated image should adhere to - the prompt; higher values make the image more aligned with - the prompt - type: number - height: - description: The height of the generated image in pixels - maximum: 2048 - minimum: 256 - type: integer - image: - description: >- - For use with img2img tasks. An array of integers that - represent the image data constrained to 8-bit unsigned - integer values - items: - description: A value between 0 and 255 - type: number - type: array - image_b64: - description: >- - For use with img2img tasks. A base64-encoded string of the - input image - type: string - mask: - description: >- - An array representing An array of integers that represent - mask image data for inpainting constrained to 8-bit unsigned - integer values - items: - description: A value between 0 and 255 - type: number - type: array - negative_prompt: - description: Text describing elements to avoid in the generated image - type: string - num_steps: - default: 20 - description: >- - The number of diffusion steps; higher values can improve - quality but take longer - maximum: 20 - type: integer - prompt: - description: A text description of the image you want to generate - minLength: 1 - type: string - seed: - description: Random seed for reproducibility of the image generation - type: integer - strength: - default: 1 - description: >- - A value between 0 and 1 indicating how strongly to apply the - transformation during img2img tasks; lower values make the - output closer to the input image - type: number - width: - description: The width of the generated image in pixels - maximum: 2048 - minimum: 256 - type: integer - required: - - prompt - type: object - responses: - '200': - content: - application/json: - schema: - type: object - image/png: - schema: - format: binary - type: string - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/runwayml/stable-diffusion-v1-5-img2img model. - tags: - - Workers AI Text To Image - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/runwayml/stable-diffusion-v1-5-inpainting: - post: - description: >- - Runs inference on the @cf/runwayml/stable-diffusion-v1-5-inpainting - model. - operationId: workers-ai-post-run-cf-runwayml-stable-diffusion-v1-5-inpainting - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - guidance: - default: 7.5 - description: >- - Controls how closely the generated image should adhere to - the prompt; higher values make the image more aligned with - the prompt - type: number - height: - description: The height of the generated image in pixels - maximum: 2048 - minimum: 256 - type: integer - image: - description: >- - For use with img2img tasks. An array of integers that - represent the image data constrained to 8-bit unsigned - integer values - items: - description: A value between 0 and 255 - type: number - type: array - image_b64: - description: >- - For use with img2img tasks. A base64-encoded string of the - input image - type: string - mask: - description: >- - An array representing An array of integers that represent - mask image data for inpainting constrained to 8-bit unsigned - integer values - items: - description: A value between 0 and 255 - type: number - type: array - negative_prompt: - description: Text describing elements to avoid in the generated image - type: string - num_steps: - default: 20 - description: >- - The number of diffusion steps; higher values can improve - quality but take longer - maximum: 20 - type: integer - prompt: - description: A text description of the image you want to generate - minLength: 1 - type: string - seed: - description: Random seed for reproducibility of the image generation - type: integer - strength: - default: 1 - description: >- - A value between 0 and 1 indicating how strongly to apply the - transformation during img2img tasks; lower values make the - output closer to the input image - type: number - width: - description: The width of the generated image in pixels - maximum: 2048 - minimum: 256 - type: integer - required: - - prompt - type: object - responses: - '200': - content: - application/json: - schema: - type: object - image/png: - schema: - format: binary - type: string - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/runwayml/stable-diffusion-v1-5-inpainting model. - tags: - - Workers AI Text To Image - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/stabilityai/stable-diffusion-xl-base-1.0: - post: - description: >- - Runs inference on the @cf/stabilityai/stable-diffusion-xl-base-1.0 - model. - operationId: workers-ai-post-run-cf-stabilityai-stable-diffusion-xl-base-1-0 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - guidance: - default: 7.5 - description: >- - Controls how closely the generated image should adhere to - the prompt; higher values make the image more aligned with - the prompt - type: number - height: - description: The height of the generated image in pixels - maximum: 2048 - minimum: 256 - type: integer - image: - description: >- - For use with img2img tasks. An array of integers that - represent the image data constrained to 8-bit unsigned - integer values - items: - description: A value between 0 and 255 - type: number - type: array - image_b64: - description: >- - For use with img2img tasks. A base64-encoded string of the - input image - type: string - mask: - description: >- - An array representing An array of integers that represent - mask image data for inpainting constrained to 8-bit unsigned - integer values - items: - description: A value between 0 and 255 - type: number - type: array - negative_prompt: - description: Text describing elements to avoid in the generated image - type: string - num_steps: - default: 20 - description: >- - The number of diffusion steps; higher values can improve - quality but take longer - maximum: 20 - type: integer - prompt: - description: A text description of the image you want to generate - minLength: 1 - type: string - seed: - description: Random seed for reproducibility of the image generation - type: integer - strength: - default: 1 - description: >- - A value between 0 and 1 indicating how strongly to apply the - transformation during img2img tasks; lower values make the - output closer to the input image - type: number - width: - description: The width of the generated image in pixels - maximum: 2048 - minimum: 256 - type: integer - required: - - prompt - type: object - responses: - '200': - content: - application/json: - schema: - type: object - image/png: - schema: - format: binary - type: string - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/stabilityai/stable-diffusion-xl-base-1.0 model. - tags: - - Workers AI Text To Image - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/thebloke/discolm-german-7b-v1-awq: - post: - description: Runs inference on the @cf/thebloke/discolm-german-7b-v1-awq model. - operationId: workers-ai-post-run-cf-thebloke-discolm-german-7b-v1-awq - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/thebloke/discolm-german-7b-v1-awq model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/tiiuae/falcon-7b-instruct: - post: - description: Runs inference on the @cf/tiiuae/falcon-7b-instruct model. - operationId: workers-ai-post-run-cf-tiiuae-falcon-7b-instruct - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/tiiuae/falcon-7b-instruct model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/tinyllama/tinyllama-1.1b-chat-v1.0: - post: - description: Runs inference on the @cf/tinyllama/tinyllama-1.1b-chat-v1.0 model. - operationId: workers-ai-post-run-cf-tinyllama-tinyllama-1-1b-chat-v1-0 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/tinyllama/tinyllama-1.1b-chat-v1.0 model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@cf/zai-org/glm-4.7-flash: - post: - description: Runs inference on the @cf/zai-org/glm-4.7-flash model. - operationId: workers-ai-post-run-cf-zai-org-glm-4-7-flash - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - audio: - description: >- - Parameters for audio output. Required when modalities - includes 'audio'. - properties: - format: - enum: - - wav - - aac - - mp3 - - flac - - opus - - pcm16 - type: string - voice: - type: string - properties: - id: - type: string - required: - - id - required: - - voice - - format - type: object - chat_template_kwargs: - properties: - clear_thinking: - default: false - description: If false, preserves reasoning context between turns. - type: boolean - enable_thinking: - default: true - description: Whether to enable reasoning, enabled by default. - type: boolean - type: object - frequency_penalty: - maximum: 2 - minimum: -2 - nullable: true - type: number - function_call: - type: string - enum: - - none - - auto - properties: - name: - type: string - required: - - name - functions: - items: - properties: - description: - description: A description of what the function does. - type: string - name: - description: The name of the function to be called. - type: string - parameters: - description: >- - The parameters the function accepts, described as a - JSON Schema object. - type: object - strict: - nullable: true - type: boolean - required: - - name - type: object - maxItems: 128 - minItems: 1 - type: array - logit_bias: - nullable: true - type: object - logprobs: - nullable: true - type: boolean - max_completion_tokens: - nullable: true - type: integer - max_tokens: - nullable: true - type: integer - metadata: - nullable: true - type: object - modalities: - items: - enum: - - text - - audio - type: string - nullable: true - type: array - model: - description: >- - ID of the model to use (e.g. '@cf/zai-org/glm-4.7-flash, - etc'). - type: string - 'n': - maximum: 128 - minimum: 1 - nullable: true - type: integer - parallel_tool_calls: - default: true - description: Whether to enable parallel function calling during tool use. - type: boolean - prediction: - properties: - content: - type: string - items: - properties: - text: - type: string - type: - enum: - - text - type: string - required: - - type - - text - type: object - type: - enum: - - content - type: string - required: - - type - - content - type: object - presence_penalty: - maximum: 2 - minimum: -2 - nullable: true - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - reasoning_effort: - enum: - - low - - medium - - high - nullable: true - type: string - response_format: - description: Specifies the format the model must output. - type: object - properties: - type: - enum: - - text - type: string - json_schema: - properties: - description: - type: string - name: - type: string - schema: - type: object - strict: - nullable: true - type: boolean - required: - - name - type: object - required: - - type - seed: - nullable: true - type: integer - service_tier: - enum: - - auto - - default - - flex - - scale - - priority - nullable: true - type: string - stop: - type: string - items: - type: string - store: - nullable: true - type: boolean - stream: - nullable: true - type: boolean - stream_options: - properties: - include_obfuscation: - type: boolean - include_usage: - type: boolean - type: object - temperature: - maximum: 2 - minimum: 0 - nullable: true - type: number - tool_choice: - description: >- - Controls which (if any) tool is called by the model. 'none' - = no tools, 'auto' = model decides, 'required' = must call a - tool. - type: string - enum: - - none - - auto - - required - properties: - function: - properties: - name: - type: string - required: - - name - type: object - type: - enum: - - function - type: string - custom: - properties: - name: - type: string - required: - - name - type: object - allowed_tools: - properties: - mode: - enum: - - auto - - required - type: string - tools: - items: - type: object - type: array - required: - - mode - - tools - type: object - required: - - type - tools: - description: A list of tools the model may call. - items: - type: object - properties: - function: - properties: - description: - description: A description of what the function does. - type: string - name: - description: The name of the function to be called. - type: string - parameters: - description: >- - The parameters the function accepts, described as - a JSON Schema object. - type: object - strict: - nullable: true - type: boolean - required: - - name - type: object - type: - enum: - - function - type: string - custom: - properties: - description: - type: string - format: - type: object - properties: - type: - enum: - - text - type: string - grammar: - properties: - definition: - type: string - syntax: - enum: - - lark - - regex - type: string - required: - - definition - - syntax - type: object - required: - - type - name: - type: string - required: - - name - type: object - required: - - type - type: array - top_logprobs: - maximum: 20 - minimum: 0 - nullable: true - type: integer - top_p: - maximum: 1 - minimum: 0 - nullable: true - type: number - user: - description: >- - A unique identifier representing your end-user, for abuse - monitoring. - type: string - web_search_options: - description: >- - Options for the web search tool (when using built-in web - search). - properties: - search_context_size: - default: medium - enum: - - low - - medium - - high - type: string - user_location: - properties: - approximate: - properties: - city: - type: string - country: - type: string - region: - type: string - timezone: - type: string - type: object - type: - enum: - - approximate - type: string - required: - - type - - approximate - type: object - type: object - messages: - description: A list of messages comprising the conversation so far. - items: - type: object - properties: - content: - type: string - items: - properties: - text: - type: string - type: - enum: - - text - type: string - required: - - type - - text - type: object - name: - type: string - role: - enum: - - developer - type: string - audio: - properties: - id: - type: string - required: - - id - type: object - function_call: - properties: - arguments: - type: string - name: - type: string - required: - - name - - arguments - type: object - refusal: - nullable: true - type: string - tool_calls: - items: - type: object - properties: - function: - properties: - arguments: - description: JSON-encoded arguments string. - type: string - name: - type: string - required: - - name - - arguments - type: object - id: - type: string - type: - enum: - - function - type: string - custom: - properties: - input: - type: string - name: - type: string - required: - - name - - input - type: object - required: - - id - - type - type: array - tool_call_id: - type: string - required: - - role - minItems: 1 - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @cf/zai-org/glm-4.7-flash model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@hf/google/gemma-7b-it: - post: - description: Runs inference on the @hf/google/gemma-7b-it model. - operationId: workers-ai-post-run-hf-google-gemma-7b-it - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @hf/google/gemma-7b-it model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@hf/mistral/mistral-7b-instruct-v0.2: - post: - description: Runs inference on the @hf/mistral/mistral-7b-instruct-v0.2 model. - operationId: workers-ai-post-run-hf-mistral-mistral-7b-instruct-v0-2 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @hf/mistral/mistral-7b-instruct-v0.2 model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@hf/nexusflow/starling-lm-7b-beta: - post: - description: Runs inference on the @hf/nexusflow/starling-lm-7b-beta model. - operationId: workers-ai-post-run-hf-nexusflow-starling-lm-7b-beta - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @hf/nexusflow/starling-lm-7b-beta model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@hf/nousresearch/hermes-2-pro-mistral-7b: - post: - description: Runs inference on the @hf/nousresearch/hermes-2-pro-mistral-7b model. - operationId: workers-ai-post-run-hf-nousresearch-hermes-2-pro-mistral-7b - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @hf/nousresearch/hermes-2-pro-mistral-7b model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@hf/thebloke/deepseek-coder-6.7b-base-awq: - post: - description: Runs inference on the @hf/thebloke/deepseek-coder-6.7b-base-awq model. - operationId: workers-ai-post-run-hf-thebloke-deepseek-coder-6-7b-base-awq - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @hf/thebloke/deepseek-coder-6.7b-base-awq model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@hf/thebloke/deepseek-coder-6.7b-instruct-awq: - post: - description: >- - Runs inference on the @hf/thebloke/deepseek-coder-6.7b-instruct-awq - model. - operationId: workers-ai-post-run-hf-thebloke-deepseek-coder-6-7b-instruct-awq - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @hf/thebloke/deepseek-coder-6.7b-instruct-awq model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@hf/thebloke/llama-2-13b-chat-awq: - post: - description: Runs inference on the @hf/thebloke/llama-2-13b-chat-awq model. - operationId: workers-ai-post-run-hf-thebloke-llama-2-13b-chat-awq - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @hf/thebloke/llama-2-13b-chat-awq model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@hf/thebloke/mistral-7b-instruct-v0.1-awq: - post: - description: Runs inference on the @hf/thebloke/mistral-7b-instruct-v0.1-awq model. - operationId: workers-ai-post-run-hf-thebloke-mistral-7b-instruct-v0-1-awq - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @hf/thebloke/mistral-7b-instruct-v0.1-awq model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@hf/thebloke/neural-chat-7b-v3-1-awq: - post: - description: Runs inference on the @hf/thebloke/neural-chat-7b-v3-1-awq model. - operationId: workers-ai-post-run-hf-thebloke-neural-chat-7b-v3-1-awq - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @hf/thebloke/neural-chat-7b-v3-1-awq model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@hf/thebloke/openhermes-2.5-mistral-7b-awq: - post: - description: Runs inference on the @hf/thebloke/openhermes-2.5-mistral-7b-awq model. - operationId: workers-ai-post-run-hf-thebloke-openhermes-2-5-mistral-7b-awq - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @hf/thebloke/openhermes-2.5-mistral-7b-awq model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/@hf/thebloke/zephyr-7b-beta-awq: - post: - description: Runs inference on the @hf/thebloke/zephyr-7b-beta-awq model. - operationId: workers-ai-post-run-hf-thebloke-zephyr-7b-beta-awq - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: queueRequest - schema: - type: string - x-auditable: true - - in: query - name: tags - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Prompt - properties: - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - prompt: - description: The input text prompt for the model to generate a response. - minLength: 1 - type: string - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - seed: - description: Random seed for reproducibility of the generation. - maximum: 9999999999 - minimum: 1 - type: integer - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - required: [] - responses: - '200': - content: - application/json: - schema: - type: object - text/event-stream: - schema: - type: object - description: Object with user data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: string - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - errors - - success - - result - type: object - description: Bad request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute @hf/thebloke/zephyr-7b-beta-awq model. - tags: - - Workers AI Text Generation - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/run/{model_name}: - post: - description: >- - This endpoint provides users with the capability to run specific AI - models on-demand. By submitting the required input data, users can - receive real-time predictions or results generated by the chosen AI - model. The endpoint supports various AI model types, ensuring - flexibility and adaptability for diverse use cases. Model specific - inputs available in [Cloudflare - Docs](https://developers.cloudflare.com/workers-ai/models/). - operationId: workers-ai-post-run-model - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: model_name - schema: - type: string - required: true - requestBody: - content: - application/json: - schema: - type: object - title: Text Classification - properties: - text: - description: The text that you want to classify - minLength: 1 - type: string - guidance: - default: 7.5 - description: >- - Controls how closely the generated image should adhere to - the prompt; higher values make the image more aligned with - the prompt - type: number - height: - description: The height of the generated image in pixels - maximum: 2048 - minimum: 256 - type: integer - image: - description: >- - For use with img2img tasks. An array of integers that - represent the image data constrained to 8-bit unsigned - integer values - items: - description: A value between 0 and 255 - type: number - type: array - image_b64: - description: >- - For use with img2img tasks. A base64-encoded string of the - input image - type: string - mask: - description: >- - An array representing An array of integers that represent - mask image data for inpainting constrained to 8-bit unsigned - integer values - items: - description: A value between 0 and 255 - type: number - type: array - negative_prompt: - description: Text describing elements to avoid in the generated image - type: string - num_steps: - default: 20 - description: >- - The number of diffusion steps; higher values can improve - quality but take longer - maximum: 20 - type: integer - prompt: - description: A text description of the image you want to generate - minLength: 1 - type: string - seed: - description: Random seed for reproducibility of the image generation - type: integer - strength: - default: 1 - description: >- - A value between 0 and 1 indicating how strongly to apply the - transformation during img2img tasks; lower values make the - output closer to the input image - type: number - width: - description: The width of the generated image in pixels - maximum: 2048 - minimum: 256 - type: integer - lang: - default: en - description: >- - The speech language (e.g., 'en' for English, 'fr' for - French). Defaults to 'en' if not specified - type: string - audio: - description: >- - An array of integers that represent the audio data - constrained to 8-bit unsigned integer values - items: - description: A value between 0 and 255 - type: number - type: array - source_lang: - description: The language of the recorded audio - type: string - target_lang: - description: >- - The language to translate the transcription into. Currently - only English is supported. - type: string - frequency_penalty: - description: >- - Decreases the likelihood of the model repeating the same - lines verbatim. - maximum: 2 - minimum: -2 - type: number - lora: - description: >- - Name of the LoRA (Low-Rank Adaptation) model to fine-tune - the base model. - type: string - max_tokens: - default: 256 - description: The maximum number of tokens to generate in the response. - type: integer - presence_penalty: - description: >- - Increases the likelihood of the model introducing new - topics. - maximum: 2 - minimum: -2 - type: number - raw: - default: false - description: >- - If true, a chat template is not applied and you must adhere - to the specific model's expected formatting. - type: boolean - repetition_penalty: - description: >- - Penalty for repeated tokens; higher values discourage - repetition. - maximum: 2 - minimum: 0 - type: number - response_format: - properties: - json_schema: {} - type: - enum: - - json_object - - json_schema - type: string - title: JSON Mode - type: object - stream: - default: false - description: >- - If true, the response will be streamed back incrementally - using SSE, Server Sent Events. - type: boolean - temperature: - default: 0.6 - description: >- - Controls the randomness of the output; higher values produce - more random results. - maximum: 5 - minimum: 0 - type: number - top_k: - description: >- - Limits the AI to choose from the top 'k' most probable - words. Lower values make responses more focused; higher - values introduce more variety and potential surprises. - maximum: 50 - minimum: 1 - type: integer - top_p: - description: >- - Adjusts the creativity of the AI's responses by controlling - how many possible words it considers. Lower values make - outputs more predictable; higher values allow for more - varied and creative responses. - maximum: 1 - minimum: 0.001 - type: number - functions: - items: - properties: - code: - type: string - name: - type: string - required: - - name - - code - type: object - type: array - messages: - description: >- - An array of message objects representing the conversation - history. - items: - properties: - content: - type: string - description: The content of the message as a string. - items: - properties: - text: - description: Text content - type: string - type: - description: Type of the content (text) - type: string - type: object - role: - description: >- - The role of the message sender (e.g., 'user', - 'assistant', 'system', 'tool'). - type: string - required: - - role - - content - type: object - type: array - tools: - description: A list of tools available for the assistant to use. - items: - type: object - properties: - description: - description: A brief description of what the tool does. - type: string - name: - description: The name of the tool. More descriptive the better. - type: string - parameters: - description: Schema defining the parameters accepted by the tool. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - function: - description: Details of the function tool. - properties: - description: - description: A brief description of what the function does. - type: string - name: - description: The name of the function. - type: string - parameters: - description: >- - Schema defining the parameters accepted by the - function. - properties: - properties: - description: Definitions of each parameter. - type: object - required: - description: List of required parameter names. - items: - type: string - type: array - type: - description: >- - The type of the parameters object (usually - 'object'). - type: string - required: - - type - - properties - type: object - required: - - name - - description - - parameters - type: object - type: - description: Specifies the type of tool (e.g., 'function'). - type: string - required: [] - type: array - input_text: - description: The text that you want the model to summarize - minLength: 1 - type: string - max_length: - default: 1024 - description: The maximum length of the generated summary in tokens - type: integer - ignore_eos: - description: >- - Whether to ignore the EOS token and continue generating - tokens after the EOS token is generated. - type: boolean - required: [] - responses: - '200': - content: - application/json: - schema: - properties: - result: - type: object - title: Text Classification - description: An array of classification results for the input text - items: - properties: - label: - description: >- - The classification label assigned to the text (e.g., - 'POSITIVE' or 'NEGATIVE') - type: string - score: - description: >- - Confidence score indicating the likelihood that the - text belongs to the specified label - type: number - type: object - format: binary - properties: - audio: - description: The generated audio in MP3 format, base64-encoded - type: string - data: - description: Embeddings of the requested text values - items: - description: >- - Floating point embedding representation shaped by - the embedding model - items: - type: number - type: array - type: array - shape: - items: - type: number - type: array - text: - description: The transcription - type: string - vtt: - type: string - word_count: - type: number - words: - items: - properties: - end: - description: The ending second when the word completes - type: number - start: - description: The second this word begins in the recording - type: number - word: - type: string - type: object - type: array - response: - description: The generated text response from the model - type: string - tool_calls: - description: >- - An array of tool calls requests made during the - response generation - items: - properties: - arguments: - description: >- - The arguments passed to be passed to the tool - call request - type: object - name: - description: The name of the tool to be called - type: string - type: object - type: array - usage: - description: Usage statistics for the inference request - properties: - completion_tokens: - default: 0 - description: Total number of tokens in output - type: number - prompt_tokens: - default: 0 - description: Total number of tokens in input - type: number - total_tokens: - default: 0 - description: Total number of input and output tokens - type: number - type: object - translated_text: - description: The translated text in the target language - type: string - summary: - description: The summarized version of the input text - type: string - description: - type: string - required: [] - type: object - description: Model response - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Execute AI model - tags: - - Workers AI - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai - resource_chain: [] - method: run - /accounts/{account_id}/ai/tasks/search: - get: - description: >- - Searches Workers AI models by task type (e.g., text-generation, - embeddings). - operationId: workers-ai-search-task - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - type: object - type: array - messages: - items: - type: string - type: array - result: - items: - type: object - type: array - success: - type: boolean - x-auditable: true - required: - - success - - result - - errors - - messages - type: object - description: Returns a list of tasks - '404': - content: - application/json: - schema: - properties: - errors: - items: - type: object - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Object not found - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Task Search - tags: - - Workers AI - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai - resource_chain: - - tasks - method: list - /accounts/{account_id}/ai/tomarkdown: - post: - description: Converts uploaded files into Markdown format using Workers AI. - operationId: workers-ai-post-to-markdown - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - multipart/form-data: - schema: - properties: - files: - items: - format: binary - type: string - type: array - required: - - files - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - items: - properties: - data: - type: string - x-auditable: true - format: - type: string - x-auditable: true - mimeType: - type: string - x-auditable: true - name: - type: string - x-auditable: true - tokens: - type: string - x-auditable: true - required: - - name - - mimeType - - format - - tokens - - data - type: object - type: array - success: - type: boolean - required: - - success - - result - type: object - description: Model Schema - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Convert Files into Markdown - tags: - - Workers AI - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai/tomarkdown/supported: - get: - description: Lists all file formats supported for conversion to Markdown. - operationId: workers-ai-get-to-markdown-supported - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - items: - properties: - extension: - type: string - x-auditable: true - mimeType: - type: string - x-auditable: true - required: - - extension - - mimeType - type: object - type: array - success: - type: boolean - required: - - success - - result - type: object - description: Successful response - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get all converted formats supported - tags: - - Workers AI - x-api-token-group: - - Workers AI Write - - Workers AI Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.ai - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai - resource_chain: - - to_markdown - method: supported - /accounts/{account_id}/autorag/rags/{id}/ai-search: - post: - operationId: autorag-config-ai-search - parameters: - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - filters: - type: object - properties: - key: - type: string - type: - enum: - - eq - - ne - - gt - - gte - - lt - - lte - type: string - value: - type: string - filters: - items: - properties: - key: - type: string - type: - enum: - - eq - - ne - - gt - - gte - - lt - - lte - type: string - value: - type: string - required: - - key - - type - - value - type: object - type: array - required: - - type - max_num_results: - default: 10 - maximum: 50 - minimum: 1 - type: integer - model: - type: string - enum: - - '@cf/meta/llama-3.3-70b-instruct-fp8-fast' - - '@cf/meta/llama-3.1-8b-instruct-fast' - - '@cf/meta/llama-3.1-8b-instruct-fp8' - - '@cf/meta/llama-4-scout-17b-16e-instruct' - - '@cf/qwen/qwen3-30b-a3b-fp8' - - '@cf/deepseek-ai/deepseek-r1-distill-qwen-32b' - - '@cf/moonshotai/kimi-k2-instruct' - - anthropic/claude-3-7-sonnet - - anthropic/claude-sonnet-4 - - anthropic/claude-opus-4 - - anthropic/claude-3-5-haiku - - cerebras/qwen-3-235b-a22b-instruct - - cerebras/qwen-3-235b-a22b-thinking - - cerebras/llama-3.3-70b - - cerebras/llama-4-maverick-17b-128e-instruct - - cerebras/llama-4-scout-17b-16e-instruct - - cerebras/gpt-oss-120b - - google-ai-studio/gemini-2.5-flash - - google-ai-studio/gemini-2.5-pro - - grok/grok-4 - - groq/llama-3.3-70b-versatile - - groq/llama-3.1-8b-instant - - openai/gpt-5 - - openai/gpt-5-mini - - openai/gpt-5-nano - query: - type: string - ranking_options: - default: {} - properties: - ranker: - type: string - score_threshold: - default: 0.4 - maximum: 1 - minimum: 0 - type: number - type: object - reranking: - properties: - enabled: - default: false - type: boolean - model: - type: string - enum: - - '@cf/baai/bge-reranker-base' - type: object - rewrite_query: - default: false - type: boolean - stream: - default: false - type: boolean - system_prompt: - type: string - required: - - query - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - data: - items: - properties: - attributes: - type: object - content: - items: - properties: - text: - type: string - type: - type: string - type: object - type: array - file_id: - type: string - filename: - type: string - score: - type: number - required: - - score - type: object - type: array - has_more: - default: false - type: boolean - next_page: - nullable: true - type: string - object: - type: string - response: - type: string - search_query: - type: string - required: - - search_query - - response - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Returns the log details - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - enum: - - false - type: boolean - required: - - success - - errors - type: object - description: Not Found - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: AI Search - tags: - - AutoRAG RAG Search - x-api-token-group: - - Auto Rag Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.rag - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/autorag/rags/{id}/files: - get: - operationId: autorag-config-files - parameters: - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - in: query - name: per_page - schema: - default: 20 - maximum: 50 - minimum: 0 - type: integer - - in: query - name: search - schema: - type: string - - in: query - name: status - schema: - enum: - - completed - - queued - - running - - error - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - items: - properties: - error: - type: string - key: - type: string - required: - - key - - error - type: object - type: array - result_info: - properties: - count: - type: integer - page: - type: integer - per_page: - default: 20 - maximum: 50 - minimum: 5 - type: integer - total_count: - type: integer - required: - - count - - page - - total_count - type: object - success: - type: boolean - required: - - success - - result - - result_info - type: object - description: Returns the AI Search files - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - enum: - - false - type: boolean - required: - - success - - errors - type: object - description: autorag_not_found - '503': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - enum: - - false - type: boolean - required: - - success - - errors - type: object - description: unable_to_connect_to_autorag - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Files - tags: - - AutoRAG RAG - x-api-token-group: - - Auto Rag Write - - Auto Rag Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.rag - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/autorag/rags/{id}/jobs: - get: - operationId: autorag-config-list-jobs - parameters: - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - in: query - name: per_page - schema: - default: 20 - maximum: 50 - minimum: 0 - type: integer - responses: - '200': - content: - application/json: - schema: - properties: - result: - items: - properties: - end_reason: - type: string - ended_at: - type: string - id: - type: string - last_seen_at: - type: string - source: - enum: - - user - - schedule - type: string - started_at: - type: string - required: - - id - - source - type: object - type: array - result_info: - properties: - count: - type: integer - page: - type: integer - per_page: - type: integer - total_count: - type: integer - required: - - count - - page - - per_page - - total_count - type: object - success: - type: boolean - required: - - success - - result - - result_info - type: object - description: Returns a list of AutoRAG Jobs - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - enum: - - false - type: boolean - required: - - success - - errors - type: object - description: autorag_not_found - '503': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - enum: - - false - type: boolean - required: - - success - - errors - type: object - description: unable_to_connect_to_autorag - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Jobs - tags: - - AutoRAG Jobs - x-api-token-group: - - Auto Rag Write - - Auto Rag Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.rag - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/autorag/rags/{id}/jobs/{job_id}: - get: - operationId: autorag-config-get-job - parameters: - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - - name: job_id - in: path - required: true - description: The job ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - end_reason: - type: string - ended_at: - type: string - id: - type: string - last_seen_at: - type: string - source: - enum: - - user - - schedule - type: string - started_at: - type: string - required: - - id - - source - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Returns a AutoRAG Job Details - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - enum: - - false - type: boolean - required: - - success - - errors - type: object - description: job_not_found - '503': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - enum: - - false - type: boolean - required: - - success - - errors - type: object - description: unable_to_connect_to_autorag - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get a Job Details - tags: - - AutoRAG Jobs - x-api-token-group: - - Auto Rag Write - - Auto Rag Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.rag - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/autorag/rags/{id}/jobs/{job_id}/logs: - get: - operationId: autorag-config-list-job-logs - parameters: - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - - name: job_id - in: path - required: true - description: The job ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - in: query - name: per_page - schema: - default: 20 - maximum: 500 - minimum: 0 - type: integer - responses: - '200': - content: - application/json: - schema: - properties: - result: - items: - properties: - created_at: - type: number - readOnly: true - id: - type: integer - message: - type: string - message_type: - type: integer - required: - - id - - message - - message_type - - created_at - type: object - type: array - result_info: - properties: - count: - type: integer - page: - type: integer - per_page: - type: integer - total_count: - type: integer - required: - - count - - page - - per_page - - total_count - type: object - success: - type: boolean - required: - - success - - result - - result_info - type: object - description: Returns a list of AutoRAG Job Logs - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - enum: - - false - type: boolean - required: - - success - - errors - type: object - description: autorag_not_found - '503': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - enum: - - false - type: boolean - required: - - success - - errors - type: object - description: unable_to_connect_to_autorag - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Job Logs - tags: - - AutoRAG Jobs - x-api-token-group: - - Auto Rag Write - - Auto Rag Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.rag - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/autorag/rags/{id}/search: - post: - operationId: autorag-config-search - parameters: - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - filters: - type: object - properties: - key: - type: string - type: - enum: - - eq - - ne - - gt - - gte - - lt - - lte - type: string - value: - type: string - filters: - items: - properties: - key: - type: string - type: - enum: - - eq - - ne - - gt - - gte - - lt - - lte - type: string - value: - type: string - required: - - key - - type - - value - type: object - type: array - required: - - type - max_num_results: - default: 10 - maximum: 50 - minimum: 1 - type: integer - query: - type: string - ranking_options: - default: {} - properties: - ranker: - type: string - score_threshold: - default: 0.4 - maximum: 1 - minimum: 0 - type: number - type: object - reranking: - properties: - enabled: - default: false - type: boolean - model: - type: string - enum: - - '@cf/baai/bge-reranker-base' - type: object - rewrite_query: - default: false - type: boolean - required: - - query - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - data: - items: - properties: - attributes: - type: object - content: - items: - properties: - text: - type: string - type: - type: string - type: object - type: array - file_id: - type: string - filename: - type: string - score: - type: number - required: - - score - type: object - type: array - has_more: - default: false - type: boolean - next_page: - nullable: true - type: string - object: - type: string - search_query: - type: string - required: - - search_query - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Returns the log details - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - enum: - - false - type: boolean - required: - - success - - errors - type: object - description: Not Found - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Search - tags: - - AutoRAG RAG Search - x-api-token-group: - - Auto Rag Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.rag - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/autorag/rags/{id}/sync: - patch: - operationId: autorag-config-sync - parameters: - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - job_id: - type: string - required: - - job_id - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Returns the autorag sync status - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - enum: - - false - type: boolean - required: - - success - - errors - type: object - description: autorag_is_paused - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - enum: - - false - type: boolean - required: - - success - - errors - type: object - description: autorag_not_found - '429': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - enum: - - false - type: boolean - required: - - success - - errors - type: object - description: sync_in_cooldown - '503': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - enum: - - false - type: boolean - required: - - success - - errors - type: object - description: unable_to_connect_to_autorag - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Sync - tags: - - AutoRAG RAG - x-api-token-group: - - Auto Rag Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.rag - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true -components: - schemas: {} - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - authors: - id: cloudflare.ai.authors - name: authors - title: Authors - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1ai~1authors~1search/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/authors/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - finetunes: - id: cloudflare.ai.finetunes - name: finetunes - title: Finetunes - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1ai~1finetunes/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1ai~1finetunes/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/finetunes/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/finetunes/methods/create' - update: [] - delete: [] - replace: [] - public: - id: cloudflare.ai.public - name: public - title: Public - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1ai~1finetunes~1public/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/public/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - assets: - id: cloudflare.ai.assets - name: assets - title: Assets - methods: - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1finetunes~1{finetune_id}~1finetune-assets/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: '#/components/x-stackQL-resources/assets/methods/create' - update: [] - delete: [] - replace: [] - schema: - id: cloudflare.ai.schema - name: schema - title: Schema - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1ai~1models~1schema/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/schema/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - models: - id: cloudflare.ai.models - name: models - title: Models - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1ai~1models~1search/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/models/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - indictrans2_en_indic_1_b: - id: cloudflare.ai.indictrans2_en_indic_1_b - name: indictrans2_en_indic_1_b - title: Indictrans2 En Indic 1 B - methods: - workers_ai_post_run_cf_ai4bharat_indictrans2_en_indic_1_b: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1ai4bharat~1indictrans2-en-indic-1B/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/indictrans2_en_indic_1_b/methods/workers_ai_post_run_cf_ai4bharat_indictrans2_en_indic_1_b - update: [] - delete: [] - replace: [] - nonomni_indictrans2_en_indic_1b: - id: cloudflare.ai.nonomni_indictrans2_en_indic_1b - name: nonomni_indictrans2_en_indic_1b - title: Nonomni Indictrans2 En Indic 1b - methods: - workers_ai_post_run_cf_ai4bharat_nonomni_indictrans2_en_indic_1b: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1ai4bharat~1nonomni-indictrans2-en-indic-1b/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/nonomni_indictrans2_en_indic_1b/methods/workers_ai_post_run_cf_ai4bharat_nonomni_indictrans2_en_indic_1b - update: [] - delete: [] - replace: [] - gemma_sea_lion_v4_27b_it: - id: cloudflare.ai.gemma_sea_lion_v4_27b_it - name: gemma_sea_lion_v4_27b_it - title: Gemma Sea Lion V4 27b It - methods: - workers_ai_post_run_cf_aisingapore_gemma_sea_lion_v4_27b_it: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1aisingapore~1gemma-sea-lion-v4-27b-it/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/gemma_sea_lion_v4_27b_it/methods/workers_ai_post_run_cf_aisingapore_gemma_sea_lion_v4_27b_it - update: [] - delete: [] - replace: [] - bge_base_en_v1_5: - id: cloudflare.ai.bge_base_en_v1_5 - name: bge_base_en_v1_5 - title: Bge Base En V1 5 - methods: - workers_ai_post_run_cf_baai_bge_base_en_v1_5: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1baai~1bge-base-en-v1.5/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/bge_base_en_v1_5/methods/workers_ai_post_run_cf_baai_bge_base_en_v1_5 - update: [] - delete: [] - replace: [] - bge_large_en_v1_5: - id: cloudflare.ai.bge_large_en_v1_5 - name: bge_large_en_v1_5 - title: Bge Large En V1 5 - methods: - workers_ai_post_run_cf_baai_bge_large_en_v1_5: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1baai~1bge-large-en-v1.5/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/bge_large_en_v1_5/methods/workers_ai_post_run_cf_baai_bge_large_en_v1_5 - update: [] - delete: [] - replace: [] - bge_m3: - id: cloudflare.ai.bge_m3 - name: bge_m3 - title: Bge M3 - methods: - workers_ai_post_run_cf_baai_bge_m3: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1baai~1bge-m3/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/bge_m3/methods/workers_ai_post_run_cf_baai_bge_m3 - update: [] - delete: [] - replace: [] - bge_reranker_base: - id: cloudflare.ai.bge_reranker_base - name: bge_reranker_base - title: Bge Reranker Base - methods: - workers_ai_post_run_cf_baai_bge_reranker_base: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1baai~1bge-reranker-base/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/bge_reranker_base/methods/workers_ai_post_run_cf_baai_bge_reranker_base - update: [] - delete: [] - replace: [] - bge_small_en_v1_5: - id: cloudflare.ai.bge_small_en_v1_5 - name: bge_small_en_v1_5 - title: Bge Small En V1 5 - methods: - workers_ai_post_run_cf_baai_bge_small_en_v1_5: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1baai~1bge-small-en-v1.5/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/bge_small_en_v1_5/methods/workers_ai_post_run_cf_baai_bge_small_en_v1_5 - update: [] - delete: [] - replace: [] - nonomni_bge_base_en_v1_5: - id: cloudflare.ai.nonomni_bge_base_en_v1_5 - name: nonomni_bge_base_en_v1_5 - title: Nonomni Bge Base En V1 5 - methods: - workers_ai_post_run_cf_baai_nonomni_bge_base_en_v1_5: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1baai~1nonomni-bge-base-en-v1.5/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/nonomni_bge_base_en_v1_5/methods/workers_ai_post_run_cf_baai_nonomni_bge_base_en_v1_5 - update: [] - delete: [] - replace: [] - nonomni_bge_large_en_v1_5: - id: cloudflare.ai.nonomni_bge_large_en_v1_5 - name: nonomni_bge_large_en_v1_5 - title: Nonomni Bge Large En V1 5 - methods: - workers_ai_post_run_cf_baai_nonomni_bge_large_en_v1_5: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1baai~1nonomni-bge-large-en-v1.5/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/nonomni_bge_large_en_v1_5/methods/workers_ai_post_run_cf_baai_nonomni_bge_large_en_v1_5 - update: [] - delete: [] - replace: [] - nonomni_bge_m3: - id: cloudflare.ai.nonomni_bge_m3 - name: nonomni_bge_m3 - title: Nonomni Bge M3 - methods: - workers_ai_post_run_cf_baai_nonomni_bge_m3: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1baai~1nonomni-bge-m3/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/nonomni_bge_m3/methods/workers_ai_post_run_cf_baai_nonomni_bge_m3 - update: [] - delete: [] - replace: [] - nonomni_bge_small_en_v1_5: - id: cloudflare.ai.nonomni_bge_small_en_v1_5 - name: nonomni_bge_small_en_v1_5 - title: Nonomni Bge Small En V1 5 - methods: - workers_ai_post_run_cf_baai_nonomni_bge_small_en_v1_5: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1baai~1nonomni-bge-small-en-v1.5/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/nonomni_bge_small_en_v1_5/methods/workers_ai_post_run_cf_baai_nonomni_bge_small_en_v1_5 - update: [] - delete: [] - replace: [] - flux_1_schnell: - id: cloudflare.ai.flux_1_schnell - name: flux_1_schnell - title: Flux 1 Schnell - methods: - workers_ai_post_run_cf_black_forest_labs_flux_1_schnell: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1black-forest-labs~1flux-1-schnell/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/flux_1_schnell/methods/workers_ai_post_run_cf_black_forest_labs_flux_1_schnell - update: [] - delete: [] - replace: [] - flux_2_dev: - id: cloudflare.ai.flux_2_dev - name: flux_2_dev - title: Flux 2 Dev - methods: - workers_ai_post_run_cf_black_forest_labs_flux_2_dev: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1black-forest-labs~1flux-2-dev/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/flux_2_dev/methods/workers_ai_post_run_cf_black_forest_labs_flux_2_dev - update: [] - delete: [] - replace: [] - flux_2_klein_4b: - id: cloudflare.ai.flux_2_klein_4b - name: flux_2_klein_4b - title: Flux 2 Klein 4b - methods: - workers_ai_post_run_cf_black_forest_labs_flux_2_klein_4b: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1black-forest-labs~1flux-2-klein-4b/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/flux_2_klein_4b/methods/workers_ai_post_run_cf_black_forest_labs_flux_2_klein_4b - update: [] - delete: [] - replace: [] - flux_2_klein_9b: - id: cloudflare.ai.flux_2_klein_9b - name: flux_2_klein_9b - title: Flux 2 Klein 9b - methods: - workers_ai_post_run_cf_black_forest_labs_flux_2_klein_9b: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1black-forest-labs~1flux-2-klein-9b/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/flux_2_klein_9b/methods/workers_ai_post_run_cf_black_forest_labs_flux_2_klein_9b - update: [] - delete: [] - replace: [] - stable_diffusion_xl_lightning: - id: cloudflare.ai.stable_diffusion_xl_lightning - name: stable_diffusion_xl_lightning - title: Stable Diffusion Xl Lightning - methods: - workers_ai_post_run_cf_bytedance_stable_diffusion_xl_lightning: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1bytedance~1stable-diffusion-xl-lightning/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/stable_diffusion_xl_lightning/methods/workers_ai_post_run_cf_bytedance_stable_diffusion_xl_lightning - update: [] - delete: [] - replace: [] - aura_1: - id: cloudflare.ai.aura_1 - name: aura_1 - title: Aura 1 - methods: - workers_ai_post_run_cf_deepgram_aura_1: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1deepgram~1aura-1/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/aura_1/methods/workers_ai_post_run_cf_deepgram_aura_1 - update: [] - delete: [] - replace: [] - aura_2_en: - id: cloudflare.ai.aura_2_en - name: aura_2_en - title: Aura 2 En - methods: - workers_ai_post_run_cf_deepgram_aura_2_en: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1deepgram~1aura-2-en/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/aura_2_en/methods/workers_ai_post_run_cf_deepgram_aura_2_en - update: [] - delete: [] - replace: [] - aura_2_es: - id: cloudflare.ai.aura_2_es - name: aura_2_es - title: Aura 2 Es - methods: - workers_ai_post_run_cf_deepgram_aura_2_es: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1deepgram~1aura-2-es/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/aura_2_es/methods/workers_ai_post_run_cf_deepgram_aura_2_es - update: [] - delete: [] - replace: [] - flux: - id: cloudflare.ai.flux - name: flux - title: Flux - methods: - workers_ai_post_run_cf_deepgram_flux: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1deepgram~1flux/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/flux/methods/workers_ai_post_run_cf_deepgram_flux - update: [] - delete: [] - replace: [] - nova_3: - id: cloudflare.ai.nova_3 - name: nova_3 - title: Nova 3 - methods: - workers_ai_post_run_cf_deepgram_nova_3: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1deepgram~1nova-3/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/nova_3/methods/workers_ai_post_run_cf_deepgram_nova_3 - update: [] - delete: [] - replace: [] - deepseek_math_7b_instruct: - id: cloudflare.ai.deepseek_math_7b_instruct - name: deepseek_math_7b_instruct - title: Deepseek Math 7b Instruct - methods: - workers_ai_post_run_cf_deepseek_ai_deepseek_math_7b_instruct: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1deepseek-ai~1deepseek-math-7b-instruct/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/deepseek_math_7b_instruct/methods/workers_ai_post_run_cf_deepseek_ai_deepseek_math_7b_instruct - update: [] - delete: [] - replace: [] - deepseek_r1_distill_qwen_32b: - id: cloudflare.ai.deepseek_r1_distill_qwen_32b - name: deepseek_r1_distill_qwen_32b - title: Deepseek R1 Distill Qwen 32b - methods: - workers_ai_post_run_cf_deepseek_ai_deepseek_r1_distill_qwen_32b: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1deepseek-ai~1deepseek-r1-distill-qwen-32b/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/deepseek_r1_distill_qwen_32b/methods/workers_ai_post_run_cf_deepseek_ai_deepseek_r1_distill_qwen_32b - update: [] - delete: [] - replace: [] - sqlcoder_7b_2: - id: cloudflare.ai.sqlcoder_7b_2 - name: sqlcoder_7b_2 - title: Sqlcoder 7b 2 - methods: - workers_ai_post_run_cf_defog_sqlcoder_7b_2: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1defog~1sqlcoder-7b-2/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/sqlcoder_7b_2/methods/workers_ai_post_run_cf_defog_sqlcoder_7b_2 - update: [] - delete: [] - replace: [] - bart_large_cnn: - id: cloudflare.ai.bart_large_cnn - name: bart_large_cnn - title: Bart Large Cnn - methods: - workers_ai_post_run_cf_facebook_bart_large_cnn: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1facebook~1bart-large-cnn/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/bart_large_cnn/methods/workers_ai_post_run_cf_facebook_bart_large_cnn - update: [] - delete: [] - replace: [] - nonomni_bart_large_cnn: - id: cloudflare.ai.nonomni_bart_large_cnn - name: nonomni_bart_large_cnn - title: Nonomni Bart Large Cnn - methods: - workers_ai_post_run_cf_facebook_nonomni_bart_large_cnn: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1facebook~1nonomni-bart-large-cnn/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/nonomni_bart_large_cnn/methods/workers_ai_post_run_cf_facebook_nonomni_bart_large_cnn - update: [] - delete: [] - replace: [] - nonomni_detr_resnet_50: - id: cloudflare.ai.nonomni_detr_resnet_50 - name: nonomni_detr_resnet_50 - title: Nonomni Detr Resnet 50 - methods: - workers_ai_post_run_cf_facebook_nonomni_detr_resnet_50: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1facebook~1nonomni-detr-resnet-50/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/nonomni_detr_resnet_50/methods/workers_ai_post_run_cf_facebook_nonomni_detr_resnet_50 - update: [] - delete: [] - replace: [] - una_cybertron_7b_v2_bf16: - id: cloudflare.ai.una_cybertron_7b_v2_bf16 - name: una_cybertron_7b_v2_bf16 - title: Una Cybertron 7b V2 Bf16 - methods: - workers_ai_post_run_cf_fblgit_una_cybertron_7b_v2_bf16: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1fblgit~1una-cybertron-7b-v2-bf16/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/una_cybertron_7b_v2_bf16/methods/workers_ai_post_run_cf_fblgit_una_cybertron_7b_v2_bf16 - update: [] - delete: [] - replace: [] - embeddinggemma_300m: - id: cloudflare.ai.embeddinggemma_300m - name: embeddinggemma_300m - title: Embeddinggemma 300m - methods: - workers_ai_post_run_cf_google_embeddinggemma_300m: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1google~1embeddinggemma-300m/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/embeddinggemma_300m/methods/workers_ai_post_run_cf_google_embeddinggemma_300m - update: [] - delete: [] - replace: [] - gemma_2b_it_lora: - id: cloudflare.ai.gemma_2b_it_lora - name: gemma_2b_it_lora - title: Gemma 2b It Lora - methods: - workers_ai_post_run_cf_google_gemma_2b_it_lora: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1google~1gemma-2b-it-lora/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/gemma_2b_it_lora/methods/workers_ai_post_run_cf_google_gemma_2b_it_lora - update: [] - delete: [] - replace: [] - gemma_3_12b_it: - id: cloudflare.ai.gemma_3_12b_it - name: gemma_3_12b_it - title: Gemma 3 12b It - methods: - workers_ai_post_run_cf_google_gemma_3_12b_it: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1google~1gemma-3-12b-it/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/gemma_3_12b_it/methods/workers_ai_post_run_cf_google_gemma_3_12b_it - update: [] - delete: [] - replace: [] - gemma_7b_it_lora: - id: cloudflare.ai.gemma_7b_it_lora - name: gemma_7b_it_lora - title: Gemma 7b It Lora - methods: - workers_ai_post_run_cf_google_gemma_7b_it_lora: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1google~1gemma-7b-it-lora/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/gemma_7b_it_lora/methods/workers_ai_post_run_cf_google_gemma_7b_it_lora - update: [] - delete: [] - replace: [] - nonomni_embeddinggemma_300m: - id: cloudflare.ai.nonomni_embeddinggemma_300m - name: nonomni_embeddinggemma_300m - title: Nonomni Embeddinggemma 300m - methods: - workers_ai_post_run_cf_google_nonomni_embeddinggemma_300m: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1google~1nonomni-embeddinggemma-300m/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/nonomni_embeddinggemma_300m/methods/workers_ai_post_run_cf_google_nonomni_embeddinggemma_300m - update: [] - delete: [] - replace: [] - distilbert_sst_2_int8: - id: cloudflare.ai.distilbert_sst_2_int8 - name: distilbert_sst_2_int8 - title: Distilbert Sst 2 Int8 - methods: - workers_ai_post_run_cf_huggingface_distilbert_sst_2_int8: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1huggingface~1distilbert-sst-2-int8/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/distilbert_sst_2_int8/methods/workers_ai_post_run_cf_huggingface_distilbert_sst_2_int8 - update: [] - delete: [] - replace: [] - nonomni_distilbert_sst_2_int8: - id: cloudflare.ai.nonomni_distilbert_sst_2_int8 - name: nonomni_distilbert_sst_2_int8 - title: Nonomni Distilbert Sst 2 Int8 - methods: - workers_ai_post_run_cf_huggingface_nonomni_distilbert_sst_2_int8: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1huggingface~1nonomni-distilbert-sst-2-int8/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/nonomni_distilbert_sst_2_int8/methods/workers_ai_post_run_cf_huggingface_nonomni_distilbert_sst_2_int8 - update: [] - delete: [] - replace: [] - granite_4_0_h_micro: - id: cloudflare.ai.granite_4_0_h_micro - name: granite_4_0_h_micro - title: Granite 4 0 H Micro - methods: - workers_ai_post_run_cf_ibm_granite_granite_4_0_h_micro: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1ibm-granite~1granite-4.0-h-micro/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/granite_4_0_h_micro/methods/workers_ai_post_run_cf_ibm_granite_granite_4_0_h_micro - update: [] - delete: [] - replace: [] - lucid_origin: - id: cloudflare.ai.lucid_origin - name: lucid_origin - title: Lucid Origin - methods: - workers_ai_post_run_cf_leonardo_lucid_origin: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1leonardo~1lucid-origin/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/lucid_origin/methods/workers_ai_post_run_cf_leonardo_lucid_origin - update: [] - delete: [] - replace: [] - phoenix_1_0: - id: cloudflare.ai.phoenix_1_0 - name: phoenix_1_0 - title: Phoenix 1 0 - methods: - workers_ai_post_run_cf_leonardo_phoenix_1_0: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1leonardo~1phoenix-1.0/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/phoenix_1_0/methods/workers_ai_post_run_cf_leonardo_phoenix_1_0 - update: [] - delete: [] - replace: [] - dreamshaper_8_lcm: - id: cloudflare.ai.dreamshaper_8_lcm - name: dreamshaper_8_lcm - title: Dreamshaper 8 Lcm - methods: - workers_ai_post_run_cf_lykon_dreamshaper_8_lcm: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1lykon~1dreamshaper-8-lcm/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/dreamshaper_8_lcm/methods/workers_ai_post_run_cf_lykon_dreamshaper_8_lcm - update: [] - delete: [] - replace: [] - llama_2_7b_chat_hf_lora: - id: cloudflare.ai.llama_2_7b_chat_hf_lora - name: llama_2_7b_chat_hf_lora - title: Llama 2 7b Chat Hf Lora - methods: - workers_ai_post_run_cf_meta_llama_llama_2_7b_chat_hf_lora: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta-llama~1llama-2-7b-chat-hf-lora/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/llama_2_7b_chat_hf_lora/methods/workers_ai_post_run_cf_meta_llama_llama_2_7b_chat_hf_lora - update: [] - delete: [] - replace: [] - llama_2_7b_chat_fp16: - id: cloudflare.ai.llama_2_7b_chat_fp16 - name: llama_2_7b_chat_fp16 - title: Llama 2 7b Chat Fp16 - methods: - workers_ai_post_run_cf_meta_llama_2_7b_chat_fp16: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-2-7b-chat-fp16/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/llama_2_7b_chat_fp16/methods/workers_ai_post_run_cf_meta_llama_2_7b_chat_fp16 - update: [] - delete: [] - replace: [] - llama_2_7b_chat_int8: - id: cloudflare.ai.llama_2_7b_chat_int8 - name: llama_2_7b_chat_int8 - title: Llama 2 7b Chat Int8 - methods: - workers_ai_post_run_cf_meta_llama_2_7b_chat_int8: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-2-7b-chat-int8/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/llama_2_7b_chat_int8/methods/workers_ai_post_run_cf_meta_llama_2_7b_chat_int8 - update: [] - delete: [] - replace: [] - llama_3_8b_instruct: - id: cloudflare.ai.llama_3_8b_instruct - name: llama_3_8b_instruct - title: Llama 3 8b Instruct - methods: - workers_ai_post_run_cf_meta_llama_3_8b_instruct: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-3-8b-instruct/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/llama_3_8b_instruct/methods/workers_ai_post_run_cf_meta_llama_3_8b_instruct - update: [] - delete: [] - replace: [] - llama_3_8b_instruct_awq: - id: cloudflare.ai.llama_3_8b_instruct_awq - name: llama_3_8b_instruct_awq - title: Llama 3 8b Instruct Awq - methods: - workers_ai_post_run_cf_meta_llama_3_8b_instruct_awq: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-3-8b-instruct-awq/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/llama_3_8b_instruct_awq/methods/workers_ai_post_run_cf_meta_llama_3_8b_instruct_awq - update: [] - delete: [] - replace: [] - llama_3_1_70b_instruct_fp8_fast: - id: cloudflare.ai.llama_3_1_70b_instruct_fp8_fast - name: llama_3_1_70b_instruct_fp8_fast - title: Llama 3 1 70b Instruct Fp8 Fast - methods: - workers_ai_post_run_cf_meta_llama_3_1_70b_instruct_fp8_fast: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-3.1-70b-instruct-fp8-fast/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/llama_3_1_70b_instruct_fp8_fast/methods/workers_ai_post_run_cf_meta_llama_3_1_70b_instruct_fp8_fast - update: [] - delete: [] - replace: [] - llama_3_1_8b_instruct_awq: - id: cloudflare.ai.llama_3_1_8b_instruct_awq - name: llama_3_1_8b_instruct_awq - title: Llama 3 1 8b Instruct Awq - methods: - workers_ai_post_run_cf_meta_llama_3_1_8b_instruct_awq: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-3.1-8b-instruct-awq/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/llama_3_1_8b_instruct_awq/methods/workers_ai_post_run_cf_meta_llama_3_1_8b_instruct_awq - update: [] - delete: [] - replace: [] - llama_3_1_8b_instruct_fp8: - id: cloudflare.ai.llama_3_1_8b_instruct_fp8 - name: llama_3_1_8b_instruct_fp8 - title: Llama 3 1 8b Instruct Fp8 - methods: - workers_ai_post_run_cf_meta_llama_3_1_8b_instruct_fp8: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-3.1-8b-instruct-fp8/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/llama_3_1_8b_instruct_fp8/methods/workers_ai_post_run_cf_meta_llama_3_1_8b_instruct_fp8 - update: [] - delete: [] - replace: [] - llama_3_1_8b_instruct_fp8_fast: - id: cloudflare.ai.llama_3_1_8b_instruct_fp8_fast - name: llama_3_1_8b_instruct_fp8_fast - title: Llama 3 1 8b Instruct Fp8 Fast - methods: - workers_ai_post_run_cf_meta_llama_3_1_8b_instruct_fp8_fast: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-3.1-8b-instruct-fp8-fast/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/llama_3_1_8b_instruct_fp8_fast/methods/workers_ai_post_run_cf_meta_llama_3_1_8b_instruct_fp8_fast - update: [] - delete: [] - replace: [] - llama_3_2_11b_vision_instruct: - id: cloudflare.ai.llama_3_2_11b_vision_instruct - name: llama_3_2_11b_vision_instruct - title: Llama 3 2 11b Vision Instruct - methods: - workers_ai_post_run_cf_meta_llama_3_2_11b_vision_instruct: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-3.2-11b-vision-instruct/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/llama_3_2_11b_vision_instruct/methods/workers_ai_post_run_cf_meta_llama_3_2_11b_vision_instruct - update: [] - delete: [] - replace: [] - llama_3_2_1b_instruct: - id: cloudflare.ai.llama_3_2_1b_instruct - name: llama_3_2_1b_instruct - title: Llama 3 2 1b Instruct - methods: - workers_ai_post_run_cf_meta_llama_3_2_1b_instruct: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-3.2-1b-instruct/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/llama_3_2_1b_instruct/methods/workers_ai_post_run_cf_meta_llama_3_2_1b_instruct - update: [] - delete: [] - replace: [] - llama_3_2_3b_instruct: - id: cloudflare.ai.llama_3_2_3b_instruct - name: llama_3_2_3b_instruct - title: Llama 3 2 3b Instruct - methods: - workers_ai_post_run_cf_meta_llama_3_2_3b_instruct: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-3.2-3b-instruct/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/llama_3_2_3b_instruct/methods/workers_ai_post_run_cf_meta_llama_3_2_3b_instruct - update: [] - delete: [] - replace: [] - llama_3_3_70b_instruct_fp8_fast: - id: cloudflare.ai.llama_3_3_70b_instruct_fp8_fast - name: llama_3_3_70b_instruct_fp8_fast - title: Llama 3 3 70b Instruct Fp8 Fast - methods: - workers_ai_post_run_cf_meta_llama_3_3_70b_instruct_fp8_fast: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-3.3-70b-instruct-fp8-fast/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/llama_3_3_70b_instruct_fp8_fast/methods/workers_ai_post_run_cf_meta_llama_3_3_70b_instruct_fp8_fast - update: [] - delete: [] - replace: [] - llama_4_scout_17b_16e_instruct: - id: cloudflare.ai.llama_4_scout_17b_16e_instruct - name: llama_4_scout_17b_16e_instruct - title: Llama 4 Scout 17b 16e Instruct - methods: - workers_ai_post_run_cf_meta_llama_4_scout_17b_16e_instruct: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-4-scout-17b-16e-instruct/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/llama_4_scout_17b_16e_instruct/methods/workers_ai_post_run_cf_meta_llama_4_scout_17b_16e_instruct - update: [] - delete: [] - replace: [] - llama_guard_3_8b: - id: cloudflare.ai.llama_guard_3_8b - name: llama_guard_3_8b - title: Llama Guard 3 8b - methods: - workers_ai_post_run_cf_meta_llama_guard_3_8b: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-guard-3-8b/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/llama_guard_3_8b/methods/workers_ai_post_run_cf_meta_llama_guard_3_8b - update: [] - delete: [] - replace: [] - m2m100_1_2b: - id: cloudflare.ai.m2m100_1_2b - name: m2m100_1_2b - title: M2m100 1 2b - methods: - workers_ai_post_run_cf_meta_m2m100_1_2b: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1m2m100-1.2b/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/m2m100_1_2b/methods/workers_ai_post_run_cf_meta_m2m100_1_2b - update: [] - delete: [] - replace: [] - nonomni_resnet_50: - id: cloudflare.ai.nonomni_resnet_50 - name: nonomni_resnet_50 - title: Nonomni Resnet 50 - methods: - workers_ai_post_run_cf_microsoft_nonomni_resnet_50: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1microsoft~1nonomni-resnet-50/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/nonomni_resnet_50/methods/workers_ai_post_run_cf_microsoft_nonomni_resnet_50 - update: [] - delete: [] - replace: [] - phi_2: - id: cloudflare.ai.phi_2 - name: phi_2 - title: Phi 2 - methods: - workers_ai_post_run_cf_microsoft_phi_2: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1microsoft~1phi-2/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/phi_2/methods/workers_ai_post_run_cf_microsoft_phi_2 - update: [] - delete: [] - replace: [] - resnet_50: - id: cloudflare.ai.resnet_50 - name: resnet_50 - title: Resnet 50 - methods: - workers_ai_post_run_cf_microsoft_resnet_50: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1microsoft~1resnet-50/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/resnet_50/methods/workers_ai_post_run_cf_microsoft_resnet_50 - update: [] - delete: [] - replace: [] - mistral_7b_instruct_v0_1: - id: cloudflare.ai.mistral_7b_instruct_v0_1 - name: mistral_7b_instruct_v0_1 - title: Mistral 7b Instruct V0 1 - methods: - workers_ai_post_run_cf_mistral_mistral_7b_instruct_v0_1: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1mistral~1mistral-7b-instruct-v0.1/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/mistral_7b_instruct_v0_1/methods/workers_ai_post_run_cf_mistral_mistral_7b_instruct_v0_1 - update: [] - delete: [] - replace: [] - mistral_7b_instruct_v0_2_lora: - id: cloudflare.ai.mistral_7b_instruct_v0_2_lora - name: mistral_7b_instruct_v0_2_lora - title: Mistral 7b Instruct V0 2 Lora - methods: - workers_ai_post_run_cf_mistral_mistral_7b_instruct_v0_2_lora: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1mistral~1mistral-7b-instruct-v0.2-lora/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/mistral_7b_instruct_v0_2_lora/methods/workers_ai_post_run_cf_mistral_mistral_7b_instruct_v0_2_lora - update: [] - delete: [] - replace: [] - mistral_small_3_1_24b_instruct: - id: cloudflare.ai.mistral_small_3_1_24b_instruct - name: mistral_small_3_1_24b_instruct - title: Mistral Small 3 1 24b Instruct - methods: - workers_ai_post_run_cf_mistralai_mistral_small_3_1_24b_instruct: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1mistralai~1mistral-small-3.1-24b-instruct/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/mistral_small_3_1_24b_instruct/methods/workers_ai_post_run_cf_mistralai_mistral_small_3_1_24b_instruct - update: [] - delete: [] - replace: [] - kimi_k2_5: - id: cloudflare.ai.kimi_k2_5 - name: kimi_k2_5 - title: Kimi K2 5 - methods: - workers_ai_post_run_cf_moonshotai_kimi_k2_5: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1moonshotai~1kimi-k2.5/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/kimi_k2_5/methods/workers_ai_post_run_cf_moonshotai_kimi_k2_5 - update: [] - delete: [] - replace: [] - melotts: - id: cloudflare.ai.melotts - name: melotts - title: Melotts - methods: - workers_ai_post_run_cf_myshell_ai_melotts: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1myshell-ai~1melotts/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/melotts/methods/workers_ai_post_run_cf_myshell_ai_melotts - update: [] - delete: [] - replace: [] - nemotron_3_120b_a12b: - id: cloudflare.ai.nemotron_3_120b_a12b - name: nemotron_3_120b_a12b - title: Nemotron 3 120b A12b - methods: - workers_ai_post_run_cf_nvidia_nemotron_3_120b_a12b: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1nvidia~1nemotron-3-120b-a12b/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/nemotron_3_120b_a12b/methods/workers_ai_post_run_cf_nvidia_nemotron_3_120b_a12b - update: [] - delete: [] - replace: [] - gpt_oss_120b: - id: cloudflare.ai.gpt_oss_120b - name: gpt_oss_120b - title: Gpt Oss 120b - methods: - workers_ai_post_run_cf_openai_gpt_oss_120b: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1openai~1gpt-oss-120b/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/gpt_oss_120b/methods/workers_ai_post_run_cf_openai_gpt_oss_120b - update: [] - delete: [] - replace: [] - gpt_oss_20b: - id: cloudflare.ai.gpt_oss_20b - name: gpt_oss_20b - title: Gpt Oss 20b - methods: - workers_ai_post_run_cf_openai_gpt_oss_20b: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1openai~1gpt-oss-20b/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/gpt_oss_20b/methods/workers_ai_post_run_cf_openai_gpt_oss_20b - update: [] - delete: [] - replace: [] - whisper: - id: cloudflare.ai.whisper - name: whisper - title: Whisper - methods: - workers_ai_post_run_cf_openai_whisper: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1openai~1whisper/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/whisper/methods/workers_ai_post_run_cf_openai_whisper - update: [] - delete: [] - replace: [] - whisper_large_v3_turbo: - id: cloudflare.ai.whisper_large_v3_turbo - name: whisper_large_v3_turbo - title: Whisper Large V3 Turbo - methods: - workers_ai_post_run_cf_openai_whisper_large_v3_turbo: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1openai~1whisper-large-v3-turbo/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/whisper_large_v3_turbo/methods/workers_ai_post_run_cf_openai_whisper_large_v3_turbo - update: [] - delete: [] - replace: [] - whisper_tiny_en: - id: cloudflare.ai.whisper_tiny_en - name: whisper_tiny_en - title: Whisper Tiny En - methods: - workers_ai_post_run_cf_openai_whisper_tiny_en: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1openai~1whisper-tiny-en/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/whisper_tiny_en/methods/workers_ai_post_run_cf_openai_whisper_tiny_en - update: [] - delete: [] - replace: [] - openchat_3_5_0106: - id: cloudflare.ai.openchat_3_5_0106 - name: openchat_3_5_0106 - title: Openchat 3 5 0106 - methods: - workers_ai_post_run_cf_openchat_openchat_3_5_0106: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1openchat~1openchat-3.5-0106/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/openchat_3_5_0106/methods/workers_ai_post_run_cf_openchat_openchat_3_5_0106 - update: [] - delete: [] - replace: [] - plamo_embedding_1b: - id: cloudflare.ai.plamo_embedding_1b - name: plamo_embedding_1b - title: Plamo Embedding 1b - methods: - workers_ai_post_run_cf_pfnet_plamo_embedding_1b: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1pfnet~1plamo-embedding-1b/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/plamo_embedding_1b/methods/workers_ai_post_run_cf_pfnet_plamo_embedding_1b - update: [] - delete: [] - replace: [] - qwen1_5_0_5b_chat: - id: cloudflare.ai.qwen1_5_0_5b_chat - name: qwen1_5_0_5b_chat - title: Qwen1 5 0 5b Chat - methods: - workers_ai_post_run_cf_qwen_qwen1_5_0_5b_chat: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1qwen~1qwen1.5-0.5b-chat/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/qwen1_5_0_5b_chat/methods/workers_ai_post_run_cf_qwen_qwen1_5_0_5b_chat - update: [] - delete: [] - replace: [] - qwen1_5_1_8b_chat: - id: cloudflare.ai.qwen1_5_1_8b_chat - name: qwen1_5_1_8b_chat - title: Qwen1 5 1 8b Chat - methods: - workers_ai_post_run_cf_qwen_qwen1_5_1_8b_chat: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1qwen~1qwen1.5-1.8b-chat/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/qwen1_5_1_8b_chat/methods/workers_ai_post_run_cf_qwen_qwen1_5_1_8b_chat - update: [] - delete: [] - replace: [] - qwen1_5_14b_chat_awq: - id: cloudflare.ai.qwen1_5_14b_chat_awq - name: qwen1_5_14b_chat_awq - title: Qwen1 5 14b Chat Awq - methods: - workers_ai_post_run_cf_qwen_qwen1_5_14b_chat_awq: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1qwen~1qwen1.5-14b-chat-awq/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/qwen1_5_14b_chat_awq/methods/workers_ai_post_run_cf_qwen_qwen1_5_14b_chat_awq - update: [] - delete: [] - replace: [] - qwen1_5_7b_chat_awq: - id: cloudflare.ai.qwen1_5_7b_chat_awq - name: qwen1_5_7b_chat_awq - title: Qwen1 5 7b Chat Awq - methods: - workers_ai_post_run_cf_qwen_qwen1_5_7b_chat_awq: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1qwen~1qwen1.5-7b-chat-awq/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/qwen1_5_7b_chat_awq/methods/workers_ai_post_run_cf_qwen_qwen1_5_7b_chat_awq - update: [] - delete: [] - replace: [] - qwen2_5_coder_32b_instruct: - id: cloudflare.ai.qwen2_5_coder_32b_instruct - name: qwen2_5_coder_32b_instruct - title: Qwen2 5 Coder 32b Instruct - methods: - workers_ai_post_run_cf_qwen_qwen2_5_coder_32b_instruct: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1qwen~1qwen2.5-coder-32b-instruct/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/qwen2_5_coder_32b_instruct/methods/workers_ai_post_run_cf_qwen_qwen2_5_coder_32b_instruct - update: [] - delete: [] - replace: [] - qwen3_30b_a3b_fp8: - id: cloudflare.ai.qwen3_30b_a3b_fp8 - name: qwen3_30b_a3b_fp8 - title: Qwen3 30b A3b Fp8 - methods: - workers_ai_post_run_cf_qwen_qwen3_30b_a3b_fp8: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1qwen~1qwen3-30b-a3b-fp8/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/qwen3_30b_a3b_fp8/methods/workers_ai_post_run_cf_qwen_qwen3_30b_a3b_fp8 - update: [] - delete: [] - replace: [] - qwen3_embedding_0_6b: - id: cloudflare.ai.qwen3_embedding_0_6b - name: qwen3_embedding_0_6b - title: Qwen3 Embedding 0 6b - methods: - workers_ai_post_run_cf_qwen_qwen3_embedding_0_6b: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1qwen~1qwen3-embedding-0.6b/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/qwen3_embedding_0_6b/methods/workers_ai_post_run_cf_qwen_qwen3_embedding_0_6b - update: [] - delete: [] - replace: [] - qwq_32b: - id: cloudflare.ai.qwq_32b - name: qwq_32b - title: Qwq 32b - methods: - workers_ai_post_run_cf_qwen_qwq_32b: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1qwen~1qwq-32b/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/qwq_32b/methods/workers_ai_post_run_cf_qwen_qwq_32b - update: [] - delete: [] - replace: [] - stable_diffusion_v1_5_img2img: - id: cloudflare.ai.stable_diffusion_v1_5_img2img - name: stable_diffusion_v1_5_img2img - title: Stable Diffusion V1 5 Img2img - methods: - workers_ai_post_run_cf_runwayml_stable_diffusion_v1_5_img2img: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1runwayml~1stable-diffusion-v1-5-img2img/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/stable_diffusion_v1_5_img2img/methods/workers_ai_post_run_cf_runwayml_stable_diffusion_v1_5_img2img - update: [] - delete: [] - replace: [] - stable_diffusion_v1_5_inpainting: - id: cloudflare.ai.stable_diffusion_v1_5_inpainting - name: stable_diffusion_v1_5_inpainting - title: Stable Diffusion V1 5 Inpainting - methods: - workers_ai_post_run_cf_runwayml_stable_diffusion_v1_5_inpainting: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1runwayml~1stable-diffusion-v1-5-inpainting/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/stable_diffusion_v1_5_inpainting/methods/workers_ai_post_run_cf_runwayml_stable_diffusion_v1_5_inpainting - update: [] - delete: [] - replace: [] - stable_diffusion_xl_base_1_0: - id: cloudflare.ai.stable_diffusion_xl_base_1_0 - name: stable_diffusion_xl_base_1_0 - title: Stable Diffusion Xl Base 1 0 - methods: - workers_ai_post_run_cf_stabilityai_stable_diffusion_xl_base_1_0: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1stabilityai~1stable-diffusion-xl-base-1.0/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/stable_diffusion_xl_base_1_0/methods/workers_ai_post_run_cf_stabilityai_stable_diffusion_xl_base_1_0 - update: [] - delete: [] - replace: [] - discolm_german_7b_v1_awq: - id: cloudflare.ai.discolm_german_7b_v1_awq - name: discolm_german_7b_v1_awq - title: Discolm German 7b V1 Awq - methods: - workers_ai_post_run_cf_thebloke_discolm_german_7b_v1_awq: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1thebloke~1discolm-german-7b-v1-awq/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/discolm_german_7b_v1_awq/methods/workers_ai_post_run_cf_thebloke_discolm_german_7b_v1_awq - update: [] - delete: [] - replace: [] - falcon_7b_instruct: - id: cloudflare.ai.falcon_7b_instruct - name: falcon_7b_instruct - title: Falcon 7b Instruct - methods: - workers_ai_post_run_cf_tiiuae_falcon_7b_instruct: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1tiiuae~1falcon-7b-instruct/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/falcon_7b_instruct/methods/workers_ai_post_run_cf_tiiuae_falcon_7b_instruct - update: [] - delete: [] - replace: [] - tinyllama_1_1b_chat_v1_0: - id: cloudflare.ai.tinyllama_1_1b_chat_v1_0 - name: tinyllama_1_1b_chat_v1_0 - title: Tinyllama 1 1b Chat V1 0 - methods: - workers_ai_post_run_cf_tinyllama_tinyllama_1_1b_chat_v1_0: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1tinyllama~1tinyllama-1.1b-chat-v1.0/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/tinyllama_1_1b_chat_v1_0/methods/workers_ai_post_run_cf_tinyllama_tinyllama_1_1b_chat_v1_0 - update: [] - delete: [] - replace: [] - glm_4_7_flash: - id: cloudflare.ai.glm_4_7_flash - name: glm_4_7_flash - title: Glm 4 7 Flash - methods: - workers_ai_post_run_cf_zai_org_glm_4_7_flash: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1zai-org~1glm-4.7-flash/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/glm_4_7_flash/methods/workers_ai_post_run_cf_zai_org_glm_4_7_flash - update: [] - delete: [] - replace: [] - gemma_7b_it: - id: cloudflare.ai.gemma_7b_it - name: gemma_7b_it - title: Gemma 7b It - methods: - workers_ai_post_run_hf_google_gemma_7b_it: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@hf~1google~1gemma-7b-it/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/gemma_7b_it/methods/workers_ai_post_run_hf_google_gemma_7b_it - update: [] - delete: [] - replace: [] - mistral_7b_instruct_v0_2: - id: cloudflare.ai.mistral_7b_instruct_v0_2 - name: mistral_7b_instruct_v0_2 - title: Mistral 7b Instruct V0 2 - methods: - workers_ai_post_run_hf_mistral_mistral_7b_instruct_v0_2: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@hf~1mistral~1mistral-7b-instruct-v0.2/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/mistral_7b_instruct_v0_2/methods/workers_ai_post_run_hf_mistral_mistral_7b_instruct_v0_2 - update: [] - delete: [] - replace: [] - starling_lm_7b_beta: - id: cloudflare.ai.starling_lm_7b_beta - name: starling_lm_7b_beta - title: Starling Lm 7b Beta - methods: - workers_ai_post_run_hf_nexusflow_starling_lm_7b_beta: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@hf~1nexusflow~1starling-lm-7b-beta/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/starling_lm_7b_beta/methods/workers_ai_post_run_hf_nexusflow_starling_lm_7b_beta - update: [] - delete: [] - replace: [] - hermes_2_pro_mistral_7b: - id: cloudflare.ai.hermes_2_pro_mistral_7b - name: hermes_2_pro_mistral_7b - title: Hermes 2 Pro Mistral 7b - methods: - workers_ai_post_run_hf_nousresearch_hermes_2_pro_mistral_7b: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@hf~1nousresearch~1hermes-2-pro-mistral-7b/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/hermes_2_pro_mistral_7b/methods/workers_ai_post_run_hf_nousresearch_hermes_2_pro_mistral_7b - update: [] - delete: [] - replace: [] - deepseek_coder_6_7b_base_awq: - id: cloudflare.ai.deepseek_coder_6_7b_base_awq - name: deepseek_coder_6_7b_base_awq - title: Deepseek Coder 6 7b Base Awq - methods: - workers_ai_post_run_hf_thebloke_deepseek_coder_6_7b_base_awq: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@hf~1thebloke~1deepseek-coder-6.7b-base-awq/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/deepseek_coder_6_7b_base_awq/methods/workers_ai_post_run_hf_thebloke_deepseek_coder_6_7b_base_awq - update: [] - delete: [] - replace: [] - deepseek_coder_6_7b_instruct_awq: - id: cloudflare.ai.deepseek_coder_6_7b_instruct_awq - name: deepseek_coder_6_7b_instruct_awq - title: Deepseek Coder 6 7b Instruct Awq - methods: - workers_ai_post_run_hf_thebloke_deepseek_coder_6_7b_instruct_awq: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@hf~1thebloke~1deepseek-coder-6.7b-instruct-awq/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/deepseek_coder_6_7b_instruct_awq/methods/workers_ai_post_run_hf_thebloke_deepseek_coder_6_7b_instruct_awq - update: [] - delete: [] - replace: [] - llama_2_13b_chat_awq: - id: cloudflare.ai.llama_2_13b_chat_awq - name: llama_2_13b_chat_awq - title: Llama 2 13b Chat Awq - methods: - workers_ai_post_run_hf_thebloke_llama_2_13b_chat_awq: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@hf~1thebloke~1llama-2-13b-chat-awq/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/llama_2_13b_chat_awq/methods/workers_ai_post_run_hf_thebloke_llama_2_13b_chat_awq - update: [] - delete: [] - replace: [] - mistral_7b_instruct_v0_1_awq: - id: cloudflare.ai.mistral_7b_instruct_v0_1_awq - name: mistral_7b_instruct_v0_1_awq - title: Mistral 7b Instruct V0 1 Awq - methods: - workers_ai_post_run_hf_thebloke_mistral_7b_instruct_v0_1_awq: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@hf~1thebloke~1mistral-7b-instruct-v0.1-awq/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/mistral_7b_instruct_v0_1_awq/methods/workers_ai_post_run_hf_thebloke_mistral_7b_instruct_v0_1_awq - update: [] - delete: [] - replace: [] - neural_chat_7b_v3_1_awq: - id: cloudflare.ai.neural_chat_7b_v3_1_awq - name: neural_chat_7b_v3_1_awq - title: Neural Chat 7b V3 1 Awq - methods: - workers_ai_post_run_hf_thebloke_neural_chat_7b_v3_1_awq: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@hf~1thebloke~1neural-chat-7b-v3-1-awq/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/neural_chat_7b_v3_1_awq/methods/workers_ai_post_run_hf_thebloke_neural_chat_7b_v3_1_awq - update: [] - delete: [] - replace: [] - openhermes_2_5_mistral_7b_awq: - id: cloudflare.ai.openhermes_2_5_mistral_7b_awq - name: openhermes_2_5_mistral_7b_awq - title: Openhermes 2 5 Mistral 7b Awq - methods: - workers_ai_post_run_hf_thebloke_openhermes_2_5_mistral_7b_awq: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@hf~1thebloke~1openhermes-2.5-mistral-7b-awq/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/openhermes_2_5_mistral_7b_awq/methods/workers_ai_post_run_hf_thebloke_openhermes_2_5_mistral_7b_awq - update: [] - delete: [] - replace: [] - zephyr_7b_beta_awq: - id: cloudflare.ai.zephyr_7b_beta_awq - name: zephyr_7b_beta_awq - title: Zephyr 7b Beta Awq - methods: - workers_ai_post_run_hf_thebloke_zephyr_7b_beta_awq: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai~1run~1@hf~1thebloke~1zephyr-7b-beta-awq/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/zephyr_7b_beta_awq/methods/workers_ai_post_run_hf_thebloke_zephyr_7b_beta_awq - update: [] - delete: [] - replace: [] - run: - id: cloudflare.ai.run - name: run - title: Run - methods: - run: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1{model_name}/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: '#/components/x-stackQL-resources/run/methods/run' - update: [] - delete: [] - replace: [] - tasks: - id: cloudflare.ai.tasks - name: tasks - title: Tasks - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1ai~1tasks~1search/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/tasks/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - tomarkdown: - id: cloudflare.ai.tomarkdown - name: tomarkdown - title: Tomarkdown - methods: - workers_ai_post_to_markdown: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1ai~1tomarkdown/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/tomarkdown/methods/workers_ai_post_to_markdown - update: [] - delete: [] - replace: [] - to_markdown: - id: cloudflare.ai.to_markdown - name: to_markdown - title: To Markdown - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1ai~1tomarkdown~1supported/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/to_markdown/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - ai_search: - id: cloudflare.ai.ai_search - name: ai_search - title: Ai Search - methods: - autorag_config_ai_search: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1autorag~1rags~1{id}~1ai-search/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/ai_search/methods/autorag_config_ai_search - update: [] - delete: [] - replace: [] - files: - id: cloudflare.ai.files - name: files - title: Files - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1autorag~1rags~1{id}~1files/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/files/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - jobs: - id: cloudflare.ai.jobs - name: jobs - title: Jobs - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1autorag~1rags~1{id}~1jobs/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1autorag~1rags~1{id}~1jobs~1{job_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/jobs/methods/get' - - $ref: '#/components/x-stackQL-resources/jobs/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - logs: - id: cloudflare.ai.logs - name: logs - title: Logs - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1autorag~1rags~1{id}~1jobs~1{job_id}~1logs/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/logs/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - search: - id: cloudflare.ai.search - name: search - title: Search - methods: - autorag_config_search: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1autorag~1rags~1{id}~1search/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/search/methods/autorag_config_search - update: [] - delete: [] - replace: [] - sync: - id: cloudflare.ai.sync - name: sync - title: Sync - methods: - autorag_config_sync: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1autorag~1rags~1{id}~1sync/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: - - $ref: '#/components/x-stackQL-resources/sync/methods/autorag_config_sync' - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: ai API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/ai/authors/search: + get: + description: Searches Workers AI models by author or organization name. + operationId: workers-ai-search-author + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + type: object + type: array + messages: + items: + type: string + type: array + result: + items: + type: object + type: array + success: + type: boolean + required: + - success + - result + - errors + - messages + type: object + description: Returns a list of authors + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Author Search + tags: + - Workers AI + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai + resource_chain: + - authors + method: list + /accounts/{account_id}/ai/finetunes: + get: + description: Lists all fine-tuning jobs created by the account, including status and metrics. + operationId: workers-ai-list-finetunes + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + created_at: + format: date-time + type: string + readOnly: true + description: + type: string + id: + format: uuid + type: string + x-auditable: true + model: + type: string + x-auditable: true + modified_at: + format: date-time + type: string + readOnly: true + name: + type: string + x-auditable: true + required: + - id + - model + - name + - created_at + - modified_at + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Returns all finetunes + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Finetunes + tags: + - Workers AI Finetune + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai + resource_chain: + - finetunes + method: list + post: + description: Creates a new fine-tuning job for a Workers AI model using custom training data. + operationId: workers-ai-create-finetune + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + description: + type: string + model: + type: string + x-auditable: true + name: + type: string + x-auditable: true + public: + default: false + type: boolean + x-auditable: true + required: + - model + - name + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + created_at: + format: date-time + type: string + readOnly: true + description: + type: string + id: + format: uuid + type: string + x-auditable: true + model: + type: string + x-auditable: true + modified_at: + format: date-time + type: string + readOnly: true + name: + type: string + x-auditable: true + public: + type: boolean + x-auditable: true + required: + - id + - created_at + - modified_at + - public + - name + - model + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Returns the created finetune + '400': + content: + application/json: + schema: + properties: + errors: + items: + type: object + type: array + success: + type: boolean + required: + - errors + - success + type: object + description: Finetune creation failed + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a new Finetune + tags: + - Workers AI Finetune + x-api-token-group: + - Workers AI Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai + resource_chain: + - finetunes + method: create + /accounts/{account_id}/ai/finetunes/public: + get: + description: Lists publicly available fine-tuned models that can be used with Workers AI. + operationId: workers-ai-list-public-finetunes + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Pagination Limit + in: query + name: limit + schema: + default: 20 + description: Pagination Limit + type: number + - description: Pagination Offset + in: query + name: offset + schema: + default: 0 + description: Pagination Offset + type: number + - description: Order By Column Name + in: query + name: orderBy + schema: + description: Order By Column Name + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + items: + properties: + created_at: + format: date-time + type: string + readOnly: true + description: + type: string + id: + format: uuid + type: string + x-auditable: true + model: + type: string + x-auditable: true + modified_at: + format: date-time + type: string + readOnly: true + name: + type: string + x-auditable: true + public: + type: boolean + x-auditable: true + required: + - id + - model + - name + - public + - created_at + - modified_at + type: object + type: array + success: + type: boolean + required: + - success + - result + type: object + description: Returns all public finetunes + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Public Finetunes + tags: + - Workers AI Finetune + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai + resource_chain: + - finetunes + - public + method: list + /accounts/{account_id}/ai/finetunes/{finetune_id}/finetune-assets: + post: + description: Uploads training data assets for a Workers AI fine-tuning job. + operationId: workers-ai-upload-finetune-asset + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: finetune_id + schema: + type: string + required: true + requestBody: + content: + multipart/form-data: + schema: + properties: + file: + description: File to upload + format: binary + type: string + file_name: + description: Name of the file (adapter_config.json or adapter_model.safetensors) + type: string + required: + - file_name + - file + type: object + description: Finetune asset file upload + responses: + '200': + content: + application/json: + schema: + properties: + success: + type: boolean + required: + - success + type: object + description: Returns successfully if finetunes were uploaded + '400': + content: + application/json: + schema: + properties: + errors: + items: + type: object + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Finetune creation failed + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Upload a Finetune Asset + tags: + - Workers AI Finetune + x-api-token-group: + - Workers AI Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai + resource_chain: + - finetunes + - assets + method: create + /accounts/{account_id}/ai/models/schema: + get: + description: Retrieves the input and output JSON schema definition for a Workers AI model. + operationId: workers-ai-get-model-schema + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Model Name + in: query + name: model + schema: + description: Model Name + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + input: + properties: + additionalProperties: + type: boolean + description: + type: string + type: + type: string + required: + - type + - description + - additionalProperties + type: object + output: + properties: + additionalProperties: + type: boolean + description: + type: string + type: + type: string + required: + - type + - description + - additionalProperties + type: object + required: + - input + - output + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Model Schema + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Model Schema + tags: + - Workers AI + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai + resource_chain: + - models + - schema + method: get + /accounts/{account_id}/ai/models/search: + get: + description: Searches Workers AI models by name or description. + operationId: workers-ai-search-model + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: per_page + schema: + default: 100 + type: integer + - in: query + name: page + schema: + default: 1 + type: integer + - description: Filter by Task Name + in: query + name: task + schema: + default: '' + description: Filter by Task Name + type: string + - description: Filter by Author + in: query + name: author + schema: + default: '' + description: Filter by Author + type: string + - description: Filter by Source Id + in: query + name: source + schema: + description: Filter by Source Id + type: number + - description: Filter to hide experimental models + in: query + name: hide_experimental + schema: + default: false + description: Filter to hide experimental models + type: boolean + - description: Search + in: query + name: search + schema: + default: '' + description: Search + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + type: object + type: array + messages: + items: + type: string + type: array + result: + items: + type: object + type: array + success: + type: boolean + required: + - success + - result + - errors + - messages + type: object + description: Returns a list of models + '404': + content: + application/json: + schema: + properties: + errors: + items: + type: object + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Object not found + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Model Search + tags: + - Workers AI + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai + resource_chain: + - models + method: list + /accounts/{account_id}/ai/run/@cf/ai4bharat/indictrans2-en-indic-1B: + post: + description: Runs inference on the @cf/ai4bharat/indictrans2-en-indic-1B model. + operationId: workers-ai-post-run-cf-ai4bharat-indictrans2-en-indic-1B + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + target_language: + default: hin_Deva + description: Target langauge to translate to + enum: + - asm_Beng + - awa_Deva + - ben_Beng + - bho_Deva + - brx_Deva + - doi_Deva + - eng_Latn + - gom_Deva + - gon_Deva + - guj_Gujr + - hin_Deva + - hne_Deva + - kan_Knda + - kas_Arab + - kas_Deva + - kha_Latn + - lus_Latn + - mag_Deva + - mai_Deva + - mal_Mlym + - mar_Deva + - mni_Beng + - mni_Mtei + - npi_Deva + - ory_Orya + - pan_Guru + - san_Deva + - sat_Olck + - snd_Arab + - snd_Deva + - tam_Taml + - tel_Telu + - urd_Arab + - unr_Deva + type: string + text: + description: Input text to translate. Can be a single string or a list of strings. + type: string + items: + type: string + required: + - text + - target_language + type: object + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/ai4bharat/indictrans2-en-indic-1B model. + tags: + - Workers AI Translation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/ai4bharat/nonomni-indictrans2-en-indic-1b: + post: + description: Runs inference on the @cf/ai4bharat/nonomni-indictrans2-en-indic-1b model. + operationId: workers-ai-post-run-cf-ai4bharat-nonomni-indictrans2-en-indic-1b + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + target_language: + default: hin_Deva + description: Target langauge to translate to + enum: + - asm_Beng + - awa_Deva + - ben_Beng + - bho_Deva + - brx_Deva + - doi_Deva + - eng_Latn + - gom_Deva + - gon_Deva + - guj_Gujr + - hin_Deva + - hne_Deva + - kan_Knda + - kas_Arab + - kas_Deva + - kha_Latn + - lus_Latn + - mag_Deva + - mai_Deva + - mal_Mlym + - mar_Deva + - mni_Beng + - mni_Mtei + - npi_Deva + - ory_Orya + - pan_Guru + - san_Deva + - sat_Olck + - snd_Arab + - snd_Deva + - tam_Taml + - tel_Telu + - urd_Arab + - unr_Deva + type: string + text: + description: Input text to translate. Can be a single string or a list of strings. + type: string + items: + type: string + required: + - text + - target_language + type: object + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/ai4bharat/nonomni-indictrans2-en-indic-1b model. + tags: + - Workers AI Translation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/aisingapore/gemma-sea-lion-v4-27b-it: + post: + description: Runs inference on the @cf/aisingapore/gemma-sea-lion-v4-27b-it model. + operationId: workers-ai-post-run-cf-aisingapore-gemma-sea-lion-v4-27b-it + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 2000 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + requests: + items: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/aisingapore/gemma-sea-lion-v4-27b-it model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/baai/bge-base-en-v1.5: + post: + description: Runs inference on the @cf/baai/bge-base-en-v1.5 model. + operationId: workers-ai-post-run-cf-baai-bge-base-en-v1-5 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + properties: + pooling: + default: mean + description: The pooling method used in the embedding process. `cls` pooling will generate more accurate embeddings on larger inputs - however, embeddings created with cls pooling are not compatible with embeddings generated with mean pooling. The default pooling method is `mean` in order for this to not be a breaking change, but we highly suggest using the new `cls` pooling for better accuracy. + enum: + - mean + - cls + type: string + text: + type: string + description: The text to embed + items: + description: The text to embed + minLength: 1 + type: string + requests: + description: Batch of the embeddings requests to run using async-queue + items: + properties: + pooling: + default: mean + description: The pooling method used in the embedding process. `cls` pooling will generate more accurate embeddings on larger inputs - however, embeddings created with cls pooling are not compatible with embeddings generated with mean pooling. The default pooling method is `mean` in order for this to not be a breaking change, but we highly suggest using the new `cls` pooling for better accuracy. + enum: + - mean + - cls + type: string + text: + type: string + description: The text to embed + items: + description: The text to embed + minLength: 1 + type: string + required: + - text + type: object + type: array + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/baai/bge-base-en-v1.5 model. + tags: + - Workers AI Text Embeddings + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/baai/bge-large-en-v1.5: + post: + description: Runs inference on the @cf/baai/bge-large-en-v1.5 model. + operationId: workers-ai-post-run-cf-baai-bge-large-en-v1-5 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + properties: + pooling: + default: mean + description: The pooling method used in the embedding process. `cls` pooling will generate more accurate embeddings on larger inputs - however, embeddings created with cls pooling are not compatible with embeddings generated with mean pooling. The default pooling method is `mean` in order for this to not be a breaking change, but we highly suggest using the new `cls` pooling for better accuracy. + enum: + - mean + - cls + type: string + text: + type: string + description: The text to embed + items: + description: The text to embed + minLength: 1 + type: string + requests: + description: Batch of the embeddings requests to run using async-queue + items: + properties: + pooling: + default: mean + description: The pooling method used in the embedding process. `cls` pooling will generate more accurate embeddings on larger inputs - however, embeddings created with cls pooling are not compatible with embeddings generated with mean pooling. The default pooling method is `mean` in order for this to not be a breaking change, but we highly suggest using the new `cls` pooling for better accuracy. + enum: + - mean + - cls + type: string + text: + type: string + description: The text to embed + items: + description: The text to embed + minLength: 1 + type: string + required: + - text + type: object + type: array + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/baai/bge-large-en-v1.5 model. + tags: + - Workers AI Text Embeddings + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/baai/bge-m3: + post: + description: Runs inference on the @cf/baai/bge-m3 model. + operationId: workers-ai-post-run-cf-baai-bge-m3 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Input Query and Contexts + properties: + contexts: + description: List of provided contexts. Note that the index in this array is important, as the response will refer to it. + items: + properties: + text: + description: One of the provided context content + minLength: 1 + type: string + type: object + type: array + query: + description: A query you wish to perform against the provided contexts. If no query is provided the model with respond with embeddings for contexts + minLength: 1 + type: string + truncate_inputs: + default: false + description: When provided with too long context should the model error out or truncate the context to fit? + type: boolean + text: + type: string + description: The text to embed + items: + description: The text to embed + minLength: 1 + type: string + requests: + description: Batch of the embeddings requests to run using async-queue + items: + type: object + title: Input Query and Contexts + properties: + contexts: + description: List of provided contexts. Note that the index in this array is important, as the response will refer to it. + items: + properties: + text: + description: One of the provided context content + minLength: 1 + type: string + type: object + type: array + query: + description: A query you wish to perform against the provided contexts. If no query is provided the model with respond with embeddings for contexts + minLength: 1 + type: string + truncate_inputs: + default: false + description: When provided with too long context should the model error out or truncate the context to fit? + type: boolean + text: + type: string + description: The text to embed + items: + description: The text to embed + minLength: 1 + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/baai/bge-m3 model. + tags: + - Workers AI Text Embeddings + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/baai/bge-reranker-base: + post: + description: Runs inference on the @cf/baai/bge-reranker-base model. + operationId: workers-ai-post-run-cf-baai-bge-reranker-base + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + contexts: + description: List of provided contexts. Note that the index in this array is important, as the response will refer to it. + items: + properties: + text: + description: One of the provided context content + minLength: 1 + type: string + type: object + type: array + query: + description: A query you wish to perform against the provided contexts. + minLength: 1 + type: string + top_k: + description: Number of returned results starting with the best score. + minimum: 1 + type: integer + required: + - query + - contexts + type: object + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/baai/bge-reranker-base model. + tags: + - Workers AI Text Classification + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/baai/bge-small-en-v1.5: + post: + description: Runs inference on the @cf/baai/bge-small-en-v1.5 model. + operationId: workers-ai-post-run-cf-baai-bge-small-en-v1-5 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + properties: + pooling: + default: mean + description: The pooling method used in the embedding process. `cls` pooling will generate more accurate embeddings on larger inputs - however, embeddings created with cls pooling are not compatible with embeddings generated with mean pooling. The default pooling method is `mean` in order for this to not be a breaking change, but we highly suggest using the new `cls` pooling for better accuracy. + enum: + - mean + - cls + type: string + text: + type: string + description: The text to embed + items: + description: The text to embed + minLength: 1 + type: string + requests: + description: Batch of the embeddings requests to run using async-queue + items: + properties: + pooling: + default: mean + description: The pooling method used in the embedding process. `cls` pooling will generate more accurate embeddings on larger inputs - however, embeddings created with cls pooling are not compatible with embeddings generated with mean pooling. The default pooling method is `mean` in order for this to not be a breaking change, but we highly suggest using the new `cls` pooling for better accuracy. + enum: + - mean + - cls + type: string + text: + type: string + description: The text to embed + items: + description: The text to embed + minLength: 1 + type: string + required: + - text + type: object + type: array + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/baai/bge-small-en-v1.5 model. + tags: + - Workers AI Text Embeddings + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/baai/nonomni-bge-base-en-v1.5: + post: + description: Runs inference on the @cf/baai/nonomni-bge-base-en-v1.5 model. + operationId: workers-ai-post-run-cf-baai-nonomni-bge-base-en-v1-5 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + properties: + pooling: + default: mean + description: The pooling method used in the embedding process. `cls` pooling will generate more accurate embeddings on larger inputs - however, embeddings created with cls pooling are not compatible with embeddings generated with mean pooling. The default pooling method is `mean` in order for this to not be a breaking change, but we highly suggest using the new `cls` pooling for better accuracy. + enum: + - mean + - cls + type: string + text: + type: string + description: The text to embed + items: + description: The text to embed + minLength: 1 + type: string + requests: + description: Batch of the embeddings requests to run using async-queue + items: + properties: + pooling: + default: mean + description: The pooling method used in the embedding process. `cls` pooling will generate more accurate embeddings on larger inputs - however, embeddings created with cls pooling are not compatible with embeddings generated with mean pooling. The default pooling method is `mean` in order for this to not be a breaking change, but we highly suggest using the new `cls` pooling for better accuracy. + enum: + - mean + - cls + type: string + text: + type: string + description: The text to embed + items: + description: The text to embed + minLength: 1 + type: string + required: + - text + type: object + type: array + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/baai/nonomni-bge-base-en-v1.5 model. + tags: + - Workers AI Text Embeddings + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/baai/nonomni-bge-large-en-v1.5: + post: + description: Runs inference on the @cf/baai/nonomni-bge-large-en-v1.5 model. + operationId: workers-ai-post-run-cf-baai-nonomni-bge-large-en-v1-5 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + properties: + pooling: + default: mean + description: The pooling method used in the embedding process. `cls` pooling will generate more accurate embeddings on larger inputs - however, embeddings created with cls pooling are not compatible with embeddings generated with mean pooling. The default pooling method is `mean` in order for this to not be a breaking change, but we highly suggest using the new `cls` pooling for better accuracy. + enum: + - mean + - cls + type: string + text: + type: string + description: The text to embed + items: + description: The text to embed + minLength: 1 + type: string + requests: + description: Batch of the embeddings requests to run using async-queue + items: + properties: + pooling: + default: mean + description: The pooling method used in the embedding process. `cls` pooling will generate more accurate embeddings on larger inputs - however, embeddings created with cls pooling are not compatible with embeddings generated with mean pooling. The default pooling method is `mean` in order for this to not be a breaking change, but we highly suggest using the new `cls` pooling for better accuracy. + enum: + - mean + - cls + type: string + text: + type: string + description: The text to embed + items: + description: The text to embed + minLength: 1 + type: string + required: + - text + type: object + type: array + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/baai/nonomni-bge-large-en-v1.5 model. + tags: + - Workers AI Text Embeddings + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/baai/nonomni-bge-m3: + post: + description: Runs inference on the @cf/baai/nonomni-bge-m3 model. + operationId: workers-ai-post-run-cf-baai-nonomni-bge-m3 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Input Query and Contexts + properties: + contexts: + description: List of provided contexts. Note that the index in this array is important, as the response will refer to it. + items: + properties: + text: + description: One of the provided context content + minLength: 1 + type: string + type: object + type: array + query: + description: A query you wish to perform against the provided contexts. If no query is provided the model with respond with embeddings for contexts + minLength: 1 + type: string + truncate_inputs: + default: false + description: When provided with too long context should the model error out or truncate the context to fit? + type: boolean + text: + type: string + description: The text to embed + items: + description: The text to embed + minLength: 1 + type: string + requests: + description: Batch of the embeddings requests to run using async-queue + items: + type: object + title: Input Query and Contexts + properties: + contexts: + description: List of provided contexts. Note that the index in this array is important, as the response will refer to it. + items: + properties: + text: + description: One of the provided context content + minLength: 1 + type: string + type: object + type: array + query: + description: A query you wish to perform against the provided contexts. If no query is provided the model with respond with embeddings for contexts + minLength: 1 + type: string + truncate_inputs: + default: false + description: When provided with too long context should the model error out or truncate the context to fit? + type: boolean + text: + type: string + description: The text to embed + items: + description: The text to embed + minLength: 1 + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/baai/nonomni-bge-m3 model. + tags: + - Workers AI Text Embeddings + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/baai/nonomni-bge-small-en-v1.5: + post: + description: Runs inference on the @cf/baai/nonomni-bge-small-en-v1.5 model. + operationId: workers-ai-post-run-cf-baai-nonomni-bge-small-en-v1-5 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + properties: + pooling: + default: mean + description: The pooling method used in the embedding process. `cls` pooling will generate more accurate embeddings on larger inputs - however, embeddings created with cls pooling are not compatible with embeddings generated with mean pooling. The default pooling method is `mean` in order for this to not be a breaking change, but we highly suggest using the new `cls` pooling for better accuracy. + enum: + - mean + - cls + type: string + text: + type: string + description: The text to embed + items: + description: The text to embed + minLength: 1 + type: string + requests: + description: Batch of the embeddings requests to run using async-queue + items: + properties: + pooling: + default: mean + description: The pooling method used in the embedding process. `cls` pooling will generate more accurate embeddings on larger inputs - however, embeddings created with cls pooling are not compatible with embeddings generated with mean pooling. The default pooling method is `mean` in order for this to not be a breaking change, but we highly suggest using the new `cls` pooling for better accuracy. + enum: + - mean + - cls + type: string + text: + type: string + description: The text to embed + items: + description: The text to embed + minLength: 1 + type: string + required: + - text + type: object + type: array + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/baai/nonomni-bge-small-en-v1.5 model. + tags: + - Workers AI Text Embeddings + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/black-forest-labs/flux-1-schnell: + post: + description: Runs inference on the @cf/black-forest-labs/flux-1-schnell model. + operationId: workers-ai-post-run-cf-black-forest-labs-flux-1-schnell + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + prompt: + description: A text description of the image you want to generate. + maxLength: 2048 + minLength: 1 + type: string + steps: + default: 4 + description: The number of diffusion steps; higher values can improve quality but take longer. + maximum: 8 + type: integer + required: + - prompt + type: object + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/black-forest-labs/flux-1-schnell model. + tags: + - Workers AI Text To Image + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/black-forest-labs/flux-2-dev: + post: + description: Runs inference on the @cf/black-forest-labs/flux-2-dev model. + operationId: workers-ai-post-run-cf-black-forest-labs-flux-2-dev + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + multipart: + properties: + body: + type: object + contentType: + type: string + type: object + required: + - multipart + type: object + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/black-forest-labs/flux-2-dev model. + tags: + - Workers AI Text To Image + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/black-forest-labs/flux-2-klein-4b: + post: + description: Runs inference on the @cf/black-forest-labs/flux-2-klein-4b model. + operationId: workers-ai-post-run-cf-black-forest-labs-flux-2-klein-4b + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + multipart: + properties: + body: + type: object + contentType: + type: string + type: object + required: + - multipart + type: object + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/black-forest-labs/flux-2-klein-4b model. + tags: + - Workers AI Text To Image + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/black-forest-labs/flux-2-klein-9b: + post: + description: Runs inference on the @cf/black-forest-labs/flux-2-klein-9b model. + operationId: workers-ai-post-run-cf-black-forest-labs-flux-2-klein-9b + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + multipart: + properties: + body: + type: object + contentType: + type: string + type: object + required: + - multipart + type: object + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/black-forest-labs/flux-2-klein-9b model. + tags: + - Workers AI Text To Image + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/bytedance/stable-diffusion-xl-lightning: + post: + description: Runs inference on the @cf/bytedance/stable-diffusion-xl-lightning model. + operationId: workers-ai-post-run-cf-bytedance-stable-diffusion-xl-lightning + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + guidance: + default: 7.5 + description: Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt + type: number + height: + description: The height of the generated image in pixels + maximum: 2048 + minimum: 256 + type: integer + image: + description: For use with img2img tasks. An array of integers that represent the image data constrained to 8-bit unsigned integer values + items: + description: A value between 0 and 255 + type: number + type: array + image_b64: + description: For use with img2img tasks. A base64-encoded string of the input image + type: string + mask: + description: An array representing An array of integers that represent mask image data for inpainting constrained to 8-bit unsigned integer values + items: + description: A value between 0 and 255 + type: number + type: array + negative_prompt: + description: Text describing elements to avoid in the generated image + type: string + num_steps: + default: 20 + description: The number of diffusion steps; higher values can improve quality but take longer + maximum: 20 + type: integer + prompt: + description: A text description of the image you want to generate + minLength: 1 + type: string + seed: + description: Random seed for reproducibility of the image generation + type: integer + strength: + default: 1 + description: A value between 0 and 1 indicating how strongly to apply the transformation during img2img tasks; lower values make the output closer to the input image + type: number + width: + description: The width of the generated image in pixels + maximum: 2048 + minimum: 256 + type: integer + required: + - prompt + type: object + responses: + '200': + content: + application/json: + schema: + type: object + image/png: + schema: + format: binary + type: string + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/bytedance/stable-diffusion-xl-lightning model. + tags: + - Workers AI Text To Image + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/deepgram/aura-1: + post: + description: Runs inference on the @cf/deepgram/aura-1 model. + operationId: workers-ai-post-run-cf-deepgram-aura-1 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + bit_rate: + description: The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type. + type: number + container: + description: Container specifies the file format wrapper for the output audio. The available options depend on the encoding type.. + enum: + - none + - wav + - ogg + type: string + encoding: + description: Encoding of the output audio. + enum: + - linear16 + - flac + - mulaw + - alaw + - mp3 + - opus + - aac + type: string + sample_rate: + description: Sample Rate specifies the sample rate for the output audio. Based on the encoding, different sample rates are supported. For some encodings, the sample rate is not configurable + type: number + speaker: + default: angus + description: Speaker used to produce the audio. + enum: + - angus + - asteria + - arcas + - orion + - orpheus + - athena + - luna + - zeus + - perseus + - helios + - hera + - stella + type: string + text: + description: The text content to be converted to speech + type: string + required: + - text + type: object + responses: + '200': + content: + application/json: + schema: + type: object + audio/mpeg: + schema: + format: binary + type: string + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/deepgram/aura-1 model. + tags: + - Workers AI Text To Speech + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/deepgram/aura-2-en: + post: + description: Runs inference on the @cf/deepgram/aura-2-en model. + operationId: workers-ai-post-run-cf-deepgram-aura-2-en + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + bit_rate: + description: The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type. + type: number + container: + description: Container specifies the file format wrapper for the output audio. The available options depend on the encoding type.. + enum: + - none + - wav + - ogg + type: string + encoding: + description: Encoding of the output audio. + enum: + - linear16 + - flac + - mulaw + - alaw + - mp3 + - opus + - aac + type: string + sample_rate: + description: Sample Rate specifies the sample rate for the output audio. Based on the encoding, different sample rates are supported. For some encodings, the sample rate is not configurable + type: number + speaker: + default: luna + description: Speaker used to produce the audio. + enum: + - amalthea + - andromeda + - apollo + - arcas + - aries + - asteria + - athena + - atlas + - aurora + - callista + - cora + - cordelia + - delia + - draco + - electra + - harmonia + - helena + - hera + - hermes + - hyperion + - iris + - janus + - juno + - jupiter + - luna + - mars + - minerva + - neptune + - odysseus + - ophelia + - orion + - orpheus + - pandora + - phoebe + - pluto + - saturn + - thalia + - theia + - vesta + - zeus + type: string + text: + description: The text content to be converted to speech + type: string + required: + - text + type: object + responses: + '200': + content: + application/json: + schema: + type: object + audio/mpeg: + schema: + format: binary + type: string + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/deepgram/aura-2-en model. + tags: + - Workers AI Text To Speech + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/deepgram/aura-2-es: + post: + description: Runs inference on the @cf/deepgram/aura-2-es model. + operationId: workers-ai-post-run-cf-deepgram-aura-2-es + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + bit_rate: + description: The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type. + type: number + container: + description: Container specifies the file format wrapper for the output audio. The available options depend on the encoding type.. + enum: + - none + - wav + - ogg + type: string + encoding: + description: Encoding of the output audio. + enum: + - linear16 + - flac + - mulaw + - alaw + - mp3 + - opus + - aac + type: string + sample_rate: + description: Sample Rate specifies the sample rate for the output audio. Based on the encoding, different sample rates are supported. For some encodings, the sample rate is not configurable + type: number + speaker: + default: aquila + description: Speaker used to produce the audio. + enum: + - sirio + - nestor + - carina + - celeste + - alvaro + - diana + - aquila + - selena + - estrella + - javier + type: string + text: + description: The text content to be converted to speech + type: string + required: + - text + type: object + responses: + '200': + content: + application/json: + schema: + type: object + audio/mpeg: + schema: + format: binary + type: string + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/deepgram/aura-2-es model. + tags: + - Workers AI Text To Speech + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/deepgram/flux: + post: + description: Runs inference on the @cf/deepgram/flux model. + operationId: workers-ai-post-run-cf-deepgram-flux + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + eager_eot_threshold: + description: End-of-turn confidence required to fire an eager end-of-turn event. When set, enables EagerEndOfTurn and TurnResumed events. Valid Values 0.3 - 0.9. + type: string + encoding: + description: Encoding of the audio stream. Currently only supports raw signed little-endian 16-bit PCM. + enum: + - linear16 + type: string + eot_threshold: + default: '0.7' + description: End-of-turn confidence required to finish a turn. Valid Values 0.5 - 0.9. + type: string + eot_timeout_ms: + default: '5000' + description: A turn will be finished when this much time has passed after speech, regardless of EOT confidence. + type: string + keyterm: + description: Keyterm prompting can improve recognition of specialized terminology. Pass multiple keyterm query parameters to boost multiple keyterms. + type: string + mip_opt_out: + default: 'false' + description: Opts out requests from the Deepgram Model Improvement Program. Refer to Deepgram Docs for pricing impacts before setting this to true. https://dpgr.am/deepgram-mip + enum: + - 'true' + - 'false' + type: string + sample_rate: + description: Sample rate of the audio stream in Hz. + type: string + tag: + description: Label your requests for the purpose of identification during usage reporting + type: string + required: + - sample_rate + - encoding + type: object + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/deepgram/flux model. + tags: + - Workers AI Automatic Speech Recognition + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/deepgram/nova-3: + post: + description: Runs inference on the @cf/deepgram/nova-3 model. + operationId: workers-ai-post-run-cf-deepgram-nova-3 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + audio: + properties: + body: + type: object + contentType: + type: string + required: + - body + - contentType + type: object + channels: + description: The number of channels in the submitted audio + type: number + custom_intent: + description: Custom intents you want the model to detect within your input audio if present + type: string + custom_intent_mode: + description: Sets how the model will interpret intents submitted to the custom_intent param. When strict, the model will only return intents submitted using the custom_intent param. When extended, the model will return its own detected intents in addition those submitted using the custom_intents param + enum: + - extended + - strict + type: string + custom_topic: + description: Custom topics you want the model to detect within your input audio or text if present Submit up to 100 + type: string + custom_topic_mode: + description: Sets how the model will interpret strings submitted to the custom_topic param. When strict, the model will only return topics submitted using the custom_topic param. When extended, the model will return its own detected topics in addition to those submitted using the custom_topic param. + enum: + - extended + - strict + type: string + detect_entities: + description: Identifies and extracts key entities from content in submitted audio + type: boolean + detect_language: + description: Identifies the dominant language spoken in submitted audio + type: boolean + diarize: + description: Recognize speaker changes. Each word in the transcript will be assigned a speaker number starting at 0 + type: boolean + dictation: + description: Identify and extract key entities from content in submitted audio + type: boolean + encoding: + description: Specify the expected encoding of your submitted audio + enum: + - linear16 + - flac + - mulaw + - amr-nb + - amr-wb + - opus + - speex + - g729 + type: string + endpointing: + description: Indicates how long model will wait to detect whether a speaker has finished speaking or pauses for a significant period of time. When set to a value, the streaming endpoint immediately finalizes the transcription for the processed time range and returns the transcript with a speech_final parameter set to true. Can also be set to false to disable endpointing + type: string + extra: + description: Arbitrary key-value pairs that are attached to the API response for usage in downstream processing + type: string + filler_words: + description: Filler Words can help transcribe interruptions in your audio, like 'uh' and 'um' + type: boolean + interim_results: + description: 'Specifies whether the streaming endpoint should provide ongoing transcription updates as more audio is received. When set to true, the endpoint sends continuous updates, meaning transcription results may evolve over time. Note: Supported only for webosockets.' + type: boolean + keyterm: + description: Key term prompting can boost or suppress specialized terminology and brands. + type: string + keywords: + description: Keywords can boost or suppress specialized terminology and brands. + type: string + language: + description: The BCP-47 language tag that hints at the primary spoken language. Depending on the Model and API endpoint you choose only certain languages are available. + type: string + measurements: + description: Spoken measurements will be converted to their corresponding abbreviations. + type: boolean + mip_opt_out: + description: Opts out requests from the Deepgram Model Improvement Program. Refer to our Docs for pricing impacts before setting this to true. https://dpgr.am/deepgram-mip. + type: boolean + mode: + description: Mode of operation for the model representing broad area of topic that will be talked about in the supplied audio + enum: + - general + - medical + - finance + type: string + multichannel: + description: Transcribe each audio channel independently. + type: boolean + numerals: + description: Numerals converts numbers from written format to numerical format. + type: boolean + paragraphs: + description: Splits audio into paragraphs to improve transcript readability. + type: boolean + profanity_filter: + description: Profanity Filter looks for recognized profanity and converts it to the nearest recognized non-profane word or removes it from the transcript completely. + type: boolean + punctuate: + description: Add punctuation and capitalization to the transcript. + type: boolean + redact: + description: Redaction removes sensitive information from your transcripts. + type: string + replace: + description: Search for terms or phrases in submitted audio and replaces them. + type: string + search: + description: Search for terms or phrases in submitted audio. + type: string + sentiment: + description: Recognizes the sentiment throughout a transcript or text. + type: boolean + smart_format: + description: Apply formatting to transcript output. When set to true, additional formatting will be applied to transcripts to improve readability. + type: boolean + topics: + description: Detect topics throughout a transcript or text. + type: boolean + utt_split: + description: Seconds to wait before detecting a pause between words in submitted audio. + type: number + utterance_end_ms: + description: 'Indicates how long model will wait to send an UtteranceEnd message after a word has been transcribed. Use with interim_results. Note: Supported only for webosockets.' + type: boolean + utterances: + description: Segments speech into meaningful semantic units. + type: boolean + vad_events: + description: 'Indicates that speech has started. You''ll begin receiving Speech Started messages upon speech starting. Note: Supported only for webosockets.' + type: boolean + required: + - audio + type: object + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/deepgram/nova-3 model. + tags: + - Workers AI Automatic Speech Recognition + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/deepseek-ai/deepseek-math-7b-instruct: + post: + description: Runs inference on the @cf/deepseek-ai/deepseek-math-7b-instruct model. + operationId: workers-ai-post-run-cf-deepseek-ai-deepseek-math-7b-instruct + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/deepseek-ai/deepseek-math-7b-instruct model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/deepseek-ai/deepseek-r1-distill-qwen-32b: + post: + description: Runs inference on the @cf/deepseek-ai/deepseek-r1-distill-qwen-32b model. + operationId: workers-ai-post-run-cf-deepseek-ai-deepseek-r1-distill-qwen-32b + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/deepseek-ai/deepseek-r1-distill-qwen-32b model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/defog/sqlcoder-7b-2: + post: + description: Runs inference on the @cf/defog/sqlcoder-7b-2 model. + operationId: workers-ai-post-run-cf-defog-sqlcoder-7b-2 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/defog/sqlcoder-7b-2 model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/facebook/bart-large-cnn: + post: + description: Runs inference on the @cf/facebook/bart-large-cnn model. + operationId: workers-ai-post-run-cf-facebook-bart-large-cnn + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + input_text: + description: The text that you want the model to summarize + minLength: 1 + type: string + max_length: + default: 1024 + description: The maximum length of the generated summary in tokens + type: integer + required: + - input_text + type: object + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/facebook/bart-large-cnn model. + tags: + - Workers AI Summarization + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/facebook/nonomni-bart-large-cnn: + post: + description: Runs inference on the @cf/facebook/nonomni-bart-large-cnn model. + operationId: workers-ai-post-run-cf-facebook-nonomni-bart-large-cnn + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + input_text: + description: The text that you want the model to summarize + minLength: 1 + type: string + max_length: + default: 1024 + description: The maximum length of the generated summary in tokens + type: integer + required: + - input_text + type: object + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/facebook/nonomni-bart-large-cnn model. + tags: + - Workers AI Summarization + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/facebook/nonomni-detr-resnet-50: + post: + description: Runs inference on the @cf/facebook/nonomni-detr-resnet-50 model. + operationId: workers-ai-post-run-cf-facebook-nonomni-detr-resnet-50 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/octet-stream: + schema: + format: binary + type: string + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/facebook/nonomni-detr-resnet-50 model. + tags: + - Workers AI Object Detection + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/fblgit/una-cybertron-7b-v2-bf16: + post: + description: Runs inference on the @cf/fblgit/una-cybertron-7b-v2-bf16 model. + operationId: workers-ai-post-run-cf-fblgit-una-cybertron-7b-v2-bf16 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/fblgit/una-cybertron-7b-v2-bf16 model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/google/embeddinggemma-300m: + post: + description: Runs inference on the @cf/google/embeddinggemma-300m model. + operationId: workers-ai-post-run-cf-google-embeddinggemma-300m + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + text: + type: string + description: The text to embed + items: + description: The text to embed + minLength: 1 + type: string + required: + - text + type: object + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/google/embeddinggemma-300m model. + tags: + - Workers AI Text Embeddings + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/google/gemma-2b-it-lora: + post: + description: Runs inference on the @cf/google/gemma-2b-it-lora model. + operationId: workers-ai-post-run-cf-google-gemma-2b-it-lora + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/google/gemma-2b-it-lora model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/google/gemma-3-12b-it: + post: + description: Runs inference on the @cf/google/gemma-3-12b-it model. + operationId: workers-ai-post-run-cf-google-gemma-3-12b-it + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: 0 + type: number + guided_json: + description: JSON schema that should be fufilled for the response. + type: object + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: 0 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 2 + minimum: 0 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + image_url: + properties: + url: + description: image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted + type: string + type: object + text: + type: string + type: + description: Type of the content provided + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/google/gemma-3-12b-it model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/google/gemma-7b-it-lora: + post: + description: Runs inference on the @cf/google/gemma-7b-it-lora model. + operationId: workers-ai-post-run-cf-google-gemma-7b-it-lora + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/google/gemma-7b-it-lora model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/google/nonomni-embeddinggemma-300m: + post: + description: Runs inference on the @cf/google/nonomni-embeddinggemma-300m model. + operationId: workers-ai-post-run-cf-google-nonomni-embeddinggemma-300m + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + text: + description: Input text to embed. Can be a single string or a list of strings. + type: string + items: + type: string + required: + - text + type: object + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/google/nonomni-embeddinggemma-300m model. + tags: + - Workers AI Text Embeddings + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/huggingface/distilbert-sst-2-int8: + post: + description: Runs inference on the @cf/huggingface/distilbert-sst-2-int8 model. + operationId: workers-ai-post-run-cf-huggingface-distilbert-sst-2-int8 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + text: + description: The text that you want to classify + minLength: 1 + type: string + required: + - text + type: object + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/huggingface/distilbert-sst-2-int8 model. + tags: + - Workers AI Text Classification + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/huggingface/nonomni-distilbert-sst-2-int8: + post: + description: Runs inference on the @cf/huggingface/nonomni-distilbert-sst-2-int8 model. + operationId: workers-ai-post-run-cf-huggingface-nonomni-distilbert-sst-2-int8 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + text: + description: The text that you want to classify + minLength: 1 + type: string + required: + - text + type: object + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/huggingface/nonomni-distilbert-sst-2-int8 model. + tags: + - Workers AI Text Classification + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/ibm-granite/granite-4.0-h-micro: + post: + description: Runs inference on the @cf/ibm-granite/granite-4.0-h-micro model. + operationId: workers-ai-post-run-cf-ibm-granite-granite-4-0-h-micro + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/ibm-granite/granite-4.0-h-micro model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/leonardo/lucid-origin: + post: + description: Runs inference on the @cf/leonardo/lucid-origin model. + operationId: workers-ai-post-run-cf-leonardo-lucid-origin + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + guidance: + default: 4.5 + description: Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt + maximum: 10 + minimum: 0 + type: number + height: + default: 1120 + description: The height of the generated image in pixels + maximum: 2500 + minimum: 0 + type: integer + num_steps: + description: The number of diffusion steps; higher values can improve quality but take longer + maximum: 40 + minimum: 1 + type: integer + prompt: + description: A text description of the image you want to generate. + minLength: 1 + type: string + seed: + description: Random seed for reproducibility of the image generation + minimum: 0 + type: integer + steps: + description: The number of diffusion steps; higher values can improve quality but take longer + maximum: 40 + minimum: 1 + type: integer + width: + default: 1120 + description: The width of the generated image in pixels + maximum: 2500 + minimum: 0 + type: integer + required: + - prompt + type: object + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/leonardo/lucid-origin model. + tags: + - Workers AI Text To Image + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/leonardo/phoenix-1.0: + post: + description: Runs inference on the @cf/leonardo/phoenix-1.0 model. + operationId: workers-ai-post-run-cf-leonardo-phoenix-1-0 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + guidance: + default: 2 + description: Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt + maximum: 10 + minimum: 2 + type: number + height: + default: 1024 + description: The height of the generated image in pixels + maximum: 2048 + minimum: 0 + type: integer + negative_prompt: + description: Specify what to exclude from the generated images + minLength: 1 + type: string + num_steps: + default: 25 + description: The number of diffusion steps; higher values can improve quality but take longer + maximum: 50 + minimum: 1 + type: integer + prompt: + description: A text description of the image you want to generate. + minLength: 1 + type: string + seed: + description: Random seed for reproducibility of the image generation + minimum: 0 + type: integer + width: + default: 1024 + description: The width of the generated image in pixels + maximum: 2048 + minimum: 0 + type: integer + required: + - prompt + type: object + responses: + '200': + content: + application/json: + schema: + type: object + image/jpeg: + schema: + format: binary + type: string + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/leonardo/phoenix-1.0 model. + tags: + - Workers AI Text To Image + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/lykon/dreamshaper-8-lcm: + post: + description: Runs inference on the @cf/lykon/dreamshaper-8-lcm model. + operationId: workers-ai-post-run-cf-lykon-dreamshaper-8-lcm + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + guidance: + default: 7.5 + description: Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt + type: number + height: + description: The height of the generated image in pixels + maximum: 2048 + minimum: 256 + type: integer + image: + description: For use with img2img tasks. An array of integers that represent the image data constrained to 8-bit unsigned integer values + items: + description: A value between 0 and 255 + type: number + type: array + image_b64: + description: For use with img2img tasks. A base64-encoded string of the input image + type: string + mask: + description: An array representing An array of integers that represent mask image data for inpainting constrained to 8-bit unsigned integer values + items: + description: A value between 0 and 255 + type: number + type: array + negative_prompt: + description: Text describing elements to avoid in the generated image + type: string + num_steps: + default: 20 + description: The number of diffusion steps; higher values can improve quality but take longer + maximum: 20 + type: integer + prompt: + description: A text description of the image you want to generate + minLength: 1 + type: string + seed: + description: Random seed for reproducibility of the image generation + type: integer + strength: + default: 1 + description: A value between 0 and 1 indicating how strongly to apply the transformation during img2img tasks; lower values make the output closer to the input image + type: number + width: + description: The width of the generated image in pixels + maximum: 2048 + minimum: 256 + type: integer + required: + - prompt + type: object + responses: + '200': + content: + application/json: + schema: + type: object + image/png: + schema: + format: binary + type: string + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/lykon/dreamshaper-8-lcm model. + tags: + - Workers AI Text To Image + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/meta-llama/llama-2-7b-chat-hf-lora: + post: + description: Runs inference on the @cf/meta-llama/llama-2-7b-chat-hf-lora model. + operationId: workers-ai-post-run-cf-meta-llama-llama-2-7b-chat-hf-lora + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/meta-llama/llama-2-7b-chat-hf-lora model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/meta/llama-2-7b-chat-fp16: + post: + description: Runs inference on the @cf/meta/llama-2-7b-chat-fp16 model. + operationId: workers-ai-post-run-cf-meta-llama-2-7b-chat-fp16 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/meta/llama-2-7b-chat-fp16 model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/meta/llama-2-7b-chat-int8: + post: + description: Runs inference on the @cf/meta/llama-2-7b-chat-int8 model. + operationId: workers-ai-post-run-cf-meta-llama-2-7b-chat-int8 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/meta/llama-2-7b-chat-int8 model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/meta/llama-3-8b-instruct: + post: + description: Runs inference on the @cf/meta/llama-3-8b-instruct model. + operationId: workers-ai-post-run-cf-meta-llama-3-8b-instruct + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/meta/llama-3-8b-instruct model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/meta/llama-3-8b-instruct-awq: + post: + description: Runs inference on the @cf/meta/llama-3-8b-instruct-awq model. + operationId: workers-ai-post-run-cf-meta-llama-3-8b-instruct-awq + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/meta/llama-3-8b-instruct-awq model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/meta/llama-3.1-70b-instruct-fp8-fast: + post: + description: Runs inference on the @cf/meta/llama-3.1-70b-instruct-fp8-fast model. + operationId: workers-ai-post-run-cf-meta-llama-3-1-70b-instruct-fp8-fast + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/meta/llama-3.1-70b-instruct-fp8-fast model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/meta/llama-3.1-8b-instruct-awq: + post: + description: Runs inference on the @cf/meta/llama-3.1-8b-instruct-awq model. + operationId: workers-ai-post-run-cf-meta-llama-3-1-8b-instruct-awq + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/meta/llama-3.1-8b-instruct-awq model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/meta/llama-3.1-8b-instruct-fp8: + post: + description: Runs inference on the @cf/meta/llama-3.1-8b-instruct-fp8 model. + operationId: workers-ai-post-run-cf-meta-llama-3-1-8b-instruct-fp8 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/meta/llama-3.1-8b-instruct-fp8 model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/meta/llama-3.1-8b-instruct-fp8-fast: + post: + description: Runs inference on the @cf/meta/llama-3.1-8b-instruct-fp8-fast model. + operationId: workers-ai-post-run-cf-meta-llama-3-1-8b-instruct-fp8-fast + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/meta/llama-3.1-8b-instruct-fp8-fast model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/meta/llama-3.2-11b-vision-instruct: + post: + description: Runs inference on the @cf/meta/llama-3.2-11b-vision-instruct model. + operationId: workers-ai-post-run-cf-meta-llama-3-2-11b-vision-instruct + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: 0 + type: number + image: + type: array + description: An array of integers that represent the image data constrained to 8-bit unsigned integer values. Deprecated, use image as a part of messages now. + items: + description: A value between 0 and 255 + type: number + format: binary + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: 0 + type: number + prompt: + description: The input text prompt for the model to generate a response. + maxLength: 131072 + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 2 + minimum: 0 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + image_url: + properties: + url: + description: image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted + type: string + type: object + text: + type: string + type: + description: Type of the content provided + type: string + type: object + properties: + image_url: + properties: + url: + description: image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted + type: string + type: object + text: + type: string + type: + description: Type of the content provided + type: string + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + tool_call_id: + description: The tool call id. If you don't know what to put here you can fall back to 000000001 + type: string + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/meta/llama-3.2-11b-vision-instruct model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/meta/llama-3.2-1b-instruct: + post: + description: Runs inference on the @cf/meta/llama-3.2-1b-instruct model. + operationId: workers-ai-post-run-cf-meta-llama-3-2-1b-instruct + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/meta/llama-3.2-1b-instruct model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/meta/llama-3.2-3b-instruct: + post: + description: Runs inference on the @cf/meta/llama-3.2-3b-instruct model. + operationId: workers-ai-post-run-cf-meta-llama-3-2-3b-instruct + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/meta/llama-3.2-3b-instruct model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/meta/llama-3.3-70b-instruct-fp8-fast: + post: + description: Runs inference on the @cf/meta/llama-3.3-70b-instruct-fp8-fast model. + operationId: workers-ai-post-run-cf-meta-llama-3-3-70b-instruct-fp8-fast + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + requests: + items: + properties: + external_reference: + description: User-supplied reference. This field will be present in the response as well it can be used to reference the request and response. It's NOT validated to be unique. + type: string + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: 0 + type: number + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: 0 + type: number + prompt: + description: Prompt for the text generation model + minLength: 1 + type: string + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 2 + minimum: 0 + type: number + type: object + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/meta/llama-3.3-70b-instruct-fp8-fast model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/meta/llama-4-scout-17b-16e-instruct: + post: + description: Runs inference on the @cf/meta/llama-4-scout-17b-16e-instruct model. + operationId: workers-ai-post-run-cf-meta-llama-4-scout-17b-16e-instruct + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: 0 + type: number + guided_json: + description: JSON schema that should be fulfilled for the response. + type: object + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: 0 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.15 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 2 + minimum: 0 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + image_url: + properties: + url: + description: image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted + type: string + type: object + text: + type: string + type: + description: Type of the content provided + type: string + type: object + properties: + image_url: + properties: + url: + description: image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted + type: string + type: object + text: + type: string + type: + description: Type of the content provided + type: string + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + tool_call_id: + description: The tool call id. If you don't know what to put here you can fall back to 000000001 + type: string + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + requests: + items: + type: object + title: Prompt_Inner + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: 0 + type: number + guided_json: + description: JSON schema that should be fulfilled for the response. + type: object + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: 0 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.15 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 2 + minimum: 0 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + image_url: + properties: + url: + description: image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted + type: string + type: object + text: + type: string + type: + description: Type of the content provided + type: string + type: object + properties: + image_url: + properties: + url: + description: image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted + type: string + type: object + text: + type: string + type: + description: Type of the content provided + type: string + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + tool_call_id: + description: The tool call id. If you don't know what to put here you can fall back to 000000001 + type: string + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/meta/llama-4-scout-17b-16e-instruct model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/meta/llama-guard-3-8b: + post: + description: Runs inference on the @cf/meta/llama-guard-3-8b model. + operationId: workers-ai-post-run-cf-meta-llama-guard-3-8b + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + description: The content of the message as a string. + type: string + role: + description: The role of the message sender must alternate between 'user' and 'assistant'. + enum: + - user + - assistant + type: string + required: + - role + - content + type: object + type: array + response_format: + description: Dictate the output format of the generated response. + properties: + type: + description: Set to json_object to process and output generated text as JSON. + type: string + type: object + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + required: + - messages + type: object + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/meta/llama-guard-3-8b model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/meta/m2m100-1.2b: + post: + description: Runs inference on the @cf/meta/m2m100-1.2b model. + operationId: workers-ai-post-run-cf-meta-m2m100-1-2b + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + properties: + source_lang: + default: en + description: The language code of the source text (e.g., 'en' for English). Defaults to 'en' if not specified + type: string + target_lang: + description: The language code to translate the text into (e.g., 'es' for Spanish) + type: string + text: + description: The text to be translated + minLength: 1 + type: string + requests: + description: Batch of the embeddings requests to run using async-queue + items: + properties: + source_lang: + default: en + description: The language code of the source text (e.g., 'en' for English). Defaults to 'en' if not specified + type: string + target_lang: + description: The language code to translate the text into (e.g., 'es' for Spanish) + type: string + text: + description: The text to be translated + minLength: 1 + type: string + required: + - text + - target_lang + type: object + type: array + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/meta/m2m100-1.2b model. + tags: + - Workers AI Translation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/microsoft/nonomni-resnet-50: + post: + description: Runs inference on the @cf/microsoft/nonomni-resnet-50 model. + operationId: workers-ai-post-run-cf-microsoft-nonomni-resnet-50 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/octet-stream: + schema: + format: binary + type: string + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/microsoft/nonomni-resnet-50 model. + tags: + - Workers AI Image Classification + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/microsoft/phi-2: + post: + description: Runs inference on the @cf/microsoft/phi-2 model. + operationId: workers-ai-post-run-cf-microsoft-phi-2 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/microsoft/phi-2 model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/microsoft/resnet-50: + post: + description: Runs inference on the @cf/microsoft/resnet-50 model. + operationId: workers-ai-post-run-cf-microsoft-resnet-50 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/octet-stream: + schema: + format: binary + type: string + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/microsoft/resnet-50 model. + tags: + - Workers AI Image Classification + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/mistral/mistral-7b-instruct-v0.1: + post: + description: Runs inference on the @cf/mistral/mistral-7b-instruct-v0.1 model. + operationId: workers-ai-post-run-cf-mistral-mistral-7b-instruct-v0-1 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/mistral/mistral-7b-instruct-v0.1 model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/mistral/mistral-7b-instruct-v0.2-lora: + post: + description: Runs inference on the @cf/mistral/mistral-7b-instruct-v0.2-lora model. + operationId: workers-ai-post-run-cf-mistral-mistral-7b-instruct-v0-2-lora + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/mistral/mistral-7b-instruct-v0.2-lora model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/mistralai/mistral-small-3.1-24b-instruct: + post: + description: Runs inference on the @cf/mistralai/mistral-small-3.1-24b-instruct model. + operationId: workers-ai-post-run-cf-mistralai-mistral-small-3-1-24b-instruct + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: 0 + type: number + guided_json: + description: JSON schema that should be fulfilled for the response. + type: object + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: 0 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.15 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 2 + minimum: 0 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + image_url: + properties: + url: + description: image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted + type: string + type: object + text: + type: string + type: + description: Type of the content provided + type: string + type: object + properties: + image_url: + properties: + url: + description: image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted + type: string + type: object + text: + type: string + type: + description: Type of the content provided + type: string + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + tool_call_id: + description: The tool call id. Must be supplied for tool calls for Mistral-3. If you don't know what to put here you can fall back to 000000001 + type: string + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/mistralai/mistral-small-3.1-24b-instruct model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/moonshotai/kimi-k2.5: + post: + description: Runs inference on the @cf/moonshotai/kimi-k2.5 model. + operationId: workers-ai-post-run-cf-moonshotai-kimi-k2-5 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + audio: + description: Parameters for audio output. Required when modalities includes 'audio'. + properties: + format: + enum: + - wav + - aac + - mp3 + - flac + - opus + - pcm16 + type: string + voice: + type: string + properties: + id: + type: string + required: + - id + required: + - voice + - format + type: object + chat_template_kwargs: + properties: + clear_thinking: + default: false + description: If false, preserves reasoning context between turns. + type: boolean + enable_thinking: + default: true + description: Whether to enable reasoning, enabled by default. + type: boolean + type: object + frequency_penalty: + maximum: 2 + minimum: -2 + nullable: true + type: number + function_call: + type: string + enum: + - none + - auto + properties: + name: + type: string + required: + - name + functions: + items: + properties: + description: + description: A description of what the function does. + type: string + name: + description: The name of the function to be called. + type: string + parameters: + description: The parameters the function accepts, described as a JSON Schema object. + type: object + strict: + nullable: true + type: boolean + required: + - name + type: object + maxItems: 128 + minItems: 1 + type: array + logit_bias: + nullable: true + type: object + logprobs: + nullable: true + type: boolean + max_completion_tokens: + nullable: true + type: integer + max_tokens: + nullable: true + type: integer + metadata: + nullable: true + type: object + modalities: + items: + enum: + - text + - audio + type: string + nullable: true + type: array + model: + description: ID of the model to use (e.g. '@cf/zai-org/glm-4.7-flash, etc'). + type: string + 'n': + maximum: 128 + minimum: 1 + nullable: true + type: integer + parallel_tool_calls: + default: true + description: Whether to enable parallel function calling during tool use. + type: boolean + prediction: + properties: + content: + type: string + items: + properties: + text: + type: string + type: + enum: + - text + type: string + required: + - type + - text + type: object + type: + enum: + - content + type: string + required: + - type + - content + type: object + presence_penalty: + maximum: 2 + minimum: -2 + nullable: true + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + reasoning_effort: + enum: + - low + - medium + - high + nullable: true + type: string + response_format: + description: Specifies the format the model must output. + type: object + properties: + type: + enum: + - text + type: string + json_schema: + properties: + description: + type: string + name: + type: string + schema: + type: object + strict: + nullable: true + type: boolean + required: + - name + type: object + required: + - type + seed: + nullable: true + type: integer + service_tier: + enum: + - auto + - default + - flex + - scale + - priority + nullable: true + type: string + stop: + type: string + items: + type: string + store: + nullable: true + type: boolean + stream: + nullable: true + type: boolean + stream_options: + properties: + include_obfuscation: + type: boolean + include_usage: + type: boolean + type: object + temperature: + maximum: 2 + minimum: 0 + nullable: true + type: number + tool_choice: + description: Controls which (if any) tool is called by the model. 'none' = no tools, 'auto' = model decides, 'required' = must call a tool. + type: string + enum: + - none + - auto + - required + properties: + function: + properties: + name: + type: string + required: + - name + type: object + type: + enum: + - function + type: string + custom: + properties: + name: + type: string + required: + - name + type: object + allowed_tools: + properties: + mode: + enum: + - auto + - required + type: string + tools: + items: + type: object + type: array + required: + - mode + - tools + type: object + required: + - type + tools: + description: A list of tools the model may call. + items: + type: object + properties: + function: + properties: + description: + description: A description of what the function does. + type: string + name: + description: The name of the function to be called. + type: string + parameters: + description: The parameters the function accepts, described as a JSON Schema object. + type: object + strict: + nullable: true + type: boolean + required: + - name + type: object + type: + enum: + - function + type: string + custom: + properties: + description: + type: string + format: + type: object + properties: + type: + enum: + - text + type: string + grammar: + properties: + definition: + type: string + syntax: + enum: + - lark + - regex + type: string + required: + - definition + - syntax + type: object + required: + - type + name: + type: string + required: + - name + type: object + required: + - type + type: array + top_logprobs: + maximum: 20 + minimum: 0 + nullable: true + type: integer + top_p: + maximum: 1 + minimum: 0 + nullable: true + type: number + user: + description: A unique identifier representing your end-user, for abuse monitoring. + type: string + web_search_options: + description: Options for the web search tool (when using built-in web search). + properties: + search_context_size: + default: medium + enum: + - low + - medium + - high + type: string + user_location: + properties: + approximate: + properties: + city: + type: string + country: + type: string + region: + type: string + timezone: + type: string + type: object + type: + enum: + - approximate + type: string + required: + - type + - approximate + type: object + type: object + messages: + description: A list of messages comprising the conversation so far. + items: + type: object + properties: + content: + type: string + items: + properties: + text: + type: string + type: + enum: + - text + type: string + required: + - type + - text + type: object + name: + type: string + role: + enum: + - developer + type: string + audio: + properties: + id: + type: string + required: + - id + type: object + function_call: + properties: + arguments: + type: string + name: + type: string + required: + - name + - arguments + type: object + refusal: + nullable: true + type: string + tool_calls: + items: + type: object + properties: + function: + properties: + arguments: + description: JSON-encoded arguments string. + type: string + name: + type: string + required: + - name + - arguments + type: object + id: + type: string + type: + enum: + - function + type: string + custom: + properties: + input: + type: string + name: + type: string + required: + - name + - input + type: object + required: + - id + - type + type: array + tool_call_id: + type: string + required: + - role + minItems: 1 + type: array + requests: + items: + type: object + title: Prompt + properties: + audio: + description: Parameters for audio output. Required when modalities includes 'audio'. + properties: + format: + enum: + - wav + - aac + - mp3 + - flac + - opus + - pcm16 + type: string + voice: + type: string + properties: + id: + type: string + required: + - id + required: + - voice + - format + type: object + chat_template_kwargs: + properties: + clear_thinking: + default: false + description: If false, preserves reasoning context between turns. + type: boolean + enable_thinking: + default: true + description: Whether to enable reasoning, enabled by default. + type: boolean + type: object + frequency_penalty: + maximum: 2 + minimum: -2 + nullable: true + type: number + function_call: + type: string + enum: + - none + - auto + properties: + name: + type: string + required: + - name + functions: + items: + properties: + description: + description: A description of what the function does. + type: string + name: + description: The name of the function to be called. + type: string + parameters: + description: The parameters the function accepts, described as a JSON Schema object. + type: object + strict: + nullable: true + type: boolean + required: + - name + type: object + maxItems: 128 + minItems: 1 + type: array + logit_bias: + nullable: true + type: object + logprobs: + nullable: true + type: boolean + max_completion_tokens: + nullable: true + type: integer + max_tokens: + nullable: true + type: integer + metadata: + nullable: true + type: object + modalities: + items: + enum: + - text + - audio + type: string + nullable: true + type: array + model: + description: ID of the model to use (e.g. '@cf/zai-org/glm-4.7-flash, etc'). + type: string + 'n': + maximum: 128 + minimum: 1 + nullable: true + type: integer + parallel_tool_calls: + default: true + description: Whether to enable parallel function calling during tool use. + type: boolean + prediction: + properties: + content: + type: string + items: + properties: + text: + type: string + type: + enum: + - text + type: string + required: + - type + - text + type: object + type: + enum: + - content + type: string + required: + - type + - content + type: object + presence_penalty: + maximum: 2 + minimum: -2 + nullable: true + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + reasoning_effort: + enum: + - low + - medium + - high + nullable: true + type: string + response_format: + description: Specifies the format the model must output. + type: object + properties: + type: + enum: + - text + type: string + json_schema: + properties: + description: + type: string + name: + type: string + schema: + type: object + strict: + nullable: true + type: boolean + required: + - name + type: object + required: + - type + seed: + nullable: true + type: integer + service_tier: + enum: + - auto + - default + - flex + - scale + - priority + nullable: true + type: string + stop: + type: string + items: + type: string + store: + nullable: true + type: boolean + stream: + nullable: true + type: boolean + stream_options: + properties: + include_obfuscation: + type: boolean + include_usage: + type: boolean + type: object + temperature: + maximum: 2 + minimum: 0 + nullable: true + type: number + tool_choice: + description: Controls which (if any) tool is called by the model. 'none' = no tools, 'auto' = model decides, 'required' = must call a tool. + type: string + enum: + - none + - auto + - required + properties: + function: + properties: + name: + type: string + required: + - name + type: object + type: + enum: + - function + type: string + custom: + properties: + name: + type: string + required: + - name + type: object + allowed_tools: + properties: + mode: + enum: + - auto + - required + type: string + tools: + items: + type: object + type: array + required: + - mode + - tools + type: object + required: + - type + tools: + description: A list of tools the model may call. + items: + type: object + properties: + function: + properties: + description: + description: A description of what the function does. + type: string + name: + description: The name of the function to be called. + type: string + parameters: + description: The parameters the function accepts, described as a JSON Schema object. + type: object + strict: + nullable: true + type: boolean + required: + - name + type: object + type: + enum: + - function + type: string + custom: + properties: + description: + type: string + format: + type: object + properties: + type: + enum: + - text + type: string + grammar: + properties: + definition: + type: string + syntax: + enum: + - lark + - regex + type: string + required: + - definition + - syntax + type: object + required: + - type + name: + type: string + required: + - name + type: object + required: + - type + type: array + top_logprobs: + maximum: 20 + minimum: 0 + nullable: true + type: integer + top_p: + maximum: 1 + minimum: 0 + nullable: true + type: number + user: + description: A unique identifier representing your end-user, for abuse monitoring. + type: string + web_search_options: + description: Options for the web search tool (when using built-in web search). + properties: + search_context_size: + default: medium + enum: + - low + - medium + - high + type: string + user_location: + properties: + approximate: + properties: + city: + type: string + country: + type: string + region: + type: string + timezone: + type: string + type: object + type: + enum: + - approximate + type: string + required: + - type + - approximate + type: object + type: object + messages: + description: A list of messages comprising the conversation so far. + items: + type: object + properties: + content: + type: string + items: + properties: + text: + type: string + type: + enum: + - text + type: string + required: + - type + - text + type: object + name: + type: string + role: + enum: + - developer + type: string + audio: + properties: + id: + type: string + required: + - id + type: object + function_call: + properties: + arguments: + type: string + name: + type: string + required: + - name + - arguments + type: object + refusal: + nullable: true + type: string + tool_calls: + items: + type: object + properties: + function: + properties: + arguments: + description: JSON-encoded arguments string. + type: string + name: + type: string + required: + - name + - arguments + type: object + id: + type: string + type: + enum: + - function + type: string + custom: + properties: + input: + type: string + name: + type: string + required: + - name + - input + type: object + required: + - id + - type + type: array + tool_call_id: + type: string + required: + - role + minItems: 1 + type: array + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/moonshotai/kimi-k2.5 model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/myshell-ai/melotts: + post: + description: Runs inference on the @cf/myshell-ai/melotts model. + operationId: workers-ai-post-run-cf-myshell-ai-melotts + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + lang: + default: en + description: The speech language (e.g., 'en' for English, 'fr' for French). Defaults to 'en' if not specified + type: string + prompt: + description: A text description of the audio you want to generate + minLength: 1 + type: string + required: + - prompt + type: object + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/myshell-ai/melotts model. + tags: + - Workers AI Text To Speech + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/nvidia/nemotron-3-120b-a12b: + post: + description: Runs inference on the @cf/nvidia/nemotron-3-120b-a12b model. + operationId: workers-ai-post-run-cf-nvidia-nemotron-3-120b-a12b + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + audio: + description: Parameters for audio output. Required when modalities includes 'audio'. + properties: + format: + enum: + - wav + - aac + - mp3 + - flac + - opus + - pcm16 + type: string + voice: + type: string + properties: + id: + type: string + required: + - id + required: + - voice + - format + type: object + chat_template_kwargs: + properties: + clear_thinking: + default: false + description: If false, preserves reasoning context between turns. + type: boolean + enable_thinking: + default: true + description: Whether to enable reasoning, enabled by default. + type: boolean + type: object + frequency_penalty: + maximum: 2 + minimum: -2 + nullable: true + type: number + function_call: + type: string + enum: + - none + - auto + properties: + name: + type: string + required: + - name + functions: + items: + properties: + description: + description: A description of what the function does. + type: string + name: + description: The name of the function to be called. + type: string + parameters: + description: The parameters the function accepts, described as a JSON Schema object. + type: object + strict: + nullable: true + type: boolean + required: + - name + type: object + maxItems: 128 + minItems: 1 + type: array + logit_bias: + nullable: true + type: object + logprobs: + nullable: true + type: boolean + max_completion_tokens: + nullable: true + type: integer + max_tokens: + nullable: true + type: integer + metadata: + nullable: true + type: object + modalities: + items: + enum: + - text + - audio + type: string + nullable: true + type: array + model: + description: ID of the model to use (e.g. '@cf/zai-org/glm-4.7-flash, etc'). + type: string + 'n': + maximum: 128 + minimum: 1 + nullable: true + type: integer + parallel_tool_calls: + default: true + description: Whether to enable parallel function calling during tool use. + type: boolean + prediction: + properties: + content: + type: string + items: + properties: + text: + type: string + type: + enum: + - text + type: string + required: + - type + - text + type: object + type: + enum: + - content + type: string + required: + - type + - content + type: object + presence_penalty: + maximum: 2 + minimum: -2 + nullable: true + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + reasoning_effort: + enum: + - low + - medium + - high + nullable: true + type: string + response_format: + description: Specifies the format the model must output. + type: object + properties: + type: + enum: + - text + type: string + json_schema: + properties: + description: + type: string + name: + type: string + schema: + type: object + strict: + nullable: true + type: boolean + required: + - name + type: object + required: + - type + seed: + nullable: true + type: integer + service_tier: + enum: + - auto + - default + - flex + - scale + - priority + nullable: true + type: string + stop: + type: string + items: + type: string + store: + nullable: true + type: boolean + stream: + nullable: true + type: boolean + stream_options: + properties: + include_obfuscation: + type: boolean + include_usage: + type: boolean + type: object + temperature: + maximum: 2 + minimum: 0 + nullable: true + type: number + tool_choice: + description: Controls which (if any) tool is called by the model. 'none' = no tools, 'auto' = model decides, 'required' = must call a tool. + type: string + enum: + - none + - auto + - required + properties: + function: + properties: + name: + type: string + required: + - name + type: object + type: + enum: + - function + type: string + custom: + properties: + name: + type: string + required: + - name + type: object + allowed_tools: + properties: + mode: + enum: + - auto + - required + type: string + tools: + items: + type: object + type: array + required: + - mode + - tools + type: object + required: + - type + tools: + description: A list of tools the model may call. + items: + type: object + properties: + function: + properties: + description: + description: A description of what the function does. + type: string + name: + description: The name of the function to be called. + type: string + parameters: + description: The parameters the function accepts, described as a JSON Schema object. + type: object + strict: + nullable: true + type: boolean + required: + - name + type: object + type: + enum: + - function + type: string + custom: + properties: + description: + type: string + format: + type: object + properties: + type: + enum: + - text + type: string + grammar: + properties: + definition: + type: string + syntax: + enum: + - lark + - regex + type: string + required: + - definition + - syntax + type: object + required: + - type + name: + type: string + required: + - name + type: object + required: + - type + type: array + top_logprobs: + maximum: 20 + minimum: 0 + nullable: true + type: integer + top_p: + maximum: 1 + minimum: 0 + nullable: true + type: number + user: + description: A unique identifier representing your end-user, for abuse monitoring. + type: string + web_search_options: + description: Options for the web search tool (when using built-in web search). + properties: + search_context_size: + default: medium + enum: + - low + - medium + - high + type: string + user_location: + properties: + approximate: + properties: + city: + type: string + country: + type: string + region: + type: string + timezone: + type: string + type: object + type: + enum: + - approximate + type: string + required: + - type + - approximate + type: object + type: object + messages: + description: A list of messages comprising the conversation so far. + items: + type: object + properties: + content: + type: string + items: + properties: + text: + type: string + type: + enum: + - text + type: string + required: + - type + - text + type: object + name: + type: string + role: + enum: + - developer + type: string + audio: + properties: + id: + type: string + required: + - id + type: object + function_call: + properties: + arguments: + type: string + name: + type: string + required: + - name + - arguments + type: object + refusal: + nullable: true + type: string + tool_calls: + items: + type: object + properties: + function: + properties: + arguments: + description: JSON-encoded arguments string. + type: string + name: + type: string + required: + - name + - arguments + type: object + id: + type: string + type: + enum: + - function + type: string + custom: + properties: + input: + type: string + name: + type: string + required: + - name + - input + type: object + required: + - id + - type + type: array + tool_call_id: + type: string + required: + - role + minItems: 1 + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/nvidia/nemotron-3-120b-a12b model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/openai/gpt-oss-120b: + post: + description: Runs inference on the @cf/openai/gpt-oss-120b model. + operationId: workers-ai-post-run-cf-openai-gpt-oss-120b + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + input: + description: Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types + type: string + items: {} + reasoning: + properties: + effort: + description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. + enum: + - low + - medium + - high + type: string + summary: + description: A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of auto, concise, or detailed. + enum: + - auto + - concise + - detailed + type: string + type: object + requests: + items: + properties: + input: + description: Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types + type: string + items: {} + reasoning: + properties: + effort: + description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. + enum: + - low + - medium + - high + type: string + summary: + description: A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of auto, concise, or detailed. + enum: + - auto + - concise + - detailed + type: string + type: object + required: + - input + type: object + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/openai/gpt-oss-120b model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/openai/gpt-oss-20b: + post: + description: Runs inference on the @cf/openai/gpt-oss-20b model. + operationId: workers-ai-post-run-cf-openai-gpt-oss-20b + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + input: + description: Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types + type: string + items: {} + reasoning: + properties: + effort: + description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. + enum: + - low + - medium + - high + type: string + summary: + description: A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of auto, concise, or detailed. + enum: + - auto + - concise + - detailed + type: string + type: object + requests: + items: + properties: + input: + description: Responses API Input messages. Refer to OpenAI Responses API docs to learn more about supported content types + type: string + items: {} + reasoning: + properties: + effort: + description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. + enum: + - low + - medium + - high + type: string + summary: + description: A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of auto, concise, or detailed. + enum: + - auto + - concise + - detailed + type: string + type: object + required: + - input + type: object + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/openai/gpt-oss-20b model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/openai/whisper: + post: + description: Runs inference on the @cf/openai/whisper model. + operationId: workers-ai-post-run-cf-openai-whisper + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/octet-stream: + schema: + format: binary + type: string + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/openai/whisper model. + tags: + - Workers AI Automatic Speech Recognition + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/openai/whisper-large-v3-turbo: + post: + description: Runs inference on the @cf/openai/whisper-large-v3-turbo model. + operationId: workers-ai-post-run-cf-openai-whisper-large-v3-turbo + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + audio: + type: string + description: Base64 encoded value of the audio data. + properties: + body: + type: object + contentType: + type: string + beam_size: + default: 5 + description: The number of beams to use in beam search decoding. Higher values may improve accuracy at the cost of speed. + type: integer + compression_ratio_threshold: + default: 2.4 + description: Threshold for filtering out segments with high compression ratio, which often indicate repetitive or hallucinated text. + type: number + condition_on_previous_text: + default: true + description: Whether to condition on previous text during transcription. Setting to false may help prevent hallucination loops. + type: boolean + hallucination_silence_threshold: + description: Optional threshold (in seconds) to skip silent periods that may cause hallucinations. + type: number + initial_prompt: + description: A text prompt to help provide context to the model on the contents of the audio. + type: string + language: + description: The language of the audio being transcribed or translated. + type: string + log_prob_threshold: + default: -1 + description: Threshold for filtering out segments with low average log probability, indicating low confidence. + type: number + no_speech_threshold: + default: 0.6 + description: Threshold for detecting no-speech segments. Segments with no-speech probability above this value are skipped. + type: number + prefix: + description: The prefix appended to the beginning of the output of the transcription and can guide the transcription result. + type: string + task: + default: transcribe + description: Supported tasks are 'translate' or 'transcribe'. + type: string + vad_filter: + default: false + description: Preprocess the audio with a voice activity detection model. + type: boolean + required: + - audio + type: object + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/openai/whisper-large-v3-turbo model. + tags: + - Workers AI Automatic Speech Recognition + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/openai/whisper-tiny-en: + post: + description: Runs inference on the @cf/openai/whisper-tiny-en model. + operationId: workers-ai-post-run-cf-openai-whisper-tiny-en + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/octet-stream: + schema: + format: binary + type: string + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/openai/whisper-tiny-en model. + tags: + - Workers AI Automatic Speech Recognition + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/openchat/openchat-3.5-0106: + post: + description: Runs inference on the @cf/openchat/openchat-3.5-0106 model. + operationId: workers-ai-post-run-cf-openchat-openchat-3-5-0106 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/openchat/openchat-3.5-0106 model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/pfnet/plamo-embedding-1b: + post: + description: Runs inference on the @cf/pfnet/plamo-embedding-1b model. + operationId: workers-ai-post-run-cf-pfnet-plamo-embedding-1b + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + text: + description: Input text to embed. Can be a single string or a list of strings. + type: string + items: + type: string + required: + - text + type: object + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/pfnet/plamo-embedding-1b model. + tags: + - Workers AI Text Embeddings + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/qwen/qwen1.5-0.5b-chat: + post: + description: Runs inference on the @cf/qwen/qwen1.5-0.5b-chat model. + operationId: workers-ai-post-run-cf-qwen-qwen1-5-0-5b-chat + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/qwen/qwen1.5-0.5b-chat model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/qwen/qwen1.5-1.8b-chat: + post: + description: Runs inference on the @cf/qwen/qwen1.5-1.8b-chat model. + operationId: workers-ai-post-run-cf-qwen-qwen1-5-1-8b-chat + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/qwen/qwen1.5-1.8b-chat model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/qwen/qwen1.5-14b-chat-awq: + post: + description: Runs inference on the @cf/qwen/qwen1.5-14b-chat-awq model. + operationId: workers-ai-post-run-cf-qwen-qwen1-5-14b-chat-awq + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/qwen/qwen1.5-14b-chat-awq model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/qwen/qwen1.5-7b-chat-awq: + post: + description: Runs inference on the @cf/qwen/qwen1.5-7b-chat-awq model. + operationId: workers-ai-post-run-cf-qwen-qwen1-5-7b-chat-awq + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/qwen/qwen1.5-7b-chat-awq model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/qwen/qwen2.5-coder-32b-instruct: + post: + description: Runs inference on the @cf/qwen/qwen2.5-coder-32b-instruct model. + operationId: workers-ai-post-run-cf-qwen-qwen2-5-coder-32b-instruct + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: 0 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: 0 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 2 + minimum: 0 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + description: The content of the message as a string. + type: string + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/qwen/qwen2.5-coder-32b-instruct model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/qwen/qwen3-30b-a3b-fp8: + post: + description: Runs inference on the @cf/qwen/qwen3-30b-a3b-fp8 model. + operationId: workers-ai-post-run-cf-qwen-qwen3-30b-a3b-fp8 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 2000 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + requests: + items: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/qwen/qwen3-30b-a3b-fp8 model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/qwen/qwen3-embedding-0.6b: + post: + description: Runs inference on the @cf/qwen/qwen3-embedding-0.6b model. + operationId: workers-ai-post-run-cf-qwen-qwen3-embedding-0-6b + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + documents: + type: string + description: A single document string + items: + minLength: 1 + type: string + instruction: + default: Given a web search query, retrieve relevant passages that answer the query + description: Optional instruction for the task + type: string + queries: + type: string + description: A single query string + items: + minLength: 1 + type: string + text: + type: string + description: 'Alias for documents: a single text string' + items: + minLength: 1 + type: string + type: object + responses: + '200': + content: + application/json: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/qwen/qwen3-embedding-0.6b model. + tags: + - Workers AI Text Embeddings + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/qwen/qwq-32b: + post: + description: Runs inference on the @cf/qwen/qwq-32b model. + operationId: workers-ai-post-run-cf-qwen-qwq-32b + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: 0 + type: number + guided_json: + description: JSON schema that should be fulfilled for the response. + type: object + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: 0 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.15 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 2 + minimum: 0 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + image_url: + properties: + url: + description: image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted + type: string + type: object + text: + type: string + type: + description: Type of the content provided + type: string + type: object + properties: + image_url: + properties: + url: + description: image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted + type: string + type: object + text: + type: string + type: + description: Type of the content provided + type: string + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + tool_call_id: + description: The tool call id. If you don't know what to put here you can fall back to 000000001 + type: string + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/qwen/qwq-32b model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/runwayml/stable-diffusion-v1-5-img2img: + post: + description: Runs inference on the @cf/runwayml/stable-diffusion-v1-5-img2img model. + operationId: workers-ai-post-run-cf-runwayml-stable-diffusion-v1-5-img2img + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + guidance: + default: 7.5 + description: Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt + type: number + height: + description: The height of the generated image in pixels + maximum: 2048 + minimum: 256 + type: integer + image: + description: For use with img2img tasks. An array of integers that represent the image data constrained to 8-bit unsigned integer values + items: + description: A value between 0 and 255 + type: number + type: array + image_b64: + description: For use with img2img tasks. A base64-encoded string of the input image + type: string + mask: + description: An array representing An array of integers that represent mask image data for inpainting constrained to 8-bit unsigned integer values + items: + description: A value between 0 and 255 + type: number + type: array + negative_prompt: + description: Text describing elements to avoid in the generated image + type: string + num_steps: + default: 20 + description: The number of diffusion steps; higher values can improve quality but take longer + maximum: 20 + type: integer + prompt: + description: A text description of the image you want to generate + minLength: 1 + type: string + seed: + description: Random seed for reproducibility of the image generation + type: integer + strength: + default: 1 + description: A value between 0 and 1 indicating how strongly to apply the transformation during img2img tasks; lower values make the output closer to the input image + type: number + width: + description: The width of the generated image in pixels + maximum: 2048 + minimum: 256 + type: integer + required: + - prompt + type: object + responses: + '200': + content: + application/json: + schema: + type: object + image/png: + schema: + format: binary + type: string + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/runwayml/stable-diffusion-v1-5-img2img model. + tags: + - Workers AI Text To Image + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/runwayml/stable-diffusion-v1-5-inpainting: + post: + description: Runs inference on the @cf/runwayml/stable-diffusion-v1-5-inpainting model. + operationId: workers-ai-post-run-cf-runwayml-stable-diffusion-v1-5-inpainting + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + guidance: + default: 7.5 + description: Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt + type: number + height: + description: The height of the generated image in pixels + maximum: 2048 + minimum: 256 + type: integer + image: + description: For use with img2img tasks. An array of integers that represent the image data constrained to 8-bit unsigned integer values + items: + description: A value between 0 and 255 + type: number + type: array + image_b64: + description: For use with img2img tasks. A base64-encoded string of the input image + type: string + mask: + description: An array representing An array of integers that represent mask image data for inpainting constrained to 8-bit unsigned integer values + items: + description: A value between 0 and 255 + type: number + type: array + negative_prompt: + description: Text describing elements to avoid in the generated image + type: string + num_steps: + default: 20 + description: The number of diffusion steps; higher values can improve quality but take longer + maximum: 20 + type: integer + prompt: + description: A text description of the image you want to generate + minLength: 1 + type: string + seed: + description: Random seed for reproducibility of the image generation + type: integer + strength: + default: 1 + description: A value between 0 and 1 indicating how strongly to apply the transformation during img2img tasks; lower values make the output closer to the input image + type: number + width: + description: The width of the generated image in pixels + maximum: 2048 + minimum: 256 + type: integer + required: + - prompt + type: object + responses: + '200': + content: + application/json: + schema: + type: object + image/png: + schema: + format: binary + type: string + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/runwayml/stable-diffusion-v1-5-inpainting model. + tags: + - Workers AI Text To Image + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/stabilityai/stable-diffusion-xl-base-1.0: + post: + description: Runs inference on the @cf/stabilityai/stable-diffusion-xl-base-1.0 model. + operationId: workers-ai-post-run-cf-stabilityai-stable-diffusion-xl-base-1-0 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + guidance: + default: 7.5 + description: Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt + type: number + height: + description: The height of the generated image in pixels + maximum: 2048 + minimum: 256 + type: integer + image: + description: For use with img2img tasks. An array of integers that represent the image data constrained to 8-bit unsigned integer values + items: + description: A value between 0 and 255 + type: number + type: array + image_b64: + description: For use with img2img tasks. A base64-encoded string of the input image + type: string + mask: + description: An array representing An array of integers that represent mask image data for inpainting constrained to 8-bit unsigned integer values + items: + description: A value between 0 and 255 + type: number + type: array + negative_prompt: + description: Text describing elements to avoid in the generated image + type: string + num_steps: + default: 20 + description: The number of diffusion steps; higher values can improve quality but take longer + maximum: 20 + type: integer + prompt: + description: A text description of the image you want to generate + minLength: 1 + type: string + seed: + description: Random seed for reproducibility of the image generation + type: integer + strength: + default: 1 + description: A value between 0 and 1 indicating how strongly to apply the transformation during img2img tasks; lower values make the output closer to the input image + type: number + width: + description: The width of the generated image in pixels + maximum: 2048 + minimum: 256 + type: integer + required: + - prompt + type: object + responses: + '200': + content: + application/json: + schema: + type: object + image/png: + schema: + format: binary + type: string + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/stabilityai/stable-diffusion-xl-base-1.0 model. + tags: + - Workers AI Text To Image + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/thebloke/discolm-german-7b-v1-awq: + post: + description: Runs inference on the @cf/thebloke/discolm-german-7b-v1-awq model. + operationId: workers-ai-post-run-cf-thebloke-discolm-german-7b-v1-awq + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/thebloke/discolm-german-7b-v1-awq model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/tiiuae/falcon-7b-instruct: + post: + description: Runs inference on the @cf/tiiuae/falcon-7b-instruct model. + operationId: workers-ai-post-run-cf-tiiuae-falcon-7b-instruct + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/tiiuae/falcon-7b-instruct model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/tinyllama/tinyllama-1.1b-chat-v1.0: + post: + description: Runs inference on the @cf/tinyllama/tinyllama-1.1b-chat-v1.0 model. + operationId: workers-ai-post-run-cf-tinyllama-tinyllama-1-1b-chat-v1-0 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/tinyllama/tinyllama-1.1b-chat-v1.0 model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@cf/zai-org/glm-4.7-flash: + post: + description: Runs inference on the @cf/zai-org/glm-4.7-flash model. + operationId: workers-ai-post-run-cf-zai-org-glm-4-7-flash + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + audio: + description: Parameters for audio output. Required when modalities includes 'audio'. + properties: + format: + enum: + - wav + - aac + - mp3 + - flac + - opus + - pcm16 + type: string + voice: + type: string + properties: + id: + type: string + required: + - id + required: + - voice + - format + type: object + chat_template_kwargs: + properties: + clear_thinking: + default: false + description: If false, preserves reasoning context between turns. + type: boolean + enable_thinking: + default: true + description: Whether to enable reasoning, enabled by default. + type: boolean + type: object + frequency_penalty: + maximum: 2 + minimum: -2 + nullable: true + type: number + function_call: + type: string + enum: + - none + - auto + properties: + name: + type: string + required: + - name + functions: + items: + properties: + description: + description: A description of what the function does. + type: string + name: + description: The name of the function to be called. + type: string + parameters: + description: The parameters the function accepts, described as a JSON Schema object. + type: object + strict: + nullable: true + type: boolean + required: + - name + type: object + maxItems: 128 + minItems: 1 + type: array + logit_bias: + nullable: true + type: object + logprobs: + nullable: true + type: boolean + max_completion_tokens: + nullable: true + type: integer + max_tokens: + nullable: true + type: integer + metadata: + nullable: true + type: object + modalities: + items: + enum: + - text + - audio + type: string + nullable: true + type: array + model: + description: ID of the model to use (e.g. '@cf/zai-org/glm-4.7-flash, etc'). + type: string + 'n': + maximum: 128 + minimum: 1 + nullable: true + type: integer + parallel_tool_calls: + default: true + description: Whether to enable parallel function calling during tool use. + type: boolean + prediction: + properties: + content: + type: string + items: + properties: + text: + type: string + type: + enum: + - text + type: string + required: + - type + - text + type: object + type: + enum: + - content + type: string + required: + - type + - content + type: object + presence_penalty: + maximum: 2 + minimum: -2 + nullable: true + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + reasoning_effort: + enum: + - low + - medium + - high + nullable: true + type: string + response_format: + description: Specifies the format the model must output. + type: object + properties: + type: + enum: + - text + type: string + json_schema: + properties: + description: + type: string + name: + type: string + schema: + type: object + strict: + nullable: true + type: boolean + required: + - name + type: object + required: + - type + seed: + nullable: true + type: integer + service_tier: + enum: + - auto + - default + - flex + - scale + - priority + nullable: true + type: string + stop: + type: string + items: + type: string + store: + nullable: true + type: boolean + stream: + nullable: true + type: boolean + stream_options: + properties: + include_obfuscation: + type: boolean + include_usage: + type: boolean + type: object + temperature: + maximum: 2 + minimum: 0 + nullable: true + type: number + tool_choice: + description: Controls which (if any) tool is called by the model. 'none' = no tools, 'auto' = model decides, 'required' = must call a tool. + type: string + enum: + - none + - auto + - required + properties: + function: + properties: + name: + type: string + required: + - name + type: object + type: + enum: + - function + type: string + custom: + properties: + name: + type: string + required: + - name + type: object + allowed_tools: + properties: + mode: + enum: + - auto + - required + type: string + tools: + items: + type: object + type: array + required: + - mode + - tools + type: object + required: + - type + tools: + description: A list of tools the model may call. + items: + type: object + properties: + function: + properties: + description: + description: A description of what the function does. + type: string + name: + description: The name of the function to be called. + type: string + parameters: + description: The parameters the function accepts, described as a JSON Schema object. + type: object + strict: + nullable: true + type: boolean + required: + - name + type: object + type: + enum: + - function + type: string + custom: + properties: + description: + type: string + format: + type: object + properties: + type: + enum: + - text + type: string + grammar: + properties: + definition: + type: string + syntax: + enum: + - lark + - regex + type: string + required: + - definition + - syntax + type: object + required: + - type + name: + type: string + required: + - name + type: object + required: + - type + type: array + top_logprobs: + maximum: 20 + minimum: 0 + nullable: true + type: integer + top_p: + maximum: 1 + minimum: 0 + nullable: true + type: number + user: + description: A unique identifier representing your end-user, for abuse monitoring. + type: string + web_search_options: + description: Options for the web search tool (when using built-in web search). + properties: + search_context_size: + default: medium + enum: + - low + - medium + - high + type: string + user_location: + properties: + approximate: + properties: + city: + type: string + country: + type: string + region: + type: string + timezone: + type: string + type: object + type: + enum: + - approximate + type: string + required: + - type + - approximate + type: object + type: object + messages: + description: A list of messages comprising the conversation so far. + items: + type: object + properties: + content: + type: string + items: + properties: + text: + type: string + type: + enum: + - text + type: string + required: + - type + - text + type: object + name: + type: string + role: + enum: + - developer + type: string + audio: + properties: + id: + type: string + required: + - id + type: object + function_call: + properties: + arguments: + type: string + name: + type: string + required: + - name + - arguments + type: object + refusal: + nullable: true + type: string + tool_calls: + items: + type: object + properties: + function: + properties: + arguments: + description: JSON-encoded arguments string. + type: string + name: + type: string + required: + - name + - arguments + type: object + id: + type: string + type: + enum: + - function + type: string + custom: + properties: + input: + type: string + name: + type: string + required: + - name + - input + type: object + required: + - id + - type + type: array + tool_call_id: + type: string + required: + - role + minItems: 1 + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @cf/zai-org/glm-4.7-flash model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@hf/google/gemma-7b-it: + post: + description: Runs inference on the @hf/google/gemma-7b-it model. + operationId: workers-ai-post-run-hf-google-gemma-7b-it + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @hf/google/gemma-7b-it model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@hf/mistral/mistral-7b-instruct-v0.2: + post: + description: Runs inference on the @hf/mistral/mistral-7b-instruct-v0.2 model. + operationId: workers-ai-post-run-hf-mistral-mistral-7b-instruct-v0-2 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @hf/mistral/mistral-7b-instruct-v0.2 model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@hf/nexusflow/starling-lm-7b-beta: + post: + description: Runs inference on the @hf/nexusflow/starling-lm-7b-beta model. + operationId: workers-ai-post-run-hf-nexusflow-starling-lm-7b-beta + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @hf/nexusflow/starling-lm-7b-beta model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@hf/nousresearch/hermes-2-pro-mistral-7b: + post: + description: Runs inference on the @hf/nousresearch/hermes-2-pro-mistral-7b model. + operationId: workers-ai-post-run-hf-nousresearch-hermes-2-pro-mistral-7b + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @hf/nousresearch/hermes-2-pro-mistral-7b model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@hf/thebloke/deepseek-coder-6.7b-base-awq: + post: + description: Runs inference on the @hf/thebloke/deepseek-coder-6.7b-base-awq model. + operationId: workers-ai-post-run-hf-thebloke-deepseek-coder-6-7b-base-awq + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @hf/thebloke/deepseek-coder-6.7b-base-awq model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@hf/thebloke/deepseek-coder-6.7b-instruct-awq: + post: + description: Runs inference on the @hf/thebloke/deepseek-coder-6.7b-instruct-awq model. + operationId: workers-ai-post-run-hf-thebloke-deepseek-coder-6-7b-instruct-awq + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @hf/thebloke/deepseek-coder-6.7b-instruct-awq model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@hf/thebloke/llama-2-13b-chat-awq: + post: + description: Runs inference on the @hf/thebloke/llama-2-13b-chat-awq model. + operationId: workers-ai-post-run-hf-thebloke-llama-2-13b-chat-awq + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @hf/thebloke/llama-2-13b-chat-awq model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@hf/thebloke/mistral-7b-instruct-v0.1-awq: + post: + description: Runs inference on the @hf/thebloke/mistral-7b-instruct-v0.1-awq model. + operationId: workers-ai-post-run-hf-thebloke-mistral-7b-instruct-v0-1-awq + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @hf/thebloke/mistral-7b-instruct-v0.1-awq model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@hf/thebloke/neural-chat-7b-v3-1-awq: + post: + description: Runs inference on the @hf/thebloke/neural-chat-7b-v3-1-awq model. + operationId: workers-ai-post-run-hf-thebloke-neural-chat-7b-v3-1-awq + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @hf/thebloke/neural-chat-7b-v3-1-awq model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@hf/thebloke/openhermes-2.5-mistral-7b-awq: + post: + description: Runs inference on the @hf/thebloke/openhermes-2.5-mistral-7b-awq model. + operationId: workers-ai-post-run-hf-thebloke-openhermes-2-5-mistral-7b-awq + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @hf/thebloke/openhermes-2.5-mistral-7b-awq model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/@hf/thebloke/zephyr-7b-beta-awq: + post: + description: Runs inference on the @hf/thebloke/zephyr-7b-beta-awq model. + operationId: workers-ai-post-run-hf-thebloke-zephyr-7b-beta-awq + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: queueRequest + schema: + type: string + x-auditable: true + - in: query + name: tags + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Prompt + properties: + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + prompt: + description: The input text prompt for the model to generate a response. + minLength: 1 + type: string + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + seed: + description: Random seed for reproducibility of the generation. + maximum: 9999999999 + minimum: 1 + type: integer + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + responses: + '200': + content: + application/json: + schema: + type: object + text/event-stream: + schema: + type: object + description: Object with user data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: string + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - errors + - success + - result + type: object + description: Bad request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute @hf/thebloke/zephyr-7b-beta-awq model. + tags: + - Workers AI Text Generation + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/run/{model_name}: + post: + description: This endpoint provides users with the capability to run specific AI models on-demand. By submitting the required input data, users can receive real-time predictions or results generated by the chosen AI model. The endpoint supports various AI model types, ensuring flexibility and adaptability for diverse use cases. Model specific inputs available in [Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/). + operationId: workers-ai-post-run-model + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: model_name + schema: + type: string + required: true + requestBody: + content: + application/json: + schema: + type: object + title: Text Classification + properties: + text: + description: The text that you want to classify + minLength: 1 + type: string + guidance: + default: 7.5 + description: Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt + type: number + height: + description: The height of the generated image in pixels + maximum: 2048 + minimum: 256 + type: integer + image: + description: For use with img2img tasks. An array of integers that represent the image data constrained to 8-bit unsigned integer values + items: + description: A value between 0 and 255 + type: number + type: array + image_b64: + description: For use with img2img tasks. A base64-encoded string of the input image + type: string + mask: + description: An array representing An array of integers that represent mask image data for inpainting constrained to 8-bit unsigned integer values + items: + description: A value between 0 and 255 + type: number + type: array + negative_prompt: + description: Text describing elements to avoid in the generated image + type: string + num_steps: + default: 20 + description: The number of diffusion steps; higher values can improve quality but take longer + maximum: 20 + type: integer + prompt: + description: A text description of the image you want to generate + minLength: 1 + type: string + seed: + description: Random seed for reproducibility of the image generation + type: integer + strength: + default: 1 + description: A value between 0 and 1 indicating how strongly to apply the transformation during img2img tasks; lower values make the output closer to the input image + type: number + width: + description: The width of the generated image in pixels + maximum: 2048 + minimum: 256 + type: integer + lang: + default: en + description: The speech language (e.g., 'en' for English, 'fr' for French). Defaults to 'en' if not specified + type: string + audio: + description: An array of integers that represent the audio data constrained to 8-bit unsigned integer values + items: + description: A value between 0 and 255 + type: number + type: array + source_lang: + description: The language of the recorded audio + type: string + target_lang: + description: The language to translate the transcription into. Currently only English is supported. + type: string + frequency_penalty: + description: Decreases the likelihood of the model repeating the same lines verbatim. + maximum: 2 + minimum: -2 + type: number + lora: + description: Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. + type: string + max_tokens: + default: 256 + description: The maximum number of tokens to generate in the response. + type: integer + presence_penalty: + description: Increases the likelihood of the model introducing new topics. + maximum: 2 + minimum: -2 + type: number + raw: + default: false + description: If true, a chat template is not applied and you must adhere to the specific model's expected formatting. + type: boolean + repetition_penalty: + description: Penalty for repeated tokens; higher values discourage repetition. + maximum: 2 + minimum: 0 + type: number + response_format: + properties: + json_schema: {} + type: + enum: + - json_object + - json_schema + type: string + title: JSON Mode + type: object + stream: + default: false + description: If true, the response will be streamed back incrementally using SSE, Server Sent Events. + type: boolean + temperature: + default: 0.6 + description: Controls the randomness of the output; higher values produce more random results. + maximum: 5 + minimum: 0 + type: number + top_k: + description: Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. + maximum: 50 + minimum: 1 + type: integer + top_p: + description: Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. + maximum: 1 + minimum: 0.001 + type: number + functions: + items: + properties: + code: + type: string + name: + type: string + required: + - name + - code + type: object + type: array + messages: + description: An array of message objects representing the conversation history. + items: + properties: + content: + type: string + description: The content of the message as a string. + items: + properties: + text: + description: Text content + type: string + type: + description: Type of the content (text) + type: string + type: object + role: + description: The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + type: string + required: + - role + - content + type: object + type: array + tools: + description: A list of tools available for the assistant to use. + items: + type: object + properties: + description: + description: A brief description of what the tool does. + type: string + name: + description: The name of the tool. More descriptive the better. + type: string + parameters: + description: Schema defining the parameters accepted by the tool. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + function: + description: Details of the function tool. + properties: + description: + description: A brief description of what the function does. + type: string + name: + description: The name of the function. + type: string + parameters: + description: Schema defining the parameters accepted by the function. + properties: + properties: + description: Definitions of each parameter. + type: object + required: + description: List of required parameter names. + items: + type: string + type: array + type: + description: The type of the parameters object (usually 'object'). + type: string + required: + - type + - properties + type: object + required: + - name + - description + - parameters + type: object + type: + description: Specifies the type of tool (e.g., 'function'). + type: string + type: array + input_text: + description: The text that you want the model to summarize + minLength: 1 + type: string + max_length: + default: 1024 + description: The maximum length of the generated summary in tokens + type: integer + ignore_eos: + description: Whether to ignore the EOS token and continue generating tokens after the EOS token is generated. + type: boolean + responses: + '200': + content: + application/json: + schema: + properties: + result: + type: object + title: Text Classification + description: An array of classification results for the input text + items: + properties: + label: + description: The classification label assigned to the text (e.g., 'POSITIVE' or 'NEGATIVE') + type: string + score: + description: Confidence score indicating the likelihood that the text belongs to the specified label + type: number + type: object + format: binary + properties: + audio: + description: The generated audio in MP3 format, base64-encoded + type: string + data: + description: Embeddings of the requested text values + items: + description: Floating point embedding representation shaped by the embedding model + items: + type: number + type: array + type: array + shape: + items: + type: number + type: array + text: + description: The transcription + type: string + vtt: + type: string + word_count: + type: number + words: + items: + properties: + end: + description: The ending second when the word completes + type: number + start: + description: The second this word begins in the recording + type: number + word: + type: string + type: object + type: array + response: + description: The generated text response from the model + type: string + tool_calls: + description: An array of tool calls requests made during the response generation + items: + properties: + arguments: + description: The arguments passed to be passed to the tool call request + type: object + name: + description: The name of the tool to be called + type: string + type: object + type: array + usage: + description: Usage statistics for the inference request + properties: + completion_tokens: + default: 0 + description: Total number of tokens in output + type: number + prompt_tokens: + default: 0 + description: Total number of tokens in input + type: number + total_tokens: + default: 0 + description: Total number of input and output tokens + type: number + type: object + translated_text: + description: The translated text in the target language + type: string + summary: + description: The summarized version of the input text + type: string + description: + type: string + required: [] + type: object + description: Model response + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Execute AI model + tags: + - Workers AI + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai + resource_chain: [] + method: run + /accounts/{account_id}/ai/tasks/search: + get: + description: Searches Workers AI models by task type (e.g., text-generation, embeddings). + operationId: workers-ai-search-task + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + type: object + type: array + messages: + items: + type: string + type: array + result: + items: + type: object + type: array + success: + type: boolean + x-auditable: true + required: + - success + - result + - errors + - messages + type: object + description: Returns a list of tasks + '404': + content: + application/json: + schema: + properties: + errors: + items: + type: object + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Object not found + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Task Search + tags: + - Workers AI + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai + resource_chain: + - tasks + method: list + /accounts/{account_id}/ai/tomarkdown: + post: + description: Converts uploaded files into Markdown format using Workers AI. + operationId: workers-ai-post-to-markdown + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + multipart/form-data: + schema: + properties: + files: + items: + format: binary + type: string + type: array + required: + - files + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + items: + properties: + data: + type: string + x-auditable: true + format: + type: string + x-auditable: true + mimeType: + type: string + x-auditable: true + name: + type: string + x-auditable: true + tokens: + type: string + x-auditable: true + required: + - name + - mimeType + - format + - tokens + - data + type: object + type: array + success: + type: boolean + required: + - success + - result + type: object + description: Model Schema + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Convert Files into Markdown + tags: + - Workers AI + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai/tomarkdown/supported: + get: + description: Lists all file formats supported for conversion to Markdown. + operationId: workers-ai-get-to-markdown-supported + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + items: + properties: + extension: + type: string + x-auditable: true + mimeType: + type: string + x-auditable: true + required: + - extension + - mimeType + type: object + type: array + success: + type: boolean + required: + - success + - result + type: object + description: Successful response + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get all converted formats supported + tags: + - Workers AI + x-api-token-group: + - Workers AI Write + - Workers AI Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.ai + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai + resource_chain: + - to_markdown + method: supported + /accounts/{account_id}/autorag/rags/{id}/ai-search: + post: + operationId: autorag-config-ai-search + parameters: + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + filters: + type: object + properties: + key: + type: string + type: + enum: + - eq + - ne + - gt + - gte + - lt + - lte + type: string + value: + type: string + filters: + items: + properties: + key: + type: string + type: + enum: + - eq + - ne + - gt + - gte + - lt + - lte + type: string + value: + type: string + required: + - key + - type + - value + type: object + type: array + required: + - type + max_num_results: + default: 10 + maximum: 50 + minimum: 1 + type: integer + model: + type: string + enum: + - '@cf/meta/llama-3.3-70b-instruct-fp8-fast' + - '@cf/meta/llama-3.1-8b-instruct-fast' + - '@cf/meta/llama-3.1-8b-instruct-fp8' + - '@cf/meta/llama-4-scout-17b-16e-instruct' + - '@cf/qwen/qwen3-30b-a3b-fp8' + - '@cf/deepseek-ai/deepseek-r1-distill-qwen-32b' + - '@cf/moonshotai/kimi-k2-instruct' + - anthropic/claude-3-7-sonnet + - anthropic/claude-sonnet-4 + - anthropic/claude-opus-4 + - anthropic/claude-3-5-haiku + - cerebras/qwen-3-235b-a22b-instruct + - cerebras/qwen-3-235b-a22b-thinking + - cerebras/llama-3.3-70b + - cerebras/llama-4-maverick-17b-128e-instruct + - cerebras/llama-4-scout-17b-16e-instruct + - cerebras/gpt-oss-120b + - google-ai-studio/gemini-2.5-flash + - google-ai-studio/gemini-2.5-pro + - grok/grok-4 + - groq/llama-3.3-70b-versatile + - groq/llama-3.1-8b-instant + - openai/gpt-5 + - openai/gpt-5-mini + - openai/gpt-5-nano + query: + type: string + ranking_options: + default: {} + properties: + ranker: + type: string + score_threshold: + default: 0.4 + maximum: 1 + minimum: 0 + type: number + type: object + reranking: + properties: + enabled: + default: false + type: boolean + model: + type: string + enum: + - '@cf/baai/bge-reranker-base' + type: object + rewrite_query: + default: false + type: boolean + stream: + default: false + type: boolean + system_prompt: + type: string + required: + - query + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + data: + items: + properties: + attributes: + type: object + content: + items: + properties: + text: + type: string + type: + type: string + type: object + type: array + file_id: + type: string + filename: + type: string + score: + type: number + required: + - score + type: object + type: array + has_more: + default: false + type: boolean + next_page: + nullable: true + type: string + object: + type: string + response: + type: string + search_query: + type: string + required: + - search_query + - response + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Returns the log details + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + enum: + - false + type: boolean + required: + - success + - errors + type: object + description: Not Found + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: AI Search + tags: + - AutoRAG RAG Search + x-api-token-group: + - Auto Rag Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.rag + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/autorag/rags/{id}/files: + get: + operationId: autorag-config-files + parameters: + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - in: query + name: per_page + schema: + default: 20 + maximum: 50 + minimum: 0 + type: integer + - in: query + name: search + schema: + type: string + - in: query + name: status + schema: + enum: + - completed + - queued + - running + - error + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + items: + properties: + error: + type: string + key: + type: string + required: + - key + - error + type: object + type: array + result_info: + properties: + count: + type: integer + page: + type: integer + per_page: + default: 20 + maximum: 50 + minimum: 5 + type: integer + total_count: + type: integer + required: + - count + - page + - total_count + type: object + success: + type: boolean + required: + - success + - result + - result_info + type: object + description: Returns the AI Search files + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + enum: + - false + type: boolean + required: + - success + - errors + type: object + description: autorag_not_found + '503': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + enum: + - false + type: boolean + required: + - success + - errors + type: object + description: unable_to_connect_to_autorag + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Files + tags: + - AutoRAG RAG + x-api-token-group: + - Auto Rag Write + - Auto Rag Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.rag + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/autorag/rags/{id}/jobs: + get: + operationId: autorag-config-list-jobs + parameters: + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - in: query + name: per_page + schema: + default: 20 + maximum: 50 + minimum: 0 + type: integer + responses: + '200': + content: + application/json: + schema: + properties: + result: + items: + properties: + end_reason: + type: string + ended_at: + type: string + id: + type: string + last_seen_at: + type: string + source: + enum: + - user + - schedule + type: string + started_at: + type: string + required: + - id + - source + type: object + type: array + result_info: + properties: + count: + type: integer + page: + type: integer + per_page: + type: integer + total_count: + type: integer + required: + - count + - page + - per_page + - total_count + type: object + success: + type: boolean + required: + - success + - result + - result_info + type: object + description: Returns a list of AutoRAG Jobs + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + enum: + - false + type: boolean + required: + - success + - errors + type: object + description: autorag_not_found + '503': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + enum: + - false + type: boolean + required: + - success + - errors + type: object + description: unable_to_connect_to_autorag + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Jobs + tags: + - AutoRAG Jobs + x-api-token-group: + - Auto Rag Write + - Auto Rag Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.rag + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/autorag/rags/{id}/jobs/{job_id}: + get: + operationId: autorag-config-get-job + parameters: + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + - name: job_id + in: path + required: true + description: The job ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + end_reason: + type: string + ended_at: + type: string + id: + type: string + last_seen_at: + type: string + source: + enum: + - user + - schedule + type: string + started_at: + type: string + required: + - id + - source + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Returns a AutoRAG Job Details + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + enum: + - false + type: boolean + required: + - success + - errors + type: object + description: job_not_found + '503': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + enum: + - false + type: boolean + required: + - success + - errors + type: object + description: unable_to_connect_to_autorag + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get a Job Details + tags: + - AutoRAG Jobs + x-api-token-group: + - Auto Rag Write + - Auto Rag Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.rag + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/autorag/rags/{id}/jobs/{job_id}/logs: + get: + operationId: autorag-config-list-job-logs + parameters: + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + - name: job_id + in: path + required: true + description: The job ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - in: query + name: per_page + schema: + default: 20 + maximum: 500 + minimum: 0 + type: integer + responses: + '200': + content: + application/json: + schema: + properties: + result: + items: + properties: + created_at: + type: number + readOnly: true + id: + type: integer + message: + type: string + message_type: + type: integer + required: + - id + - message + - message_type + - created_at + type: object + type: array + result_info: + properties: + count: + type: integer + page: + type: integer + per_page: + type: integer + total_count: + type: integer + required: + - count + - page + - per_page + - total_count + type: object + success: + type: boolean + required: + - success + - result + - result_info + type: object + description: Returns a list of AutoRAG Job Logs + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + enum: + - false + type: boolean + required: + - success + - errors + type: object + description: autorag_not_found + '503': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + enum: + - false + type: boolean + required: + - success + - errors + type: object + description: unable_to_connect_to_autorag + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Job Logs + tags: + - AutoRAG Jobs + x-api-token-group: + - Auto Rag Write + - Auto Rag Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.rag + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/autorag/rags/{id}/search: + post: + operationId: autorag-config-search + parameters: + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + filters: + type: object + properties: + key: + type: string + type: + enum: + - eq + - ne + - gt + - gte + - lt + - lte + type: string + value: + type: string + filters: + items: + properties: + key: + type: string + type: + enum: + - eq + - ne + - gt + - gte + - lt + - lte + type: string + value: + type: string + required: + - key + - type + - value + type: object + type: array + required: + - type + max_num_results: + default: 10 + maximum: 50 + minimum: 1 + type: integer + query: + type: string + ranking_options: + default: {} + properties: + ranker: + type: string + score_threshold: + default: 0.4 + maximum: 1 + minimum: 0 + type: number + type: object + reranking: + properties: + enabled: + default: false + type: boolean + model: + type: string + enum: + - '@cf/baai/bge-reranker-base' + type: object + rewrite_query: + default: false + type: boolean + required: + - query + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + data: + items: + properties: + attributes: + type: object + content: + items: + properties: + text: + type: string + type: + type: string + type: object + type: array + file_id: + type: string + filename: + type: string + score: + type: number + required: + - score + type: object + type: array + has_more: + default: false + type: boolean + next_page: + nullable: true + type: string + object: + type: string + search_query: + type: string + required: + - search_query + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Returns the log details + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + enum: + - false + type: boolean + required: + - success + - errors + type: object + description: Not Found + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Search + tags: + - AutoRAG RAG Search + x-api-token-group: + - Auto Rag Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.rag + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/autorag/rags/{id}/sync: + patch: + operationId: autorag-config-sync + parameters: + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + job_id: + type: string + required: + - job_id + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Returns the autorag sync status + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + enum: + - false + type: boolean + required: + - success + - errors + type: object + description: autorag_is_paused + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + enum: + - false + type: boolean + required: + - success + - errors + type: object + description: autorag_not_found + '429': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + enum: + - false + type: boolean + required: + - success + - errors + type: object + description: sync_in_cooldown + '503': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + enum: + - false + type: boolean + required: + - success + - errors + type: object + description: unable_to_connect_to_autorag + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Sync + tags: + - AutoRAG RAG + x-api-token-group: + - Auto Rag Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.rag + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true +components: + schemas: {} + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + authors: + id: cloudflare.ai.authors + name: authors + title: Authors + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1authors~1search/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/authors/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + finetunes: + id: cloudflare.ai.finetunes + name: finetunes + title: Finetunes + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1finetunes/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1finetunes/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/finetunes/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/finetunes/methods/create' + update: [] + delete: [] + replace: [] + public: + id: cloudflare.ai.public + name: public + title: Public + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1finetunes~1public/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/public/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + assets: + id: cloudflare.ai.assets + name: assets + title: Assets + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1finetunes~1{finetune_id}~1finetune-assets/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/assets/methods/create' + update: [] + delete: [] + replace: [] + schema: + id: cloudflare.ai.schema + name: schema + title: Schema + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1models~1schema/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/schema/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + models: + id: cloudflare.ai.models + name: models + title: Models + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1models~1search/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/models/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + indictrans2_en_indic_1_b: + id: cloudflare.ai.indictrans2_en_indic_1_b + name: indictrans2_en_indic_1_b + title: Indictrans2 En Indic 1 B + methods: + workers_ai_post_run_cf_ai4bharat_indictrans2_en_indic_1_b: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1ai4bharat~1indictrans2-en-indic-1B/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/indictrans2_en_indic_1_b/methods/workers_ai_post_run_cf_ai4bharat_indictrans2_en_indic_1_b' + update: [] + delete: [] + replace: [] + nonomni_indictrans2_en_indic_1b: + id: cloudflare.ai.nonomni_indictrans2_en_indic_1b + name: nonomni_indictrans2_en_indic_1b + title: Nonomni Indictrans2 En Indic 1b + methods: + workers_ai_post_run_cf_ai4bharat_nonomni_indictrans2_en_indic_1b: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1ai4bharat~1nonomni-indictrans2-en-indic-1b/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/nonomni_indictrans2_en_indic_1b/methods/workers_ai_post_run_cf_ai4bharat_nonomni_indictrans2_en_indic_1b' + update: [] + delete: [] + replace: [] + gemma_sea_lion_v4_27b_it: + id: cloudflare.ai.gemma_sea_lion_v4_27b_it + name: gemma_sea_lion_v4_27b_it + title: Gemma Sea Lion V4 27b It + methods: + workers_ai_post_run_cf_aisingapore_gemma_sea_lion_v4_27b_it: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1aisingapore~1gemma-sea-lion-v4-27b-it/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .requests }}{{ $sep }}"requests": {{ if eq (kindOf .requests) "string" }}{{ .requests }}{{ else }}{{ toJson .requests }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/gemma_sea_lion_v4_27b_it/methods/workers_ai_post_run_cf_aisingapore_gemma_sea_lion_v4_27b_it' + update: [] + delete: [] + replace: [] + bge_base_en_v1_5: + id: cloudflare.ai.bge_base_en_v1_5 + name: bge_base_en_v1_5 + title: Bge Base En V1 5 + methods: + workers_ai_post_run_cf_baai_bge_base_en_v1_5: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1baai~1bge-base-en-v1.5/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .pooling }}{{ $sep }}"pooling": {{ toJson .pooling }}{{- $sep = "," -}}{{ end }} + + {{- if .text }}{{ $sep }}"text": {{ toJson .text }}{{- $sep = "," -}}{{ end }} + + {{- if .requests }}{{ $sep }}"requests": {{ if eq (kindOf .requests) "string" }}{{ .requests }}{{ else }}{{ toJson .requests }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/bge_base_en_v1_5/methods/workers_ai_post_run_cf_baai_bge_base_en_v1_5' + update: [] + delete: [] + replace: [] + bge_large_en_v1_5: + id: cloudflare.ai.bge_large_en_v1_5 + name: bge_large_en_v1_5 + title: Bge Large En V1 5 + methods: + workers_ai_post_run_cf_baai_bge_large_en_v1_5: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1baai~1bge-large-en-v1.5/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .pooling }}{{ $sep }}"pooling": {{ toJson .pooling }}{{- $sep = "," -}}{{ end }} + + {{- if .text }}{{ $sep }}"text": {{ toJson .text }}{{- $sep = "," -}}{{ end }} + + {{- if .requests }}{{ $sep }}"requests": {{ if eq (kindOf .requests) "string" }}{{ .requests }}{{ else }}{{ toJson .requests }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/bge_large_en_v1_5/methods/workers_ai_post_run_cf_baai_bge_large_en_v1_5' + update: [] + delete: [] + replace: [] + bge_m3: + id: cloudflare.ai.bge_m3 + name: bge_m3 + title: Bge M3 + methods: + workers_ai_post_run_cf_baai_bge_m3: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1baai~1bge-m3/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .contexts }}{{ $sep }}"contexts": {{ if eq (kindOf .contexts) "string" }}{{ .contexts }}{{ else }}{{ toJson .contexts }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .query }}{{ $sep }}"query": {{ toJson .query }}{{- $sep = "," -}}{{ end }} + + {{- if .truncate_inputs }}{{ $sep }}"truncate_inputs": {{ toJson .truncate_inputs }}{{- $sep = "," -}}{{ end }} + + {{- if .text }}{{ $sep }}"text": {{ toJson .text }}{{- $sep = "," -}}{{ end }} + + {{- if .requests }}{{ $sep }}"requests": {{ if eq (kindOf .requests) "string" }}{{ .requests }}{{ else }}{{ toJson .requests }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/bge_m3/methods/workers_ai_post_run_cf_baai_bge_m3' + update: [] + delete: [] + replace: [] + bge_reranker_base: + id: cloudflare.ai.bge_reranker_base + name: bge_reranker_base + title: Bge Reranker Base + methods: + workers_ai_post_run_cf_baai_bge_reranker_base: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1baai~1bge-reranker-base/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .contexts }}{{ $sep }}"contexts": {{ if eq (kindOf .contexts) "string" }}{{ .contexts }}{{ else }}{{ toJson .contexts }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .query }}{{ $sep }}"query": {{ toJson .query }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/bge_reranker_base/methods/workers_ai_post_run_cf_baai_bge_reranker_base' + update: [] + delete: [] + replace: [] + bge_small_en_v1_5: + id: cloudflare.ai.bge_small_en_v1_5 + name: bge_small_en_v1_5 + title: Bge Small En V1 5 + methods: + workers_ai_post_run_cf_baai_bge_small_en_v1_5: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1baai~1bge-small-en-v1.5/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .pooling }}{{ $sep }}"pooling": {{ toJson .pooling }}{{- $sep = "," -}}{{ end }} + + {{- if .text }}{{ $sep }}"text": {{ toJson .text }}{{- $sep = "," -}}{{ end }} + + {{- if .requests }}{{ $sep }}"requests": {{ if eq (kindOf .requests) "string" }}{{ .requests }}{{ else }}{{ toJson .requests }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/bge_small_en_v1_5/methods/workers_ai_post_run_cf_baai_bge_small_en_v1_5' + update: [] + delete: [] + replace: [] + nonomni_bge_base_en_v1_5: + id: cloudflare.ai.nonomni_bge_base_en_v1_5 + name: nonomni_bge_base_en_v1_5 + title: Nonomni Bge Base En V1 5 + methods: + workers_ai_post_run_cf_baai_nonomni_bge_base_en_v1_5: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1baai~1nonomni-bge-base-en-v1.5/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .pooling }}{{ $sep }}"pooling": {{ toJson .pooling }}{{- $sep = "," -}}{{ end }} + + {{- if .text }}{{ $sep }}"text": {{ toJson .text }}{{- $sep = "," -}}{{ end }} + + {{- if .requests }}{{ $sep }}"requests": {{ if eq (kindOf .requests) "string" }}{{ .requests }}{{ else }}{{ toJson .requests }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/nonomni_bge_base_en_v1_5/methods/workers_ai_post_run_cf_baai_nonomni_bge_base_en_v1_5' + update: [] + delete: [] + replace: [] + nonomni_bge_large_en_v1_5: + id: cloudflare.ai.nonomni_bge_large_en_v1_5 + name: nonomni_bge_large_en_v1_5 + title: Nonomni Bge Large En V1 5 + methods: + workers_ai_post_run_cf_baai_nonomni_bge_large_en_v1_5: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1baai~1nonomni-bge-large-en-v1.5/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .pooling }}{{ $sep }}"pooling": {{ toJson .pooling }}{{- $sep = "," -}}{{ end }} + + {{- if .text }}{{ $sep }}"text": {{ toJson .text }}{{- $sep = "," -}}{{ end }} + + {{- if .requests }}{{ $sep }}"requests": {{ if eq (kindOf .requests) "string" }}{{ .requests }}{{ else }}{{ toJson .requests }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/nonomni_bge_large_en_v1_5/methods/workers_ai_post_run_cf_baai_nonomni_bge_large_en_v1_5' + update: [] + delete: [] + replace: [] + nonomni_bge_m3: + id: cloudflare.ai.nonomni_bge_m3 + name: nonomni_bge_m3 + title: Nonomni Bge M3 + methods: + workers_ai_post_run_cf_baai_nonomni_bge_m3: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1baai~1nonomni-bge-m3/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .contexts }}{{ $sep }}"contexts": {{ if eq (kindOf .contexts) "string" }}{{ .contexts }}{{ else }}{{ toJson .contexts }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .query }}{{ $sep }}"query": {{ toJson .query }}{{- $sep = "," -}}{{ end }} + + {{- if .truncate_inputs }}{{ $sep }}"truncate_inputs": {{ toJson .truncate_inputs }}{{- $sep = "," -}}{{ end }} + + {{- if .text }}{{ $sep }}"text": {{ toJson .text }}{{- $sep = "," -}}{{ end }} + + {{- if .requests }}{{ $sep }}"requests": {{ if eq (kindOf .requests) "string" }}{{ .requests }}{{ else }}{{ toJson .requests }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/nonomni_bge_m3/methods/workers_ai_post_run_cf_baai_nonomni_bge_m3' + update: [] + delete: [] + replace: [] + nonomni_bge_small_en_v1_5: + id: cloudflare.ai.nonomni_bge_small_en_v1_5 + name: nonomni_bge_small_en_v1_5 + title: Nonomni Bge Small En V1 5 + methods: + workers_ai_post_run_cf_baai_nonomni_bge_small_en_v1_5: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1baai~1nonomni-bge-small-en-v1.5/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .pooling }}{{ $sep }}"pooling": {{ toJson .pooling }}{{- $sep = "," -}}{{ end }} + + {{- if .text }}{{ $sep }}"text": {{ toJson .text }}{{- $sep = "," -}}{{ end }} + + {{- if .requests }}{{ $sep }}"requests": {{ if eq (kindOf .requests) "string" }}{{ .requests }}{{ else }}{{ toJson .requests }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/nonomni_bge_small_en_v1_5/methods/workers_ai_post_run_cf_baai_nonomni_bge_small_en_v1_5' + update: [] + delete: [] + replace: [] + flux_1_schnell: + id: cloudflare.ai.flux_1_schnell + name: flux_1_schnell + title: Flux 1 Schnell + methods: + workers_ai_post_run_cf_black_forest_labs_flux_1_schnell: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1black-forest-labs~1flux-1-schnell/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/flux_1_schnell/methods/workers_ai_post_run_cf_black_forest_labs_flux_1_schnell' + update: [] + delete: [] + replace: [] + flux_2_dev: + id: cloudflare.ai.flux_2_dev + name: flux_2_dev + title: Flux 2 Dev + methods: + workers_ai_post_run_cf_black_forest_labs_flux_2_dev: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1black-forest-labs~1flux-2-dev/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .multipart }}{{ $sep }}"multipart": {{ if eq (kindOf .multipart) "string" }}{{ .multipart }}{{ else }}{{ toJson .multipart }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/flux_2_dev/methods/workers_ai_post_run_cf_black_forest_labs_flux_2_dev' + update: [] + delete: [] + replace: [] + flux_2_klein_4b: + id: cloudflare.ai.flux_2_klein_4b + name: flux_2_klein_4b + title: Flux 2 Klein 4b + methods: + workers_ai_post_run_cf_black_forest_labs_flux_2_klein_4b: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1black-forest-labs~1flux-2-klein-4b/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .multipart }}{{ $sep }}"multipart": {{ if eq (kindOf .multipart) "string" }}{{ .multipart }}{{ else }}{{ toJson .multipart }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/flux_2_klein_4b/methods/workers_ai_post_run_cf_black_forest_labs_flux_2_klein_4b' + update: [] + delete: [] + replace: [] + flux_2_klein_9b: + id: cloudflare.ai.flux_2_klein_9b + name: flux_2_klein_9b + title: Flux 2 Klein 9b + methods: + workers_ai_post_run_cf_black_forest_labs_flux_2_klein_9b: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1black-forest-labs~1flux-2-klein-9b/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .multipart }}{{ $sep }}"multipart": {{ if eq (kindOf .multipart) "string" }}{{ .multipart }}{{ else }}{{ toJson .multipart }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/flux_2_klein_9b/methods/workers_ai_post_run_cf_black_forest_labs_flux_2_klein_9b' + update: [] + delete: [] + replace: [] + stable_diffusion_xl_lightning: + id: cloudflare.ai.stable_diffusion_xl_lightning + name: stable_diffusion_xl_lightning + title: Stable Diffusion Xl Lightning + methods: + workers_ai_post_run_cf_bytedance_stable_diffusion_xl_lightning: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1bytedance~1stable-diffusion-xl-lightning/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .guidance }}{{ $sep }}"guidance": {{ toJson .guidance }}{{- $sep = "," -}}{{ end }} + + {{- if .height }}{{ $sep }}"height": {{ toJson .height }}{{- $sep = "," -}}{{ end }} + + {{- if .image }}{{ $sep }}"image": {{ if eq (kindOf .image) "string" }}{{ .image }}{{ else }}{{ toJson .image }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .image_b64 }}{{ $sep }}"image_b64": {{ toJson .image_b64 }}{{- $sep = "," -}}{{ end }} + + {{- if .mask }}{{ $sep }}"mask": {{ if eq (kindOf .mask) "string" }}{{ .mask }}{{ else }}{{ toJson .mask }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .negative_prompt }}{{ $sep }}"negative_prompt": {{ toJson .negative_prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .num_steps }}{{ $sep }}"num_steps": {{ toJson .num_steps }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .strength }}{{ $sep }}"strength": {{ toJson .strength }}{{- $sep = "," -}}{{ end }} + + {{- if .width }}{{ $sep }}"width": {{ toJson .width }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/stable_diffusion_xl_lightning/methods/workers_ai_post_run_cf_bytedance_stable_diffusion_xl_lightning' + update: [] + delete: [] + replace: [] + aura_1: + id: cloudflare.ai.aura_1 + name: aura_1 + title: Aura 1 + methods: + workers_ai_post_run_cf_deepgram_aura_1: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1deepgram~1aura-1/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/aura_1/methods/workers_ai_post_run_cf_deepgram_aura_1' + update: [] + delete: [] + replace: [] + aura_2_en: + id: cloudflare.ai.aura_2_en + name: aura_2_en + title: Aura 2 En + methods: + workers_ai_post_run_cf_deepgram_aura_2_en: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1deepgram~1aura-2-en/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/aura_2_en/methods/workers_ai_post_run_cf_deepgram_aura_2_en' + update: [] + delete: [] + replace: [] + aura_2_es: + id: cloudflare.ai.aura_2_es + name: aura_2_es + title: Aura 2 Es + methods: + workers_ai_post_run_cf_deepgram_aura_2_es: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1deepgram~1aura-2-es/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/aura_2_es/methods/workers_ai_post_run_cf_deepgram_aura_2_es' + update: [] + delete: [] + replace: [] + flux: + id: cloudflare.ai.flux + name: flux + title: Flux + methods: + workers_ai_post_run_cf_deepgram_flux: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1deepgram~1flux/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/flux/methods/workers_ai_post_run_cf_deepgram_flux' + update: [] + delete: [] + replace: [] + nova_3: + id: cloudflare.ai.nova_3 + name: nova_3 + title: Nova 3 + methods: + workers_ai_post_run_cf_deepgram_nova_3: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1deepgram~1nova-3/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .audio }}{{ $sep }}"audio": {{ if eq (kindOf .audio) "string" }}{{ .audio }}{{ else }}{{ toJson .audio }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .channels }}{{ $sep }}"channels": {{ toJson .channels }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_intent }}{{ $sep }}"custom_intent": {{ toJson .custom_intent }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_intent_mode }}{{ $sep }}"custom_intent_mode": {{ toJson .custom_intent_mode }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_topic }}{{ $sep }}"custom_topic": {{ toJson .custom_topic }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_topic_mode }}{{ $sep }}"custom_topic_mode": {{ toJson .custom_topic_mode }}{{- $sep = "," -}}{{ end }} + + {{- if .detect_entities }}{{ $sep }}"detect_entities": {{ toJson .detect_entities }}{{- $sep = "," -}}{{ end }} + + {{- if .detect_language }}{{ $sep }}"detect_language": {{ toJson .detect_language }}{{- $sep = "," -}}{{ end }} + + {{- if .diarize }}{{ $sep }}"diarize": {{ toJson .diarize }}{{- $sep = "," -}}{{ end }} + + {{- if .dictation }}{{ $sep }}"dictation": {{ toJson .dictation }}{{- $sep = "," -}}{{ end }} + + {{- if .encoding }}{{ $sep }}"encoding": {{ toJson .encoding }}{{- $sep = "," -}}{{ end }} + + {{- if .endpointing }}{{ $sep }}"endpointing": {{ toJson .endpointing }}{{- $sep = "," -}}{{ end }} + + {{- if .extra }}{{ $sep }}"extra": {{ toJson .extra }}{{- $sep = "," -}}{{ end }} + + {{- if .filler_words }}{{ $sep }}"filler_words": {{ toJson .filler_words }}{{- $sep = "," -}}{{ end }} + + {{- if .interim_results }}{{ $sep }}"interim_results": {{ toJson .interim_results }}{{- $sep = "," -}}{{ end }} + + {{- if .keyterm }}{{ $sep }}"keyterm": {{ toJson .keyterm }}{{- $sep = "," -}}{{ end }} + + {{- if .keywords }}{{ $sep }}"keywords": {{ toJson .keywords }}{{- $sep = "," -}}{{ end }} + + {{- if .language }}{{ $sep }}"language": {{ toJson .language }}{{- $sep = "," -}}{{ end }} + + {{- if .measurements }}{{ $sep }}"measurements": {{ toJson .measurements }}{{- $sep = "," -}}{{ end }} + + {{- if .mip_opt_out }}{{ $sep }}"mip_opt_out": {{ toJson .mip_opt_out }}{{- $sep = "," -}}{{ end }} + + {{- if .mode }}{{ $sep }}"mode": {{ toJson .mode }}{{- $sep = "," -}}{{ end }} + + {{- if .multichannel }}{{ $sep }}"multichannel": {{ toJson .multichannel }}{{- $sep = "," -}}{{ end }} + + {{- if .numerals }}{{ $sep }}"numerals": {{ toJson .numerals }}{{- $sep = "," -}}{{ end }} + + {{- if .paragraphs }}{{ $sep }}"paragraphs": {{ toJson .paragraphs }}{{- $sep = "," -}}{{ end }} + + {{- if .profanity_filter }}{{ $sep }}"profanity_filter": {{ toJson .profanity_filter }}{{- $sep = "," -}}{{ end }} + + {{- if .punctuate }}{{ $sep }}"punctuate": {{ toJson .punctuate }}{{- $sep = "," -}}{{ end }} + + {{- if .redact }}{{ $sep }}"redact": {{ toJson .redact }}{{- $sep = "," -}}{{ end }} + + {{- if .replace }}{{ $sep }}"replace": {{ toJson .replace }}{{- $sep = "," -}}{{ end }} + + {{- if .search }}{{ $sep }}"search": {{ toJson .search }}{{- $sep = "," -}}{{ end }} + + {{- if .sentiment }}{{ $sep }}"sentiment": {{ toJson .sentiment }}{{- $sep = "," -}}{{ end }} + + {{- if .smart_format }}{{ $sep }}"smart_format": {{ toJson .smart_format }}{{- $sep = "," -}}{{ end }} + + {{- if .topics }}{{ $sep }}"topics": {{ toJson .topics }}{{- $sep = "," -}}{{ end }} + + {{- if .utt_split }}{{ $sep }}"utt_split": {{ toJson .utt_split }}{{- $sep = "," -}}{{ end }} + + {{- if .utterance_end_ms }}{{ $sep }}"utterance_end_ms": {{ toJson .utterance_end_ms }}{{- $sep = "," -}}{{ end }} + + {{- if .utterances }}{{ $sep }}"utterances": {{ toJson .utterances }}{{- $sep = "," -}}{{ end }} + + {{- if .vad_events }}{{ $sep }}"vad_events": {{ toJson .vad_events }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/nova_3/methods/workers_ai_post_run_cf_deepgram_nova_3' + update: [] + delete: [] + replace: [] + deepseek_math_7b_instruct: + id: cloudflare.ai.deepseek_math_7b_instruct + name: deepseek_math_7b_instruct + title: Deepseek Math 7b Instruct + methods: + workers_ai_post_run_cf_deepseek_ai_deepseek_math_7b_instruct: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1deepseek-ai~1deepseek-math-7b-instruct/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/deepseek_math_7b_instruct/methods/workers_ai_post_run_cf_deepseek_ai_deepseek_math_7b_instruct' + update: [] + delete: [] + replace: [] + deepseek_r1_distill_qwen_32b: + id: cloudflare.ai.deepseek_r1_distill_qwen_32b + name: deepseek_r1_distill_qwen_32b + title: Deepseek R1 Distill Qwen 32b + methods: + workers_ai_post_run_cf_deepseek_ai_deepseek_r1_distill_qwen_32b: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1deepseek-ai~1deepseek-r1-distill-qwen-32b/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/deepseek_r1_distill_qwen_32b/methods/workers_ai_post_run_cf_deepseek_ai_deepseek_r1_distill_qwen_32b' + update: [] + delete: [] + replace: [] + sqlcoder_7b_2: + id: cloudflare.ai.sqlcoder_7b_2 + name: sqlcoder_7b_2 + title: Sqlcoder 7b 2 + methods: + workers_ai_post_run_cf_defog_sqlcoder_7b_2: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1defog~1sqlcoder-7b-2/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/sqlcoder_7b_2/methods/workers_ai_post_run_cf_defog_sqlcoder_7b_2' + update: [] + delete: [] + replace: [] + bart_large_cnn: + id: cloudflare.ai.bart_large_cnn + name: bart_large_cnn + title: Bart Large Cnn + methods: + workers_ai_post_run_cf_facebook_bart_large_cnn: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1facebook~1bart-large-cnn/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/bart_large_cnn/methods/workers_ai_post_run_cf_facebook_bart_large_cnn' + update: [] + delete: [] + replace: [] + nonomni_bart_large_cnn: + id: cloudflare.ai.nonomni_bart_large_cnn + name: nonomni_bart_large_cnn + title: Nonomni Bart Large Cnn + methods: + workers_ai_post_run_cf_facebook_nonomni_bart_large_cnn: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1facebook~1nonomni-bart-large-cnn/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/nonomni_bart_large_cnn/methods/workers_ai_post_run_cf_facebook_nonomni_bart_large_cnn' + update: [] + delete: [] + replace: [] + nonomni_detr_resnet_50: + id: cloudflare.ai.nonomni_detr_resnet_50 + name: nonomni_detr_resnet_50 + title: Nonomni Detr Resnet 50 + methods: + workers_ai_post_run_cf_facebook_nonomni_detr_resnet_50: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1facebook~1nonomni-detr-resnet-50/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/nonomni_detr_resnet_50/methods/workers_ai_post_run_cf_facebook_nonomni_detr_resnet_50' + update: [] + delete: [] + replace: [] + una_cybertron_7b_v2_bf16: + id: cloudflare.ai.una_cybertron_7b_v2_bf16 + name: una_cybertron_7b_v2_bf16 + title: Una Cybertron 7b V2 Bf16 + methods: + workers_ai_post_run_cf_fblgit_una_cybertron_7b_v2_bf16: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1fblgit~1una-cybertron-7b-v2-bf16/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/una_cybertron_7b_v2_bf16/methods/workers_ai_post_run_cf_fblgit_una_cybertron_7b_v2_bf16' + update: [] + delete: [] + replace: [] + embeddinggemma_300m: + id: cloudflare.ai.embeddinggemma_300m + name: embeddinggemma_300m + title: Embeddinggemma 300m + methods: + workers_ai_post_run_cf_google_embeddinggemma_300m: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1google~1embeddinggemma-300m/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/embeddinggemma_300m/methods/workers_ai_post_run_cf_google_embeddinggemma_300m' + update: [] + delete: [] + replace: [] + gemma_2b_it_lora: + id: cloudflare.ai.gemma_2b_it_lora + name: gemma_2b_it_lora + title: Gemma 2b It Lora + methods: + workers_ai_post_run_cf_google_gemma_2b_it_lora: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1google~1gemma-2b-it-lora/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/gemma_2b_it_lora/methods/workers_ai_post_run_cf_google_gemma_2b_it_lora' + update: [] + delete: [] + replace: [] + gemma_3_12b_it: + id: cloudflare.ai.gemma_3_12b_it + name: gemma_3_12b_it + title: Gemma 3 12b It + methods: + workers_ai_post_run_cf_google_gemma_3_12b_it: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1google~1gemma-3-12b-it/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .guided_json }}{{ $sep }}"guided_json": {{ if eq (kindOf .guided_json) "string" }}{{ .guided_json }}{{ else }}{{ toJson .guided_json }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/gemma_3_12b_it/methods/workers_ai_post_run_cf_google_gemma_3_12b_it' + update: [] + delete: [] + replace: [] + gemma_7b_it_lora: + id: cloudflare.ai.gemma_7b_it_lora + name: gemma_7b_it_lora + title: Gemma 7b It Lora + methods: + workers_ai_post_run_cf_google_gemma_7b_it_lora: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1google~1gemma-7b-it-lora/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/gemma_7b_it_lora/methods/workers_ai_post_run_cf_google_gemma_7b_it_lora' + update: [] + delete: [] + replace: [] + nonomni_embeddinggemma_300m: + id: cloudflare.ai.nonomni_embeddinggemma_300m + name: nonomni_embeddinggemma_300m + title: Nonomni Embeddinggemma 300m + methods: + workers_ai_post_run_cf_google_nonomni_embeddinggemma_300m: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1google~1nonomni-embeddinggemma-300m/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/nonomni_embeddinggemma_300m/methods/workers_ai_post_run_cf_google_nonomni_embeddinggemma_300m' + update: [] + delete: [] + replace: [] + distilbert_sst_2_int8: + id: cloudflare.ai.distilbert_sst_2_int8 + name: distilbert_sst_2_int8 + title: Distilbert Sst 2 Int8 + methods: + workers_ai_post_run_cf_huggingface_distilbert_sst_2_int8: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1huggingface~1distilbert-sst-2-int8/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/distilbert_sst_2_int8/methods/workers_ai_post_run_cf_huggingface_distilbert_sst_2_int8' + update: [] + delete: [] + replace: [] + nonomni_distilbert_sst_2_int8: + id: cloudflare.ai.nonomni_distilbert_sst_2_int8 + name: nonomni_distilbert_sst_2_int8 + title: Nonomni Distilbert Sst 2 Int8 + methods: + workers_ai_post_run_cf_huggingface_nonomni_distilbert_sst_2_int8: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1huggingface~1nonomni-distilbert-sst-2-int8/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/nonomni_distilbert_sst_2_int8/methods/workers_ai_post_run_cf_huggingface_nonomni_distilbert_sst_2_int8' + update: [] + delete: [] + replace: [] + granite_4_0_h_micro: + id: cloudflare.ai.granite_4_0_h_micro + name: granite_4_0_h_micro + title: Granite 4 0 H Micro + methods: + workers_ai_post_run_cf_ibm_granite_granite_4_0_h_micro: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1ibm-granite~1granite-4.0-h-micro/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/granite_4_0_h_micro/methods/workers_ai_post_run_cf_ibm_granite_granite_4_0_h_micro' + update: [] + delete: [] + replace: [] + lucid_origin: + id: cloudflare.ai.lucid_origin + name: lucid_origin + title: Lucid Origin + methods: + workers_ai_post_run_cf_leonardo_lucid_origin: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1leonardo~1lucid-origin/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/lucid_origin/methods/workers_ai_post_run_cf_leonardo_lucid_origin' + update: [] + delete: [] + replace: [] + phoenix_1_0: + id: cloudflare.ai.phoenix_1_0 + name: phoenix_1_0 + title: Phoenix 1 0 + methods: + workers_ai_post_run_cf_leonardo_phoenix_1_0: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1leonardo~1phoenix-1.0/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/phoenix_1_0/methods/workers_ai_post_run_cf_leonardo_phoenix_1_0' + update: [] + delete: [] + replace: [] + dreamshaper_8_lcm: + id: cloudflare.ai.dreamshaper_8_lcm + name: dreamshaper_8_lcm + title: Dreamshaper 8 Lcm + methods: + workers_ai_post_run_cf_lykon_dreamshaper_8_lcm: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1lykon~1dreamshaper-8-lcm/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .guidance }}{{ $sep }}"guidance": {{ toJson .guidance }}{{- $sep = "," -}}{{ end }} + + {{- if .height }}{{ $sep }}"height": {{ toJson .height }}{{- $sep = "," -}}{{ end }} + + {{- if .image }}{{ $sep }}"image": {{ if eq (kindOf .image) "string" }}{{ .image }}{{ else }}{{ toJson .image }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .image_b64 }}{{ $sep }}"image_b64": {{ toJson .image_b64 }}{{- $sep = "," -}}{{ end }} + + {{- if .mask }}{{ $sep }}"mask": {{ if eq (kindOf .mask) "string" }}{{ .mask }}{{ else }}{{ toJson .mask }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .negative_prompt }}{{ $sep }}"negative_prompt": {{ toJson .negative_prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .num_steps }}{{ $sep }}"num_steps": {{ toJson .num_steps }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .strength }}{{ $sep }}"strength": {{ toJson .strength }}{{- $sep = "," -}}{{ end }} + + {{- if .width }}{{ $sep }}"width": {{ toJson .width }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/dreamshaper_8_lcm/methods/workers_ai_post_run_cf_lykon_dreamshaper_8_lcm' + update: [] + delete: [] + replace: [] + llama_2_7b_chat_hf_lora: + id: cloudflare.ai.llama_2_7b_chat_hf_lora + name: llama_2_7b_chat_hf_lora + title: Llama 2 7b Chat Hf Lora + methods: + workers_ai_post_run_cf_meta_llama_llama_2_7b_chat_hf_lora: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta-llama~1llama-2-7b-chat-hf-lora/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/llama_2_7b_chat_hf_lora/methods/workers_ai_post_run_cf_meta_llama_llama_2_7b_chat_hf_lora' + update: [] + delete: [] + replace: [] + llama_2_7b_chat_fp16: + id: cloudflare.ai.llama_2_7b_chat_fp16 + name: llama_2_7b_chat_fp16 + title: Llama 2 7b Chat Fp16 + methods: + workers_ai_post_run_cf_meta_llama_2_7b_chat_fp16: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-2-7b-chat-fp16/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/llama_2_7b_chat_fp16/methods/workers_ai_post_run_cf_meta_llama_2_7b_chat_fp16' + update: [] + delete: [] + replace: [] + llama_2_7b_chat_int8: + id: cloudflare.ai.llama_2_7b_chat_int8 + name: llama_2_7b_chat_int8 + title: Llama 2 7b Chat Int8 + methods: + workers_ai_post_run_cf_meta_llama_2_7b_chat_int8: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-2-7b-chat-int8/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/llama_2_7b_chat_int8/methods/workers_ai_post_run_cf_meta_llama_2_7b_chat_int8' + update: [] + delete: [] + replace: [] + llama_3_8b_instruct: + id: cloudflare.ai.llama_3_8b_instruct + name: llama_3_8b_instruct + title: Llama 3 8b Instruct + methods: + workers_ai_post_run_cf_meta_llama_3_8b_instruct: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-3-8b-instruct/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/llama_3_8b_instruct/methods/workers_ai_post_run_cf_meta_llama_3_8b_instruct' + update: [] + delete: [] + replace: [] + llama_3_8b_instruct_awq: + id: cloudflare.ai.llama_3_8b_instruct_awq + name: llama_3_8b_instruct_awq + title: Llama 3 8b Instruct Awq + methods: + workers_ai_post_run_cf_meta_llama_3_8b_instruct_awq: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-3-8b-instruct-awq/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/llama_3_8b_instruct_awq/methods/workers_ai_post_run_cf_meta_llama_3_8b_instruct_awq' + update: [] + delete: [] + replace: [] + llama_3_1_70b_instruct_fp8_fast: + id: cloudflare.ai.llama_3_1_70b_instruct_fp8_fast + name: llama_3_1_70b_instruct_fp8_fast + title: Llama 3 1 70b Instruct Fp8 Fast + methods: + workers_ai_post_run_cf_meta_llama_3_1_70b_instruct_fp8_fast: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-3.1-70b-instruct-fp8-fast/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/llama_3_1_70b_instruct_fp8_fast/methods/workers_ai_post_run_cf_meta_llama_3_1_70b_instruct_fp8_fast' + update: [] + delete: [] + replace: [] + llama_3_1_8b_instruct_awq: + id: cloudflare.ai.llama_3_1_8b_instruct_awq + name: llama_3_1_8b_instruct_awq + title: Llama 3 1 8b Instruct Awq + methods: + workers_ai_post_run_cf_meta_llama_3_1_8b_instruct_awq: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-3.1-8b-instruct-awq/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/llama_3_1_8b_instruct_awq/methods/workers_ai_post_run_cf_meta_llama_3_1_8b_instruct_awq' + update: [] + delete: [] + replace: [] + llama_3_1_8b_instruct_fp8: + id: cloudflare.ai.llama_3_1_8b_instruct_fp8 + name: llama_3_1_8b_instruct_fp8 + title: Llama 3 1 8b Instruct Fp8 + methods: + workers_ai_post_run_cf_meta_llama_3_1_8b_instruct_fp8: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-3.1-8b-instruct-fp8/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/llama_3_1_8b_instruct_fp8/methods/workers_ai_post_run_cf_meta_llama_3_1_8b_instruct_fp8' + update: [] + delete: [] + replace: [] + llama_3_1_8b_instruct_fp8_fast: + id: cloudflare.ai.llama_3_1_8b_instruct_fp8_fast + name: llama_3_1_8b_instruct_fp8_fast + title: Llama 3 1 8b Instruct Fp8 Fast + methods: + workers_ai_post_run_cf_meta_llama_3_1_8b_instruct_fp8_fast: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-3.1-8b-instruct-fp8-fast/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/llama_3_1_8b_instruct_fp8_fast/methods/workers_ai_post_run_cf_meta_llama_3_1_8b_instruct_fp8_fast' + update: [] + delete: [] + replace: [] + llama_3_2_11b_vision_instruct: + id: cloudflare.ai.llama_3_2_11b_vision_instruct + name: llama_3_2_11b_vision_instruct + title: Llama 3 2 11b Vision Instruct + methods: + workers_ai_post_run_cf_meta_llama_3_2_11b_vision_instruct: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-3.2-11b-vision-instruct/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .image }}{{ $sep }}"image": {{ if eq (kindOf .image) "string" }}{{ .image }}{{ else }}{{ toJson .image }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/llama_3_2_11b_vision_instruct/methods/workers_ai_post_run_cf_meta_llama_3_2_11b_vision_instruct' + update: [] + delete: [] + replace: [] + llama_3_2_1b_instruct: + id: cloudflare.ai.llama_3_2_1b_instruct + name: llama_3_2_1b_instruct + title: Llama 3 2 1b Instruct + methods: + workers_ai_post_run_cf_meta_llama_3_2_1b_instruct: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-3.2-1b-instruct/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/llama_3_2_1b_instruct/methods/workers_ai_post_run_cf_meta_llama_3_2_1b_instruct' + update: [] + delete: [] + replace: [] + llama_3_2_3b_instruct: + id: cloudflare.ai.llama_3_2_3b_instruct + name: llama_3_2_3b_instruct + title: Llama 3 2 3b Instruct + methods: + workers_ai_post_run_cf_meta_llama_3_2_3b_instruct: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-3.2-3b-instruct/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/llama_3_2_3b_instruct/methods/workers_ai_post_run_cf_meta_llama_3_2_3b_instruct' + update: [] + delete: [] + replace: [] + llama_3_3_70b_instruct_fp8_fast: + id: cloudflare.ai.llama_3_3_70b_instruct_fp8_fast + name: llama_3_3_70b_instruct_fp8_fast + title: Llama 3 3 70b Instruct Fp8 Fast + methods: + workers_ai_post_run_cf_meta_llama_3_3_70b_instruct_fp8_fast: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-3.3-70b-instruct-fp8-fast/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .requests }}{{ $sep }}"requests": {{ if eq (kindOf .requests) "string" }}{{ .requests }}{{ else }}{{ toJson .requests }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/llama_3_3_70b_instruct_fp8_fast/methods/workers_ai_post_run_cf_meta_llama_3_3_70b_instruct_fp8_fast' + update: [] + delete: [] + replace: [] + llama_4_scout_17b_16e_instruct: + id: cloudflare.ai.llama_4_scout_17b_16e_instruct + name: llama_4_scout_17b_16e_instruct + title: Llama 4 Scout 17b 16e Instruct + methods: + workers_ai_post_run_cf_meta_llama_4_scout_17b_16e_instruct: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-4-scout-17b-16e-instruct/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .guided_json }}{{ $sep }}"guided_json": {{ if eq (kindOf .guided_json) "string" }}{{ .guided_json }}{{ else }}{{ toJson .guided_json }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .requests }}{{ $sep }}"requests": {{ if eq (kindOf .requests) "string" }}{{ .requests }}{{ else }}{{ toJson .requests }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/llama_4_scout_17b_16e_instruct/methods/workers_ai_post_run_cf_meta_llama_4_scout_17b_16e_instruct' + update: [] + delete: [] + replace: [] + llama_guard_3_8b: + id: cloudflare.ai.llama_guard_3_8b + name: llama_guard_3_8b + title: Llama Guard 3 8b + methods: + workers_ai_post_run_cf_meta_llama_guard_3_8b: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1llama-guard-3-8b/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/llama_guard_3_8b/methods/workers_ai_post_run_cf_meta_llama_guard_3_8b' + update: [] + delete: [] + replace: [] + m2m100_1_2b: + id: cloudflare.ai.m2m100_1_2b + name: m2m100_1_2b + title: M2m100 1 2b + methods: + workers_ai_post_run_cf_meta_m2m100_1_2b: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1meta~1m2m100-1.2b/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .source_lang }}{{ $sep }}"source_lang": {{ toJson .source_lang }}{{- $sep = "," -}}{{ end }} + + {{- if .target_lang }}{{ $sep }}"target_lang": {{ toJson .target_lang }}{{- $sep = "," -}}{{ end }} + + {{- if .text }}{{ $sep }}"text": {{ toJson .text }}{{- $sep = "," -}}{{ end }} + + {{- if .requests }}{{ $sep }}"requests": {{ if eq (kindOf .requests) "string" }}{{ .requests }}{{ else }}{{ toJson .requests }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/m2m100_1_2b/methods/workers_ai_post_run_cf_meta_m2m100_1_2b' + update: [] + delete: [] + replace: [] + nonomni_resnet_50: + id: cloudflare.ai.nonomni_resnet_50 + name: nonomni_resnet_50 + title: Nonomni Resnet 50 + methods: + workers_ai_post_run_cf_microsoft_nonomni_resnet_50: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1microsoft~1nonomni-resnet-50/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/nonomni_resnet_50/methods/workers_ai_post_run_cf_microsoft_nonomni_resnet_50' + update: [] + delete: [] + replace: [] + phi_2: + id: cloudflare.ai.phi_2 + name: phi_2 + title: Phi 2 + methods: + workers_ai_post_run_cf_microsoft_phi_2: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1microsoft~1phi-2/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/phi_2/methods/workers_ai_post_run_cf_microsoft_phi_2' + update: [] + delete: [] + replace: [] + resnet_50: + id: cloudflare.ai.resnet_50 + name: resnet_50 + title: Resnet 50 + methods: + workers_ai_post_run_cf_microsoft_resnet_50: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1microsoft~1resnet-50/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/resnet_50/methods/workers_ai_post_run_cf_microsoft_resnet_50' + update: [] + delete: [] + replace: [] + mistral_7b_instruct_v0_1: + id: cloudflare.ai.mistral_7b_instruct_v0_1 + name: mistral_7b_instruct_v0_1 + title: Mistral 7b Instruct V0 1 + methods: + workers_ai_post_run_cf_mistral_mistral_7b_instruct_v0_1: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1mistral~1mistral-7b-instruct-v0.1/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/mistral_7b_instruct_v0_1/methods/workers_ai_post_run_cf_mistral_mistral_7b_instruct_v0_1' + update: [] + delete: [] + replace: [] + mistral_7b_instruct_v0_2_lora: + id: cloudflare.ai.mistral_7b_instruct_v0_2_lora + name: mistral_7b_instruct_v0_2_lora + title: Mistral 7b Instruct V0 2 Lora + methods: + workers_ai_post_run_cf_mistral_mistral_7b_instruct_v0_2_lora: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1mistral~1mistral-7b-instruct-v0.2-lora/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/mistral_7b_instruct_v0_2_lora/methods/workers_ai_post_run_cf_mistral_mistral_7b_instruct_v0_2_lora' + update: [] + delete: [] + replace: [] + mistral_small_3_1_24b_instruct: + id: cloudflare.ai.mistral_small_3_1_24b_instruct + name: mistral_small_3_1_24b_instruct + title: Mistral Small 3 1 24b Instruct + methods: + workers_ai_post_run_cf_mistralai_mistral_small_3_1_24b_instruct: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1mistralai~1mistral-small-3.1-24b-instruct/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .guided_json }}{{ $sep }}"guided_json": {{ if eq (kindOf .guided_json) "string" }}{{ .guided_json }}{{ else }}{{ toJson .guided_json }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/mistral_small_3_1_24b_instruct/methods/workers_ai_post_run_cf_mistralai_mistral_small_3_1_24b_instruct' + update: [] + delete: [] + replace: [] + kimi_k2_5: + id: cloudflare.ai.kimi_k2_5 + name: kimi_k2_5 + title: Kimi K2 5 + methods: + workers_ai_post_run_cf_moonshotai_kimi_k2_5: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1moonshotai~1kimi-k2.5/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .audio }}{{ $sep }}"audio": {{ if eq (kindOf .audio) "string" }}{{ .audio }}{{ else }}{{ toJson .audio }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .chat_template_kwargs }}{{ $sep }}"chat_template_kwargs": {{ if eq (kindOf .chat_template_kwargs) "string" }}{{ .chat_template_kwargs }}{{ else }}{{ toJson .chat_template_kwargs }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .function_call }}{{ $sep }}"function_call": {{ toJson .function_call }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .logit_bias }}{{ $sep }}"logit_bias": {{ if eq (kindOf .logit_bias) "string" }}{{ .logit_bias }}{{ else }}{{ toJson .logit_bias }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .logprobs }}{{ $sep }}"logprobs": {{ toJson .logprobs }}{{- $sep = "," -}}{{ end }} + + {{- if .max_completion_tokens }}{{ $sep }}"max_completion_tokens": {{ toJson .max_completion_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .metadata }}{{ $sep }}"metadata": {{ if eq (kindOf .metadata) "string" }}{{ .metadata }}{{ else }}{{ toJson .metadata }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .modalities }}{{ $sep }}"modalities": {{ if eq (kindOf .modalities) "string" }}{{ .modalities }}{{ else }}{{ toJson .modalities }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .model }}{{ $sep }}"model": {{ toJson .model }}{{- $sep = "," -}}{{ end }} + + {{- if .n }}{{ $sep }}"n": {{ toJson .n }}{{- $sep = "," -}}{{ end }} + + {{- if .parallel_tool_calls }}{{ $sep }}"parallel_tool_calls": {{ toJson .parallel_tool_calls }}{{- $sep = "," -}}{{ end }} + + {{- if .prediction }}{{ $sep }}"prediction": {{ if eq (kindOf .prediction) "string" }}{{ .prediction }}{{ else }}{{ toJson .prediction }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .reasoning_effort }}{{ $sep }}"reasoning_effort": {{ toJson .reasoning_effort }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .service_tier }}{{ $sep }}"service_tier": {{ toJson .service_tier }}{{- $sep = "," -}}{{ end }} + + {{- if .stop }}{{ $sep }}"stop": {{ toJson .stop }}{{- $sep = "," -}}{{ end }} + + {{- if .store }}{{ $sep }}"store": {{ toJson .store }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .stream_options }}{{ $sep }}"stream_options": {{ if eq (kindOf .stream_options) "string" }}{{ .stream_options }}{{ else }}{{ toJson .stream_options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .tool_choice }}{{ $sep }}"tool_choice": {{ toJson .tool_choice }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .top_logprobs }}{{ $sep }}"top_logprobs": {{ toJson .top_logprobs }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .user }}{{ $sep }}"user": {{ toJson .user }}{{- $sep = "," -}}{{ end }} + + {{- if .web_search_options }}{{ $sep }}"web_search_options": {{ if eq (kindOf .web_search_options) "string" }}{{ .web_search_options }}{{ else }}{{ toJson .web_search_options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .requests }}{{ $sep }}"requests": {{ if eq (kindOf .requests) "string" }}{{ .requests }}{{ else }}{{ toJson .requests }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/kimi_k2_5/methods/workers_ai_post_run_cf_moonshotai_kimi_k2_5' + update: [] + delete: [] + replace: [] + melotts: + id: cloudflare.ai.melotts + name: melotts + title: Melotts + methods: + workers_ai_post_run_cf_myshell_ai_melotts: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1myshell-ai~1melotts/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/melotts/methods/workers_ai_post_run_cf_myshell_ai_melotts' + update: [] + delete: [] + replace: [] + nemotron_3_120b_a12b: + id: cloudflare.ai.nemotron_3_120b_a12b + name: nemotron_3_120b_a12b + title: Nemotron 3 120b A12b + methods: + workers_ai_post_run_cf_nvidia_nemotron_3_120b_a12b: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1nvidia~1nemotron-3-120b-a12b/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .audio }}{{ $sep }}"audio": {{ if eq (kindOf .audio) "string" }}{{ .audio }}{{ else }}{{ toJson .audio }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .chat_template_kwargs }}{{ $sep }}"chat_template_kwargs": {{ if eq (kindOf .chat_template_kwargs) "string" }}{{ .chat_template_kwargs }}{{ else }}{{ toJson .chat_template_kwargs }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .function_call }}{{ $sep }}"function_call": {{ toJson .function_call }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .logit_bias }}{{ $sep }}"logit_bias": {{ if eq (kindOf .logit_bias) "string" }}{{ .logit_bias }}{{ else }}{{ toJson .logit_bias }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .logprobs }}{{ $sep }}"logprobs": {{ toJson .logprobs }}{{- $sep = "," -}}{{ end }} + + {{- if .max_completion_tokens }}{{ $sep }}"max_completion_tokens": {{ toJson .max_completion_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .metadata }}{{ $sep }}"metadata": {{ if eq (kindOf .metadata) "string" }}{{ .metadata }}{{ else }}{{ toJson .metadata }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .modalities }}{{ $sep }}"modalities": {{ if eq (kindOf .modalities) "string" }}{{ .modalities }}{{ else }}{{ toJson .modalities }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .model }}{{ $sep }}"model": {{ toJson .model }}{{- $sep = "," -}}{{ end }} + + {{- if .n }}{{ $sep }}"n": {{ toJson .n }}{{- $sep = "," -}}{{ end }} + + {{- if .parallel_tool_calls }}{{ $sep }}"parallel_tool_calls": {{ toJson .parallel_tool_calls }}{{- $sep = "," -}}{{ end }} + + {{- if .prediction }}{{ $sep }}"prediction": {{ if eq (kindOf .prediction) "string" }}{{ .prediction }}{{ else }}{{ toJson .prediction }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .reasoning_effort }}{{ $sep }}"reasoning_effort": {{ toJson .reasoning_effort }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .service_tier }}{{ $sep }}"service_tier": {{ toJson .service_tier }}{{- $sep = "," -}}{{ end }} + + {{- if .stop }}{{ $sep }}"stop": {{ toJson .stop }}{{- $sep = "," -}}{{ end }} + + {{- if .store }}{{ $sep }}"store": {{ toJson .store }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .stream_options }}{{ $sep }}"stream_options": {{ if eq (kindOf .stream_options) "string" }}{{ .stream_options }}{{ else }}{{ toJson .stream_options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .tool_choice }}{{ $sep }}"tool_choice": {{ toJson .tool_choice }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .top_logprobs }}{{ $sep }}"top_logprobs": {{ toJson .top_logprobs }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .user }}{{ $sep }}"user": {{ toJson .user }}{{- $sep = "," -}}{{ end }} + + {{- if .web_search_options }}{{ $sep }}"web_search_options": {{ if eq (kindOf .web_search_options) "string" }}{{ .web_search_options }}{{ else }}{{ toJson .web_search_options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/nemotron_3_120b_a12b/methods/workers_ai_post_run_cf_nvidia_nemotron_3_120b_a12b' + update: [] + delete: [] + replace: [] + gpt_oss_120b: + id: cloudflare.ai.gpt_oss_120b + name: gpt_oss_120b + title: Gpt Oss 120b + methods: + workers_ai_post_run_cf_openai_gpt_oss_120b: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1openai~1gpt-oss-120b/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .input }}{{ $sep }}"input": {{ toJson .input }}{{- $sep = "," -}}{{ end }} + + {{- if .reasoning }}{{ $sep }}"reasoning": {{ if eq (kindOf .reasoning) "string" }}{{ .reasoning }}{{ else }}{{ toJson .reasoning }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .requests }}{{ $sep }}"requests": {{ if eq (kindOf .requests) "string" }}{{ .requests }}{{ else }}{{ toJson .requests }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/gpt_oss_120b/methods/workers_ai_post_run_cf_openai_gpt_oss_120b' + update: [] + delete: [] + replace: [] + gpt_oss_20b: + id: cloudflare.ai.gpt_oss_20b + name: gpt_oss_20b + title: Gpt Oss 20b + methods: + workers_ai_post_run_cf_openai_gpt_oss_20b: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1openai~1gpt-oss-20b/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .input }}{{ $sep }}"input": {{ toJson .input }}{{- $sep = "," -}}{{ end }} + + {{- if .reasoning }}{{ $sep }}"reasoning": {{ if eq (kindOf .reasoning) "string" }}{{ .reasoning }}{{ else }}{{ toJson .reasoning }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .requests }}{{ $sep }}"requests": {{ if eq (kindOf .requests) "string" }}{{ .requests }}{{ else }}{{ toJson .requests }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/gpt_oss_20b/methods/workers_ai_post_run_cf_openai_gpt_oss_20b' + update: [] + delete: [] + replace: [] + whisper: + id: cloudflare.ai.whisper + name: whisper + title: Whisper + methods: + workers_ai_post_run_cf_openai_whisper: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1openai~1whisper/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/whisper/methods/workers_ai_post_run_cf_openai_whisper' + update: [] + delete: [] + replace: [] + whisper_large_v3_turbo: + id: cloudflare.ai.whisper_large_v3_turbo + name: whisper_large_v3_turbo + title: Whisper Large V3 Turbo + methods: + workers_ai_post_run_cf_openai_whisper_large_v3_turbo: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1openai~1whisper-large-v3-turbo/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/whisper_large_v3_turbo/methods/workers_ai_post_run_cf_openai_whisper_large_v3_turbo' + update: [] + delete: [] + replace: [] + whisper_tiny_en: + id: cloudflare.ai.whisper_tiny_en + name: whisper_tiny_en + title: Whisper Tiny En + methods: + workers_ai_post_run_cf_openai_whisper_tiny_en: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1openai~1whisper-tiny-en/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/whisper_tiny_en/methods/workers_ai_post_run_cf_openai_whisper_tiny_en' + update: [] + delete: [] + replace: [] + openchat_3_5_0106: + id: cloudflare.ai.openchat_3_5_0106 + name: openchat_3_5_0106 + title: Openchat 3 5 0106 + methods: + workers_ai_post_run_cf_openchat_openchat_3_5_0106: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1openchat~1openchat-3.5-0106/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/openchat_3_5_0106/methods/workers_ai_post_run_cf_openchat_openchat_3_5_0106' + update: [] + delete: [] + replace: [] + plamo_embedding_1b: + id: cloudflare.ai.plamo_embedding_1b + name: plamo_embedding_1b + title: Plamo Embedding 1b + methods: + workers_ai_post_run_cf_pfnet_plamo_embedding_1b: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1pfnet~1plamo-embedding-1b/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/plamo_embedding_1b/methods/workers_ai_post_run_cf_pfnet_plamo_embedding_1b' + update: [] + delete: [] + replace: [] + qwen1_5_0_5b_chat: + id: cloudflare.ai.qwen1_5_0_5b_chat + name: qwen1_5_0_5b_chat + title: Qwen1 5 0 5b Chat + methods: + workers_ai_post_run_cf_qwen_qwen1_5_0_5b_chat: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1qwen~1qwen1.5-0.5b-chat/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/qwen1_5_0_5b_chat/methods/workers_ai_post_run_cf_qwen_qwen1_5_0_5b_chat' + update: [] + delete: [] + replace: [] + qwen1_5_1_8b_chat: + id: cloudflare.ai.qwen1_5_1_8b_chat + name: qwen1_5_1_8b_chat + title: Qwen1 5 1 8b Chat + methods: + workers_ai_post_run_cf_qwen_qwen1_5_1_8b_chat: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1qwen~1qwen1.5-1.8b-chat/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/qwen1_5_1_8b_chat/methods/workers_ai_post_run_cf_qwen_qwen1_5_1_8b_chat' + update: [] + delete: [] + replace: [] + qwen1_5_14b_chat_awq: + id: cloudflare.ai.qwen1_5_14b_chat_awq + name: qwen1_5_14b_chat_awq + title: Qwen1 5 14b Chat Awq + methods: + workers_ai_post_run_cf_qwen_qwen1_5_14b_chat_awq: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1qwen~1qwen1.5-14b-chat-awq/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/qwen1_5_14b_chat_awq/methods/workers_ai_post_run_cf_qwen_qwen1_5_14b_chat_awq' + update: [] + delete: [] + replace: [] + qwen1_5_7b_chat_awq: + id: cloudflare.ai.qwen1_5_7b_chat_awq + name: qwen1_5_7b_chat_awq + title: Qwen1 5 7b Chat Awq + methods: + workers_ai_post_run_cf_qwen_qwen1_5_7b_chat_awq: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1qwen~1qwen1.5-7b-chat-awq/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/qwen1_5_7b_chat_awq/methods/workers_ai_post_run_cf_qwen_qwen1_5_7b_chat_awq' + update: [] + delete: [] + replace: [] + qwen2_5_coder_32b_instruct: + id: cloudflare.ai.qwen2_5_coder_32b_instruct + name: qwen2_5_coder_32b_instruct + title: Qwen2 5 Coder 32b Instruct + methods: + workers_ai_post_run_cf_qwen_qwen2_5_coder_32b_instruct: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1qwen~1qwen2.5-coder-32b-instruct/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/qwen2_5_coder_32b_instruct/methods/workers_ai_post_run_cf_qwen_qwen2_5_coder_32b_instruct' + update: [] + delete: [] + replace: [] + qwen3_30b_a3b_fp8: + id: cloudflare.ai.qwen3_30b_a3b_fp8 + name: qwen3_30b_a3b_fp8 + title: Qwen3 30b A3b Fp8 + methods: + workers_ai_post_run_cf_qwen_qwen3_30b_a3b_fp8: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1qwen~1qwen3-30b-a3b-fp8/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .requests }}{{ $sep }}"requests": {{ if eq (kindOf .requests) "string" }}{{ .requests }}{{ else }}{{ toJson .requests }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/qwen3_30b_a3b_fp8/methods/workers_ai_post_run_cf_qwen_qwen3_30b_a3b_fp8' + update: [] + delete: [] + replace: [] + qwen3_embedding_0_6b: + id: cloudflare.ai.qwen3_embedding_0_6b + name: qwen3_embedding_0_6b + title: Qwen3 Embedding 0 6b + methods: + workers_ai_post_run_cf_qwen_qwen3_embedding_0_6b: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1qwen~1qwen3-embedding-0.6b/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/qwen3_embedding_0_6b/methods/workers_ai_post_run_cf_qwen_qwen3_embedding_0_6b' + update: [] + delete: [] + replace: [] + qwq_32b: + id: cloudflare.ai.qwq_32b + name: qwq_32b + title: Qwq 32b + methods: + workers_ai_post_run_cf_qwen_qwq_32b: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1qwen~1qwq-32b/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .guided_json }}{{ $sep }}"guided_json": {{ if eq (kindOf .guided_json) "string" }}{{ .guided_json }}{{ else }}{{ toJson .guided_json }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/qwq_32b/methods/workers_ai_post_run_cf_qwen_qwq_32b' + update: [] + delete: [] + replace: [] + stable_diffusion_v1_5_img2img: + id: cloudflare.ai.stable_diffusion_v1_5_img2img + name: stable_diffusion_v1_5_img2img + title: Stable Diffusion V1 5 Img2img + methods: + workers_ai_post_run_cf_runwayml_stable_diffusion_v1_5_img2img: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1runwayml~1stable-diffusion-v1-5-img2img/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .guidance }}{{ $sep }}"guidance": {{ toJson .guidance }}{{- $sep = "," -}}{{ end }} + + {{- if .height }}{{ $sep }}"height": {{ toJson .height }}{{- $sep = "," -}}{{ end }} + + {{- if .image }}{{ $sep }}"image": {{ if eq (kindOf .image) "string" }}{{ .image }}{{ else }}{{ toJson .image }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .image_b64 }}{{ $sep }}"image_b64": {{ toJson .image_b64 }}{{- $sep = "," -}}{{ end }} + + {{- if .mask }}{{ $sep }}"mask": {{ if eq (kindOf .mask) "string" }}{{ .mask }}{{ else }}{{ toJson .mask }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .negative_prompt }}{{ $sep }}"negative_prompt": {{ toJson .negative_prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .num_steps }}{{ $sep }}"num_steps": {{ toJson .num_steps }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .strength }}{{ $sep }}"strength": {{ toJson .strength }}{{- $sep = "," -}}{{ end }} + + {{- if .width }}{{ $sep }}"width": {{ toJson .width }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/stable_diffusion_v1_5_img2img/methods/workers_ai_post_run_cf_runwayml_stable_diffusion_v1_5_img2img' + update: [] + delete: [] + replace: [] + stable_diffusion_v1_5_inpainting: + id: cloudflare.ai.stable_diffusion_v1_5_inpainting + name: stable_diffusion_v1_5_inpainting + title: Stable Diffusion V1 5 Inpainting + methods: + workers_ai_post_run_cf_runwayml_stable_diffusion_v1_5_inpainting: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1runwayml~1stable-diffusion-v1-5-inpainting/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .guidance }}{{ $sep }}"guidance": {{ toJson .guidance }}{{- $sep = "," -}}{{ end }} + + {{- if .height }}{{ $sep }}"height": {{ toJson .height }}{{- $sep = "," -}}{{ end }} + + {{- if .image }}{{ $sep }}"image": {{ if eq (kindOf .image) "string" }}{{ .image }}{{ else }}{{ toJson .image }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .image_b64 }}{{ $sep }}"image_b64": {{ toJson .image_b64 }}{{- $sep = "," -}}{{ end }} + + {{- if .mask }}{{ $sep }}"mask": {{ if eq (kindOf .mask) "string" }}{{ .mask }}{{ else }}{{ toJson .mask }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .negative_prompt }}{{ $sep }}"negative_prompt": {{ toJson .negative_prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .num_steps }}{{ $sep }}"num_steps": {{ toJson .num_steps }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .strength }}{{ $sep }}"strength": {{ toJson .strength }}{{- $sep = "," -}}{{ end }} + + {{- if .width }}{{ $sep }}"width": {{ toJson .width }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/stable_diffusion_v1_5_inpainting/methods/workers_ai_post_run_cf_runwayml_stable_diffusion_v1_5_inpainting' + update: [] + delete: [] + replace: [] + stable_diffusion_xl_base_1_0: + id: cloudflare.ai.stable_diffusion_xl_base_1_0 + name: stable_diffusion_xl_base_1_0 + title: Stable Diffusion Xl Base 1 0 + methods: + workers_ai_post_run_cf_stabilityai_stable_diffusion_xl_base_1_0: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1stabilityai~1stable-diffusion-xl-base-1.0/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .guidance }}{{ $sep }}"guidance": {{ toJson .guidance }}{{- $sep = "," -}}{{ end }} + + {{- if .height }}{{ $sep }}"height": {{ toJson .height }}{{- $sep = "," -}}{{ end }} + + {{- if .image }}{{ $sep }}"image": {{ if eq (kindOf .image) "string" }}{{ .image }}{{ else }}{{ toJson .image }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .image_b64 }}{{ $sep }}"image_b64": {{ toJson .image_b64 }}{{- $sep = "," -}}{{ end }} + + {{- if .mask }}{{ $sep }}"mask": {{ if eq (kindOf .mask) "string" }}{{ .mask }}{{ else }}{{ toJson .mask }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .negative_prompt }}{{ $sep }}"negative_prompt": {{ toJson .negative_prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .num_steps }}{{ $sep }}"num_steps": {{ toJson .num_steps }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .strength }}{{ $sep }}"strength": {{ toJson .strength }}{{- $sep = "," -}}{{ end }} + + {{- if .width }}{{ $sep }}"width": {{ toJson .width }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/stable_diffusion_xl_base_1_0/methods/workers_ai_post_run_cf_stabilityai_stable_diffusion_xl_base_1_0' + update: [] + delete: [] + replace: [] + discolm_german_7b_v1_awq: + id: cloudflare.ai.discolm_german_7b_v1_awq + name: discolm_german_7b_v1_awq + title: Discolm German 7b V1 Awq + methods: + workers_ai_post_run_cf_thebloke_discolm_german_7b_v1_awq: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1thebloke~1discolm-german-7b-v1-awq/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/discolm_german_7b_v1_awq/methods/workers_ai_post_run_cf_thebloke_discolm_german_7b_v1_awq' + update: [] + delete: [] + replace: [] + falcon_7b_instruct: + id: cloudflare.ai.falcon_7b_instruct + name: falcon_7b_instruct + title: Falcon 7b Instruct + methods: + workers_ai_post_run_cf_tiiuae_falcon_7b_instruct: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1tiiuae~1falcon-7b-instruct/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/falcon_7b_instruct/methods/workers_ai_post_run_cf_tiiuae_falcon_7b_instruct' + update: [] + delete: [] + replace: [] + tinyllama_1_1b_chat_v1_0: + id: cloudflare.ai.tinyllama_1_1b_chat_v1_0 + name: tinyllama_1_1b_chat_v1_0 + title: Tinyllama 1 1b Chat V1 0 + methods: + workers_ai_post_run_cf_tinyllama_tinyllama_1_1b_chat_v1_0: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1tinyllama~1tinyllama-1.1b-chat-v1.0/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/tinyllama_1_1b_chat_v1_0/methods/workers_ai_post_run_cf_tinyllama_tinyllama_1_1b_chat_v1_0' + update: [] + delete: [] + replace: [] + glm_4_7_flash: + id: cloudflare.ai.glm_4_7_flash + name: glm_4_7_flash + title: Glm 4 7 Flash + methods: + workers_ai_post_run_cf_zai_org_glm_4_7_flash: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@cf~1zai-org~1glm-4.7-flash/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .audio }}{{ $sep }}"audio": {{ if eq (kindOf .audio) "string" }}{{ .audio }}{{ else }}{{ toJson .audio }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .chat_template_kwargs }}{{ $sep }}"chat_template_kwargs": {{ if eq (kindOf .chat_template_kwargs) "string" }}{{ .chat_template_kwargs }}{{ else }}{{ toJson .chat_template_kwargs }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .function_call }}{{ $sep }}"function_call": {{ toJson .function_call }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .logit_bias }}{{ $sep }}"logit_bias": {{ if eq (kindOf .logit_bias) "string" }}{{ .logit_bias }}{{ else }}{{ toJson .logit_bias }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .logprobs }}{{ $sep }}"logprobs": {{ toJson .logprobs }}{{- $sep = "," -}}{{ end }} + + {{- if .max_completion_tokens }}{{ $sep }}"max_completion_tokens": {{ toJson .max_completion_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .metadata }}{{ $sep }}"metadata": {{ if eq (kindOf .metadata) "string" }}{{ .metadata }}{{ else }}{{ toJson .metadata }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .modalities }}{{ $sep }}"modalities": {{ if eq (kindOf .modalities) "string" }}{{ .modalities }}{{ else }}{{ toJson .modalities }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .model }}{{ $sep }}"model": {{ toJson .model }}{{- $sep = "," -}}{{ end }} + + {{- if .n }}{{ $sep }}"n": {{ toJson .n }}{{- $sep = "," -}}{{ end }} + + {{- if .parallel_tool_calls }}{{ $sep }}"parallel_tool_calls": {{ toJson .parallel_tool_calls }}{{- $sep = "," -}}{{ end }} + + {{- if .prediction }}{{ $sep }}"prediction": {{ if eq (kindOf .prediction) "string" }}{{ .prediction }}{{ else }}{{ toJson .prediction }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .reasoning_effort }}{{ $sep }}"reasoning_effort": {{ toJson .reasoning_effort }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .service_tier }}{{ $sep }}"service_tier": {{ toJson .service_tier }}{{- $sep = "," -}}{{ end }} + + {{- if .stop }}{{ $sep }}"stop": {{ toJson .stop }}{{- $sep = "," -}}{{ end }} + + {{- if .store }}{{ $sep }}"store": {{ toJson .store }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .stream_options }}{{ $sep }}"stream_options": {{ if eq (kindOf .stream_options) "string" }}{{ .stream_options }}{{ else }}{{ toJson .stream_options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .tool_choice }}{{ $sep }}"tool_choice": {{ toJson .tool_choice }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .top_logprobs }}{{ $sep }}"top_logprobs": {{ toJson .top_logprobs }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .user }}{{ $sep }}"user": {{ toJson .user }}{{- $sep = "," -}}{{ end }} + + {{- if .web_search_options }}{{ $sep }}"web_search_options": {{ if eq (kindOf .web_search_options) "string" }}{{ .web_search_options }}{{ else }}{{ toJson .web_search_options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/glm_4_7_flash/methods/workers_ai_post_run_cf_zai_org_glm_4_7_flash' + update: [] + delete: [] + replace: [] + gemma_7b_it: + id: cloudflare.ai.gemma_7b_it + name: gemma_7b_it + title: Gemma 7b It + methods: + workers_ai_post_run_hf_google_gemma_7b_it: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@hf~1google~1gemma-7b-it/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/gemma_7b_it/methods/workers_ai_post_run_hf_google_gemma_7b_it' + update: [] + delete: [] + replace: [] + mistral_7b_instruct_v0_2: + id: cloudflare.ai.mistral_7b_instruct_v0_2 + name: mistral_7b_instruct_v0_2 + title: Mistral 7b Instruct V0 2 + methods: + workers_ai_post_run_hf_mistral_mistral_7b_instruct_v0_2: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@hf~1mistral~1mistral-7b-instruct-v0.2/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/mistral_7b_instruct_v0_2/methods/workers_ai_post_run_hf_mistral_mistral_7b_instruct_v0_2' + update: [] + delete: [] + replace: [] + starling_lm_7b_beta: + id: cloudflare.ai.starling_lm_7b_beta + name: starling_lm_7b_beta + title: Starling Lm 7b Beta + methods: + workers_ai_post_run_hf_nexusflow_starling_lm_7b_beta: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@hf~1nexusflow~1starling-lm-7b-beta/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/starling_lm_7b_beta/methods/workers_ai_post_run_hf_nexusflow_starling_lm_7b_beta' + update: [] + delete: [] + replace: [] + hermes_2_pro_mistral_7b: + id: cloudflare.ai.hermes_2_pro_mistral_7b + name: hermes_2_pro_mistral_7b + title: Hermes 2 Pro Mistral 7b + methods: + workers_ai_post_run_hf_nousresearch_hermes_2_pro_mistral_7b: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@hf~1nousresearch~1hermes-2-pro-mistral-7b/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/hermes_2_pro_mistral_7b/methods/workers_ai_post_run_hf_nousresearch_hermes_2_pro_mistral_7b' + update: [] + delete: [] + replace: [] + deepseek_coder_6_7b_base_awq: + id: cloudflare.ai.deepseek_coder_6_7b_base_awq + name: deepseek_coder_6_7b_base_awq + title: Deepseek Coder 6 7b Base Awq + methods: + workers_ai_post_run_hf_thebloke_deepseek_coder_6_7b_base_awq: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@hf~1thebloke~1deepseek-coder-6.7b-base-awq/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/deepseek_coder_6_7b_base_awq/methods/workers_ai_post_run_hf_thebloke_deepseek_coder_6_7b_base_awq' + update: [] + delete: [] + replace: [] + deepseek_coder_6_7b_instruct_awq: + id: cloudflare.ai.deepseek_coder_6_7b_instruct_awq + name: deepseek_coder_6_7b_instruct_awq + title: Deepseek Coder 6 7b Instruct Awq + methods: + workers_ai_post_run_hf_thebloke_deepseek_coder_6_7b_instruct_awq: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@hf~1thebloke~1deepseek-coder-6.7b-instruct-awq/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/deepseek_coder_6_7b_instruct_awq/methods/workers_ai_post_run_hf_thebloke_deepseek_coder_6_7b_instruct_awq' + update: [] + delete: [] + replace: [] + llama_2_13b_chat_awq: + id: cloudflare.ai.llama_2_13b_chat_awq + name: llama_2_13b_chat_awq + title: Llama 2 13b Chat Awq + methods: + workers_ai_post_run_hf_thebloke_llama_2_13b_chat_awq: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@hf~1thebloke~1llama-2-13b-chat-awq/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/llama_2_13b_chat_awq/methods/workers_ai_post_run_hf_thebloke_llama_2_13b_chat_awq' + update: [] + delete: [] + replace: [] + mistral_7b_instruct_v0_1_awq: + id: cloudflare.ai.mistral_7b_instruct_v0_1_awq + name: mistral_7b_instruct_v0_1_awq + title: Mistral 7b Instruct V0 1 Awq + methods: + workers_ai_post_run_hf_thebloke_mistral_7b_instruct_v0_1_awq: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@hf~1thebloke~1mistral-7b-instruct-v0.1-awq/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/mistral_7b_instruct_v0_1_awq/methods/workers_ai_post_run_hf_thebloke_mistral_7b_instruct_v0_1_awq' + update: [] + delete: [] + replace: [] + neural_chat_7b_v3_1_awq: + id: cloudflare.ai.neural_chat_7b_v3_1_awq + name: neural_chat_7b_v3_1_awq + title: Neural Chat 7b V3 1 Awq + methods: + workers_ai_post_run_hf_thebloke_neural_chat_7b_v3_1_awq: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@hf~1thebloke~1neural-chat-7b-v3-1-awq/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/neural_chat_7b_v3_1_awq/methods/workers_ai_post_run_hf_thebloke_neural_chat_7b_v3_1_awq' + update: [] + delete: [] + replace: [] + openhermes_2_5_mistral_7b_awq: + id: cloudflare.ai.openhermes_2_5_mistral_7b_awq + name: openhermes_2_5_mistral_7b_awq + title: Openhermes 2 5 Mistral 7b Awq + methods: + workers_ai_post_run_hf_thebloke_openhermes_2_5_mistral_7b_awq: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@hf~1thebloke~1openhermes-2.5-mistral-7b-awq/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/openhermes_2_5_mistral_7b_awq/methods/workers_ai_post_run_hf_thebloke_openhermes_2_5_mistral_7b_awq' + update: [] + delete: [] + replace: [] + zephyr_7b_beta_awq: + id: cloudflare.ai.zephyr_7b_beta_awq + name: zephyr_7b_beta_awq + title: Zephyr 7b Beta Awq + methods: + workers_ai_post_run_hf_thebloke_zephyr_7b_beta_awq: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1@hf~1thebloke~1zephyr-7b-beta-awq/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/zephyr_7b_beta_awq/methods/workers_ai_post_run_hf_thebloke_zephyr_7b_beta_awq' + update: [] + delete: [] + replace: [] + run: + id: cloudflare.ai.run + name: run + title: Run + methods: + run: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1run~1{model_name}/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .text }}{{ $sep }}"text": {{ toJson .text }}{{- $sep = "," -}}{{ end }} + + {{- if .guidance }}{{ $sep }}"guidance": {{ toJson .guidance }}{{- $sep = "," -}}{{ end }} + + {{- if .height }}{{ $sep }}"height": {{ toJson .height }}{{- $sep = "," -}}{{ end }} + + {{- if .image }}{{ $sep }}"image": {{ if eq (kindOf .image) "string" }}{{ .image }}{{ else }}{{ toJson .image }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .image_b64 }}{{ $sep }}"image_b64": {{ toJson .image_b64 }}{{- $sep = "," -}}{{ end }} + + {{- if .mask }}{{ $sep }}"mask": {{ if eq (kindOf .mask) "string" }}{{ .mask }}{{ else }}{{ toJson .mask }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .negative_prompt }}{{ $sep }}"negative_prompt": {{ toJson .negative_prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .num_steps }}{{ $sep }}"num_steps": {{ toJson .num_steps }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .seed }}{{ $sep }}"seed": {{ toJson .seed }}{{- $sep = "," -}}{{ end }} + + {{- if .strength }}{{ $sep }}"strength": {{ toJson .strength }}{{- $sep = "," -}}{{ end }} + + {{- if .width }}{{ $sep }}"width": {{ toJson .width }}{{- $sep = "," -}}{{ end }} + + {{- if .lang }}{{ $sep }}"lang": {{ toJson .lang }}{{- $sep = "," -}}{{ end }} + + {{- if .audio }}{{ $sep }}"audio": {{ if eq (kindOf .audio) "string" }}{{ .audio }}{{ else }}{{ toJson .audio }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .source_lang }}{{ $sep }}"source_lang": {{ toJson .source_lang }}{{- $sep = "," -}}{{ end }} + + {{- if .target_lang }}{{ $sep }}"target_lang": {{ toJson .target_lang }}{{- $sep = "," -}}{{ end }} + + {{- if .frequency_penalty }}{{ $sep }}"frequency_penalty": {{ toJson .frequency_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .lora }}{{ $sep }}"lora": {{ toJson .lora }}{{- $sep = "," -}}{{ end }} + + {{- if .max_tokens }}{{ $sep }}"max_tokens": {{ toJson .max_tokens }}{{- $sep = "," -}}{{ end }} + + {{- if .presence_penalty }}{{ $sep }}"presence_penalty": {{ toJson .presence_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ toJson .raw }}{{- $sep = "," -}}{{ end }} + + {{- if .repetition_penalty }}{{ $sep }}"repetition_penalty": {{ toJson .repetition_penalty }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .temperature }}{{ $sep }}"temperature": {{ toJson .temperature }}{{- $sep = "," -}}{{ end }} + + {{- if .top_k }}{{ $sep }}"top_k": {{ toJson .top_k }}{{- $sep = "," -}}{{ end }} + + {{- if .top_p }}{{ $sep }}"top_p": {{ toJson .top_p }}{{- $sep = "," -}}{{ end }} + + {{- if .functions }}{{ $sep }}"functions": {{ if eq (kindOf .functions) "string" }}{{ .functions }}{{ else }}{{ toJson .functions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .input_text }}{{ $sep }}"input_text": {{ toJson .input_text }}{{- $sep = "," -}}{{ end }} + + {{- if .max_length }}{{ $sep }}"max_length": {{ toJson .max_length }}{{- $sep = "," -}}{{ end }} + + {{- if .ignore_eos }}{{ $sep }}"ignore_eos": {{ toJson .ignore_eos }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/run/methods/run' + update: [] + delete: [] + replace: [] + tasks: + id: cloudflare.ai.tasks + name: tasks + title: Tasks + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1tasks~1search/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/tasks/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + tomarkdown: + id: cloudflare.ai.tomarkdown + name: tomarkdown + title: Tomarkdown + methods: + workers_ai_post_to_markdown: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1tomarkdown/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .files }}{{ $sep }}"files": {{ if eq (kindOf .files) "string" }}{{ .files }}{{ else }}{{ toJson .files }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/tomarkdown/methods/workers_ai_post_to_markdown' + update: [] + delete: [] + replace: [] + to_markdown: + id: cloudflare.ai.to_markdown + name: to_markdown + title: To Markdown + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai~1tomarkdown~1supported/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/to_markdown/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + ai_search: + id: cloudflare.ai.ai_search + name: ai_search + title: Ai Search + methods: + autorag_config_ai_search: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1autorag~1rags~1{id}~1ai-search/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .filters }}{{ $sep }}"filters": {{ if eq (kindOf .filters) "string" }}{{ .filters }}{{ else }}{{ toJson .filters }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .max_num_results }}{{ $sep }}"max_num_results": {{ toJson .max_num_results }}{{- $sep = "," -}}{{ end }} + + {{- if .model }}{{ $sep }}"model": {{ toJson .model }}{{- $sep = "," -}}{{ end }} + + {{- if .query }}{{ $sep }}"query": {{ toJson .query }}{{- $sep = "," -}}{{ end }} + + {{- if .ranking_options }}{{ $sep }}"ranking_options": {{ if eq (kindOf .ranking_options) "string" }}{{ .ranking_options }}{{ else }}{{ toJson .ranking_options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .reranking }}{{ $sep }}"reranking": {{ if eq (kindOf .reranking) "string" }}{{ .reranking }}{{ else }}{{ toJson .reranking }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .rewrite_query }}{{ $sep }}"rewrite_query": {{ toJson .rewrite_query }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + {{- if .system_prompt }}{{ $sep }}"system_prompt": {{ toJson .system_prompt }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/ai_search/methods/autorag_config_ai_search' + update: [] + delete: [] + replace: [] + files: + id: cloudflare.ai.files + name: files + title: Files + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1autorag~1rags~1{id}~1files/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/files/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + jobs: + id: cloudflare.ai.jobs + name: jobs + title: Jobs + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1autorag~1rags~1{id}~1jobs/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1autorag~1rags~1{id}~1jobs~1{job_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/jobs/methods/get' + - $ref: '#/components/x-stackQL-resources/jobs/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + logs: + id: cloudflare.ai.logs + name: logs + title: Logs + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1autorag~1rags~1{id}~1jobs~1{job_id}~1logs/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/logs/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + search: + id: cloudflare.ai.search + name: search + title: Search + methods: + autorag_config_search: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1autorag~1rags~1{id}~1search/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .filters }}{{ $sep }}"filters": {{ if eq (kindOf .filters) "string" }}{{ .filters }}{{ else }}{{ toJson .filters }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .max_num_results }}{{ $sep }}"max_num_results": {{ toJson .max_num_results }}{{- $sep = "," -}}{{ end }} + + {{- if .query }}{{ $sep }}"query": {{ toJson .query }}{{- $sep = "," -}}{{ end }} + + {{- if .ranking_options }}{{ $sep }}"ranking_options": {{ if eq (kindOf .ranking_options) "string" }}{{ .ranking_options }}{{ else }}{{ toJson .ranking_options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .reranking }}{{ $sep }}"reranking": {{ if eq (kindOf .reranking) "string" }}{{ .reranking }}{{ else }}{{ toJson .reranking }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .rewrite_query }}{{ $sep }}"rewrite_query": {{ toJson .rewrite_query }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/search/methods/autorag_config_search' + update: [] + delete: [] + replace: [] + sync: + id: cloudflare.ai.sync + name: sync + title: Sync + methods: + autorag_config_sync: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1autorag~1rags~1{id}~1sync/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/sync/methods/autorag_config_sync' + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/ai_gateway.yaml b/providers/src/cloudflare/v00.00.00000/services/ai_gateway.yaml index a97caf6a..aac29090 100644 --- a/providers/src/cloudflare/v00.00.00000/services/ai_gateway.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/ai_gateway.yaml @@ -1,7630 +1,7674 @@ -openapi: 3.0.3 -info: - title: ai_gateway API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/ai-gateway/evaluation-types: - get: - operationId: aig-config-list-evaluators - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - in: query - name: per_page - schema: - default: 20 - maximum: 50 - minimum: 5 - type: integer - - in: query - name: order_by - schema: - default: mandatory - type: string - - in: query - name: order_by_direction - schema: - default: desc - enum: - - asc - - desc - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - items: - properties: - created_at: - format: date-time - type: string - readOnly: true - description: - type: string - enable: - type: boolean - id: - type: string - mandatory: - type: boolean - modified_at: - format: date-time - type: string - readOnly: true - name: - type: string - type: - type: string - required: - - name - - type - - mandatory - - description - - enable - - id - - created_at - - modified_at - type: object - type: array - result_info: - properties: - count: - type: number - page: - type: number - per_page: - type: number - total_count: - type: number - required: - - count - - page - - per_page - - total_count - type: object - success: - type: boolean - required: - - success - - result - - result_info - type: object - description: Returns a list of Evaluators - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Evaluators - tags: - - AI Gateway Evaluations - x-api-token-group: - - AI Gateway Write - - AI Gateway Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - evaluation_types - method: list - /accounts/{account_id}/ai-gateway/gateways: - get: - description: Lists all AI Gateway evaluator types configured for the account. - operationId: aig-config-list-gateway - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - in: query - name: per_page - schema: - default: 20 - maximum: 100 - minimum: 1 - type: integer - - in: query - name: search - schema: - description: Search by id - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - items: - properties: - authentication: - type: boolean - x-auditable: true - cache_invalidate_on_update: - type: boolean - x-auditable: true - cache_ttl: - minimum: 0 - nullable: true - type: integer - x-auditable: true - collect_logs: - type: boolean - x-auditable: true - created_at: - format: date-time - type: string - readOnly: true - dlp: - type: object - properties: - action: - enum: - - BLOCK - - FLAG - type: string - enabled: - type: boolean - profiles: - items: - type: string - type: array - policies: - items: - properties: - action: - enum: - - FLAG - - BLOCK - type: string - check: - items: - enum: - - REQUEST - - RESPONSE - type: string - type: array - enabled: - type: boolean - id: - type: string - profiles: - items: - type: string - type: array - required: - - id - - enabled - - action - - profiles - - check - type: object - type: array - required: - - enabled - id: - description: gateway id - maxLength: 64 - minLength: 1 - type: string - x-auditable: true - is_default: - type: boolean - x-auditable: true - log_management: - maximum: 10000000 - minimum: 10000 - nullable: true - type: integer - x-auditable: true - log_management_strategy: - enum: - - STOP_INSERTING - - DELETE_OLDEST - nullable: true - type: string - x-auditable: true - logpush: - type: boolean - x-auditable: true - logpush_public_key: - maxLength: 1024 - minLength: 16 - nullable: true - type: string - x-auditable: true - modified_at: - format: date-time - type: string - readOnly: true - otel: - items: - properties: - authorization: - type: string - content_type: - default: json - enum: - - json - - protobuf - type: string - headers: - type: object - url: - type: string - required: - - url - - headers - - authorization - type: object - nullable: true - type: array - x-auditable: true - rate_limiting_interval: - minimum: 0 - nullable: true - type: integer - x-auditable: true - rate_limiting_limit: - minimum: 0 - nullable: true - type: integer - x-auditable: true - rate_limiting_technique: - enum: - - fixed - - sliding - nullable: true - type: string - x-auditable: true - retry_backoff: - description: Backoff strategy for retry delays - enum: - - constant - - linear - - exponential - nullable: true - type: string - x-auditable: true - retry_delay: - description: >- - Delay between retry attempts in milliseconds - (0-5000) - maximum: 5000 - minimum: 0 - nullable: true - type: integer - x-auditable: true - retry_max_attempts: - description: >- - Maximum number of retry attempts for failed requests - (1-5) - maximum: 5 - minimum: 1 - nullable: true - type: integer - x-auditable: true - store_id: - nullable: true - type: string - stripe: - nullable: true - properties: - authorization: - type: string - usage_events: - items: - properties: - payload: - type: string - required: - - payload - type: object - type: array - required: - - authorization - - usage_events - type: object - x-auditable: true - workers_ai_billing_mode: - default: postpaid - description: >- - Controls how Workers AI inference calls routed - through this gateway are billed. Only 'postpaid' is - currently supported. - enum: - - postpaid - type: string - x-auditable: true - zdr: - type: boolean - x-auditable: true - required: - - id - - rate_limiting_interval - - rate_limiting_limit - - collect_logs - - cache_ttl - - cache_invalidate_on_update - - created_at - - modified_at - type: object - type: array - success: - type: boolean - required: - - success - - result - type: object - description: List objects - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Gateways - tags: - - AI Gateway Gateways - x-api-token-group: - - AI Gateway Write - - AI Gateway Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: [] - method: list - post: - description: Creates a new AI Gateway. - operationId: aig-config-create-gateway - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - authentication: - type: boolean - x-auditable: true - cache_invalidate_on_update: - type: boolean - x-auditable: true - cache_ttl: - minimum: 0 - nullable: true - type: integer - x-auditable: true - collect_logs: - type: boolean - x-auditable: true - id: - description: gateway id - maxLength: 64 - minLength: 1 - type: string - x-auditable: true - log_management: - maximum: 10000000 - minimum: 10000 - nullable: true - type: integer - x-auditable: true - log_management_strategy: - enum: - - STOP_INSERTING - - DELETE_OLDEST - nullable: true - type: string - x-auditable: true - logpush: - type: boolean - x-auditable: true - logpush_public_key: - maxLength: 1024 - minLength: 16 - nullable: true - type: string - x-auditable: true - rate_limiting_interval: - minimum: 0 - nullable: true - type: integer - x-auditable: true - rate_limiting_limit: - minimum: 0 - nullable: true - type: integer - x-auditable: true - rate_limiting_technique: - enum: - - fixed - - sliding - nullable: true - type: string - x-auditable: true - retry_backoff: - description: Backoff strategy for retry delays - enum: - - constant - - linear - - exponential - nullable: true - type: string - x-auditable: true - retry_delay: - description: Delay between retry attempts in milliseconds (0-5000) - maximum: 5000 - minimum: 0 - nullable: true - type: integer - x-auditable: true - retry_max_attempts: - description: Maximum number of retry attempts for failed requests (1-5) - maximum: 5 - minimum: 1 - nullable: true - type: integer - x-auditable: true - workers_ai_billing_mode: - default: postpaid - description: >- - Controls how Workers AI inference calls routed through this - gateway are billed. Only 'postpaid' is currently supported. - enum: - - postpaid - type: string - x-auditable: true - zdr: - type: boolean - x-auditable: true - required: - - id - - rate_limiting_interval - - rate_limiting_limit - - collect_logs - - cache_ttl - - cache_invalidate_on_update - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - authentication: - type: boolean - x-auditable: true - cache_invalidate_on_update: - type: boolean - x-auditable: true - cache_ttl: - minimum: 0 - nullable: true - type: integer - x-auditable: true - collect_logs: - type: boolean - x-auditable: true - created_at: - format: date-time - type: string - readOnly: true - dlp: - type: object - properties: - action: - enum: - - BLOCK - - FLAG - type: string - enabled: - type: boolean - profiles: - items: - type: string - type: array - policies: - items: - properties: - action: - enum: - - FLAG - - BLOCK - type: string - check: - items: - enum: - - REQUEST - - RESPONSE - type: string - type: array - enabled: - type: boolean - id: - type: string - profiles: - items: - type: string - type: array - required: - - id - - enabled - - action - - profiles - - check - type: object - type: array - required: - - enabled - id: - description: gateway id - maxLength: 64 - minLength: 1 - type: string - x-auditable: true - is_default: - type: boolean - x-auditable: true - log_management: - maximum: 10000000 - minimum: 10000 - nullable: true - type: integer - x-auditable: true - log_management_strategy: - enum: - - STOP_INSERTING - - DELETE_OLDEST - nullable: true - type: string - x-auditable: true - logpush: - type: boolean - x-auditable: true - logpush_public_key: - maxLength: 1024 - minLength: 16 - nullable: true - type: string - x-auditable: true - modified_at: - format: date-time - type: string - readOnly: true - otel: - items: - properties: - authorization: - type: string - content_type: - default: json - enum: - - json - - protobuf - type: string - headers: - type: object - url: - type: string - required: - - url - - headers - - authorization - type: object - nullable: true - type: array - x-auditable: true - rate_limiting_interval: - minimum: 0 - nullable: true - type: integer - x-auditable: true - rate_limiting_limit: - minimum: 0 - nullable: true - type: integer - x-auditable: true - rate_limiting_technique: - enum: - - fixed - - sliding - nullable: true - type: string - x-auditable: true - retry_backoff: - description: Backoff strategy for retry delays - enum: - - constant - - linear - - exponential - nullable: true - type: string - x-auditable: true - retry_delay: - description: Delay between retry attempts in milliseconds (0-5000) - maximum: 5000 - minimum: 0 - nullable: true - type: integer - x-auditable: true - retry_max_attempts: - description: >- - Maximum number of retry attempts for failed requests - (1-5) - maximum: 5 - minimum: 1 - nullable: true - type: integer - x-auditable: true - store_id: - nullable: true - type: string - stripe: - nullable: true - properties: - authorization: - type: string - usage_events: - items: - properties: - payload: - type: string - required: - - payload - type: object - type: array - required: - - authorization - - usage_events - type: object - x-auditable: true - workers_ai_billing_mode: - default: postpaid - description: >- - Controls how Workers AI inference calls routed through - this gateway are billed. Only 'postpaid' is currently - supported. - enum: - - postpaid - type: string - x-auditable: true - zdr: - type: boolean - x-auditable: true - required: - - id - - rate_limiting_interval - - rate_limiting_limit - - collect_logs - - cache_ttl - - cache_invalidate_on_update - - created_at - - modified_at - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Returns the created Object - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - path: - items: - type: string - type: array - required: - - code - - message - - path - type: object - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Input Validation Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a new Gateway - tags: - - AI Gateway Gateways - x-api-token-group: - - AI Gateway Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: [] - method: create - /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/datasets: - get: - description: Lists all AI Gateway evaluator types configured for the account. - operationId: aig-config-list-dataset - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - in: query - name: per_page - schema: - default: 20 - maximum: 100 - minimum: 1 - type: integer - - in: query - name: name - schema: - type: string - x-auditable: true - - in: query - name: enable - schema: - type: boolean - x-auditable: true - - in: query - name: search - schema: - description: Search by id, name, filters - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - items: - properties: - created_at: - format: date-time - type: string - readOnly: true - enable: - type: boolean - x-auditable: true - filters: - items: - properties: - key: - enum: - - created_at - - request_content_type - - response_content_type - - success - - cached - - provider - - model - - cost - - tokens - - tokens_in - - tokens_out - - duration - - feedback - type: string - x-auditable: true - operator: - enum: - - eq - - contains - - lt - - gt - type: string - x-auditable: true - value: - items: - type: string - type: array - x-auditable: true - required: - - key - - operator - - value - type: object - type: array - x-auditable: true - gateway_id: - description: gateway id - maxLength: 64 - minLength: 1 - type: string - x-auditable: true - id: - type: string - x-auditable: true - modified_at: - format: date-time - type: string - readOnly: true - name: - type: string - x-auditable: true - required: - - gateway_id - - name - - filters - - enable - - id - - created_at - - modified_at - type: object - type: array - success: - type: boolean - required: - - success - - result - type: object - description: List objects - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Datasets - tags: - - AI Gateway Datasets - x-api-token-group: - - AI Gateway Write - - AI Gateway Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - datasets - method: list - post: - description: Creates a new AI Gateway. - operationId: aig-config-create-dataset - parameters: - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - enable: - type: boolean - x-auditable: true - filters: - items: - properties: - key: - enum: - - created_at - - request_content_type - - response_content_type - - success - - cached - - provider - - model - - cost - - tokens - - tokens_in - - tokens_out - - duration - - feedback - type: string - x-auditable: true - operator: - enum: - - eq - - contains - - lt - - gt - type: string - x-auditable: true - value: - items: - type: string - type: array - x-auditable: true - required: - - key - - operator - - value - type: object - type: array - x-auditable: true - name: - type: string - x-auditable: true - required: - - name - - filters - - enable - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - created_at: - format: date-time - type: string - readOnly: true - enable: - type: boolean - x-auditable: true - filters: - items: - properties: - key: - enum: - - created_at - - request_content_type - - response_content_type - - success - - cached - - provider - - model - - cost - - tokens - - tokens_in - - tokens_out - - duration - - feedback - type: string - x-auditable: true - operator: - enum: - - eq - - contains - - lt - - gt - type: string - x-auditable: true - value: - items: - type: string - type: array - x-auditable: true - required: - - key - - operator - - value - type: object - type: array - x-auditable: true - gateway_id: - description: gateway id - maxLength: 64 - minLength: 1 - type: string - x-auditable: true - id: - type: string - x-auditable: true - modified_at: - format: date-time - type: string - readOnly: true - name: - type: string - x-auditable: true - required: - - gateway_id - - name - - filters - - enable - - id - - created_at - - modified_at - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Returns the created Object - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - path: - items: - type: string - type: array - required: - - code - - message - - path - type: object - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Input Validation Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a new Dataset - tags: - - AI Gateway Datasets - x-api-token-group: - - AI Gateway Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - datasets - method: create - /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/datasets/{id}: - delete: - description: Deletes an AI Gateway dataset. - operationId: aig-config-delete-dataset - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - created_at: - format: date-time - type: string - readOnly: true - enable: - type: boolean - x-auditable: true - filters: - items: - properties: - key: - enum: - - created_at - - request_content_type - - response_content_type - - success - - cached - - provider - - model - - cost - - tokens - - tokens_in - - tokens_out - - duration - - feedback - type: string - x-auditable: true - operator: - enum: - - eq - - contains - - lt - - gt - type: string - x-auditable: true - value: - items: - type: string - type: array - x-auditable: true - required: - - key - - operator - - value - type: object - type: array - x-auditable: true - gateway_id: - description: gateway id - maxLength: 64 - minLength: 1 - type: string - x-auditable: true - id: - type: string - x-auditable: true - modified_at: - format: date-time - type: string - readOnly: true - name: - type: string - x-auditable: true - required: - - gateway_id - - name - - filters - - enable - - id - - created_at - - modified_at - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Returns the Object if it was successfully deleted - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Not Found - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete a Dataset - tags: - - AI Gateway Datasets - x-api-token-group: - - AI Gateway Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - datasets - method: delete - get: - description: Retrieves details for a specific AI Gateway dataset. - operationId: aig-config-fetch-dataset - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - created_at: - format: date-time - type: string - readOnly: true - enable: - type: boolean - x-auditable: true - filters: - items: - properties: - key: - enum: - - created_at - - request_content_type - - response_content_type - - success - - cached - - provider - - model - - cost - - tokens - - tokens_in - - tokens_out - - duration - - feedback - type: string - x-auditable: true - operator: - enum: - - eq - - contains - - lt - - gt - type: string - x-auditable: true - value: - items: - type: string - type: array - x-auditable: true - required: - - key - - operator - - value - type: object - type: array - x-auditable: true - gateway_id: - description: gateway id - maxLength: 64 - minLength: 1 - type: string - x-auditable: true - id: - type: string - x-auditable: true - modified_at: - format: date-time - type: string - readOnly: true - name: - type: string - x-auditable: true - required: - - gateway_id - - name - - filters - - enable - - id - - created_at - - modified_at - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Returns a single object if found - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Not Found - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Fetch a Dataset - tags: - - AI Gateway Datasets - x-api-token-group: - - AI Gateway Write - - AI Gateway Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - datasets - method: get - put: - description: Updates an existing AI Gateway dataset. - operationId: aig-config-update-dataset - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - enable: - type: boolean - x-auditable: true - filters: - items: - properties: - key: - enum: - - created_at - - request_content_type - - response_content_type - - success - - cached - - provider - - model - - cost - - tokens - - tokens_in - - tokens_out - - duration - - feedback - type: string - x-auditable: true - operator: - enum: - - eq - - contains - - lt - - gt - type: string - x-auditable: true - value: - items: - type: string - type: array - x-auditable: true - required: - - key - - operator - - value - type: object - type: array - x-auditable: true - name: - type: string - x-auditable: true - required: - - name - - filters - - enable - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - created_at: - format: date-time - type: string - readOnly: true - enable: - type: boolean - x-auditable: true - filters: - items: - properties: - key: - enum: - - created_at - - request_content_type - - response_content_type - - success - - cached - - provider - - model - - cost - - tokens - - tokens_in - - tokens_out - - duration - - feedback - type: string - x-auditable: true - operator: - enum: - - eq - - contains - - lt - - gt - type: string - x-auditable: true - value: - items: - type: string - type: array - x-auditable: true - required: - - key - - operator - - value - type: object - type: array - x-auditable: true - gateway_id: - description: gateway id - maxLength: 64 - minLength: 1 - type: string - x-auditable: true - id: - type: string - x-auditable: true - modified_at: - format: date-time - type: string - readOnly: true - name: - type: string - x-auditable: true - required: - - gateway_id - - name - - filters - - enable - - id - - created_at - - modified_at - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Returns the updated Object - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - path: - items: - type: string - type: array - required: - - code - - message - - path - type: object - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Input Validation Error - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Not Found - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update a Dataset - tags: - - AI Gateway Datasets - x-api-token-group: - - AI Gateway Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - datasets - method: update - /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/evaluations: - get: - description: Lists all AI Gateway evaluator types configured for the account. - operationId: aig-config-list-evaluations - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - in: query - name: per_page - schema: - default: 20 - maximum: 100 - minimum: 1 - type: integer - - in: query - name: name - schema: - type: string - x-auditable: true - - in: query - name: processed - schema: - type: boolean - x-auditable: true - - in: query - name: search - schema: - description: Search by id, name - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - items: - properties: - created_at: - format: date-time - type: string - readOnly: true - datasets: - items: - properties: - account_id: - type: string - account_tag: - type: string - created_at: - format: date-time - type: string - readOnly: true - enable: - type: boolean - x-auditable: true - filters: - items: - properties: - key: - enum: - - created_at - - request_content_type - - response_content_type - - success - - cached - - provider - - model - - cost - - tokens - - tokens_in - - tokens_out - - duration - - feedback - type: string - x-auditable: true - operator: - enum: - - eq - - contains - - lt - - gt - type: string - x-auditable: true - value: - items: - type: string - type: array - x-auditable: true - required: - - key - - operator - - value - type: object - type: array - x-auditable: true - gateway_id: - description: gateway id - maxLength: 64 - minLength: 1 - type: string - x-auditable: true - id: - type: string - x-auditable: true - modified_at: - format: date-time - type: string - readOnly: true - name: - type: string - x-auditable: true - required: - - gateway_id - - name - - filters - - enable - - id - - account_id - - account_tag - - created_at - - modified_at - type: object - type: array - gateway_id: - description: gateway id - maxLength: 64 - minLength: 1 - type: string - x-auditable: true - id: - type: string - x-auditable: true - modified_at: - format: date-time - type: string - readOnly: true - name: - type: string - x-auditable: true - processed: - type: boolean - x-auditable: true - results: - items: - properties: - created_at: - format: date-time - type: string - readOnly: true - evaluation_id: - type: string - evaluation_type_id: - type: string - id: - type: string - modified_at: - format: date-time - type: string - readOnly: true - result: - type: string - status: - type: number - status_description: - type: string - total_logs: - type: number - required: - - evaluation_id - - evaluation_type_id - - result - - total_logs - - status - - status_description - - id - - created_at - - modified_at - type: object - type: array - total_logs: - type: number - x-auditable: true - required: - - id - - gateway_id - - name - - created_at - - modified_at - - datasets - - results - - processed - - total_logs - type: object - type: array - success: - type: boolean - required: - - success - - result - type: object - description: List objects - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Evaluations - tags: - - AI Gateway Evaluations - x-api-token-group: - - AI Gateway Write - - AI Gateway Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - evaluations - method: list - post: - description: Creates a new AI Gateway. - operationId: aig-config-create-evaluations - parameters: - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - dataset_ids: - items: - type: string - maxItems: 5 - minItems: 1 - type: array - evaluation_type_ids: - items: - type: string - type: array - name: - type: string - x-auditable: true - required: - - name - - dataset_ids - - evaluation_type_ids - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - created_at: - format: date-time - type: string - readOnly: true - datasets: - items: - properties: - account_id: - type: string - account_tag: - type: string - created_at: - format: date-time - type: string - readOnly: true - enable: - type: boolean - x-auditable: true - filters: - items: - properties: - key: - enum: - - created_at - - request_content_type - - response_content_type - - success - - cached - - provider - - model - - cost - - tokens - - tokens_in - - tokens_out - - duration - - feedback - type: string - x-auditable: true - operator: - enum: - - eq - - contains - - lt - - gt - type: string - x-auditable: true - value: - items: - type: string - type: array - x-auditable: true - required: - - key - - operator - - value - type: object - type: array - x-auditable: true - gateway_id: - description: gateway id - maxLength: 64 - minLength: 1 - type: string - x-auditable: true - id: - type: string - x-auditable: true - modified_at: - format: date-time - type: string - readOnly: true - name: - type: string - x-auditable: true - required: - - gateway_id - - name - - filters - - enable - - id - - account_id - - account_tag - - created_at - - modified_at - type: object - type: array - gateway_id: - description: gateway id - maxLength: 64 - minLength: 1 - type: string - x-auditable: true - id: - type: string - x-auditable: true - modified_at: - format: date-time - type: string - readOnly: true - name: - type: string - x-auditable: true - processed: - type: boolean - x-auditable: true - results: - items: - properties: - created_at: - format: date-time - type: string - readOnly: true - evaluation_id: - type: string - evaluation_type_id: - type: string - id: - type: string - modified_at: - format: date-time - type: string - readOnly: true - result: - type: string - status: - type: number - status_description: - type: string - total_logs: - type: number - required: - - evaluation_id - - evaluation_type_id - - result - - total_logs - - status - - status_description - - id - - created_at - - modified_at - type: object - type: array - total_logs: - type: number - x-auditable: true - required: - - id - - gateway_id - - name - - created_at - - modified_at - - datasets - - results - - processed - - total_logs - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Returns the created Object - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - path: - items: - type: string - type: array - required: - - code - - message - - path - type: object - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Input Validation Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a new Evaluation - tags: - - AI Gateway Evaluations - x-api-token-group: - - AI Gateway Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - evaluations - method: create - /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/evaluations/{id}: - delete: - description: Deletes an AI Gateway dataset. - operationId: aig-config-delete-evaluations - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - created_at: - format: date-time - type: string - readOnly: true - datasets: - items: - properties: - account_id: - type: string - account_tag: - type: string - created_at: - format: date-time - type: string - readOnly: true - enable: - type: boolean - x-auditable: true - filters: - items: - properties: - key: - enum: - - created_at - - request_content_type - - response_content_type - - success - - cached - - provider - - model - - cost - - tokens - - tokens_in - - tokens_out - - duration - - feedback - type: string - x-auditable: true - operator: - enum: - - eq - - contains - - lt - - gt - type: string - x-auditable: true - value: - items: - type: string - type: array - x-auditable: true - required: - - key - - operator - - value - type: object - type: array - x-auditable: true - gateway_id: - description: gateway id - maxLength: 64 - minLength: 1 - type: string - x-auditable: true - id: - type: string - x-auditable: true - modified_at: - format: date-time - type: string - readOnly: true - name: - type: string - x-auditable: true - required: - - gateway_id - - name - - filters - - enable - - id - - account_id - - account_tag - - created_at - - modified_at - type: object - type: array - gateway_id: - description: gateway id - maxLength: 64 - minLength: 1 - type: string - x-auditable: true - id: - type: string - x-auditable: true - modified_at: - format: date-time - type: string - readOnly: true - name: - type: string - x-auditable: true - processed: - type: boolean - x-auditable: true - results: - items: - properties: - created_at: - format: date-time - type: string - readOnly: true - evaluation_id: - type: string - evaluation_type_id: - type: string - id: - type: string - modified_at: - format: date-time - type: string - readOnly: true - result: - type: string - status: - type: number - status_description: - type: string - total_logs: - type: number - required: - - evaluation_id - - evaluation_type_id - - result - - total_logs - - status - - status_description - - id - - created_at - - modified_at - type: object - type: array - total_logs: - type: number - x-auditable: true - required: - - id - - gateway_id - - name - - created_at - - modified_at - - datasets - - results - - processed - - total_logs - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Returns the Object if it was successfully deleted - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Not Found - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete a Evaluation - tags: - - AI Gateway Evaluations - x-api-token-group: - - AI Gateway Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - evaluations - method: delete - get: - description: Retrieves details for a specific AI Gateway dataset. - operationId: aig-config-fetch-evaluations - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - created_at: - format: date-time - type: string - readOnly: true - datasets: - items: - properties: - account_id: - type: string - account_tag: - type: string - created_at: - format: date-time - type: string - readOnly: true - enable: - type: boolean - x-auditable: true - filters: - items: - properties: - key: - enum: - - created_at - - request_content_type - - response_content_type - - success - - cached - - provider - - model - - cost - - tokens - - tokens_in - - tokens_out - - duration - - feedback - type: string - x-auditable: true - operator: - enum: - - eq - - contains - - lt - - gt - type: string - x-auditable: true - value: - items: - type: string - type: array - x-auditable: true - required: - - key - - operator - - value - type: object - type: array - x-auditable: true - gateway_id: - description: gateway id - maxLength: 64 - minLength: 1 - type: string - x-auditable: true - id: - type: string - x-auditable: true - modified_at: - format: date-time - type: string - readOnly: true - name: - type: string - x-auditable: true - required: - - gateway_id - - name - - filters - - enable - - id - - account_id - - account_tag - - created_at - - modified_at - type: object - type: array - gateway_id: - description: gateway id - maxLength: 64 - minLength: 1 - type: string - x-auditable: true - id: - type: string - x-auditable: true - modified_at: - format: date-time - type: string - readOnly: true - name: - type: string - x-auditable: true - processed: - type: boolean - x-auditable: true - results: - items: - properties: - created_at: - format: date-time - type: string - readOnly: true - evaluation_id: - type: string - evaluation_type_id: - type: string - id: - type: string - modified_at: - format: date-time - type: string - readOnly: true - result: - type: string - status: - type: number - status_description: - type: string - total_logs: - type: number - required: - - evaluation_id - - evaluation_type_id - - result - - total_logs - - status - - status_description - - id - - created_at - - modified_at - type: object - type: array - total_logs: - type: number - x-auditable: true - required: - - id - - gateway_id - - name - - created_at - - modified_at - - datasets - - results - - processed - - total_logs - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Returns a single object if found - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Not Found - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Fetch a Evaluation - tags: - - AI Gateway Evaluations - x-api-token-group: - - AI Gateway Write - - AI Gateway Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - evaluations - method: get - /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs: - delete: - operationId: aig-config-delete-gateway-logs - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - - in: query - name: order_by - schema: - default: created_at - enum: - - created_at - - provider - - model - - model_type - - success - - cached - - cost - - tokens_in - - tokens_out - - duration - - feedback - type: string - - in: query - name: order_by_direction - schema: - default: asc - enum: - - asc - - desc - type: string - - in: query - name: filters - schema: - items: - properties: - key: - enum: - - id - - created_at - - request_content_type - - response_content_type - - request_type - - success - - cached - - provider - - model - - model_type - - cost - - tokens - - tokens_in - - tokens_out - - duration - - feedback - - event_id - - metadata.key - - metadata.value - - authentication - - wholesale - - compatibilityMode - - dlp_action - type: string - operator: - enum: - - eq - - neq - - contains - - lt - - gt - type: string - value: - items: - type: string - type: array - required: - - key - - operator - - value - type: object - type: array - explode: true - - in: query - name: limit - schema: - default: 10000 - maximum: 10000 - minimum: 1 - type: integer - responses: - '200': - content: - application/json: - schema: - properties: - success: - type: boolean - required: - - success - type: object - description: Returns if the delete was successful - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Gateway Logs - tags: - - AI Gateway Logs - x-api-token-group: - - AI Gateway Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - logs - method: delete - get: - operationId: aig-config-list-gateway-logs - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - - in: query - name: search - schema: - type: string - - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - in: query - name: per_page - schema: - default: 20 - maximum: 50 - minimum: 1 - type: integer - - in: query - name: order_by - schema: - default: created_at - enum: - - created_at - - provider - - model - - model_type - - success - - cached - type: string - - in: query - name: order_by_direction - schema: - default: desc - enum: - - asc - - desc - type: string - - in: query - name: filters - schema: - items: - properties: - key: - enum: - - id - - created_at - - request_content_type - - response_content_type - - request_type - - success - - cached - - provider - - model - - model_type - - cost - - tokens - - tokens_in - - tokens_out - - duration - - feedback - - event_id - - metadata.key - - metadata.value - - authentication - - wholesale - - compatibilityMode - - dlp_action - type: string - operator: - enum: - - eq - - neq - - contains - - lt - - gt - type: string - value: - items: - type: string - type: array - required: - - key - - operator - - value - type: object - type: array - explode: true - - in: query - name: meta_info - schema: - type: boolean - - in: query - name: direction - schema: - deprecated: true - enum: - - asc - - desc - type: string - - in: query - name: start_date - schema: - deprecated: true - format: date-time - type: string - - in: query - name: end_date - schema: - deprecated: true - format: date-time - type: string - - in: query - name: min_cost - schema: - deprecated: true - type: number - - in: query - name: max_cost - schema: - deprecated: true - type: number - - in: query - name: min_tokens_in - schema: - deprecated: true - type: number - - in: query - name: max_tokens_in - schema: - deprecated: true - type: number - - in: query - name: min_tokens_out - schema: - deprecated: true - type: number - - in: query - name: max_tokens_out - schema: - deprecated: true - type: number - - in: query - name: min_total_tokens - schema: - deprecated: true - type: number - - in: query - name: max_total_tokens - schema: - deprecated: true - type: number - - in: query - name: min_duration - schema: - deprecated: true - type: number - - in: query - name: max_duration - schema: - deprecated: true - type: number - - in: query - name: feedback - schema: - deprecated: true - type: number - enum: - - 0 - - in: query - name: success - schema: - deprecated: true - type: boolean - - in: query - name: cached - schema: - deprecated: true - type: boolean - - in: query - name: model - schema: - deprecated: true - type: string - - in: query - name: model_type - schema: - deprecated: true - type: string - - in: query - name: provider - schema: - deprecated: true - type: string - - in: query - name: request_content_type - schema: - deprecated: true - type: string - - in: query - name: response_content_type - schema: - deprecated: true - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - items: - properties: - cached: - type: boolean - cost: - type: number - created_at: - format: date-time - type: string - readOnly: true - custom_cost: - type: boolean - duration: - type: integer - id: - type: string - metadata: - type: string - model: - type: string - model_type: - type: string - x-stainless-naming: - python: - property_name: ai_model_type - path: - type: string - provider: - type: string - request_content_type: - type: string - request_type: - type: string - response_content_type: - type: string - status_code: - type: integer - step: - type: integer - success: - type: boolean - tokens_in: - nullable: true - type: integer - tokens_out: - nullable: true - type: integer - required: - - id - - created_at - - provider - - model - - path - - duration - - success - - cached - - tokens_in - - tokens_out - type: object - type: array - result_info: - properties: - count: - type: number - max_cost: - type: number - max_duration: - type: number - max_tokens_in: - type: number - max_tokens_out: - type: number - max_total_tokens: - type: number - min_cost: - type: number - min_duration: - type: number - min_tokens_in: - type: number - min_tokens_out: - type: number - min_total_tokens: - type: number - page: - type: number - per_page: - type: number - total_count: - type: number - type: object - success: - type: boolean - required: - - success - - result - - result_info - type: object - description: Returns a list of Gateway Logs - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Gateway Logs - tags: - - AI Gateway Logs - x-api-token-group: - - AI Gateway Write - - AI Gateway Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - logs - method: list - /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs/{id}: - get: - description: Retrieves detailed information for a specific AI Gateway log entry. - operationId: aig-config-get-gateway-log-detail - parameters: - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - cached: - type: boolean - cost: - type: number - created_at: - format: date-time - type: string - readOnly: true - custom_cost: - type: boolean - duration: - type: integer - id: - type: string - metadata: - type: string - model: - type: string - model_type: - type: string - x-stainless-naming: - python: - property_name: ai_model_type - path: - type: string - provider: - type: string - request_content_type: - type: string - request_head: - type: string - request_head_complete: - type: boolean - request_size: - type: integer - request_type: - type: string - response_content_type: - type: string - response_head: - type: string - response_head_complete: - type: boolean - response_size: - type: integer - status_code: - type: integer - step: - type: integer - success: - type: boolean - tokens_in: - nullable: true - type: integer - tokens_out: - nullable: true - type: integer - required: - - id - - created_at - - provider - - model - - path - - duration - - success - - cached - - tokens_in - - tokens_out - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Returns the log details - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Not Found - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Gateway Log Detail - tags: - - AI Gateway Logs - x-api-token-group: - - AI Gateway Write - - AI Gateway Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - logs - method: get - patch: - description: Updates metadata for an AI Gateway log entry. - operationId: aig-config-patch-gateway-log - parameters: - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - feedback: - maximum: 1 - minimum: -1 - nullable: true - type: number - metadata: - nullable: true - type: object - score: - maximum: 100 - minimum: 0 - nullable: true - type: number - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Returns the log details - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Not Found - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Patch Gateway Log - tags: - - AI Gateway Logs - x-api-token-group: - - AI Gateway Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - logs - method: edit - /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs/{id}/request: - get: - description: Retrieves the original request payload for an AI Gateway log entry. - operationId: aig-config-get-gateway-log-request - parameters: - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - description: Returns the request body from a specific log - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Not Found - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Gateway Log Request - tags: - - AI Gateway Logs - x-api-token-group: - - AI Gateway Write - - AI Gateway Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - logs - method: request - /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs/{id}/response: - get: - description: Retrieves the response payload for an AI Gateway log entry. - operationId: aig-config-get-gateway-log-response - parameters: - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - description: Returns the response body from a specific log - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Not Found - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Gateway Log Response - tags: - - AI Gateway Logs - x-api-token-group: - - AI Gateway Write - - AI Gateway Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - logs - method: response - /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/provider_configs: - get: - description: Lists all AI Gateway evaluator types configured for the account. - operationId: aig-config-list-providers - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - in: query - name: per_page - schema: - default: 20 - maximum: 100 - minimum: 1 - type: integer - responses: - '200': - content: - application/json: - schema: - properties: - result: - items: - properties: - alias: - type: string - default_config: - type: boolean - gateway_id: - description: gateway id - maxLength: 64 - minLength: 1 - type: string - x-auditable: true - id: - type: string - modified_at: - format: date-time - type: string - readOnly: true - provider_slug: - type: string - rate_limit: - type: number - rate_limit_period: - default: 60 - type: number - secret_id: - type: string - secret_preview: - type: string - required: - - id - - provider_slug - - secret_preview - - default_config - - gateway_id - - modified_at - - alias - - secret_id - type: object - type: array - success: - type: boolean - required: - - success - - result - type: object - description: List objects - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Provider Configs - tags: - - AI Gateway Provider Configs - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - provider_configs - method: list - post: - description: Creates a new AI Gateway. - operationId: aig-config-create-providers - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - alias: - type: string - default_config: - type: boolean - provider_slug: - type: string - rate_limit: - type: number - rate_limit_period: - default: 60 - type: number - secret: - type: string - secret_id: - type: string - required: - - provider_slug - - default_config - - alias - - secret_id - - secret - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - alias: - type: string - default_config: - type: boolean - gateway_id: - description: gateway id - maxLength: 64 - minLength: 1 - type: string - x-auditable: true - id: - type: string - modified_at: - format: date-time - type: string - readOnly: true - provider_slug: - type: string - rate_limit: - type: number - rate_limit_period: - default: 60 - type: number - secret_id: - type: string - secret_preview: - type: string - required: - - id - - provider_slug - - secret_preview - - default_config - - gateway_id - - modified_at - - alias - - secret_id - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Returns the created Object - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - path: - items: - type: string - type: array - required: - - code - - message - - path - type: object - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Input Validation Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a new Provider Configs - tags: - - AI Gateway Provider Configs - x-api-token-group: - - Secrets Store Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - provider_configs - method: create - /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/provider_configs/{id}: - delete: - description: Deletes an AI Gateway dataset. - operationId: aig-config-delete-providers - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - alias: - type: string - default_config: - type: boolean - gateway_id: - description: gateway id - maxLength: 64 - minLength: 1 - type: string - x-auditable: true - id: - type: string - modified_at: - format: date-time - type: string - readOnly: true - provider_slug: - type: string - rate_limit: - type: number - rate_limit_period: - default: 60 - type: number - secret_id: - type: string - secret_preview: - type: string - required: - - id - - provider_slug - - secret_preview - - default_config - - gateway_id - - modified_at - - alias - - secret_id - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Returns the Object if it was successfully deleted - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Not Found - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete a Provider Configs - tags: - - AI Gateway Provider Configs - x-api-token-group: - - Secrets Store Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - put: - description: Updates an existing AI Gateway dataset. - operationId: aig-config-update-providers - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - secret: - type: string - required: - - secret - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - alias: - type: string - default_config: - type: boolean - gateway_id: - description: gateway id - maxLength: 64 - minLength: 1 - type: string - x-auditable: true - id: - type: string - modified_at: - format: date-time - type: string - readOnly: true - provider_slug: - type: string - rate_limit: - type: number - rate_limit_period: - default: 60 - type: number - secret_id: - type: string - secret_preview: - type: string - required: - - id - - provider_slug - - secret_preview - - default_config - - gateway_id - - modified_at - - alias - - secret_id - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Returns the updated Object - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - path: - items: - type: string - type: array - required: - - code - - message - - path - type: object - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Input Validation Error - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Not Found - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update a Provider Configs - tags: - - AI Gateway Provider Configs - x-api-token-group: - - Secrets Store Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes: - get: - description: List all AI Gateway Dynamic Routes. - operationId: aig-config-list-gateway-dynamic-routes - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - data: - properties: - order_by: - type: string - order_by_direction: - type: string - page: - type: number - per_page: - type: number - routes: - items: - properties: - account_tag: - type: string - created_at: - format: date-time - type: string - readOnly: true - deployment: - properties: - created_at: - type: string - readOnly: true - deployment_id: - type: string - version_id: - type: string - required: - - deployment_id - - version_id - - created_at - type: object - elements: - items: - type: object - properties: - id: - type: string - outputs: - properties: - next: - properties: - elementId: - type: string - required: - - elementId - type: object - required: - - next - type: object - type: - enum: - - start - type: string - properties: - properties: - conditions: - type: object - type: object - required: - - id - - outputs - - type - type: array - gateway_id: - type: string - id: - type: string - modified_at: - format: date-time - type: string - readOnly: true - name: - type: string - version: - properties: - active: - enum: - - 'true' - - 'false' - type: string - created_at: - type: string - readOnly: true - data: - type: string - version_id: - type: string - required: - - version_id - - data - - active - - created_at - type: object - required: - - id - - name - - elements - - created_at - - modified_at - - account_tag - - gateway_id - - version - - deployment - type: object - type: array - required: - - routes - - page - - per_page - - order_by - - order_by_direction - type: object - success: - type: boolean - required: - - success - - data - type: object - description: Success - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List all AI Gateway Dynamic Routes. - tags: - - AI Gateway Dynamic Routes - x-api-token-group: - - AI Gateway Write - - AI Gateway Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - dynamic_routing - method: list - post: - description: Create a new AI Gateway Dynamic Route. - operationId: aig-config-post-gateway-dynamic-route - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - elements: - items: - type: object - properties: - id: - type: string - outputs: - properties: - next: - properties: - elementId: - type: string - required: - - elementId - type: object - required: - - next - type: object - type: - enum: - - start - type: string - properties: - properties: - conditions: - type: object - type: object - required: - - id - - outputs - - type - type: array - name: - type: string - required: - - name - - elements - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - created_at: - format: date-time - type: string - readOnly: true - deployment: - properties: - created_at: - type: string - readOnly: true - deployment_id: - type: string - version_id: - type: string - required: - - deployment_id - - version_id - - created_at - type: object - elements: - items: - type: object - properties: - id: - type: string - outputs: - properties: - next: - properties: - elementId: - type: string - required: - - elementId - type: object - required: - - next - type: object - type: - enum: - - start - type: string - properties: - properties: - conditions: - type: object - type: object - required: - - id - - outputs - - type - type: array - gateway_id: - type: string - id: - type: string - modified_at: - format: date-time - type: string - readOnly: true - name: - type: string - version: - properties: - active: - enum: - - 'true' - - 'false' - type: string - created_at: - type: string - readOnly: true - data: - type: string - version_id: - type: string - required: - - version_id - - data - - active - - created_at - type: object - required: - - id - - name - - elements - - created_at - - modified_at - - gateway_id - - version - - deployment - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Success - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a new AI Gateway Dynamic Route. - tags: - - AI Gateway Dynamic Routes - x-api-token-group: - - AI Gateway Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - dynamic_routing - method: create - /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}: - delete: - description: Delete an AI Gateway Dynamic Route. - operationId: aig-config-delete-gateway-dynamic-route - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - created_at: - format: date-time - type: string - readOnly: true - elements: - items: - type: object - properties: - id: - type: string - outputs: - properties: - next: - properties: - elementId: - type: string - required: - - elementId - type: object - required: - - next - type: object - type: - enum: - - start - type: string - properties: - properties: - conditions: - type: object - type: object - required: - - id - - outputs - - type - type: array - gateway_id: - type: string - id: - type: string - modified_at: - format: date-time - type: string - readOnly: true - name: - type: string - required: - - id - - name - - elements - - created_at - - modified_at - - gateway_id - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Success - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete an AI Gateway Dynamic Route. - tags: - - AI Gateway Dynamic Routes - x-api-token-group: - - AI Gateway Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - dynamic_routing - method: delete - get: - description: Get an AI Gateway Dynamic Route. - operationId: aig-config-get-gateway-dynamic-route - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - created_at: - format: date-time - type: string - readOnly: true - deployment: - properties: - created_at: - type: string - readOnly: true - deployment_id: - type: string - version_id: - type: string - required: - - deployment_id - - version_id - - created_at - type: object - elements: - items: - type: object - properties: - id: - type: string - outputs: - properties: - next: - properties: - elementId: - type: string - required: - - elementId - type: object - required: - - next - type: object - type: - enum: - - start - type: string - properties: - properties: - conditions: - type: object - type: object - required: - - id - - outputs - - type - type: array - gateway_id: - type: string - id: - type: string - modified_at: - format: date-time - type: string - readOnly: true - name: - type: string - version: - properties: - active: - enum: - - 'true' - - 'false' - type: string - created_at: - type: string - readOnly: true - data: - type: string - version_id: - type: string - required: - - version_id - - data - - active - - created_at - type: object - required: - - id - - name - - elements - - created_at - - modified_at - - gateway_id - - version - - deployment - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Success - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get an AI Gateway Dynamic Route. - tags: - - AI Gateway Dynamic Routes - x-api-token-group: - - AI Gateway Write - - AI Gateway Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - dynamic_routing - method: get - patch: - description: Update an AI Gateway Dynamic Route. - operationId: aig-config-update-gateway-dynamic-route - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - name: - type: string - required: - - name - type: object - responses: - '200': - content: - application/json: - schema: - properties: - route: - properties: - account_tag: - type: string - created_at: - format: date-time - type: string - readOnly: true - deployment: - properties: - created_at: - type: string - readOnly: true - deployment_id: - type: string - version_id: - type: string - required: - - deployment_id - - version_id - - created_at - type: object - elements: - items: - type: object - properties: - id: - type: string - outputs: - properties: - next: - properties: - elementId: - type: string - required: - - elementId - type: object - required: - - next - type: object - type: - enum: - - start - type: string - properties: - properties: - conditions: - type: object - type: object - required: - - id - - outputs - - type - type: array - gateway_id: - type: string - id: - type: string - modified_at: - format: date-time - type: string - readOnly: true - name: - type: string - version: - properties: - active: - enum: - - 'true' - - 'false' - type: string - created_at: - type: string - readOnly: true - data: - type: string - version_id: - type: string - required: - - version_id - - data - - active - - created_at - type: object - required: - - id - - name - - elements - - created_at - - modified_at - - account_tag - - gateway_id - - version - - deployment - type: object - success: - type: boolean - required: - - success - - route - type: object - description: Success - '400': - content: - application/json: - schema: - properties: - route: - properties: - account_tag: - type: string - created_at: - format: date-time - type: string - readOnly: true - elements: - items: - type: object - properties: - id: - type: string - outputs: - properties: - next: - properties: - elementId: - type: string - required: - - elementId - type: object - required: - - next - type: object - type: - enum: - - start - type: string - properties: - properties: - conditions: - type: object - type: object - required: - - id - - outputs - - type - type: array - gateway_id: - type: string - id: - type: string - modified_at: - format: date-time - type: string - readOnly: true - name: - type: string - required: - - id - - name - - elements - - created_at - - modified_at - - account_tag - - gateway_id - type: object - success: - type: boolean - required: - - success - - route - type: object - description: Input Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update an AI Gateway Dynamic Route. - tags: - - AI Gateway Dynamic Routes - x-api-token-group: - - AI Gateway Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - dynamic_routing - method: update - /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}/deployments: - get: - description: List all AI Gateway Dynamic Route Deployments. - operationId: aig-config-list-gateway-dynamic-route-deployments - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - data: - properties: - deployments: - items: - properties: - created_at: - type: string - readOnly: true - deployment_id: - type: string - version_id: - type: string - required: - - deployment_id - - version_id - - created_at - type: object - type: array - order_by: - type: string - order_by_direction: - type: string - page: - type: number - per_page: - type: number - required: - - deployments - - page - - per_page - - order_by - - order_by_direction - type: object - success: - type: boolean - required: - - success - - data - type: object - description: Success - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List all AI Gateway Dynamic Route Deployments. - tags: - - AI Gateway Dynamic Routes - x-api-token-group: - - AI Gateway Write - - AI Gateway Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - dynamic_routing - method: list_deployments - post: - description: Create a new AI Gateway Dynamic Route Deployment. - operationId: aig-config-post-gateway-dynamic-route-deployment - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - version_id: - type: string - required: - - version_id - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - created_at: - format: date-time - type: string - readOnly: true - elements: - items: - type: object - properties: - id: - type: string - outputs: - properties: - next: - properties: - elementId: - type: string - required: - - elementId - type: object - required: - - next - type: object - type: - enum: - - start - type: string - properties: - properties: - conditions: - type: object - type: object - required: - - id - - outputs - - type - type: array - gateway_id: - type: string - id: - type: string - modified_at: - format: date-time - type: string - readOnly: true - name: - type: string - required: - - id - - name - - elements - - created_at - - modified_at - - gateway_id - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Success - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a new AI Gateway Dynamic Route Deployment. - tags: - - AI Gateway Dynamic Routes - x-api-token-group: - - AI Gateway Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - dynamic_routing - method: create_deployment - /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}/versions: - get: - description: List all AI Gateway Dynamic Route Versions. - operationId: aig-config-list-gateway-dynamic-route-versions - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - data: - properties: - order_by: - type: string - order_by_direction: - type: string - page: - type: number - per_page: - type: number - versions: - items: - properties: - active: - enum: - - 'true' - - 'false' - type: string - created_at: - type: string - readOnly: true - data: - type: string - version_id: - type: string - required: - - version_id - - data - - active - - created_at - type: object - type: array - required: - - versions - - page - - per_page - - order_by - - order_by_direction - type: object - success: - type: boolean - required: - - success - - data - type: object - description: Success - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List all AI Gateway Dynamic Route Versions. - tags: - - AI Gateway Dynamic Routes - x-api-token-group: - - AI Gateway Write - - AI Gateway Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - dynamic_routing - method: list_versions - post: - description: Create a new AI Gateway Dynamic Route Version. - operationId: aig-config-post-gateway-dynamic-route-version - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - elements: - items: - type: object - properties: - id: - type: string - outputs: - properties: - next: - properties: - elementId: - type: string - required: - - elementId - type: object - required: - - next - type: object - type: - enum: - - start - type: string - properties: - properties: - conditions: - type: object - type: object - required: - - id - - outputs - - type - type: array - required: - - elements - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - created_at: - format: date-time - type: string - readOnly: true - elements: - items: - type: object - properties: - id: - type: string - outputs: - properties: - next: - properties: - elementId: - type: string - required: - - elementId - type: object - required: - - next - type: object - type: - enum: - - start - type: string - properties: - properties: - conditions: - type: object - type: object - required: - - id - - outputs - - type - type: array - gateway_id: - type: string - id: - type: string - modified_at: - format: date-time - type: string - readOnly: true - name: - type: string - required: - - id - - name - - elements - - created_at - - modified_at - - gateway_id - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Success - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a new AI Gateway Dynamic Route Version. - tags: - - AI Gateway Dynamic Routes - x-api-token-group: - - AI Gateway Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - dynamic_routing - method: create_version - /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}/versions/{version_id}: - get: - description: Get an AI Gateway Dynamic Route Version. - operationId: aig-config-get-gateway-dynamic-route-version - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - - in: path - name: version_id - schema: - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - active: - enum: - - 'true' - - 'false' - type: string - created_at: - type: string - readOnly: true - data: - type: string - elements: - items: - type: object - properties: - id: - type: string - outputs: - properties: - next: - properties: - elementId: - type: string - required: - - elementId - type: object - required: - - next - type: object - type: - enum: - - start - type: string - properties: - properties: - conditions: - type: object - type: object - required: - - id - - outputs - - type - type: array - gateway_id: - type: string - id: - type: string - modified_at: - format: date-time - type: string - readOnly: true - name: - type: string - version_id: - type: string - required: - - id - - name - - elements - - created_at - - modified_at - - gateway_id - - version_id - - data - - active - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Success - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get an AI Gateway Dynamic Route Version. - tags: - - AI Gateway Dynamic Routes - x-api-token-group: - - AI Gateway Write - - AI Gateway Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - dynamic_routing - method: get_version - /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/url/{provider}: - get: - description: Retrieves the endpoint URL for an AI Gateway. - operationId: aig-config-get-gateway-url - parameters: - - name: gateway_id - in: path - required: true - description: The AI Gateway ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: provider - schema: - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - result: - type: string - success: - type: boolean - required: - - success - - result - type: object - description: Returns the log details - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Gateway URL - tags: - - AI Gateway Gateways - x-api-token-group: - - AI Gateway Write - - AI Gateway Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: - - urls - method: get - /accounts/{account_id}/ai-gateway/gateways/{id}: - delete: - description: Deletes an AI Gateway dataset. - operationId: aig-config-delete-gateway - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - authentication: - type: boolean - x-auditable: true - cache_invalidate_on_update: - type: boolean - x-auditable: true - cache_ttl: - minimum: 0 - nullable: true - type: integer - x-auditable: true - collect_logs: - type: boolean - x-auditable: true - created_at: - format: date-time - type: string - readOnly: true - dlp: - type: object - properties: - action: - enum: - - BLOCK - - FLAG - type: string - enabled: - type: boolean - profiles: - items: - type: string - type: array - policies: - items: - properties: - action: - enum: - - FLAG - - BLOCK - type: string - check: - items: - enum: - - REQUEST - - RESPONSE - type: string - type: array - enabled: - type: boolean - id: - type: string - profiles: - items: - type: string - type: array - required: - - id - - enabled - - action - - profiles - - check - type: object - type: array - required: - - enabled - id: - description: gateway id - maxLength: 64 - minLength: 1 - type: string - x-auditable: true - is_default: - type: boolean - x-auditable: true - log_management: - maximum: 10000000 - minimum: 10000 - nullable: true - type: integer - x-auditable: true - log_management_strategy: - enum: - - STOP_INSERTING - - DELETE_OLDEST - nullable: true - type: string - x-auditable: true - logpush: - type: boolean - x-auditable: true - logpush_public_key: - maxLength: 1024 - minLength: 16 - nullable: true - type: string - x-auditable: true - modified_at: - format: date-time - type: string - readOnly: true - otel: - items: - properties: - authorization: - type: string - content_type: - default: json - enum: - - json - - protobuf - type: string - headers: - type: object - url: - type: string - required: - - url - - headers - - authorization - type: object - nullable: true - type: array - x-auditable: true - rate_limiting_interval: - minimum: 0 - nullable: true - type: integer - x-auditable: true - rate_limiting_limit: - minimum: 0 - nullable: true - type: integer - x-auditable: true - rate_limiting_technique: - enum: - - fixed - - sliding - nullable: true - type: string - x-auditable: true - retry_backoff: - description: Backoff strategy for retry delays - enum: - - constant - - linear - - exponential - nullable: true - type: string - x-auditable: true - retry_delay: - description: Delay between retry attempts in milliseconds (0-5000) - maximum: 5000 - minimum: 0 - nullable: true - type: integer - x-auditable: true - retry_max_attempts: - description: >- - Maximum number of retry attempts for failed requests - (1-5) - maximum: 5 - minimum: 1 - nullable: true - type: integer - x-auditable: true - store_id: - nullable: true - type: string - stripe: - nullable: true - properties: - authorization: - type: string - usage_events: - items: - properties: - payload: - type: string - required: - - payload - type: object - type: array - required: - - authorization - - usage_events - type: object - x-auditable: true - workers_ai_billing_mode: - default: postpaid - description: >- - Controls how Workers AI inference calls routed through - this gateway are billed. Only 'postpaid' is currently - supported. - enum: - - postpaid - type: string - x-auditable: true - zdr: - type: boolean - x-auditable: true - required: - - id - - rate_limiting_interval - - rate_limiting_limit - - collect_logs - - cache_ttl - - cache_invalidate_on_update - - created_at - - modified_at - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Returns the Object if it was successfully deleted - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Not Found - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete a Gateway - tags: - - AI Gateway Gateways - x-api-token-group: - - AI Gateway Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: [] - method: delete - get: - description: Retrieves details for a specific AI Gateway dataset. - operationId: aig-config-fetch-gateway - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - authentication: - type: boolean - x-auditable: true - cache_invalidate_on_update: - type: boolean - x-auditable: true - cache_ttl: - minimum: 0 - nullable: true - type: integer - x-auditable: true - collect_logs: - type: boolean - x-auditable: true - created_at: - format: date-time - type: string - readOnly: true - dlp: - type: object - properties: - action: - enum: - - BLOCK - - FLAG - type: string - enabled: - type: boolean - profiles: - items: - type: string - type: array - policies: - items: - properties: - action: - enum: - - FLAG - - BLOCK - type: string - check: - items: - enum: - - REQUEST - - RESPONSE - type: string - type: array - enabled: - type: boolean - id: - type: string - profiles: - items: - type: string - type: array - required: - - id - - enabled - - action - - profiles - - check - type: object - type: array - required: - - enabled - id: - description: gateway id - maxLength: 64 - minLength: 1 - type: string - x-auditable: true - is_default: - type: boolean - x-auditable: true - log_management: - maximum: 10000000 - minimum: 10000 - nullable: true - type: integer - x-auditable: true - log_management_strategy: - enum: - - STOP_INSERTING - - DELETE_OLDEST - nullable: true - type: string - x-auditable: true - logpush: - type: boolean - x-auditable: true - logpush_public_key: - maxLength: 1024 - minLength: 16 - nullable: true - type: string - x-auditable: true - modified_at: - format: date-time - type: string - readOnly: true - otel: - items: - properties: - authorization: - type: string - content_type: - default: json - enum: - - json - - protobuf - type: string - headers: - type: object - url: - type: string - required: - - url - - headers - - authorization - type: object - nullable: true - type: array - x-auditable: true - rate_limiting_interval: - minimum: 0 - nullable: true - type: integer - x-auditable: true - rate_limiting_limit: - minimum: 0 - nullable: true - type: integer - x-auditable: true - rate_limiting_technique: - enum: - - fixed - - sliding - nullable: true - type: string - x-auditable: true - retry_backoff: - description: Backoff strategy for retry delays - enum: - - constant - - linear - - exponential - nullable: true - type: string - x-auditable: true - retry_delay: - description: Delay between retry attempts in milliseconds (0-5000) - maximum: 5000 - minimum: 0 - nullable: true - type: integer - x-auditable: true - retry_max_attempts: - description: >- - Maximum number of retry attempts for failed requests - (1-5) - maximum: 5 - minimum: 1 - nullable: true - type: integer - x-auditable: true - store_id: - nullable: true - type: string - stripe: - nullable: true - properties: - authorization: - type: string - usage_events: - items: - properties: - payload: - type: string - required: - - payload - type: object - type: array - required: - - authorization - - usage_events - type: object - x-auditable: true - workers_ai_billing_mode: - default: postpaid - description: >- - Controls how Workers AI inference calls routed through - this gateway are billed. Only 'postpaid' is currently - supported. - enum: - - postpaid - type: string - x-auditable: true - zdr: - type: boolean - x-auditable: true - required: - - id - - rate_limiting_interval - - rate_limiting_limit - - collect_logs - - cache_ttl - - cache_invalidate_on_update - - created_at - - modified_at - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Returns a single object if found - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Not Found - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Fetch a Gateway - tags: - - AI Gateway Gateways - x-api-token-group: - - AI Gateway Write - - AI Gateway Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: [] - method: get - put: - description: Updates an existing AI Gateway dataset. - operationId: aig-config-update-gateway - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - authentication: - type: boolean - x-auditable: true - cache_invalidate_on_update: - type: boolean - x-auditable: true - cache_ttl: - minimum: 0 - nullable: true - type: integer - x-auditable: true - collect_logs: - type: boolean - x-auditable: true - dlp: - type: object - properties: - action: - enum: - - BLOCK - - FLAG - type: string - enabled: - type: boolean - profiles: - items: - type: string - type: array - policies: - items: - properties: - action: - enum: - - FLAG - - BLOCK - type: string - check: - items: - enum: - - REQUEST - - RESPONSE - type: string - type: array - enabled: - type: boolean - id: - type: string - profiles: - items: - type: string - type: array - required: - - id - - enabled - - action - - profiles - - check - type: object - type: array - required: - - enabled - log_management: - maximum: 10000000 - minimum: 10000 - nullable: true - type: integer - x-auditable: true - log_management_strategy: - enum: - - STOP_INSERTING - - DELETE_OLDEST - nullable: true - type: string - x-auditable: true - logpush: - type: boolean - x-auditable: true - logpush_public_key: - maxLength: 1024 - minLength: 16 - nullable: true - type: string - x-auditable: true - otel: - items: - properties: - authorization: - type: string - content_type: - default: json - enum: - - json - - protobuf - type: string - headers: - type: object - url: - type: string - required: - - url - - headers - - authorization - type: object - nullable: true - type: array - x-auditable: true - rate_limiting_interval: - minimum: 0 - nullable: true - type: integer - x-auditable: true - rate_limiting_limit: - minimum: 0 - nullable: true - type: integer - x-auditable: true - rate_limiting_technique: - enum: - - fixed - - sliding - nullable: true - type: string - x-auditable: true - retry_backoff: - description: Backoff strategy for retry delays - enum: - - constant - - linear - - exponential - nullable: true - type: string - x-auditable: true - retry_delay: - description: Delay between retry attempts in milliseconds (0-5000) - maximum: 5000 - minimum: 0 - nullable: true - type: integer - x-auditable: true - retry_max_attempts: - description: Maximum number of retry attempts for failed requests (1-5) - maximum: 5 - minimum: 1 - nullable: true - type: integer - x-auditable: true - store_id: - nullable: true - type: string - stripe: - nullable: true - properties: - authorization: - type: string - usage_events: - items: - properties: - payload: - type: string - required: - - payload - type: object - type: array - required: - - authorization - - usage_events - type: object - x-auditable: true - workers_ai_billing_mode: - default: postpaid - description: >- - Controls how Workers AI inference calls routed through this - gateway are billed. Only 'postpaid' is currently supported. - enum: - - postpaid - type: string - x-auditable: true - zdr: - type: boolean - x-auditable: true - required: - - rate_limiting_interval - - rate_limiting_limit - - collect_logs - - cache_ttl - - cache_invalidate_on_update - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - authentication: - type: boolean - x-auditable: true - cache_invalidate_on_update: - type: boolean - x-auditable: true - cache_ttl: - minimum: 0 - nullable: true - type: integer - x-auditable: true - collect_logs: - type: boolean - x-auditable: true - created_at: - format: date-time - type: string - readOnly: true - dlp: - type: object - properties: - action: - enum: - - BLOCK - - FLAG - type: string - enabled: - type: boolean - profiles: - items: - type: string - type: array - policies: - items: - properties: - action: - enum: - - FLAG - - BLOCK - type: string - check: - items: - enum: - - REQUEST - - RESPONSE - type: string - type: array - enabled: - type: boolean - id: - type: string - profiles: - items: - type: string - type: array - required: - - id - - enabled - - action - - profiles - - check - type: object - type: array - required: - - enabled - id: - description: gateway id - maxLength: 64 - minLength: 1 - type: string - x-auditable: true - is_default: - type: boolean - x-auditable: true - log_management: - maximum: 10000000 - minimum: 10000 - nullable: true - type: integer - x-auditable: true - log_management_strategy: - enum: - - STOP_INSERTING - - DELETE_OLDEST - nullable: true - type: string - x-auditable: true - logpush: - type: boolean - x-auditable: true - logpush_public_key: - maxLength: 1024 - minLength: 16 - nullable: true - type: string - x-auditable: true - modified_at: - format: date-time - type: string - readOnly: true - otel: - items: - properties: - authorization: - type: string - content_type: - default: json - enum: - - json - - protobuf - type: string - headers: - type: object - url: - type: string - required: - - url - - headers - - authorization - type: object - nullable: true - type: array - x-auditable: true - rate_limiting_interval: - minimum: 0 - nullable: true - type: integer - x-auditable: true - rate_limiting_limit: - minimum: 0 - nullable: true - type: integer - x-auditable: true - rate_limiting_technique: - enum: - - fixed - - sliding - nullable: true - type: string - x-auditable: true - retry_backoff: - description: Backoff strategy for retry delays - enum: - - constant - - linear - - exponential - nullable: true - type: string - x-auditable: true - retry_delay: - description: Delay between retry attempts in milliseconds (0-5000) - maximum: 5000 - minimum: 0 - nullable: true - type: integer - x-auditable: true - retry_max_attempts: - description: >- - Maximum number of retry attempts for failed requests - (1-5) - maximum: 5 - minimum: 1 - nullable: true - type: integer - x-auditable: true - store_id: - nullable: true - type: string - stripe: - nullable: true - properties: - authorization: - type: string - usage_events: - items: - properties: - payload: - type: string - required: - - payload - type: object - type: array - required: - - authorization - - usage_events - type: object - x-auditable: true - workers_ai_billing_mode: - default: postpaid - description: >- - Controls how Workers AI inference calls routed through - this gateway are billed. Only 'postpaid' is currently - supported. - enum: - - postpaid - type: string - x-auditable: true - zdr: - type: boolean - x-auditable: true - required: - - id - - rate_limiting_interval - - rate_limiting_limit - - collect_logs - - cache_ttl - - cache_invalidate_on_update - - created_at - - modified_at - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Returns the updated Object - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - path: - items: - type: string - type: array - required: - - code - - message - - path - type: object - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Input Validation Error - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Not Found - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update a Gateway - tags: - - AI Gateway Gateways - x-api-token-group: - - AI Gateway Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.aig - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ai_gateway - resource_chain: [] - method: update -components: - schemas: {} - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - evaluation_types: - id: cloudflare.ai_gateway.evaluation_types - name: evaluation_types - title: Evaluation Types - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1evaluation-types/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/evaluation_types/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - gateways: - id: cloudflare.ai_gateway.gateways - name: gateways - title: Gateways - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{id}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/gateways/methods/get' - - $ref: '#/components/x-stackQL-resources/gateways/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/gateways/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/gateways/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/gateways/methods/update' - datasets: - id: cloudflare.ai_gateway.datasets - name: datasets - title: Datasets - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1datasets/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1datasets/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1datasets~1{id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1datasets~1{id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1datasets~1{id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/datasets/methods/get' - - $ref: '#/components/x-stackQL-resources/datasets/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/datasets/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/datasets/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/datasets/methods/update' - evaluations: - id: cloudflare.ai_gateway.evaluations - name: evaluations - title: Evaluations - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1evaluations/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1evaluations/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1evaluations~1{id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1evaluations~1{id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/evaluations/methods/get' - - $ref: '#/components/x-stackQL-resources/evaluations/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/evaluations/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/evaluations/methods/delete' - replace: [] - logs: - id: cloudflare.ai_gateway.logs - name: logs - title: Logs - methods: - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1logs/delete - response: - mediaType: application/json - openAPIDocKey: '200' - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1logs/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1logs~1{id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1logs~1{id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - list_logs_request: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1logs~1{id}~1request/get - response: - mediaType: application/json - openAPIDocKey: '200' - list_logs_response: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1logs~1{id}~1response/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/logs/methods/get' - - $ref: '#/components/x-stackQL-resources/logs/methods/list' - insert: [] - update: - - $ref: '#/components/x-stackQL-resources/logs/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/logs/methods/delete' - replace: [] - provider_configs: - id: cloudflare.ai_gateway.provider_configs - name: provider_configs - title: Provider Configs - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1provider_configs/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1provider_configs/post - response: - mediaType: application/json - openAPIDocKey: '200' - aig_config_delete_providers: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1provider_configs~1{id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - aig_config_update_providers: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1provider_configs~1{id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/provider_configs/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/provider_configs/methods/create' - update: [] - delete: - - $ref: >- - #/components/x-stackQL-resources/provider_configs/methods/aig_config_delete_providers - replace: - - $ref: >- - #/components/x-stackQL-resources/provider_configs/methods/aig_config_update_providers - dynamic_routing: - id: cloudflare.ai_gateway.dynamic_routing - name: dynamic_routing - title: Dynamic Routing - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1routes/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1routes/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1routes~1{id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1routes~1{id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/dynamic_routing/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/dynamic_routing/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/dynamic_routing/methods/update' - delete: - - $ref: '#/components/x-stackQL-resources/dynamic_routing/methods/delete' - replace: [] - gateways_routes: - id: cloudflare.ai_gateway.gateways_routes - name: gateways_routes - title: Gateways Routes - methods: - get_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1routes~1{id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/gateways_routes/methods/get_by_account - insert: [] - update: [] - delete: [] - replace: [] - routes_deployments: - id: cloudflare.ai_gateway.routes_deployments - name: routes_deployments - title: Routes Deployments - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1routes~1{id}~1deployments/get - response: - mediaType: application/json - openAPIDocKey: '200' - create_deployment: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1routes~1{id}~1deployments/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/routes_deployments/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/routes_deployments/methods/create_deployment - update: [] - delete: [] - replace: [] - routes_versions: - id: cloudflare.ai_gateway.routes_versions - name: routes_versions - title: Routes Versions - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1routes~1{id}~1versions/get - response: - mediaType: application/json - openAPIDocKey: '200' - create_version: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1routes~1{id}~1versions/post - response: - mediaType: application/json - openAPIDocKey: '200' - get_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1routes~1{id}~1versions~1{version_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/routes_versions/methods/get_by_account - - $ref: '#/components/x-stackQL-resources/routes_versions/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/routes_versions/methods/create_version - update: [] - delete: [] - replace: [] - urls: - id: cloudflare.ai_gateway.urls - name: urls - title: Urls - methods: - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1url~1{provider}/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/urls/methods/get' - insert: [] - update: [] - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: ai_gateway API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/ai-gateway/evaluation-types: + get: + operationId: aig-config-list-evaluators + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - in: query + name: per_page + schema: + default: 20 + maximum: 50 + minimum: 5 + type: integer + - in: query + name: order_by + schema: + default: mandatory + type: string + - in: query + name: order_by_direction + schema: + default: desc + enum: + - asc + - desc + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + items: + properties: + created_at: + format: date-time + type: string + readOnly: true + description: + type: string + enable: + type: boolean + id: + type: string + mandatory: + type: boolean + modified_at: + format: date-time + type: string + readOnly: true + name: + type: string + type: + type: string + required: + - name + - type + - mandatory + - description + - enable + - id + - created_at + - modified_at + type: object + type: array + result_info: + properties: + count: + type: number + page: + type: number + per_page: + type: number + total_count: + type: number + required: + - count + - page + - per_page + - total_count + type: object + success: + type: boolean + required: + - success + - result + - result_info + type: object + description: Returns a list of Evaluators + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Evaluators + tags: + - AI Gateway Evaluations + x-api-token-group: + - AI Gateway Write + - AI Gateway Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - evaluation_types + method: list + /accounts/{account_id}/ai-gateway/gateways: + get: + description: Lists all AI Gateway evaluator types configured for the account. + operationId: aig-config-list-gateway + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - in: query + name: per_page + schema: + default: 20 + maximum: 100 + minimum: 1 + type: integer + - in: query + name: search + schema: + description: Search by id + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + items: + properties: + authentication: + type: boolean + x-auditable: true + cache_invalidate_on_update: + type: boolean + x-auditable: true + cache_ttl: + minimum: 0 + nullable: true + type: integer + x-auditable: true + collect_logs: + type: boolean + x-auditable: true + created_at: + format: date-time + type: string + readOnly: true + dlp: + type: object + properties: + action: + enum: + - BLOCK + - FLAG + type: string + enabled: + type: boolean + profiles: + items: + type: string + type: array + policies: + items: + properties: + action: + enum: + - FLAG + - BLOCK + type: string + check: + items: + enum: + - REQUEST + - RESPONSE + type: string + type: array + enabled: + type: boolean + id: + type: string + profiles: + items: + type: string + type: array + required: + - id + - enabled + - action + - profiles + - check + type: object + type: array + required: + - enabled + id: + description: gateway id + maxLength: 64 + minLength: 1 + type: string + x-auditable: true + is_default: + type: boolean + x-auditable: true + log_management: + maximum: 10000000 + minimum: 10000 + nullable: true + type: integer + x-auditable: true + log_management_strategy: + enum: + - STOP_INSERTING + - DELETE_OLDEST + nullable: true + type: string + x-auditable: true + logpush: + type: boolean + x-auditable: true + logpush_public_key: + maxLength: 1024 + minLength: 16 + nullable: true + type: string + x-auditable: true + modified_at: + format: date-time + type: string + readOnly: true + otel: + items: + properties: + authorization: + type: string + content_type: + default: json + enum: + - json + - protobuf + type: string + headers: + type: object + url: + type: string + required: + - url + - headers + - authorization + type: object + nullable: true + type: array + x-auditable: true + rate_limiting_interval: + minimum: 0 + nullable: true + type: integer + x-auditable: true + rate_limiting_limit: + minimum: 0 + nullable: true + type: integer + x-auditable: true + rate_limiting_technique: + enum: + - fixed + - sliding + nullable: true + type: string + x-auditable: true + retry_backoff: + description: Backoff strategy for retry delays + enum: + - constant + - linear + - exponential + nullable: true + type: string + x-auditable: true + retry_delay: + description: Delay between retry attempts in milliseconds (0-5000) + maximum: 5000 + minimum: 0 + nullable: true + type: integer + x-auditable: true + retry_max_attempts: + description: Maximum number of retry attempts for failed requests (1-5) + maximum: 5 + minimum: 1 + nullable: true + type: integer + x-auditable: true + store_id: + nullable: true + type: string + stripe: + nullable: true + properties: + authorization: + type: string + usage_events: + items: + properties: + payload: + type: string + required: + - payload + type: object + type: array + required: + - authorization + - usage_events + type: object + x-auditable: true + workers_ai_billing_mode: + default: postpaid + description: Controls how Workers AI inference calls routed through this gateway are billed. Only 'postpaid' is currently supported. + enum: + - postpaid + type: string + x-auditable: true + zdr: + type: boolean + x-auditable: true + required: + - id + - rate_limiting_interval + - rate_limiting_limit + - collect_logs + - cache_ttl + - cache_invalidate_on_update + - created_at + - modified_at + type: object + type: array + success: + type: boolean + required: + - success + - result + type: object + description: List objects + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Gateways + tags: + - AI Gateway Gateways + x-api-token-group: + - AI Gateway Write + - AI Gateway Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: [] + method: list + post: + description: Creates a new AI Gateway. + operationId: aig-config-create-gateway + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + authentication: + type: boolean + x-auditable: true + cache_invalidate_on_update: + type: boolean + x-auditable: true + cache_ttl: + minimum: 0 + nullable: true + type: integer + x-auditable: true + collect_logs: + type: boolean + x-auditable: true + id: + description: gateway id + maxLength: 64 + minLength: 1 + type: string + x-auditable: true + log_management: + maximum: 10000000 + minimum: 10000 + nullable: true + type: integer + x-auditable: true + log_management_strategy: + enum: + - STOP_INSERTING + - DELETE_OLDEST + nullable: true + type: string + x-auditable: true + logpush: + type: boolean + x-auditable: true + logpush_public_key: + maxLength: 1024 + minLength: 16 + nullable: true + type: string + x-auditable: true + rate_limiting_interval: + minimum: 0 + nullable: true + type: integer + x-auditable: true + rate_limiting_limit: + minimum: 0 + nullable: true + type: integer + x-auditable: true + rate_limiting_technique: + enum: + - fixed + - sliding + nullable: true + type: string + x-auditable: true + retry_backoff: + description: Backoff strategy for retry delays + enum: + - constant + - linear + - exponential + nullable: true + type: string + x-auditable: true + retry_delay: + description: Delay between retry attempts in milliseconds (0-5000) + maximum: 5000 + minimum: 0 + nullable: true + type: integer + x-auditable: true + retry_max_attempts: + description: Maximum number of retry attempts for failed requests (1-5) + maximum: 5 + minimum: 1 + nullable: true + type: integer + x-auditable: true + workers_ai_billing_mode: + default: postpaid + description: Controls how Workers AI inference calls routed through this gateway are billed. Only 'postpaid' is currently supported. + enum: + - postpaid + type: string + x-auditable: true + zdr: + type: boolean + x-auditable: true + required: + - id + - rate_limiting_interval + - rate_limiting_limit + - collect_logs + - cache_ttl + - cache_invalidate_on_update + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + authentication: + type: boolean + x-auditable: true + cache_invalidate_on_update: + type: boolean + x-auditable: true + cache_ttl: + minimum: 0 + nullable: true + type: integer + x-auditable: true + collect_logs: + type: boolean + x-auditable: true + created_at: + format: date-time + type: string + readOnly: true + dlp: + type: object + properties: + action: + enum: + - BLOCK + - FLAG + type: string + enabled: + type: boolean + profiles: + items: + type: string + type: array + policies: + items: + properties: + action: + enum: + - FLAG + - BLOCK + type: string + check: + items: + enum: + - REQUEST + - RESPONSE + type: string + type: array + enabled: + type: boolean + id: + type: string + profiles: + items: + type: string + type: array + required: + - id + - enabled + - action + - profiles + - check + type: object + type: array + required: + - enabled + id: + description: gateway id + maxLength: 64 + minLength: 1 + type: string + x-auditable: true + is_default: + type: boolean + x-auditable: true + log_management: + maximum: 10000000 + minimum: 10000 + nullable: true + type: integer + x-auditable: true + log_management_strategy: + enum: + - STOP_INSERTING + - DELETE_OLDEST + nullable: true + type: string + x-auditable: true + logpush: + type: boolean + x-auditable: true + logpush_public_key: + maxLength: 1024 + minLength: 16 + nullable: true + type: string + x-auditable: true + modified_at: + format: date-time + type: string + readOnly: true + otel: + items: + properties: + authorization: + type: string + content_type: + default: json + enum: + - json + - protobuf + type: string + headers: + type: object + url: + type: string + required: + - url + - headers + - authorization + type: object + nullable: true + type: array + x-auditable: true + rate_limiting_interval: + minimum: 0 + nullable: true + type: integer + x-auditable: true + rate_limiting_limit: + minimum: 0 + nullable: true + type: integer + x-auditable: true + rate_limiting_technique: + enum: + - fixed + - sliding + nullable: true + type: string + x-auditable: true + retry_backoff: + description: Backoff strategy for retry delays + enum: + - constant + - linear + - exponential + nullable: true + type: string + x-auditable: true + retry_delay: + description: Delay between retry attempts in milliseconds (0-5000) + maximum: 5000 + minimum: 0 + nullable: true + type: integer + x-auditable: true + retry_max_attempts: + description: Maximum number of retry attempts for failed requests (1-5) + maximum: 5 + minimum: 1 + nullable: true + type: integer + x-auditable: true + store_id: + nullable: true + type: string + stripe: + nullable: true + properties: + authorization: + type: string + usage_events: + items: + properties: + payload: + type: string + required: + - payload + type: object + type: array + required: + - authorization + - usage_events + type: object + x-auditable: true + workers_ai_billing_mode: + default: postpaid + description: Controls how Workers AI inference calls routed through this gateway are billed. Only 'postpaid' is currently supported. + enum: + - postpaid + type: string + x-auditable: true + zdr: + type: boolean + x-auditable: true + required: + - id + - rate_limiting_interval + - rate_limiting_limit + - collect_logs + - cache_ttl + - cache_invalidate_on_update + - created_at + - modified_at + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Returns the created Object + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + path: + items: + type: string + type: array + required: + - code + - message + - path + type: object + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Input Validation Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a new Gateway + tags: + - AI Gateway Gateways + x-api-token-group: + - AI Gateway Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: [] + method: create + /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/datasets: + get: + description: Lists all AI Gateway evaluator types configured for the account. + operationId: aig-config-list-dataset + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + - in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - in: query + name: per_page + schema: + default: 20 + maximum: 100 + minimum: 1 + type: integer + - in: query + name: name + schema: + type: string + x-auditable: true + - in: query + name: enable + schema: + type: boolean + x-auditable: true + - in: query + name: search + schema: + description: Search by id, name, filters + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + items: + properties: + created_at: + format: date-time + type: string + readOnly: true + enable: + type: boolean + x-auditable: true + filters: + items: + properties: + key: + enum: + - created_at + - request_content_type + - response_content_type + - success + - cached + - provider + - model + - cost + - tokens + - tokens_in + - tokens_out + - duration + - feedback + type: string + x-auditable: true + operator: + enum: + - eq + - contains + - lt + - gt + type: string + x-auditable: true + value: + items: + type: string + type: array + x-auditable: true + required: + - key + - operator + - value + type: object + type: array + x-auditable: true + gateway_id: + description: gateway id + maxLength: 64 + minLength: 1 + type: string + x-auditable: true + id: + type: string + x-auditable: true + modified_at: + format: date-time + type: string + readOnly: true + name: + type: string + x-auditable: true + required: + - gateway_id + - name + - filters + - enable + - id + - created_at + - modified_at + type: object + type: array + success: + type: boolean + required: + - success + - result + type: object + description: List objects + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Datasets + tags: + - AI Gateway Datasets + x-api-token-group: + - AI Gateway Write + - AI Gateway Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - datasets + method: list + post: + description: Creates a new AI Gateway. + operationId: aig-config-create-dataset + parameters: + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + enable: + type: boolean + x-auditable: true + filters: + items: + properties: + key: + enum: + - created_at + - request_content_type + - response_content_type + - success + - cached + - provider + - model + - cost + - tokens + - tokens_in + - tokens_out + - duration + - feedback + type: string + x-auditable: true + operator: + enum: + - eq + - contains + - lt + - gt + type: string + x-auditable: true + value: + items: + type: string + type: array + x-auditable: true + required: + - key + - operator + - value + type: object + type: array + x-auditable: true + name: + type: string + x-auditable: true + required: + - name + - filters + - enable + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + created_at: + format: date-time + type: string + readOnly: true + enable: + type: boolean + x-auditable: true + filters: + items: + properties: + key: + enum: + - created_at + - request_content_type + - response_content_type + - success + - cached + - provider + - model + - cost + - tokens + - tokens_in + - tokens_out + - duration + - feedback + type: string + x-auditable: true + operator: + enum: + - eq + - contains + - lt + - gt + type: string + x-auditable: true + value: + items: + type: string + type: array + x-auditable: true + required: + - key + - operator + - value + type: object + type: array + x-auditable: true + gateway_id: + description: gateway id + maxLength: 64 + minLength: 1 + type: string + x-auditable: true + id: + type: string + x-auditable: true + modified_at: + format: date-time + type: string + readOnly: true + name: + type: string + x-auditable: true + required: + - gateway_id + - name + - filters + - enable + - id + - created_at + - modified_at + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Returns the created Object + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + path: + items: + type: string + type: array + required: + - code + - message + - path + type: object + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Input Validation Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a new Dataset + tags: + - AI Gateway Datasets + x-api-token-group: + - AI Gateway Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - datasets + method: create + /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/datasets/{id}: + delete: + description: Deletes an AI Gateway dataset. + operationId: aig-config-delete-dataset + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + created_at: + format: date-time + type: string + readOnly: true + enable: + type: boolean + x-auditable: true + filters: + items: + properties: + key: + enum: + - created_at + - request_content_type + - response_content_type + - success + - cached + - provider + - model + - cost + - tokens + - tokens_in + - tokens_out + - duration + - feedback + type: string + x-auditable: true + operator: + enum: + - eq + - contains + - lt + - gt + type: string + x-auditable: true + value: + items: + type: string + type: array + x-auditable: true + required: + - key + - operator + - value + type: object + type: array + x-auditable: true + gateway_id: + description: gateway id + maxLength: 64 + minLength: 1 + type: string + x-auditable: true + id: + type: string + x-auditable: true + modified_at: + format: date-time + type: string + readOnly: true + name: + type: string + x-auditable: true + required: + - gateway_id + - name + - filters + - enable + - id + - created_at + - modified_at + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Returns the Object if it was successfully deleted + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Not Found + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete a Dataset + tags: + - AI Gateway Datasets + x-api-token-group: + - AI Gateway Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - datasets + method: delete + get: + description: Retrieves details for a specific AI Gateway dataset. + operationId: aig-config-fetch-dataset + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + created_at: + format: date-time + type: string + readOnly: true + enable: + type: boolean + x-auditable: true + filters: + items: + properties: + key: + enum: + - created_at + - request_content_type + - response_content_type + - success + - cached + - provider + - model + - cost + - tokens + - tokens_in + - tokens_out + - duration + - feedback + type: string + x-auditable: true + operator: + enum: + - eq + - contains + - lt + - gt + type: string + x-auditable: true + value: + items: + type: string + type: array + x-auditable: true + required: + - key + - operator + - value + type: object + type: array + x-auditable: true + gateway_id: + description: gateway id + maxLength: 64 + minLength: 1 + type: string + x-auditable: true + id: + type: string + x-auditable: true + modified_at: + format: date-time + type: string + readOnly: true + name: + type: string + x-auditable: true + required: + - gateway_id + - name + - filters + - enable + - id + - created_at + - modified_at + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Returns a single object if found + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Not Found + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Fetch a Dataset + tags: + - AI Gateway Datasets + x-api-token-group: + - AI Gateway Write + - AI Gateway Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - datasets + method: get + put: + description: Updates an existing AI Gateway dataset. + operationId: aig-config-update-dataset + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + enable: + type: boolean + x-auditable: true + filters: + items: + properties: + key: + enum: + - created_at + - request_content_type + - response_content_type + - success + - cached + - provider + - model + - cost + - tokens + - tokens_in + - tokens_out + - duration + - feedback + type: string + x-auditable: true + operator: + enum: + - eq + - contains + - lt + - gt + type: string + x-auditable: true + value: + items: + type: string + type: array + x-auditable: true + required: + - key + - operator + - value + type: object + type: array + x-auditable: true + name: + type: string + x-auditable: true + required: + - name + - filters + - enable + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + created_at: + format: date-time + type: string + readOnly: true + enable: + type: boolean + x-auditable: true + filters: + items: + properties: + key: + enum: + - created_at + - request_content_type + - response_content_type + - success + - cached + - provider + - model + - cost + - tokens + - tokens_in + - tokens_out + - duration + - feedback + type: string + x-auditable: true + operator: + enum: + - eq + - contains + - lt + - gt + type: string + x-auditable: true + value: + items: + type: string + type: array + x-auditable: true + required: + - key + - operator + - value + type: object + type: array + x-auditable: true + gateway_id: + description: gateway id + maxLength: 64 + minLength: 1 + type: string + x-auditable: true + id: + type: string + x-auditable: true + modified_at: + format: date-time + type: string + readOnly: true + name: + type: string + x-auditable: true + required: + - gateway_id + - name + - filters + - enable + - id + - created_at + - modified_at + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Returns the updated Object + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + path: + items: + type: string + type: array + required: + - code + - message + - path + type: object + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Input Validation Error + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Not Found + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update a Dataset + tags: + - AI Gateway Datasets + x-api-token-group: + - AI Gateway Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - datasets + method: update + /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/evaluations: + get: + description: Lists all AI Gateway evaluator types configured for the account. + operationId: aig-config-list-evaluations + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + - in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - in: query + name: per_page + schema: + default: 20 + maximum: 100 + minimum: 1 + type: integer + - in: query + name: name + schema: + type: string + x-auditable: true + - in: query + name: processed + schema: + type: boolean + x-auditable: true + - in: query + name: search + schema: + description: Search by id, name + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + items: + properties: + created_at: + format: date-time + type: string + readOnly: true + datasets: + items: + properties: + account_id: + type: string + account_tag: + type: string + created_at: + format: date-time + type: string + readOnly: true + enable: + type: boolean + x-auditable: true + filters: + items: + properties: + key: + enum: + - created_at + - request_content_type + - response_content_type + - success + - cached + - provider + - model + - cost + - tokens + - tokens_in + - tokens_out + - duration + - feedback + type: string + x-auditable: true + operator: + enum: + - eq + - contains + - lt + - gt + type: string + x-auditable: true + value: + items: + type: string + type: array + x-auditable: true + required: + - key + - operator + - value + type: object + type: array + x-auditable: true + gateway_id: + description: gateway id + maxLength: 64 + minLength: 1 + type: string + x-auditable: true + id: + type: string + x-auditable: true + modified_at: + format: date-time + type: string + readOnly: true + name: + type: string + x-auditable: true + required: + - gateway_id + - name + - filters + - enable + - id + - account_id + - account_tag + - created_at + - modified_at + type: object + type: array + gateway_id: + description: gateway id + maxLength: 64 + minLength: 1 + type: string + x-auditable: true + id: + type: string + x-auditable: true + modified_at: + format: date-time + type: string + readOnly: true + name: + type: string + x-auditable: true + processed: + type: boolean + x-auditable: true + results: + items: + properties: + created_at: + format: date-time + type: string + readOnly: true + evaluation_id: + type: string + evaluation_type_id: + type: string + id: + type: string + modified_at: + format: date-time + type: string + readOnly: true + result: + type: string + status: + type: number + status_description: + type: string + total_logs: + type: number + required: + - evaluation_id + - evaluation_type_id + - result + - total_logs + - status + - status_description + - id + - created_at + - modified_at + type: object + type: array + total_logs: + type: number + x-auditable: true + required: + - id + - gateway_id + - name + - created_at + - modified_at + - datasets + - results + - processed + - total_logs + type: object + type: array + success: + type: boolean + required: + - success + - result + type: object + description: List objects + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Evaluations + tags: + - AI Gateway Evaluations + x-api-token-group: + - AI Gateway Write + - AI Gateway Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - evaluations + method: list + post: + description: Creates a new AI Gateway. + operationId: aig-config-create-evaluations + parameters: + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + dataset_ids: + items: + type: string + maxItems: 5 + minItems: 1 + type: array + evaluation_type_ids: + items: + type: string + type: array + name: + type: string + x-auditable: true + required: + - name + - dataset_ids + - evaluation_type_ids + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + created_at: + format: date-time + type: string + readOnly: true + datasets: + items: + properties: + account_id: + type: string + account_tag: + type: string + created_at: + format: date-time + type: string + readOnly: true + enable: + type: boolean + x-auditable: true + filters: + items: + properties: + key: + enum: + - created_at + - request_content_type + - response_content_type + - success + - cached + - provider + - model + - cost + - tokens + - tokens_in + - tokens_out + - duration + - feedback + type: string + x-auditable: true + operator: + enum: + - eq + - contains + - lt + - gt + type: string + x-auditable: true + value: + items: + type: string + type: array + x-auditable: true + required: + - key + - operator + - value + type: object + type: array + x-auditable: true + gateway_id: + description: gateway id + maxLength: 64 + minLength: 1 + type: string + x-auditable: true + id: + type: string + x-auditable: true + modified_at: + format: date-time + type: string + readOnly: true + name: + type: string + x-auditable: true + required: + - gateway_id + - name + - filters + - enable + - id + - account_id + - account_tag + - created_at + - modified_at + type: object + type: array + gateway_id: + description: gateway id + maxLength: 64 + minLength: 1 + type: string + x-auditable: true + id: + type: string + x-auditable: true + modified_at: + format: date-time + type: string + readOnly: true + name: + type: string + x-auditable: true + processed: + type: boolean + x-auditable: true + results: + items: + properties: + created_at: + format: date-time + type: string + readOnly: true + evaluation_id: + type: string + evaluation_type_id: + type: string + id: + type: string + modified_at: + format: date-time + type: string + readOnly: true + result: + type: string + status: + type: number + status_description: + type: string + total_logs: + type: number + required: + - evaluation_id + - evaluation_type_id + - result + - total_logs + - status + - status_description + - id + - created_at + - modified_at + type: object + type: array + total_logs: + type: number + x-auditable: true + required: + - id + - gateway_id + - name + - created_at + - modified_at + - datasets + - results + - processed + - total_logs + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Returns the created Object + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + path: + items: + type: string + type: array + required: + - code + - message + - path + type: object + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Input Validation Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a new Evaluation + tags: + - AI Gateway Evaluations + x-api-token-group: + - AI Gateway Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - evaluations + method: create + /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/evaluations/{id}: + delete: + description: Deletes an AI Gateway dataset. + operationId: aig-config-delete-evaluations + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + created_at: + format: date-time + type: string + readOnly: true + datasets: + items: + properties: + account_id: + type: string + account_tag: + type: string + created_at: + format: date-time + type: string + readOnly: true + enable: + type: boolean + x-auditable: true + filters: + items: + properties: + key: + enum: + - created_at + - request_content_type + - response_content_type + - success + - cached + - provider + - model + - cost + - tokens + - tokens_in + - tokens_out + - duration + - feedback + type: string + x-auditable: true + operator: + enum: + - eq + - contains + - lt + - gt + type: string + x-auditable: true + value: + items: + type: string + type: array + x-auditable: true + required: + - key + - operator + - value + type: object + type: array + x-auditable: true + gateway_id: + description: gateway id + maxLength: 64 + minLength: 1 + type: string + x-auditable: true + id: + type: string + x-auditable: true + modified_at: + format: date-time + type: string + readOnly: true + name: + type: string + x-auditable: true + required: + - gateway_id + - name + - filters + - enable + - id + - account_id + - account_tag + - created_at + - modified_at + type: object + type: array + gateway_id: + description: gateway id + maxLength: 64 + minLength: 1 + type: string + x-auditable: true + id: + type: string + x-auditable: true + modified_at: + format: date-time + type: string + readOnly: true + name: + type: string + x-auditable: true + processed: + type: boolean + x-auditable: true + results: + items: + properties: + created_at: + format: date-time + type: string + readOnly: true + evaluation_id: + type: string + evaluation_type_id: + type: string + id: + type: string + modified_at: + format: date-time + type: string + readOnly: true + result: + type: string + status: + type: number + status_description: + type: string + total_logs: + type: number + required: + - evaluation_id + - evaluation_type_id + - result + - total_logs + - status + - status_description + - id + - created_at + - modified_at + type: object + type: array + total_logs: + type: number + x-auditable: true + required: + - id + - gateway_id + - name + - created_at + - modified_at + - datasets + - results + - processed + - total_logs + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Returns the Object if it was successfully deleted + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Not Found + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete a Evaluation + tags: + - AI Gateway Evaluations + x-api-token-group: + - AI Gateway Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - evaluations + method: delete + get: + description: Retrieves details for a specific AI Gateway dataset. + operationId: aig-config-fetch-evaluations + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + created_at: + format: date-time + type: string + readOnly: true + datasets: + items: + properties: + account_id: + type: string + account_tag: + type: string + created_at: + format: date-time + type: string + readOnly: true + enable: + type: boolean + x-auditable: true + filters: + items: + properties: + key: + enum: + - created_at + - request_content_type + - response_content_type + - success + - cached + - provider + - model + - cost + - tokens + - tokens_in + - tokens_out + - duration + - feedback + type: string + x-auditable: true + operator: + enum: + - eq + - contains + - lt + - gt + type: string + x-auditable: true + value: + items: + type: string + type: array + x-auditable: true + required: + - key + - operator + - value + type: object + type: array + x-auditable: true + gateway_id: + description: gateway id + maxLength: 64 + minLength: 1 + type: string + x-auditable: true + id: + type: string + x-auditable: true + modified_at: + format: date-time + type: string + readOnly: true + name: + type: string + x-auditable: true + required: + - gateway_id + - name + - filters + - enable + - id + - account_id + - account_tag + - created_at + - modified_at + type: object + type: array + gateway_id: + description: gateway id + maxLength: 64 + minLength: 1 + type: string + x-auditable: true + id: + type: string + x-auditable: true + modified_at: + format: date-time + type: string + readOnly: true + name: + type: string + x-auditable: true + processed: + type: boolean + x-auditable: true + results: + items: + properties: + created_at: + format: date-time + type: string + readOnly: true + evaluation_id: + type: string + evaluation_type_id: + type: string + id: + type: string + modified_at: + format: date-time + type: string + readOnly: true + result: + type: string + status: + type: number + status_description: + type: string + total_logs: + type: number + required: + - evaluation_id + - evaluation_type_id + - result + - total_logs + - status + - status_description + - id + - created_at + - modified_at + type: object + type: array + total_logs: + type: number + x-auditable: true + required: + - id + - gateway_id + - name + - created_at + - modified_at + - datasets + - results + - processed + - total_logs + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Returns a single object if found + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Not Found + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Fetch a Evaluation + tags: + - AI Gateway Evaluations + x-api-token-group: + - AI Gateway Write + - AI Gateway Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - evaluations + method: get + /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs: + delete: + operationId: aig-config-delete-gateway-logs + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + - in: query + name: order_by + schema: + default: created_at + enum: + - created_at + - provider + - model + - model_type + - success + - cached + - cost + - tokens_in + - tokens_out + - duration + - feedback + type: string + - in: query + name: order_by_direction + schema: + default: asc + enum: + - asc + - desc + type: string + - in: query + name: filters + schema: + items: + properties: + key: + enum: + - id + - created_at + - request_content_type + - response_content_type + - request_type + - success + - cached + - provider + - model + - model_type + - cost + - tokens + - tokens_in + - tokens_out + - duration + - feedback + - event_id + - metadata.key + - metadata.value + - authentication + - wholesale + - compatibilityMode + - dlp_action + type: string + operator: + enum: + - eq + - neq + - contains + - lt + - gt + type: string + value: + items: + type: string + type: array + required: + - key + - operator + - value + type: object + type: array + explode: true + - in: query + name: limit + schema: + default: 10000 + maximum: 10000 + minimum: 1 + type: integer + responses: + '200': + content: + application/json: + schema: + properties: + success: + type: boolean + required: + - success + type: object + description: Returns if the delete was successful + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Gateway Logs + tags: + - AI Gateway Logs + x-api-token-group: + - AI Gateway Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - logs + method: delete + get: + operationId: aig-config-list-gateway-logs + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + - in: query + name: search + schema: + type: string + - in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - in: query + name: per_page + schema: + default: 20 + maximum: 50 + minimum: 1 + type: integer + - in: query + name: order_by + schema: + default: created_at + enum: + - created_at + - provider + - model + - model_type + - success + - cached + type: string + - in: query + name: order_by_direction + schema: + default: desc + enum: + - asc + - desc + type: string + - in: query + name: filters + schema: + items: + properties: + key: + enum: + - id + - created_at + - request_content_type + - response_content_type + - request_type + - success + - cached + - provider + - model + - model_type + - cost + - tokens + - tokens_in + - tokens_out + - duration + - feedback + - event_id + - metadata.key + - metadata.value + - authentication + - wholesale + - compatibilityMode + - dlp_action + type: string + operator: + enum: + - eq + - neq + - contains + - lt + - gt + type: string + value: + items: + type: string + type: array + required: + - key + - operator + - value + type: object + type: array + explode: true + - in: query + name: meta_info + schema: + type: boolean + - in: query + name: direction + schema: + deprecated: true + enum: + - asc + - desc + type: string + - in: query + name: start_date + schema: + deprecated: true + format: date-time + type: string + - in: query + name: end_date + schema: + deprecated: true + format: date-time + type: string + - in: query + name: min_cost + schema: + deprecated: true + type: number + - in: query + name: max_cost + schema: + deprecated: true + type: number + - in: query + name: min_tokens_in + schema: + deprecated: true + type: number + - in: query + name: max_tokens_in + schema: + deprecated: true + type: number + - in: query + name: min_tokens_out + schema: + deprecated: true + type: number + - in: query + name: max_tokens_out + schema: + deprecated: true + type: number + - in: query + name: min_total_tokens + schema: + deprecated: true + type: number + - in: query + name: max_total_tokens + schema: + deprecated: true + type: number + - in: query + name: min_duration + schema: + deprecated: true + type: number + - in: query + name: max_duration + schema: + deprecated: true + type: number + - in: query + name: feedback + schema: + deprecated: true + type: number + enum: + - 0 + - in: query + name: success + schema: + deprecated: true + type: boolean + - in: query + name: cached + schema: + deprecated: true + type: boolean + - in: query + name: model + schema: + deprecated: true + type: string + - in: query + name: model_type + schema: + deprecated: true + type: string + - in: query + name: provider + schema: + deprecated: true + type: string + - in: query + name: request_content_type + schema: + deprecated: true + type: string + - in: query + name: response_content_type + schema: + deprecated: true + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + items: + properties: + cached: + type: boolean + cost: + type: number + created_at: + format: date-time + type: string + readOnly: true + custom_cost: + type: boolean + duration: + type: integer + id: + type: string + metadata: + type: string + model: + type: string + model_type: + type: string + x-stainless-naming: + python: + property_name: ai_model_type + path: + type: string + provider: + type: string + request_content_type: + type: string + request_type: + type: string + response_content_type: + type: string + status_code: + type: integer + step: + type: integer + success: + type: boolean + tokens_in: + nullable: true + type: integer + tokens_out: + nullable: true + type: integer + required: + - id + - created_at + - provider + - model + - path + - duration + - success + - cached + - tokens_in + - tokens_out + type: object + type: array + result_info: + properties: + count: + type: number + max_cost: + type: number + max_duration: + type: number + max_tokens_in: + type: number + max_tokens_out: + type: number + max_total_tokens: + type: number + min_cost: + type: number + min_duration: + type: number + min_tokens_in: + type: number + min_tokens_out: + type: number + min_total_tokens: + type: number + page: + type: number + per_page: + type: number + total_count: + type: number + type: object + success: + type: boolean + required: + - success + - result + - result_info + type: object + description: Returns a list of Gateway Logs + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Gateway Logs + tags: + - AI Gateway Logs + x-api-token-group: + - AI Gateway Write + - AI Gateway Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - logs + method: list + /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs/{id}: + get: + description: Retrieves detailed information for a specific AI Gateway log entry. + operationId: aig-config-get-gateway-log-detail + parameters: + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + cached: + type: boolean + cost: + type: number + created_at: + format: date-time + type: string + readOnly: true + custom_cost: + type: boolean + duration: + type: integer + id: + type: string + metadata: + type: string + model: + type: string + model_type: + type: string + x-stainless-naming: + python: + property_name: ai_model_type + path: + type: string + provider: + type: string + request_content_type: + type: string + request_head: + type: string + request_head_complete: + type: boolean + request_size: + type: integer + request_type: + type: string + response_content_type: + type: string + response_head: + type: string + response_head_complete: + type: boolean + response_size: + type: integer + status_code: + type: integer + step: + type: integer + success: + type: boolean + tokens_in: + nullable: true + type: integer + tokens_out: + nullable: true + type: integer + required: + - id + - created_at + - provider + - model + - path + - duration + - success + - cached + - tokens_in + - tokens_out + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Returns the log details + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Not Found + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Gateway Log Detail + tags: + - AI Gateway Logs + x-api-token-group: + - AI Gateway Write + - AI Gateway Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - logs + method: get + patch: + description: Updates metadata for an AI Gateway log entry. + operationId: aig-config-patch-gateway-log + parameters: + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + feedback: + maximum: 1 + minimum: -1 + nullable: true + type: number + metadata: + nullable: true + type: object + score: + maximum: 100 + minimum: 0 + nullable: true + type: number + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Returns the log details + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Not Found + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Patch Gateway Log + tags: + - AI Gateway Logs + x-api-token-group: + - AI Gateway Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - logs + method: edit + /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs/{id}/request: + get: + description: Retrieves the original request payload for an AI Gateway log entry. + operationId: aig-config-get-gateway-log-request + parameters: + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + description: Returns the request body from a specific log + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Not Found + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Gateway Log Request + tags: + - AI Gateway Logs + x-api-token-group: + - AI Gateway Write + - AI Gateway Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - logs + method: request + /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs/{id}/response: + get: + description: Retrieves the response payload for an AI Gateway log entry. + operationId: aig-config-get-gateway-log-response + parameters: + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + description: Returns the response body from a specific log + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Not Found + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Gateway Log Response + tags: + - AI Gateway Logs + x-api-token-group: + - AI Gateway Write + - AI Gateway Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - logs + method: response + /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/provider_configs: + get: + description: Lists all AI Gateway evaluator types configured for the account. + operationId: aig-config-list-providers + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + - in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - in: query + name: per_page + schema: + default: 20 + maximum: 100 + minimum: 1 + type: integer + responses: + '200': + content: + application/json: + schema: + properties: + result: + items: + properties: + alias: + type: string + default_config: + type: boolean + gateway_id: + description: gateway id + maxLength: 64 + minLength: 1 + type: string + x-auditable: true + id: + type: string + modified_at: + format: date-time + type: string + readOnly: true + provider_slug: + type: string + rate_limit: + type: number + rate_limit_period: + default: 60 + type: number + secret_id: + type: string + secret_preview: + type: string + required: + - id + - provider_slug + - secret_preview + - default_config + - gateway_id + - modified_at + - alias + - secret_id + type: object + type: array + success: + type: boolean + required: + - success + - result + type: object + description: List objects + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Provider Configs + tags: + - AI Gateway Provider Configs + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - provider_configs + method: list + post: + description: Creates a new AI Gateway. + operationId: aig-config-create-providers + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + alias: + type: string + default_config: + type: boolean + provider_slug: + type: string + rate_limit: + type: number + rate_limit_period: + default: 60 + type: number + secret: + type: string + secret_id: + type: string + required: + - provider_slug + - default_config + - alias + - secret_id + - secret + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + alias: + type: string + default_config: + type: boolean + gateway_id: + description: gateway id + maxLength: 64 + minLength: 1 + type: string + x-auditable: true + id: + type: string + modified_at: + format: date-time + type: string + readOnly: true + provider_slug: + type: string + rate_limit: + type: number + rate_limit_period: + default: 60 + type: number + secret_id: + type: string + secret_preview: + type: string + required: + - id + - provider_slug + - secret_preview + - default_config + - gateway_id + - modified_at + - alias + - secret_id + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Returns the created Object + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + path: + items: + type: string + type: array + required: + - code + - message + - path + type: object + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Input Validation Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a new Provider Configs + tags: + - AI Gateway Provider Configs + x-api-token-group: + - Secrets Store Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - provider_configs + method: create + /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/provider_configs/{id}: + delete: + description: Deletes an AI Gateway dataset. + operationId: aig-config-delete-providers + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + alias: + type: string + default_config: + type: boolean + gateway_id: + description: gateway id + maxLength: 64 + minLength: 1 + type: string + x-auditable: true + id: + type: string + modified_at: + format: date-time + type: string + readOnly: true + provider_slug: + type: string + rate_limit: + type: number + rate_limit_period: + default: 60 + type: number + secret_id: + type: string + secret_preview: + type: string + required: + - id + - provider_slug + - secret_preview + - default_config + - gateway_id + - modified_at + - alias + - secret_id + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Returns the Object if it was successfully deleted + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Not Found + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete a Provider Configs + tags: + - AI Gateway Provider Configs + x-api-token-group: + - Secrets Store Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + put: + description: Updates an existing AI Gateway dataset. + operationId: aig-config-update-providers + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + secret: + type: string + required: + - secret + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + alias: + type: string + default_config: + type: boolean + gateway_id: + description: gateway id + maxLength: 64 + minLength: 1 + type: string + x-auditable: true + id: + type: string + modified_at: + format: date-time + type: string + readOnly: true + provider_slug: + type: string + rate_limit: + type: number + rate_limit_period: + default: 60 + type: number + secret_id: + type: string + secret_preview: + type: string + required: + - id + - provider_slug + - secret_preview + - default_config + - gateway_id + - modified_at + - alias + - secret_id + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Returns the updated Object + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + path: + items: + type: string + type: array + required: + - code + - message + - path + type: object + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Input Validation Error + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Not Found + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update a Provider Configs + tags: + - AI Gateway Provider Configs + x-api-token-group: + - Secrets Store Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes: + get: + description: List all AI Gateway Dynamic Routes. + operationId: aig-config-list-gateway-dynamic-routes + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + data: + properties: + order_by: + type: string + order_by_direction: + type: string + page: + type: number + per_page: + type: number + routes: + items: + properties: + account_tag: + type: string + created_at: + format: date-time + type: string + readOnly: true + deployment: + properties: + created_at: + type: string + readOnly: true + deployment_id: + type: string + version_id: + type: string + required: + - deployment_id + - version_id + - created_at + type: object + elements: + items: + type: object + properties: + id: + type: string + outputs: + properties: + next: + properties: + elementId: + type: string + required: + - elementId + type: object + required: + - next + type: object + type: + enum: + - start + type: string + properties: + properties: + conditions: + type: object + type: object + required: + - id + - outputs + - type + type: array + gateway_id: + type: string + id: + type: string + modified_at: + format: date-time + type: string + readOnly: true + name: + type: string + version: + properties: + active: + enum: + - 'true' + - 'false' + type: string + created_at: + type: string + readOnly: true + data: + type: string + version_id: + type: string + required: + - version_id + - data + - active + - created_at + type: object + required: + - id + - name + - elements + - created_at + - modified_at + - account_tag + - gateway_id + - version + - deployment + type: object + type: array + required: + - routes + - page + - per_page + - order_by + - order_by_direction + type: object + success: + type: boolean + required: + - success + - data + type: object + description: Success + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List all AI Gateway Dynamic Routes. + tags: + - AI Gateway Dynamic Routes + x-api-token-group: + - AI Gateway Write + - AI Gateway Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - dynamic_routing + method: list + post: + description: Create a new AI Gateway Dynamic Route. + operationId: aig-config-post-gateway-dynamic-route + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + elements: + items: + type: object + properties: + id: + type: string + outputs: + properties: + next: + properties: + elementId: + type: string + required: + - elementId + type: object + required: + - next + type: object + type: + enum: + - start + type: string + properties: + properties: + conditions: + type: object + type: object + required: + - id + - outputs + - type + type: array + name: + type: string + required: + - name + - elements + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + created_at: + format: date-time + type: string + readOnly: true + deployment: + properties: + created_at: + type: string + readOnly: true + deployment_id: + type: string + version_id: + type: string + required: + - deployment_id + - version_id + - created_at + type: object + elements: + items: + type: object + properties: + id: + type: string + outputs: + properties: + next: + properties: + elementId: + type: string + required: + - elementId + type: object + required: + - next + type: object + type: + enum: + - start + type: string + properties: + properties: + conditions: + type: object + type: object + required: + - id + - outputs + - type + type: array + gateway_id: + type: string + id: + type: string + modified_at: + format: date-time + type: string + readOnly: true + name: + type: string + version: + properties: + active: + enum: + - 'true' + - 'false' + type: string + created_at: + type: string + readOnly: true + data: + type: string + version_id: + type: string + required: + - version_id + - data + - active + - created_at + type: object + required: + - id + - name + - elements + - created_at + - modified_at + - gateway_id + - version + - deployment + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Success + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a new AI Gateway Dynamic Route. + tags: + - AI Gateway Dynamic Routes + x-api-token-group: + - AI Gateway Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - dynamic_routing + method: create + /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}: + delete: + description: Delete an AI Gateway Dynamic Route. + operationId: aig-config-delete-gateway-dynamic-route + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + created_at: + format: date-time + type: string + readOnly: true + elements: + items: + type: object + properties: + id: + type: string + outputs: + properties: + next: + properties: + elementId: + type: string + required: + - elementId + type: object + required: + - next + type: object + type: + enum: + - start + type: string + properties: + properties: + conditions: + type: object + type: object + required: + - id + - outputs + - type + type: array + gateway_id: + type: string + id: + type: string + modified_at: + format: date-time + type: string + readOnly: true + name: + type: string + required: + - id + - name + - elements + - created_at + - modified_at + - gateway_id + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Success + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete an AI Gateway Dynamic Route. + tags: + - AI Gateway Dynamic Routes + x-api-token-group: + - AI Gateway Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - dynamic_routing + method: delete + get: + description: Get an AI Gateway Dynamic Route. + operationId: aig-config-get-gateway-dynamic-route + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + created_at: + format: date-time + type: string + readOnly: true + deployment: + properties: + created_at: + type: string + readOnly: true + deployment_id: + type: string + version_id: + type: string + required: + - deployment_id + - version_id + - created_at + type: object + elements: + items: + type: object + properties: + id: + type: string + outputs: + properties: + next: + properties: + elementId: + type: string + required: + - elementId + type: object + required: + - next + type: object + type: + enum: + - start + type: string + properties: + properties: + conditions: + type: object + type: object + required: + - id + - outputs + - type + type: array + gateway_id: + type: string + id: + type: string + modified_at: + format: date-time + type: string + readOnly: true + name: + type: string + version: + properties: + active: + enum: + - 'true' + - 'false' + type: string + created_at: + type: string + readOnly: true + data: + type: string + version_id: + type: string + required: + - version_id + - data + - active + - created_at + type: object + required: + - id + - name + - elements + - created_at + - modified_at + - gateway_id + - version + - deployment + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Success + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get an AI Gateway Dynamic Route. + tags: + - AI Gateway Dynamic Routes + x-api-token-group: + - AI Gateway Write + - AI Gateway Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - dynamic_routing + method: get + patch: + description: Update an AI Gateway Dynamic Route. + operationId: aig-config-update-gateway-dynamic-route + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + name: + type: string + required: + - name + type: object + responses: + '200': + content: + application/json: + schema: + properties: + route: + properties: + account_tag: + type: string + created_at: + format: date-time + type: string + readOnly: true + deployment: + properties: + created_at: + type: string + readOnly: true + deployment_id: + type: string + version_id: + type: string + required: + - deployment_id + - version_id + - created_at + type: object + elements: + items: + type: object + properties: + id: + type: string + outputs: + properties: + next: + properties: + elementId: + type: string + required: + - elementId + type: object + required: + - next + type: object + type: + enum: + - start + type: string + properties: + properties: + conditions: + type: object + type: object + required: + - id + - outputs + - type + type: array + gateway_id: + type: string + id: + type: string + modified_at: + format: date-time + type: string + readOnly: true + name: + type: string + version: + properties: + active: + enum: + - 'true' + - 'false' + type: string + created_at: + type: string + readOnly: true + data: + type: string + version_id: + type: string + required: + - version_id + - data + - active + - created_at + type: object + required: + - id + - name + - elements + - created_at + - modified_at + - account_tag + - gateway_id + - version + - deployment + type: object + success: + type: boolean + required: + - success + - route + type: object + description: Success + '400': + content: + application/json: + schema: + properties: + route: + properties: + account_tag: + type: string + created_at: + format: date-time + type: string + readOnly: true + elements: + items: + type: object + properties: + id: + type: string + outputs: + properties: + next: + properties: + elementId: + type: string + required: + - elementId + type: object + required: + - next + type: object + type: + enum: + - start + type: string + properties: + properties: + conditions: + type: object + type: object + required: + - id + - outputs + - type + type: array + gateway_id: + type: string + id: + type: string + modified_at: + format: date-time + type: string + readOnly: true + name: + type: string + required: + - id + - name + - elements + - created_at + - modified_at + - account_tag + - gateway_id + type: object + success: + type: boolean + required: + - success + - route + type: object + description: Input Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update an AI Gateway Dynamic Route. + tags: + - AI Gateway Dynamic Routes + x-api-token-group: + - AI Gateway Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - dynamic_routing + method: update + /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}/deployments: + get: + description: List all AI Gateway Dynamic Route Deployments. + operationId: aig-config-list-gateway-dynamic-route-deployments + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + data: + properties: + deployments: + items: + properties: + created_at: + type: string + readOnly: true + deployment_id: + type: string + version_id: + type: string + required: + - deployment_id + - version_id + - created_at + type: object + type: array + order_by: + type: string + order_by_direction: + type: string + page: + type: number + per_page: + type: number + required: + - deployments + - page + - per_page + - order_by + - order_by_direction + type: object + success: + type: boolean + required: + - success + - data + type: object + description: Success + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List all AI Gateway Dynamic Route Deployments. + tags: + - AI Gateway Dynamic Routes + x-api-token-group: + - AI Gateway Write + - AI Gateway Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - dynamic_routing + method: list_deployments + post: + description: Create a new AI Gateway Dynamic Route Deployment. + operationId: aig-config-post-gateway-dynamic-route-deployment + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + version_id: + type: string + required: + - version_id + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + created_at: + format: date-time + type: string + readOnly: true + elements: + items: + type: object + properties: + id: + type: string + outputs: + properties: + next: + properties: + elementId: + type: string + required: + - elementId + type: object + required: + - next + type: object + type: + enum: + - start + type: string + properties: + properties: + conditions: + type: object + type: object + required: + - id + - outputs + - type + type: array + gateway_id: + type: string + id: + type: string + modified_at: + format: date-time + type: string + readOnly: true + name: + type: string + required: + - id + - name + - elements + - created_at + - modified_at + - gateway_id + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Success + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a new AI Gateway Dynamic Route Deployment. + tags: + - AI Gateway Dynamic Routes + x-api-token-group: + - AI Gateway Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - dynamic_routing + method: create_deployment + /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}/versions: + get: + description: List all AI Gateway Dynamic Route Versions. + operationId: aig-config-list-gateway-dynamic-route-versions + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + data: + properties: + order_by: + type: string + order_by_direction: + type: string + page: + type: number + per_page: + type: number + versions: + items: + properties: + active: + enum: + - 'true' + - 'false' + type: string + created_at: + type: string + readOnly: true + data: + type: string + version_id: + type: string + required: + - version_id + - data + - active + - created_at + type: object + type: array + required: + - versions + - page + - per_page + - order_by + - order_by_direction + type: object + success: + type: boolean + required: + - success + - data + type: object + description: Success + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List all AI Gateway Dynamic Route Versions. + tags: + - AI Gateway Dynamic Routes + x-api-token-group: + - AI Gateway Write + - AI Gateway Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - dynamic_routing + method: list_versions + post: + description: Create a new AI Gateway Dynamic Route Version. + operationId: aig-config-post-gateway-dynamic-route-version + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + elements: + items: + type: object + properties: + id: + type: string + outputs: + properties: + next: + properties: + elementId: + type: string + required: + - elementId + type: object + required: + - next + type: object + type: + enum: + - start + type: string + properties: + properties: + conditions: + type: object + type: object + required: + - id + - outputs + - type + type: array + required: + - elements + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + created_at: + format: date-time + type: string + readOnly: true + elements: + items: + type: object + properties: + id: + type: string + outputs: + properties: + next: + properties: + elementId: + type: string + required: + - elementId + type: object + required: + - next + type: object + type: + enum: + - start + type: string + properties: + properties: + conditions: + type: object + type: object + required: + - id + - outputs + - type + type: array + gateway_id: + type: string + id: + type: string + modified_at: + format: date-time + type: string + readOnly: true + name: + type: string + required: + - id + - name + - elements + - created_at + - modified_at + - gateway_id + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Success + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a new AI Gateway Dynamic Route Version. + tags: + - AI Gateway Dynamic Routes + x-api-token-group: + - AI Gateway Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - dynamic_routing + method: create_version + /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}/versions/{version_id}: + get: + description: Get an AI Gateway Dynamic Route Version. + operationId: aig-config-get-gateway-dynamic-route-version + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + - in: path + name: version_id + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + active: + enum: + - 'true' + - 'false' + type: string + created_at: + type: string + readOnly: true + data: + type: string + elements: + items: + type: object + properties: + id: + type: string + outputs: + properties: + next: + properties: + elementId: + type: string + required: + - elementId + type: object + required: + - next + type: object + type: + enum: + - start + type: string + properties: + properties: + conditions: + type: object + type: object + required: + - id + - outputs + - type + type: array + gateway_id: + type: string + id: + type: string + modified_at: + format: date-time + type: string + readOnly: true + name: + type: string + version_id: + type: string + required: + - id + - name + - elements + - created_at + - modified_at + - gateway_id + - version_id + - data + - active + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Success + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get an AI Gateway Dynamic Route Version. + tags: + - AI Gateway Dynamic Routes + x-api-token-group: + - AI Gateway Write + - AI Gateway Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - dynamic_routing + method: get_version + /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/url/{provider}: + get: + description: Retrieves the endpoint URL for an AI Gateway. + operationId: aig-config-get-gateway-url + parameters: + - name: gateway_id + in: path + required: true + description: The AI Gateway ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: provider + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + result: + type: string + success: + type: boolean + required: + - success + - result + type: object + description: Returns the log details + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Gateway URL + tags: + - AI Gateway Gateways + x-api-token-group: + - AI Gateway Write + - AI Gateway Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: + - urls + method: get + /accounts/{account_id}/ai-gateway/gateways/{id}: + delete: + description: Deletes an AI Gateway dataset. + operationId: aig-config-delete-gateway + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + authentication: + type: boolean + x-auditable: true + cache_invalidate_on_update: + type: boolean + x-auditable: true + cache_ttl: + minimum: 0 + nullable: true + type: integer + x-auditable: true + collect_logs: + type: boolean + x-auditable: true + created_at: + format: date-time + type: string + readOnly: true + dlp: + type: object + properties: + action: + enum: + - BLOCK + - FLAG + type: string + enabled: + type: boolean + profiles: + items: + type: string + type: array + policies: + items: + properties: + action: + enum: + - FLAG + - BLOCK + type: string + check: + items: + enum: + - REQUEST + - RESPONSE + type: string + type: array + enabled: + type: boolean + id: + type: string + profiles: + items: + type: string + type: array + required: + - id + - enabled + - action + - profiles + - check + type: object + type: array + required: + - enabled + id: + description: gateway id + maxLength: 64 + minLength: 1 + type: string + x-auditable: true + is_default: + type: boolean + x-auditable: true + log_management: + maximum: 10000000 + minimum: 10000 + nullable: true + type: integer + x-auditable: true + log_management_strategy: + enum: + - STOP_INSERTING + - DELETE_OLDEST + nullable: true + type: string + x-auditable: true + logpush: + type: boolean + x-auditable: true + logpush_public_key: + maxLength: 1024 + minLength: 16 + nullable: true + type: string + x-auditable: true + modified_at: + format: date-time + type: string + readOnly: true + otel: + items: + properties: + authorization: + type: string + content_type: + default: json + enum: + - json + - protobuf + type: string + headers: + type: object + url: + type: string + required: + - url + - headers + - authorization + type: object + nullable: true + type: array + x-auditable: true + rate_limiting_interval: + minimum: 0 + nullable: true + type: integer + x-auditable: true + rate_limiting_limit: + minimum: 0 + nullable: true + type: integer + x-auditable: true + rate_limiting_technique: + enum: + - fixed + - sliding + nullable: true + type: string + x-auditable: true + retry_backoff: + description: Backoff strategy for retry delays + enum: + - constant + - linear + - exponential + nullable: true + type: string + x-auditable: true + retry_delay: + description: Delay between retry attempts in milliseconds (0-5000) + maximum: 5000 + minimum: 0 + nullable: true + type: integer + x-auditable: true + retry_max_attempts: + description: Maximum number of retry attempts for failed requests (1-5) + maximum: 5 + minimum: 1 + nullable: true + type: integer + x-auditable: true + store_id: + nullable: true + type: string + stripe: + nullable: true + properties: + authorization: + type: string + usage_events: + items: + properties: + payload: + type: string + required: + - payload + type: object + type: array + required: + - authorization + - usage_events + type: object + x-auditable: true + workers_ai_billing_mode: + default: postpaid + description: Controls how Workers AI inference calls routed through this gateway are billed. Only 'postpaid' is currently supported. + enum: + - postpaid + type: string + x-auditable: true + zdr: + type: boolean + x-auditable: true + required: + - id + - rate_limiting_interval + - rate_limiting_limit + - collect_logs + - cache_ttl + - cache_invalidate_on_update + - created_at + - modified_at + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Returns the Object if it was successfully deleted + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Not Found + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete a Gateway + tags: + - AI Gateway Gateways + x-api-token-group: + - AI Gateway Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: [] + method: delete + get: + description: Retrieves details for a specific AI Gateway dataset. + operationId: aig-config-fetch-gateway + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + authentication: + type: boolean + x-auditable: true + cache_invalidate_on_update: + type: boolean + x-auditable: true + cache_ttl: + minimum: 0 + nullable: true + type: integer + x-auditable: true + collect_logs: + type: boolean + x-auditable: true + created_at: + format: date-time + type: string + readOnly: true + dlp: + type: object + properties: + action: + enum: + - BLOCK + - FLAG + type: string + enabled: + type: boolean + profiles: + items: + type: string + type: array + policies: + items: + properties: + action: + enum: + - FLAG + - BLOCK + type: string + check: + items: + enum: + - REQUEST + - RESPONSE + type: string + type: array + enabled: + type: boolean + id: + type: string + profiles: + items: + type: string + type: array + required: + - id + - enabled + - action + - profiles + - check + type: object + type: array + required: + - enabled + id: + description: gateway id + maxLength: 64 + minLength: 1 + type: string + x-auditable: true + is_default: + type: boolean + x-auditable: true + log_management: + maximum: 10000000 + minimum: 10000 + nullable: true + type: integer + x-auditable: true + log_management_strategy: + enum: + - STOP_INSERTING + - DELETE_OLDEST + nullable: true + type: string + x-auditable: true + logpush: + type: boolean + x-auditable: true + logpush_public_key: + maxLength: 1024 + minLength: 16 + nullable: true + type: string + x-auditable: true + modified_at: + format: date-time + type: string + readOnly: true + otel: + items: + properties: + authorization: + type: string + content_type: + default: json + enum: + - json + - protobuf + type: string + headers: + type: object + url: + type: string + required: + - url + - headers + - authorization + type: object + nullable: true + type: array + x-auditable: true + rate_limiting_interval: + minimum: 0 + nullable: true + type: integer + x-auditable: true + rate_limiting_limit: + minimum: 0 + nullable: true + type: integer + x-auditable: true + rate_limiting_technique: + enum: + - fixed + - sliding + nullable: true + type: string + x-auditable: true + retry_backoff: + description: Backoff strategy for retry delays + enum: + - constant + - linear + - exponential + nullable: true + type: string + x-auditable: true + retry_delay: + description: Delay between retry attempts in milliseconds (0-5000) + maximum: 5000 + minimum: 0 + nullable: true + type: integer + x-auditable: true + retry_max_attempts: + description: Maximum number of retry attempts for failed requests (1-5) + maximum: 5 + minimum: 1 + nullable: true + type: integer + x-auditable: true + store_id: + nullable: true + type: string + stripe: + nullable: true + properties: + authorization: + type: string + usage_events: + items: + properties: + payload: + type: string + required: + - payload + type: object + type: array + required: + - authorization + - usage_events + type: object + x-auditable: true + workers_ai_billing_mode: + default: postpaid + description: Controls how Workers AI inference calls routed through this gateway are billed. Only 'postpaid' is currently supported. + enum: + - postpaid + type: string + x-auditable: true + zdr: + type: boolean + x-auditable: true + required: + - id + - rate_limiting_interval + - rate_limiting_limit + - collect_logs + - cache_ttl + - cache_invalidate_on_update + - created_at + - modified_at + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Returns a single object if found + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Not Found + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Fetch a Gateway + tags: + - AI Gateway Gateways + x-api-token-group: + - AI Gateway Write + - AI Gateway Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: [] + method: get + put: + description: Updates an existing AI Gateway dataset. + operationId: aig-config-update-gateway + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + authentication: + type: boolean + x-auditable: true + cache_invalidate_on_update: + type: boolean + x-auditable: true + cache_ttl: + minimum: 0 + nullable: true + type: integer + x-auditable: true + collect_logs: + type: boolean + x-auditable: true + dlp: + type: object + properties: + action: + enum: + - BLOCK + - FLAG + type: string + enabled: + type: boolean + profiles: + items: + type: string + type: array + policies: + items: + properties: + action: + enum: + - FLAG + - BLOCK + type: string + check: + items: + enum: + - REQUEST + - RESPONSE + type: string + type: array + enabled: + type: boolean + id: + type: string + profiles: + items: + type: string + type: array + required: + - id + - enabled + - action + - profiles + - check + type: object + type: array + required: + - enabled + log_management: + maximum: 10000000 + minimum: 10000 + nullable: true + type: integer + x-auditable: true + log_management_strategy: + enum: + - STOP_INSERTING + - DELETE_OLDEST + nullable: true + type: string + x-auditable: true + logpush: + type: boolean + x-auditable: true + logpush_public_key: + maxLength: 1024 + minLength: 16 + nullable: true + type: string + x-auditable: true + otel: + items: + properties: + authorization: + type: string + content_type: + default: json + enum: + - json + - protobuf + type: string + headers: + type: object + url: + type: string + required: + - url + - headers + - authorization + type: object + nullable: true + type: array + x-auditable: true + rate_limiting_interval: + minimum: 0 + nullable: true + type: integer + x-auditable: true + rate_limiting_limit: + minimum: 0 + nullable: true + type: integer + x-auditable: true + rate_limiting_technique: + enum: + - fixed + - sliding + nullable: true + type: string + x-auditable: true + retry_backoff: + description: Backoff strategy for retry delays + enum: + - constant + - linear + - exponential + nullable: true + type: string + x-auditable: true + retry_delay: + description: Delay between retry attempts in milliseconds (0-5000) + maximum: 5000 + minimum: 0 + nullable: true + type: integer + x-auditable: true + retry_max_attempts: + description: Maximum number of retry attempts for failed requests (1-5) + maximum: 5 + minimum: 1 + nullable: true + type: integer + x-auditable: true + store_id: + nullable: true + type: string + stripe: + nullable: true + properties: + authorization: + type: string + usage_events: + items: + properties: + payload: + type: string + required: + - payload + type: object + type: array + required: + - authorization + - usage_events + type: object + x-auditable: true + workers_ai_billing_mode: + default: postpaid + description: Controls how Workers AI inference calls routed through this gateway are billed. Only 'postpaid' is currently supported. + enum: + - postpaid + type: string + x-auditable: true + zdr: + type: boolean + x-auditable: true + required: + - rate_limiting_interval + - rate_limiting_limit + - collect_logs + - cache_ttl + - cache_invalidate_on_update + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + authentication: + type: boolean + x-auditable: true + cache_invalidate_on_update: + type: boolean + x-auditable: true + cache_ttl: + minimum: 0 + nullable: true + type: integer + x-auditable: true + collect_logs: + type: boolean + x-auditable: true + created_at: + format: date-time + type: string + readOnly: true + dlp: + type: object + properties: + action: + enum: + - BLOCK + - FLAG + type: string + enabled: + type: boolean + profiles: + items: + type: string + type: array + policies: + items: + properties: + action: + enum: + - FLAG + - BLOCK + type: string + check: + items: + enum: + - REQUEST + - RESPONSE + type: string + type: array + enabled: + type: boolean + id: + type: string + profiles: + items: + type: string + type: array + required: + - id + - enabled + - action + - profiles + - check + type: object + type: array + required: + - enabled + id: + description: gateway id + maxLength: 64 + minLength: 1 + type: string + x-auditable: true + is_default: + type: boolean + x-auditable: true + log_management: + maximum: 10000000 + minimum: 10000 + nullable: true + type: integer + x-auditable: true + log_management_strategy: + enum: + - STOP_INSERTING + - DELETE_OLDEST + nullable: true + type: string + x-auditable: true + logpush: + type: boolean + x-auditable: true + logpush_public_key: + maxLength: 1024 + minLength: 16 + nullable: true + type: string + x-auditable: true + modified_at: + format: date-time + type: string + readOnly: true + otel: + items: + properties: + authorization: + type: string + content_type: + default: json + enum: + - json + - protobuf + type: string + headers: + type: object + url: + type: string + required: + - url + - headers + - authorization + type: object + nullable: true + type: array + x-auditable: true + rate_limiting_interval: + minimum: 0 + nullable: true + type: integer + x-auditable: true + rate_limiting_limit: + minimum: 0 + nullable: true + type: integer + x-auditable: true + rate_limiting_technique: + enum: + - fixed + - sliding + nullable: true + type: string + x-auditable: true + retry_backoff: + description: Backoff strategy for retry delays + enum: + - constant + - linear + - exponential + nullable: true + type: string + x-auditable: true + retry_delay: + description: Delay between retry attempts in milliseconds (0-5000) + maximum: 5000 + minimum: 0 + nullable: true + type: integer + x-auditable: true + retry_max_attempts: + description: Maximum number of retry attempts for failed requests (1-5) + maximum: 5 + minimum: 1 + nullable: true + type: integer + x-auditable: true + store_id: + nullable: true + type: string + stripe: + nullable: true + properties: + authorization: + type: string + usage_events: + items: + properties: + payload: + type: string + required: + - payload + type: object + type: array + required: + - authorization + - usage_events + type: object + x-auditable: true + workers_ai_billing_mode: + default: postpaid + description: Controls how Workers AI inference calls routed through this gateway are billed. Only 'postpaid' is currently supported. + enum: + - postpaid + type: string + x-auditable: true + zdr: + type: boolean + x-auditable: true + required: + - id + - rate_limiting_interval + - rate_limiting_limit + - collect_logs + - cache_ttl + - cache_invalidate_on_update + - created_at + - modified_at + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Returns the updated Object + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + path: + items: + type: string + type: array + required: + - code + - message + - path + type: object + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Input Validation Error + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Not Found + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update a Gateway + tags: + - AI Gateway Gateways + x-api-token-group: + - AI Gateway Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.aig + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ai_gateway + resource_chain: [] + method: update +components: + schemas: {} + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + evaluation_types: + id: cloudflare.ai_gateway.evaluation_types + name: evaluation_types + title: Evaluation Types + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1evaluation-types/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/evaluation_types/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + gateways: + id: cloudflare.ai_gateway.gateways + name: gateways + title: Gateways + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .authentication }}{{ $sep }}"authentication": {{ toJson .authentication }}{{- $sep = "," -}}{{ end }} + + {{- if .cache_invalidate_on_update }}{{ $sep }}"cache_invalidate_on_update": {{ toJson .cache_invalidate_on_update }}{{- $sep = "," -}}{{ end }} + + {{- if .cache_ttl }}{{ $sep }}"cache_ttl": {{ toJson .cache_ttl }}{{- $sep = "," -}}{{ end }} + + {{- if .collect_logs }}{{ $sep }}"collect_logs": {{ toJson .collect_logs }}{{- $sep = "," -}}{{ end }} + + {{- if .dlp }}{{ $sep }}"dlp": {{ if eq (kindOf .dlp) "string" }}{{ .dlp }}{{ else }}{{ toJson .dlp }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .log_management }}{{ $sep }}"log_management": {{ toJson .log_management }}{{- $sep = "," -}}{{ end }} + + {{- if .log_management_strategy }}{{ $sep }}"log_management_strategy": {{ toJson .log_management_strategy }}{{- $sep = "," -}}{{ end }} + + {{- if .logpush }}{{ $sep }}"logpush": {{ toJson .logpush }}{{- $sep = "," -}}{{ end }} + + {{- if .logpush_public_key }}{{ $sep }}"logpush_public_key": {{ toJson .logpush_public_key }}{{- $sep = "," -}}{{ end }} + + {{- if .otel }}{{ $sep }}"otel": {{ if eq (kindOf .otel) "string" }}{{ .otel }}{{ else }}{{ toJson .otel }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .rate_limiting_interval }}{{ $sep }}"rate_limiting_interval": {{ toJson .rate_limiting_interval }}{{- $sep = "," -}}{{ end }} + + {{- if .rate_limiting_limit }}{{ $sep }}"rate_limiting_limit": {{ toJson .rate_limiting_limit }}{{- $sep = "," -}}{{ end }} + + {{- if .rate_limiting_technique }}{{ $sep }}"rate_limiting_technique": {{ toJson .rate_limiting_technique }}{{- $sep = "," -}}{{ end }} + + {{- if .retry_backoff }}{{ $sep }}"retry_backoff": {{ toJson .retry_backoff }}{{- $sep = "," -}}{{ end }} + + {{- if .retry_delay }}{{ $sep }}"retry_delay": {{ toJson .retry_delay }}{{- $sep = "," -}}{{ end }} + + {{- if .retry_max_attempts }}{{ $sep }}"retry_max_attempts": {{ toJson .retry_max_attempts }}{{- $sep = "," -}}{{ end }} + + {{- if .store_id }}{{ $sep }}"store_id": {{ toJson .store_id }}{{- $sep = "," -}}{{ end }} + + {{- if .stripe }}{{ $sep }}"stripe": {{ if eq (kindOf .stripe) "string" }}{{ .stripe }}{{ else }}{{ toJson .stripe }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .workers_ai_billing_mode }}{{ $sep }}"workers_ai_billing_mode": {{ toJson .workers_ai_billing_mode }}{{- $sep = "," -}}{{ end }} + + {{- if .zdr }}{{ $sep }}"zdr": {{ toJson .zdr }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/gateways/methods/get' + - $ref: '#/components/x-stackQL-resources/gateways/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/gateways/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/gateways/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/gateways/methods/update' + datasets: + id: cloudflare.ai_gateway.datasets + name: datasets + title: Datasets + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1datasets/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1datasets/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .enable }}{{ $sep }}"enable": {{ toJson .enable }}{{- $sep = "," -}}{{ end }} + + {{- if .filters }}{{ $sep }}"filters": {{ if eq (kindOf .filters) "string" }}{{ .filters }}{{ else }}{{ toJson .filters }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1datasets~1{id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1datasets~1{id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1datasets~1{id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .enable }}{{ $sep }}"enable": {{ toJson .enable }}{{- $sep = "," -}}{{ end }} + + {{- if .filters }}{{ $sep }}"filters": {{ if eq (kindOf .filters) "string" }}{{ .filters }}{{ else }}{{ toJson .filters }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/datasets/methods/get' + - $ref: '#/components/x-stackQL-resources/datasets/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/datasets/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/datasets/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/datasets/methods/update' + evaluations: + id: cloudflare.ai_gateway.evaluations + name: evaluations + title: Evaluations + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1evaluations/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1evaluations/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .dataset_ids }}{{ $sep }}"dataset_ids": {{ if eq (kindOf .dataset_ids) "string" }}{{ .dataset_ids }}{{ else }}{{ toJson .dataset_ids }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .evaluation_type_ids }}{{ $sep }}"evaluation_type_ids": {{ if eq (kindOf .evaluation_type_ids) "string" }}{{ .evaluation_type_ids }}{{ else }}{{ toJson .evaluation_type_ids }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1evaluations~1{id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1evaluations~1{id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/evaluations/methods/get' + - $ref: '#/components/x-stackQL-resources/evaluations/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/evaluations/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/evaluations/methods/delete' + replace: [] + logs: + id: cloudflare.ai_gateway.logs + name: logs + title: Logs + methods: + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1logs/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1logs/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1logs~1{id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1logs~1{id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .feedback }}{{ $sep }}"feedback": {{ toJson .feedback }}{{- $sep = "," -}}{{ end }} + + {{- if .metadata }}{{ $sep }}"metadata": {{ if eq (kindOf .metadata) "string" }}{{ .metadata }}{{ else }}{{ toJson .metadata }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .score }}{{ $sep }}"score": {{ toJson .score }}{{- $sep = "," -}}{{ end }} + + } + + ' + list_logs_request: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1logs~1{id}~1request/get' + response: + mediaType: application/json + openAPIDocKey: '200' + list_logs_response: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1logs~1{id}~1response/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/logs/methods/get' + - $ref: '#/components/x-stackQL-resources/logs/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/logs/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/logs/methods/delete' + replace: [] + provider_configs: + id: cloudflare.ai_gateway.provider_configs + name: provider_configs + title: Provider Configs + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1provider_configs/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1provider_configs/post' + response: + mediaType: application/json + openAPIDocKey: '200' + aig_config_delete_providers: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1provider_configs~1{id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + aig_config_update_providers: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1provider_configs~1{id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/provider_configs/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/provider_configs/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/provider_configs/methods/aig_config_delete_providers' + replace: + - $ref: '#/components/x-stackQL-resources/provider_configs/methods/aig_config_update_providers' + dynamic_routing: + id: cloudflare.ai_gateway.dynamic_routing + name: dynamic_routing + title: Dynamic Routing + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1routes/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1routes/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .elements }}{{ $sep }}"elements": {{ if eq (kindOf .elements) "string" }}{{ .elements }}{{ else }}{{ toJson .elements }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1routes~1{id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1routes~1{id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/dynamic_routing/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/dynamic_routing/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/dynamic_routing/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/dynamic_routing/methods/delete' + replace: [] + gateways_routes: + id: cloudflare.ai_gateway.gateways_routes + name: gateways_routes + title: Gateways Routes + methods: + get_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1routes~1{id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/gateways_routes/methods/get_by_account' + insert: [] + update: [] + delete: [] + replace: [] + routes_deployments: + id: cloudflare.ai_gateway.routes_deployments + name: routes_deployments + title: Routes Deployments + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1routes~1{id}~1deployments/get' + response: + mediaType: application/json + openAPIDocKey: '200' + create_deployment: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1routes~1{id}~1deployments/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/routes_deployments/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/routes_deployments/methods/create_deployment' + update: [] + delete: [] + replace: [] + routes_versions: + id: cloudflare.ai_gateway.routes_versions + name: routes_versions + title: Routes Versions + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1routes~1{id}~1versions/get' + response: + mediaType: application/json + openAPIDocKey: '200' + create_version: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1routes~1{id}~1versions/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .elements }}{{ $sep }}"elements": {{ if eq (kindOf .elements) "string" }}{{ .elements }}{{ else }}{{ toJson .elements }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + get_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1routes~1{id}~1versions~1{version_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/routes_versions/methods/get_by_account' + - $ref: '#/components/x-stackQL-resources/routes_versions/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/routes_versions/methods/create_version' + update: [] + delete: [] + replace: [] + urls: + id: cloudflare.ai_gateway.urls + name: urls + title: Urls + methods: + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1ai-gateway~1gateways~1{gateway_id}~1url~1{provider}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/urls/methods/get' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/aisearch.yaml b/providers/src/cloudflare/v00.00.00000/services/aisearch.yaml index 3c3ed6c5..6c50e270 100644 --- a/providers/src/cloudflare/v00.00.00000/services/aisearch.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/aisearch.yaml @@ -15498,6 +15498,73 @@ components: response: mediaType: application/json openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ai_gateway_id }}{{ $sep }}"ai_gateway_id": {{ toJson .ai_gateway_id }}{{- $sep = "," -}}{{ end }} + + {{- if .ai_search_model }}{{ $sep }}"ai_search_model": {{ toJson .ai_search_model }}{{- $sep = "," -}}{{ end }} + + {{- if .cache }}{{ $sep }}"cache": {{ toJson .cache }}{{- $sep = "," -}}{{ end }} + + {{- if .cache_threshold }}{{ $sep }}"cache_threshold": {{ toJson .cache_threshold }}{{- $sep = "," -}}{{ end }} + + {{- if .chunk }}{{ $sep }}"chunk": {{ toJson .chunk }}{{- $sep = "," -}}{{ end }} + + {{- if .chunk_overlap }}{{ $sep }}"chunk_overlap": {{ toJson .chunk_overlap }}{{- $sep = "," -}}{{ end }} + + {{- if .chunk_size }}{{ $sep }}"chunk_size": {{ toJson .chunk_size }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_metadata }}{{ $sep }}"custom_metadata": {{ if eq (kindOf .custom_metadata) "string" }}{{ .custom_metadata }}{{ else }}{{ toJson .custom_metadata }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .embedding_model }}{{ $sep }}"embedding_model": {{ toJson .embedding_model }}{{- $sep = "," -}}{{ end }} + + {{- if .fusion_method }}{{ $sep }}"fusion_method": {{ toJson .fusion_method }}{{- $sep = "," -}}{{ end }} + + {{- if .hybrid_search_enabled }}{{ $sep }}"hybrid_search_enabled": {{ toJson .hybrid_search_enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .id }}{{ $sep }}"id": {{ toJson .id }}{{- $sep = "," -}}{{ end }} + + {{- if .index_method }}{{ $sep }}"index_method": {{ if eq (kindOf .index_method) "string" }}{{ .index_method }}{{ else }}{{ toJson .index_method }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .indexing_options }}{{ $sep }}"indexing_options": {{ if eq (kindOf .indexing_options) "string" }}{{ .indexing_options }}{{ else }}{{ toJson .indexing_options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .max_num_results }}{{ $sep }}"max_num_results": {{ toJson .max_num_results }}{{- $sep = "," -}}{{ end }} + + {{- if .metadata }}{{ $sep }}"metadata": {{ if eq (kindOf .metadata) "string" }}{{ .metadata }}{{ else }}{{ toJson .metadata }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .public_endpoint_params }}{{ $sep }}"public_endpoint_params": {{ if eq (kindOf .public_endpoint_params) "string" }}{{ .public_endpoint_params }}{{ else }}{{ toJson .public_endpoint_params }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .reranking }}{{ $sep }}"reranking": {{ toJson .reranking }}{{- $sep = "," -}}{{ end }} + + {{- if .reranking_model }}{{ $sep }}"reranking_model": {{ toJson .reranking_model }}{{- $sep = "," -}}{{ end }} + + {{- if .retrieval_options }}{{ $sep }}"retrieval_options": {{ if eq (kindOf .retrieval_options) "string" }}{{ .retrieval_options }}{{ else }}{{ toJson .retrieval_options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .rewrite_model }}{{ $sep }}"rewrite_model": {{ toJson .rewrite_model }}{{- $sep = "," -}}{{ end }} + + {{- if .rewrite_query }}{{ $sep }}"rewrite_query": {{ toJson .rewrite_query }}{{- $sep = "," -}}{{ end }} + + {{- if .score_threshold }}{{ $sep }}"score_threshold": {{ toJson .score_threshold }}{{- $sep = "," -}}{{ end }} + + {{- if .source }}{{ $sep }}"source": {{ toJson .source }}{{- $sep = "," -}}{{ end }} + + {{- if .source_params }}{{ $sep }}"source_params": {{ if eq (kindOf .source_params) "string" }}{{ .source_params }}{{ else }}{{ toJson .source_params }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .sync_interval }}{{ $sep }}"sync_interval": {{ toJson .sync_interval }}{{- $sep = "," -}}{{ end }} + + {{- if .token_id }}{{ $sep }}"token_id": {{ toJson .token_id }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' delete_by_account: operation: $ref: '#/paths/~1accounts~1{account_id}~1ai-search~1instances~1{id}/delete' @@ -15520,6 +15587,77 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ai_gateway_id }}{{ $sep }}"ai_gateway_id": {{ toJson .ai_gateway_id }}{{- $sep = "," -}}{{ end }} + + {{- if .ai_search_model }}{{ $sep }}"ai_search_model": {{ toJson .ai_search_model }}{{- $sep = "," -}}{{ end }} + + {{- if .cache }}{{ $sep }}"cache": {{ toJson .cache }}{{- $sep = "," -}}{{ end }} + + {{- if .cache_threshold }}{{ $sep }}"cache_threshold": {{ toJson .cache_threshold }}{{- $sep = "," -}}{{ end }} + + {{- if .chunk }}{{ $sep }}"chunk": {{ toJson .chunk }}{{- $sep = "," -}}{{ end }} + + {{- if .chunk_overlap }}{{ $sep }}"chunk_overlap": {{ toJson .chunk_overlap }}{{- $sep = "," -}}{{ end }} + + {{- if .chunk_size }}{{ $sep }}"chunk_size": {{ toJson .chunk_size }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_metadata }}{{ $sep }}"custom_metadata": {{ if eq (kindOf .custom_metadata) "string" }}{{ .custom_metadata }}{{ else }}{{ toJson .custom_metadata }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .embedding_model }}{{ $sep }}"embedding_model": {{ toJson .embedding_model }}{{- $sep = "," -}}{{ end }} + + {{- if .fusion_method }}{{ $sep }}"fusion_method": {{ toJson .fusion_method }}{{- $sep = "," -}}{{ end }} + + {{- if .index_method }}{{ $sep }}"index_method": {{ if eq (kindOf .index_method) "string" }}{{ .index_method }}{{ else }}{{ toJson .index_method }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .indexing_options }}{{ $sep }}"indexing_options": {{ if eq (kindOf .indexing_options) "string" }}{{ .indexing_options }}{{ else }}{{ toJson .indexing_options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .max_num_results }}{{ $sep }}"max_num_results": {{ toJson .max_num_results }}{{- $sep = "," -}}{{ end }} + + {{- if .metadata }}{{ $sep }}"metadata": {{ if eq (kindOf .metadata) "string" }}{{ .metadata }}{{ else }}{{ toJson .metadata }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .paused }}{{ $sep }}"paused": {{ toJson .paused }}{{- $sep = "," -}}{{ end }} + + {{- if .public_endpoint_params }}{{ $sep }}"public_endpoint_params": {{ if eq (kindOf .public_endpoint_params) "string" }}{{ .public_endpoint_params }}{{ else }}{{ toJson .public_endpoint_params }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .reranking }}{{ $sep }}"reranking": {{ toJson .reranking }}{{- $sep = "," -}}{{ end }} + + {{- if .reranking_model }}{{ $sep }}"reranking_model": {{ toJson .reranking_model }}{{- $sep = "," -}}{{ end }} + + {{- if .retrieval_options }}{{ $sep }}"retrieval_options": {{ if eq (kindOf .retrieval_options) "string" }}{{ .retrieval_options }}{{ else }}{{ toJson .retrieval_options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .rewrite_model }}{{ $sep }}"rewrite_model": {{ toJson .rewrite_model }}{{- $sep = "," -}}{{ end }} + + {{- if .rewrite_query }}{{ $sep }}"rewrite_query": {{ toJson .rewrite_query }}{{- $sep = "," -}}{{ end }} + + {{- if .score_threshold }}{{ $sep }}"score_threshold": {{ toJson .score_threshold }}{{- $sep = "," -}}{{ end }} + + {{- if .source_params }}{{ $sep }}"source_params": {{ if eq (kindOf .source_params) "string" }}{{ .source_params }}{{ else }}{{ toJson .source_params }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .summarization }}{{ $sep }}"summarization": {{ toJson .summarization }}{{- $sep = "," -}}{{ end }} + + {{- if .summarization_model }}{{ $sep }}"summarization_model": {{ toJson .summarization_model }}{{- $sep = "," -}}{{ end }} + + {{- if .sync_interval }}{{ $sep }}"sync_interval": {{ toJson .sync_interval }}{{- $sep = "," -}}{{ end }} + + {{- if .system_prompt_ai_search }}{{ $sep }}"system_prompt_ai_search": {{ toJson .system_prompt_ai_search }}{{- $sep = "," -}}{{ end }} + + {{- if .system_prompt_index_summarization }}{{ $sep }}"system_prompt_index_summarization": {{ toJson .system_prompt_index_summarization }}{{- $sep = "," -}}{{ end }} + + {{- if .system_prompt_rewrite_query }}{{ $sep }}"system_prompt_rewrite_query": {{ toJson .system_prompt_rewrite_query }}{{- $sep = "," -}}{{ end }} + + {{- if .token_id }}{{ $sep }}"token_id": {{ toJson .token_id }}{{- $sep = "," -}}{{ end }} + + } + + ' ai_search_move_instance: config: requestBodyTranslate: @@ -15554,6 +15692,25 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ai_search_options }}{{ $sep }}"ai_search_options": {{ if eq (kindOf .ai_search_options) "string" }}{{ .ai_search_options }}{{ else }}{{ toJson .ai_search_options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .model }}{{ $sep }}"model": {{ toJson .model }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + } + + ' chat_completions: config: requestBodyTranslate: @@ -15563,6 +15720,25 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ai_search_options }}{{ $sep }}"ai_search_options": {{ if eq (kindOf .ai_search_options) "string" }}{{ .ai_search_options }}{{ else }}{{ toJson .ai_search_options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .model }}{{ $sep }}"model": {{ toJson .model }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: [] insert: @@ -15661,6 +15837,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ai_search_options }}{{ $sep }}"ai_search_options": {{ if eq (kindOf .ai_search_options) "string" }}{{ .ai_search_options }}{{ else }}{{ toJson .ai_search_options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .query }}{{ $sep }}"query": {{ toJson .query }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: [] insert: @@ -15762,6 +15955,73 @@ components: response: mediaType: application/json openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ai_gateway_id }}{{ $sep }}"ai_gateway_id": {{ toJson .ai_gateway_id }}{{- $sep = "," -}}{{ end }} + + {{- if .ai_search_model }}{{ $sep }}"ai_search_model": {{ toJson .ai_search_model }}{{- $sep = "," -}}{{ end }} + + {{- if .cache }}{{ $sep }}"cache": {{ toJson .cache }}{{- $sep = "," -}}{{ end }} + + {{- if .cache_threshold }}{{ $sep }}"cache_threshold": {{ toJson .cache_threshold }}{{- $sep = "," -}}{{ end }} + + {{- if .chunk }}{{ $sep }}"chunk": {{ toJson .chunk }}{{- $sep = "," -}}{{ end }} + + {{- if .chunk_overlap }}{{ $sep }}"chunk_overlap": {{ toJson .chunk_overlap }}{{- $sep = "," -}}{{ end }} + + {{- if .chunk_size }}{{ $sep }}"chunk_size": {{ toJson .chunk_size }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_metadata }}{{ $sep }}"custom_metadata": {{ if eq (kindOf .custom_metadata) "string" }}{{ .custom_metadata }}{{ else }}{{ toJson .custom_metadata }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .embedding_model }}{{ $sep }}"embedding_model": {{ toJson .embedding_model }}{{- $sep = "," -}}{{ end }} + + {{- if .fusion_method }}{{ $sep }}"fusion_method": {{ toJson .fusion_method }}{{- $sep = "," -}}{{ end }} + + {{- if .hybrid_search_enabled }}{{ $sep }}"hybrid_search_enabled": {{ toJson .hybrid_search_enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .id }}{{ $sep }}"id": {{ toJson .id }}{{- $sep = "," -}}{{ end }} + + {{- if .index_method }}{{ $sep }}"index_method": {{ if eq (kindOf .index_method) "string" }}{{ .index_method }}{{ else }}{{ toJson .index_method }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .indexing_options }}{{ $sep }}"indexing_options": {{ if eq (kindOf .indexing_options) "string" }}{{ .indexing_options }}{{ else }}{{ toJson .indexing_options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .max_num_results }}{{ $sep }}"max_num_results": {{ toJson .max_num_results }}{{- $sep = "," -}}{{ end }} + + {{- if .metadata }}{{ $sep }}"metadata": {{ if eq (kindOf .metadata) "string" }}{{ .metadata }}{{ else }}{{ toJson .metadata }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .public_endpoint_params }}{{ $sep }}"public_endpoint_params": {{ if eq (kindOf .public_endpoint_params) "string" }}{{ .public_endpoint_params }}{{ else }}{{ toJson .public_endpoint_params }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .reranking }}{{ $sep }}"reranking": {{ toJson .reranking }}{{- $sep = "," -}}{{ end }} + + {{- if .reranking_model }}{{ $sep }}"reranking_model": {{ toJson .reranking_model }}{{- $sep = "," -}}{{ end }} + + {{- if .retrieval_options }}{{ $sep }}"retrieval_options": {{ if eq (kindOf .retrieval_options) "string" }}{{ .retrieval_options }}{{ else }}{{ toJson .retrieval_options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .rewrite_model }}{{ $sep }}"rewrite_model": {{ toJson .rewrite_model }}{{- $sep = "," -}}{{ end }} + + {{- if .rewrite_query }}{{ $sep }}"rewrite_query": {{ toJson .rewrite_query }}{{- $sep = "," -}}{{ end }} + + {{- if .score_threshold }}{{ $sep }}"score_threshold": {{ toJson .score_threshold }}{{- $sep = "," -}}{{ end }} + + {{- if .source }}{{ $sep }}"source": {{ toJson .source }}{{- $sep = "," -}}{{ end }} + + {{- if .source_params }}{{ $sep }}"source_params": {{ if eq (kindOf .source_params) "string" }}{{ .source_params }}{{ else }}{{ toJson .source_params }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .sync_interval }}{{ $sep }}"sync_interval": {{ toJson .sync_interval }}{{- $sep = "," -}}{{ end }} + + {{- if .token_id }}{{ $sep }}"token_id": {{ toJson .token_id }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' delete_by_account: operation: $ref: '#/paths/~1accounts~1{account_id}~1ai-search~1namespaces~1{name}~1instances~1{id}/delete' @@ -15784,6 +16044,77 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ai_gateway_id }}{{ $sep }}"ai_gateway_id": {{ toJson .ai_gateway_id }}{{- $sep = "," -}}{{ end }} + + {{- if .ai_search_model }}{{ $sep }}"ai_search_model": {{ toJson .ai_search_model }}{{- $sep = "," -}}{{ end }} + + {{- if .cache }}{{ $sep }}"cache": {{ toJson .cache }}{{- $sep = "," -}}{{ end }} + + {{- if .cache_threshold }}{{ $sep }}"cache_threshold": {{ toJson .cache_threshold }}{{- $sep = "," -}}{{ end }} + + {{- if .chunk }}{{ $sep }}"chunk": {{ toJson .chunk }}{{- $sep = "," -}}{{ end }} + + {{- if .chunk_overlap }}{{ $sep }}"chunk_overlap": {{ toJson .chunk_overlap }}{{- $sep = "," -}}{{ end }} + + {{- if .chunk_size }}{{ $sep }}"chunk_size": {{ toJson .chunk_size }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_metadata }}{{ $sep }}"custom_metadata": {{ if eq (kindOf .custom_metadata) "string" }}{{ .custom_metadata }}{{ else }}{{ toJson .custom_metadata }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .embedding_model }}{{ $sep }}"embedding_model": {{ toJson .embedding_model }}{{- $sep = "," -}}{{ end }} + + {{- if .fusion_method }}{{ $sep }}"fusion_method": {{ toJson .fusion_method }}{{- $sep = "," -}}{{ end }} + + {{- if .index_method }}{{ $sep }}"index_method": {{ if eq (kindOf .index_method) "string" }}{{ .index_method }}{{ else }}{{ toJson .index_method }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .indexing_options }}{{ $sep }}"indexing_options": {{ if eq (kindOf .indexing_options) "string" }}{{ .indexing_options }}{{ else }}{{ toJson .indexing_options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .max_num_results }}{{ $sep }}"max_num_results": {{ toJson .max_num_results }}{{- $sep = "," -}}{{ end }} + + {{- if .metadata }}{{ $sep }}"metadata": {{ if eq (kindOf .metadata) "string" }}{{ .metadata }}{{ else }}{{ toJson .metadata }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .paused }}{{ $sep }}"paused": {{ toJson .paused }}{{- $sep = "," -}}{{ end }} + + {{- if .public_endpoint_params }}{{ $sep }}"public_endpoint_params": {{ if eq (kindOf .public_endpoint_params) "string" }}{{ .public_endpoint_params }}{{ else }}{{ toJson .public_endpoint_params }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .reranking }}{{ $sep }}"reranking": {{ toJson .reranking }}{{- $sep = "," -}}{{ end }} + + {{- if .reranking_model }}{{ $sep }}"reranking_model": {{ toJson .reranking_model }}{{- $sep = "," -}}{{ end }} + + {{- if .retrieval_options }}{{ $sep }}"retrieval_options": {{ if eq (kindOf .retrieval_options) "string" }}{{ .retrieval_options }}{{ else }}{{ toJson .retrieval_options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .rewrite_model }}{{ $sep }}"rewrite_model": {{ toJson .rewrite_model }}{{- $sep = "," -}}{{ end }} + + {{- if .rewrite_query }}{{ $sep }}"rewrite_query": {{ toJson .rewrite_query }}{{- $sep = "," -}}{{ end }} + + {{- if .score_threshold }}{{ $sep }}"score_threshold": {{ toJson .score_threshold }}{{- $sep = "," -}}{{ end }} + + {{- if .source_params }}{{ $sep }}"source_params": {{ if eq (kindOf .source_params) "string" }}{{ .source_params }}{{ else }}{{ toJson .source_params }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .summarization }}{{ $sep }}"summarization": {{ toJson .summarization }}{{- $sep = "," -}}{{ end }} + + {{- if .summarization_model }}{{ $sep }}"summarization_model": {{ toJson .summarization_model }}{{- $sep = "," -}}{{ end }} + + {{- if .sync_interval }}{{ $sep }}"sync_interval": {{ toJson .sync_interval }}{{- $sep = "," -}}{{ end }} + + {{- if .system_prompt_ai_search }}{{ $sep }}"system_prompt_ai_search": {{ toJson .system_prompt_ai_search }}{{- $sep = "," -}}{{ end }} + + {{- if .system_prompt_index_summarization }}{{ $sep }}"system_prompt_index_summarization": {{ toJson .system_prompt_index_summarization }}{{- $sep = "," -}}{{ end }} + + {{- if .system_prompt_rewrite_query }}{{ $sep }}"system_prompt_rewrite_query": {{ toJson .system_prompt_rewrite_query }}{{- $sep = "," -}}{{ end }} + + {{- if .token_id }}{{ $sep }}"token_id": {{ toJson .token_id }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/namespace_instances/methods/get_by_account' @@ -15809,6 +16140,25 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ai_search_options }}{{ $sep }}"ai_search_options": {{ if eq (kindOf .ai_search_options) "string" }}{{ .ai_search_options }}{{ else }}{{ toJson .ai_search_options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .model }}{{ $sep }}"model": {{ toJson .model }}{{- $sep = "," -}}{{ end }} + + {{- if .stream }}{{ $sep }}"stream": {{ toJson .stream }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: [] insert: @@ -16021,6 +16371,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ai_search_options }}{{ $sep }}"ai_search_options": {{ if eq (kindOf .ai_search_options) "string" }}{{ .ai_search_options }}{{ else }}{{ toJson .ai_search_options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .query }}{{ $sep }}"query": {{ toJson .query }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: [] insert: @@ -16061,6 +16428,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ai_search_options }}{{ $sep }}"ai_search_options": {{ if eq (kindOf .ai_search_options) "string" }}{{ .ai_search_options }}{{ else }}{{ toJson .ai_search_options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .query }}{{ $sep }}"query": {{ toJson .query }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: [] insert: diff --git a/providers/src/cloudflare/v00.00.00000/services/alerting.yaml b/providers/src/cloudflare/v00.00.00000/services/alerting.yaml index 731bfedc..21bacf73 100644 --- a/providers/src/cloudflare/v00.00.00000/services/alerting.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/alerting.yaml @@ -1,3040 +1,2983 @@ -openapi: 3.0.3 -info: - title: alerting API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/alerting/v3/available_alerts: - get: - description: Gets a list of all alert types for which an account is eligible. - operationId: notification-alert-types-get-alert-types - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/aaaAlertsResponseCollection' - description: Get Alert Types response - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/aaaComponentsSchemasApiResponseCommonFailure - description: Get Alert Types response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Alert Types - tags: - - Notification Alert Types - x-api-token-group: - - 'Zero Trust: PII Read' - - Notifications Write - - Notifications Read - - Account Settings Write - - Account Settings Read - x-stackql-sdk: - service: alerting - resource_chain: - - available_alerts - method: list - /accounts/{account_id}/alerting/v3/destinations/eligible: - get: - description: >- - Get a list of all delivery mechanism types for which an account is - eligible. - operationId: notification-mechanism-eligibility-get-delivery-mechanism-eligibility - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/aaaSchemasResponseCollection' - description: Get delivery mechanism eligibility response - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/aaaComponentsSchemasApiResponseCommonFailure - description: Get delivery mechanism eligibility response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get delivery mechanism eligibility - tags: - - Notification Mechanism Eligibility - x-stackql-sdk: - service: alerting - resource_chain: - - destinations - - eligible - method: get - /accounts/{account_id}/alerting/v3/destinations/pagerduty: - delete: - description: Deletes all the PagerDuty Services connected to the account. - operationId: notification-destinations-with-pager-duty-delete-pager-duty-services - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/aaaSchemasApiResponseCommon' - description: Delete PagerDuty Services response - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/aaaComponentsSchemasApiResponseCommonFailure - description: Delete PagerDuty Services response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete PagerDuty Services - tags: - - Notification destinations with PagerDuty - x-api-token-group: - - Notifications Write - - Account Settings Write - x-stackql-sdk: - service: alerting - resource_chain: - - destinations - - pagerduty - method: delete - get: - description: Get a list of all configured PagerDuty services. - operationId: notification-destinations-with-pager-duty-list-pager-duty-services - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/aaaComponentsSchemasResponseCollection' - description: List PagerDuty services response - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/aaaComponentsSchemasApiResponseCommonFailure - description: List PagerDuty services response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List PagerDuty services - tags: - - Notification destinations with PagerDuty - x-api-token-group: - - 'Zero Trust: PII Read' - - Notifications Write - - Notifications Read - - Account Settings Write - - Account Settings Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: alerting - resource_chain: - - destinations - - pagerduty - method: get - /accounts/{account_id}/alerting/v3/destinations/pagerduty/connect: - post: - description: Creates a new token for integrating with PagerDuty. - operationId: notification-destinations-with-pager-duty-connect-pager-duty - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/aaaSensitiveIdResponse' - description: Token for PagerDuty integration - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - result: - properties: - id: - $ref: '#/components/schemas/aaaUuid' - type: object - required: - - success - - errors - - messages - - success - - errors - - messages - description: Create a token for PagerDuty integration failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create PagerDuty integration token - tags: - - Notification destinations with PagerDuty - x-api-token-group: - - Notifications Write - - Account Settings Write - x-stackql-sdk: - service: alerting - resource_chain: - - destinations - - pagerduty - method: create - /accounts/{account_id}/alerting/v3/destinations/pagerduty/connect/{token_id}: - get: - description: Links PagerDuty with the account using the integration token. - operationId: notification-destinations-with-pager-duty-connect-pager-duty-token - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: token_id - in: path - required: true - description: The API token ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/aaaIdResponse' - description: Create a Notification policy response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - result: - properties: - id: - $ref: '#/components/schemas/aaaUuid' - type: object - required: - - success - - errors - - messages - - success - - errors - - messages - description: Create a Notification policy response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Connect PagerDuty - tags: - - Notification destinations with PagerDuty - x-api-token-group: - - Notifications Write - - Account Settings Write - x-stackql-sdk: - service: alerting - resource_chain: - - destinations - - pagerduty - method: link - /accounts/{account_id}/alerting/v3/destinations/webhooks: - get: - description: Gets a list of all configured webhook destinations. - operationId: notification-webhooks-list-webhooks - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/aaaWebhooksComponentsSchemasResponseCollection - description: List webhooks response - 4XX: - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - result: - items: - $ref: '#/components/schemas/aaaWebhooks' - type: array - required: - - success - - errors - - messages - - success - - errors - - messages - type: object - description: List webhooks response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List webhooks - tags: - - Notification webhooks - x-api-token-group: - - 'Zero Trust: PII Read' - - Notifications Write - - Notifications Read - - Account Settings Write - - Account Settings Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: alerting - resource_chain: - - destinations - - webhooks - method: list - post: - description: Creates a new webhook destination. - operationId: notification-webhooks-create-a-webhook - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - name: - $ref: '#/components/schemas/aaaComponentsSchemasName' - secret: - $ref: '#/components/schemas/aaaSecret' - url: - $ref: '#/components/schemas/aaaUrl' - required: - - name - - url - type: object - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/aaaIdResponse' - description: Create a webhook response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - result: - properties: - id: - $ref: '#/components/schemas/aaaUuid' - type: object - required: - - success - - errors - - messages - - success - - errors - - messages - description: Create a webhook response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a webhook - tags: - - Notification webhooks - x-api-token-group: - - Notifications Write - - Account Settings Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: alerting - resource_chain: - - destinations - - webhooks - method: create - /accounts/{account_id}/alerting/v3/destinations/webhooks/{webhook_id}: - delete: - description: Delete a configured webhook destination. - operationId: notification-webhooks-delete-a-webhook - parameters: - - in: path - name: webhook_id - schema: - $ref: '#/components/schemas/aaaWebhookId' - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/aaaSchemasApiResponseCommon' - description: Delete a webhook response - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/aaaComponentsSchemasApiResponseCommonFailure - description: Delete a webhook response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete a webhook - tags: - - Notification webhooks - x-api-token-group: - - Notifications Write - - Account Settings Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: alerting - resource_chain: - - destinations - - webhooks - method: delete - get: - description: Get details for a single webhooks destination. - operationId: notification-webhooks-get-a-webhook - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: webhook_id - schema: - $ref: '#/components/schemas/aaaWebhookId' - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/aaaSchemasSingleResponse' - description: Get a webhook response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - result: - $ref: '#/components/schemas/aaaWebhooks' - required: - - success - - errors - - messages - - success - - errors - - messages - description: Get a webhook response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get a webhook - tags: - - Notification webhooks - x-api-token-group: - - 'Zero Trust: PII Read' - - Notifications Write - - Notifications Read - - Account Settings Write - - Account Settings Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: alerting - resource_chain: - - destinations - - webhooks - method: get - put: - description: Update a webhook destination. - operationId: notification-webhooks-update-a-webhook - parameters: - - in: path - name: webhook_id - schema: - $ref: '#/components/schemas/aaaWebhookId' - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - name: - $ref: '#/components/schemas/aaaComponentsSchemasName' - secret: - $ref: '#/components/schemas/aaaSecret' - url: - $ref: '#/components/schemas/aaaUrl' - required: - - name - - url - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/aaaIdResponse' - description: Update a webhook response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - result: - properties: - id: - $ref: '#/components/schemas/aaaUuid' - type: object - required: - - success - - errors - - messages - - success - - errors - - messages - description: Update a webhook response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update a webhook - tags: - - Notification webhooks - x-api-token-group: - - Notifications Write - - Account Settings Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: alerting - resource_chain: - - destinations - - webhooks - method: update - /accounts/{account_id}/alerting/v3/history: - get: - description: >- - Gets a list of history records for notifications sent to an account. The - records are displayed for last `x` number of days based on the zone plan - (free = 30, pro = 30, biz = 30, ent = 90). - operationId: notification-history-list-history - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: per_page - schema: - $ref: '#/components/schemas/aaaPerPage' - - in: query - name: before - schema: - $ref: '#/components/schemas/aaaBefore' - - in: query - name: page - schema: - default: 1 - description: Page number of paginated results. - minimum: 1 - type: number - - in: query - name: since - schema: - description: >- - Limit the returned results to history records newer than the - specified date. This must be a timestamp that conforms to RFC3339. - format: date-time - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/aaaHistoryComponentsSchemasResponseCollection - description: List History response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/aaaSchemasResultInfo' - type: object - result: - items: - $ref: '#/components/schemas/aaaHistory' - type: array - required: - - success - - errors - - messages - - success - - errors - - messages - description: List History response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List History - tags: - - Notification History - x-api-token-group: - - 'Zero Trust: PII Read' - - Notifications Write - - Notifications Read - - Account Settings Write - - Account Settings Read - x-stackql-sdk: - service: alerting - resource_chain: - - history - method: list - /accounts/{account_id}/alerting/v3/policies: - get: - description: Get a list of all Notification policies. - operationId: notification-policies-list-notification-policies - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/aaaPoliciesComponentsSchemasResponseCollection - description: List Notification policies response - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/aaaComponentsSchemasApiResponseCommonFailure - description: List Notification policies response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Notification policies - tags: - - Notification policies - x-api-token-group: - - 'Zero Trust: PII Read' - - Notifications Write - - Notifications Read - - Account Settings Write - - Account Settings Read - x-stackql-sdk: - service: alerting - resource_chain: - - policies - method: list - post: - description: Creates a new Notification policy. - operationId: notification-policies-create-a-notification-policy - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - alert_interval: - $ref: '#/components/schemas/aaaAlertInterval' - alert_type: - $ref: '#/components/schemas/aaaAlertType' - description: - $ref: '#/components/schemas/aaaSchemasDescription' - enabled: - $ref: '#/components/schemas/aaaEnabled' - filters: - $ref: '#/components/schemas/aaaFilters' - mechanisms: - $ref: '#/components/schemas/aaaMechanisms' - name: - $ref: '#/components/schemas/aaaSchemasName' - required: - - name - - alert_type - - enabled - - mechanisms - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/aaaIdResponse' - description: Create a Notification policy response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - result: - properties: - id: - $ref: '#/components/schemas/aaaUuid' - type: object - required: - - success - - errors - - messages - - success - - errors - - messages - description: Create a Notification policy response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a Notification policy - tags: - - Notification policies - x-api-token-group: - - Notifications Write - - Account Settings Write - x-stackql-sdk: - service: alerting - resource_chain: - - policies - method: create - /accounts/{account_id}/alerting/v3/policies/{policy_id}: - delete: - description: Delete a Notification policy. - operationId: notification-policies-delete-a-notification-policy - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: policy_id - in: path - required: true - description: The Access policy ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/aaaApiResponseCollection' - description: Delete a Notification policy response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/aaaSchemasResultInfo' - required: - - success - - errors - - messages - - success - - errors - - messages - description: Delete a Notification policy response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete a Notification policy - tags: - - Notification policies - x-api-token-group: - - Notifications Write - - Account Settings Write - x-stackql-sdk: - service: alerting - resource_chain: - - policies - method: delete - get: - description: Get details for a single policy. - operationId: notification-policies-get-a-notification-policy - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: policy_id - in: path - required: true - description: The Access policy ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/aaaSingleResponse' - description: Get a Notification policy response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - result: - $ref: '#/components/schemas/aaaPolicies' - required: - - success - - errors - - messages - - success - - errors - - messages - description: Get a Notification policy response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get a Notification policy - tags: - - Notification policies - x-api-token-group: - - 'Zero Trust: PII Read' - - Notifications Write - - Notifications Read - - Account Settings Write - - Account Settings Read - x-stackql-sdk: - service: alerting - resource_chain: - - policies - method: get - put: - description: Update a Notification policy. - operationId: notification-policies-update-a-notification-policy - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: policy_id - in: path - required: true - description: The Access policy ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - alert_interval: - $ref: '#/components/schemas/aaaAlertInterval' - alert_type: - $ref: '#/components/schemas/aaaAlertType' - description: - $ref: '#/components/schemas/aaaSchemasDescription' - enabled: - $ref: '#/components/schemas/aaaEnabled' - filters: - $ref: '#/components/schemas/aaaFilters' - mechanisms: - $ref: '#/components/schemas/aaaMechanisms' - name: - $ref: '#/components/schemas/aaaSchemasName' - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/aaaIdResponse' - description: Update a Notification policy response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - result: - properties: - id: - $ref: '#/components/schemas/aaaUuid' - type: object - required: - - success - - errors - - messages - - success - - errors - - messages - description: Update a Notification policy response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update a Notification policy - tags: - - Notification policies - x-api-token-group: - - Notifications Write - - Account Settings Write - x-stackql-sdk: - service: alerting - resource_chain: - - policies - method: update - /accounts/{account_id}/alerting/v3/policies/{policy_id}/email/unsubscribe: - get: - description: >- - Shows details for unsubscribing an email address from a notification - policy. - operationId: notification-policies-show-email-unsubscribe-details - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: policy_id - in: path - required: true - description: The Access policy ID. - schema: - type: string - - in: query - name: email - schema: - format: email - type: string - - in: query - name: token - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/aaaUnsubscribeEmailSingleResponse' - text/html: - schema: - type: string - description: Show email unsubscribe details response - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/aaaComponentsSchemasApiResponseCommonFailure - description: Show email unsubscribe details response failure - security: [] - summary: Show email unsubscribe details - tags: - - Notification policies - x-api-token-group: - - 'Zero Trust: PII Read' - - Notifications Write - - Notifications Read - - Account Settings Write - - Account Settings Read - post: - description: Unsubscribes an email address from a notification policy. - operationId: notification-policies-unsubscribe-email-from-notification-policy - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: policy_id - in: path - required: true - description: The Access policy ID. - schema: - type: string - - in: query - name: email - schema: - format: email - type: string - - in: query - name: token - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/aaaUnsubscribeEmailPostSingleResponse' - text/html: - schema: - type: string - description: Unsubscribe email from Notification policy response - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/aaaComponentsSchemasApiResponseCommonFailure - description: Unsubscribe email from Notification policy response failure - security: [] - summary: Unsubscribe email from a Notification policy - tags: - - Notification policies - /accounts/{account_id}/alerting/v3/silences: - get: - description: Gets a list of silences for an account. - operationId: notification-silences-list-silences - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/aaaSilencesComponentsSchemasResponseCollection - description: List Silences response - 4XX: - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - result: - items: - $ref: '#/components/schemas/aaaSilence' - type: array - required: - - success - - errors - - messages - - success - - errors - - messages - type: object - description: List Silences response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Silences - tags: - - Notification Silences - x-api-token-group: - - 'Zero Trust: PII Read' - - Notifications Write - - Notifications Read - - Account Settings Write - - Account Settings Read - x-stackql-sdk: - service: alerting - resource_chain: - - silences - method: update - post: - description: Creates a new silence for an account. - operationId: notification-silences-create-silences - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - items: - $ref: '#/components/schemas/aaaSilenceCreateRequest' - type: array - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/aaaSchemasApiResponseCommon' - description: Create Silences response - 4XX: - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - result: - items: - $ref: '#/components/schemas/aaaSilence' - type: array - required: - - success - - errors - - messages - - success - - errors - - messages - type: object - description: Create Silences response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Silences - tags: - - Notification Silences - x-api-token-group: - - Notifications Write - - Account Settings Write - x-stackql-sdk: - service: alerting - resource_chain: - - silences - method: create - put: - description: Updates existing silences for an account. - operationId: notification-silences-update-silences - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - items: - $ref: '#/components/schemas/aaaSilenceUpdateRequest' - type: array - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/aaaSilencesComponentsSchemasResponseCollection - description: Update Silences response - 4XX: - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - result: - items: - $ref: '#/components/schemas/aaaSilence' - type: array - required: - - success - - errors - - messages - - success - - errors - - messages - type: object - description: Update Silences response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Silences - tags: - - Notification Silences - x-api-token-group: - - Notifications Write - - Account Settings Write - /accounts/{account_id}/alerting/v3/silences/{silence_id}: - delete: - description: Deletes an existing silence for an account. - operationId: notification-silences-delete-silences - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: silence_id - schema: - $ref: '#/components/schemas/aaaSilenceId' - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/aaaSchemasApiResponseCommon' - description: Delete Silence response - 4XX: - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - result: - $ref: '#/components/schemas/aaaSilence' - required: - - success - - errors - - messages - - success - - errors - - messages - type: object - description: Delete Silence response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Silence - tags: - - Notification Silences - x-api-token-group: - - Notifications Write - - Account Settings Write - x-stackql-sdk: - service: alerting - resource_chain: - - silences - method: delete - get: - description: Gets a specific silence for an account. - operationId: notification-silences-get-silence - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: silence_id - schema: - $ref: '#/components/schemas/aaaSilenceId' - required: true - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/aaaSilenceComponentsSchemasResponseCollection - description: Get Silence response - 4XX: - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - result: - $ref: '#/components/schemas/aaaSilence' - required: - - success - - errors - - messages - - success - - errors - - messages - type: object - description: Get Silence response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Silence - tags: - - Notification Silences - x-api-token-group: - - 'Zero Trust: PII Read' - - Notifications Write - - Notifications Read - - Account Settings Write - - Account Settings Read - x-stackql-sdk: - service: alerting - resource_chain: - - silences - method: get -components: - schemas: - aaaAccountId: - description: The account id - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - readOnly: true - type: string - x-auditable: true - aaaAlertBody: - description: Message body included in the notification sent. - example: SSL certificate has expired - type: string - aaaAlertInterval: - description: >- - Optional specification of how often to re-alert from the same incident, - not support on all alert types. - example: 30m - type: string - x-auditable: true - aaaAlertType: - description: >- - Refers to which event will trigger a Notification dispatch. You can use - the endpoint to get available alert types which then will give you a - list of possible values. - enum: - - abuse_report_alert - - access_custom_certificate_expiration_type - - advanced_ddos_attack_l4_alert - - advanced_ddos_attack_l7_alert - - advanced_http_alert_error - - bgp_hijack_notification - - billing_usage_alert - - block_notification_block_removed - - block_notification_new_block - - block_notification_review_rejected - - bot_traffic_basic_alert - - brand_protection_alert - - brand_protection_digest - - clickhouse_alert_fw_anomaly - - clickhouse_alert_fw_ent_anomaly - - cloudforce_one_request_notification - - cni_maintenance_notification - - custom_analytics - - custom_bot_detection_alert - - custom_ssl_certificate_event_type - - dedicated_ssl_certificate_event_type - - device_connectivity_anomaly_alert - - dos_attack_l4 - - dos_attack_l7 - - expiring_service_token_alert - - failing_logpush_job_disabled_alert - - fbm_auto_advertisement - - fbm_dosd_attack - - fbm_volumetric_attack - - health_check_status_notification - - hostname_aop_custom_certificate_expiration_type - - http_alert_edge_error - - http_alert_origin_error - - image_notification - - image_resizing_notification - - incident_alert - - load_balancing_health_alert - - load_balancing_pool_enablement_alert - - logo_match_alert - - magic_tunnel_health_check_event - - magic_wan_tunnel_health - - maintenance_event_notification - - mtls_certificate_store_certificate_expiration_type - - pages_event_alert - - radar_notification - - real_origin_monitoring - - scriptmonitor_alert_new_code_change_detections - - scriptmonitor_alert_new_hosts - - scriptmonitor_alert_new_malicious_hosts - - scriptmonitor_alert_new_malicious_scripts - - scriptmonitor_alert_new_malicious_url - - scriptmonitor_alert_new_max_length_resource_url - - scriptmonitor_alert_new_resources - - secondary_dns_all_primaries_failing - - secondary_dns_primaries_failing - - secondary_dns_warning - - secondary_dns_zone_successfully_updated - - secondary_dns_zone_validation_warning - - security_insights_alert - - sentinel_alert - - stream_live_notifications - - synthetic_test_latency_alert - - synthetic_test_low_availability_alert - - traffic_anomalies_alert - - tunnel_health_event - - tunnel_update_event - - universal_ssl_event_type - - web_analytics_metrics_update - - zone_aop_custom_certificate_expiration_type - example: universal_ssl_event_type - type: string - x-auditable: true - aaaAlertsResponseCollection: - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - result: - example: - Origin Monitoring: - - description: High levels of 5xx HTTP errors at your origin. - display_name: Origin Error Rate Alert - filter_options: - - AvailableValues: null - ComparisonOperator: '==' - Key: zones - Range: 1-n - - AvailableValues: - - Description: Service-Level Objective of 99.7 - ID: '99.7' - - Description: Service-Level Objective of 99.8 - ID: '99.8' - ComparisonOperator: '>=' - Key: slo - Range: 0-1 - type: http_alert_origin_error - type: object - required: - - success - - errors - - messages - type: object - aaaApiResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/aaaSchemasResultInfo' - required: - - success - - errors - - messages - aaaBefore: - description: >- - Limit the returned results to history records older than the specified - date. This must be a timestamp that conforms to RFC3339. - example: '2022-05-20T20:29:58.679897Z' - format: date-time - type: string - aaaComponentsSchemasApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - example: [] - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - type: object - aaaComponentsSchemasDescription: - description: Description of the notification policy (if present). - example: >- - Universal Certificate validation status, issuance, renewal, and - expiration notices - type: string - aaaComponentsSchemasMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - message: - type: string - required: - - message - type: object - uniqueItems: true - type: array - aaaComponentsSchemasName: - description: >- - The name of the webhook destination. This will be included in the - request body when you receive a webhook notification. - example: Slack Webhook - type: string - x-auditable: true - aaaComponentsSchemasResponseCollection: - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - result: - items: - $ref: '#/components/schemas/aaaPagerduty' - type: array - required: - - success - - errors - - messages - type: object - aaaComponentsSchemasType: - description: Type of webhook endpoint. - enum: - - datadog - - discord - - feishu - - gchat - - generic - - opsgenie - - slack - - splunk - example: slack - type: string - x-auditable: true - aaaCreatedAt: - description: Timestamp of when the webhook destination was created. - example: '2020-10-26T18:25:04.532316Z' - format: date-time - readOnly: true - type: string - x-auditable: true - aaaEnabled: - default: true - description: Whether or not the Notification policy is enabled. - example: true - type: boolean - x-auditable: true - aaaFilters: - description: >- - Optional filters that allow you to be alerted only on a subset of events - for that alert type based on some criteria. This is only available for - select alert types. See alert type documentation for more details. - example: - slo: - - '99.9' - properties: - actions: - description: Usage depends on specific alert type - items: - type: string - x-auditable: true - type: array - affected_asns: - description: Used for configuring radar_notification - items: - type: string - x-auditable: true - type: array - affected_components: - description: Used for configuring incident_alert - items: - type: string - x-auditable: true - type: array - affected_locations: - description: Used for configuring radar_notification - items: - type: string - x-auditable: true - type: array - airport_code: - description: Used for configuring maintenance_event_notification - items: - type: string - x-auditable: true - type: array - alert_trigger_preferences: - description: Usage depends on specific alert type - items: - type: string - x-auditable: true - type: array - alert_trigger_preferences_value: - description: Usage depends on specific alert type - items: - type: string - x-auditable: true - type: array - enabled: - description: Used for configuring load_balancing_pool_enablement_alert - items: - minItems: 1 - type: string - x-auditable: true - type: array - environment: - description: Used for configuring pages_event_alert - items: - minItems: 1 - type: string - x-auditable: true - type: array - event: - description: Used for configuring pages_event_alert - items: - minItems: 1 - type: string - x-auditable: true - type: array - event_source: - description: Used for configuring load_balancing_health_alert - items: - type: string - x-auditable: true - type: array - event_type: - description: Usage depends on specific alert type - items: - type: string - x-auditable: true - type: array - group_by: - description: Usage depends on specific alert type - items: - type: string - x-auditable: true - type: array - health_check_id: - description: Used for configuring health_check_status_notification - items: - type: string - x-auditable: true - type: array - incident_impact: - description: Used for configuring incident_alert - items: - enum: - - INCIDENT_IMPACT_NONE - - INCIDENT_IMPACT_MINOR - - INCIDENT_IMPACT_MAJOR - - INCIDENT_IMPACT_CRITICAL - type: string - x-auditable: true - type: array - input_id: - description: Used for configuring stream_live_notifications - items: - type: string - x-auditable: true - type: array - insight_class: - description: Used for configuring security_insights_alert - items: - type: string - x-auditable: true - type: array - limit: - description: Used for configuring billing_usage_alert - items: - minItems: 1 - type: string - x-auditable: true - type: array - logo_tag: - description: Used for configuring logo_match_alert - items: - type: string - x-auditable: true - type: array - megabits_per_second: - description: Used for configuring advanced_ddos_attack_l4_alert - items: - type: string - x-auditable: true - type: array - new_health: - description: Used for configuring load_balancing_health_alert - items: - type: string - x-auditable: true - type: array - new_status: - description: Used for configuring tunnel_health_event - items: - type: string - x-auditable: true - type: array - packets_per_second: - description: Used for configuring advanced_ddos_attack_l4_alert - items: - type: string - x-auditable: true - type: array - pool_id: - description: Usage depends on specific alert type - items: - type: string - x-auditable: true - type: array - pop_names: - description: Usage depends on specific alert type - items: - type: string - x-auditable: true - type: array - product: - description: Used for configuring billing_usage_alert - items: - minItems: 1 - type: string - x-auditable: true - type: array - project_id: - description: Used for configuring pages_event_alert - items: - minItems: 1 - type: string - x-auditable: true - type: array - protocol: - description: Used for configuring advanced_ddos_attack_l4_alert - items: - type: string - x-auditable: true - type: array - query_tag: - description: Usage depends on specific alert type - items: - type: string - x-auditable: true - type: array - requests_per_second: - description: Used for configuring advanced_ddos_attack_l7_alert - items: - type: string - x-auditable: true - type: array - selectors: - description: Usage depends on specific alert type - items: - type: string - x-auditable: true - type: array - services: - description: Used for configuring clickhouse_alert_fw_ent_anomaly - items: - minItems: 1 - type: string - x-auditable: true - type: array - slo: - description: Usage depends on specific alert type - items: - type: string - x-auditable: true - type: array - status: - description: Used for configuring health_check_status_notification - items: - minItems: 1 - type: string - x-auditable: true - type: array - target_hostname: - description: Used for configuring advanced_ddos_attack_l7_alert - items: - type: string - x-auditable: true - type: array - target_ip: - description: Used for configuring advanced_ddos_attack_l4_alert - items: - type: string - x-auditable: true - type: array - target_zone_name: - description: Used for configuring advanced_ddos_attack_l7_alert - items: - type: string - x-auditable: true - type: array - traffic_exclusions: - description: Used for configuring traffic_anomalies_alert - items: - enum: - - security_events - maxItems: 1 - type: string - x-auditable: true - type: array - tunnel_id: - description: Used for configuring tunnel_health_event - items: - type: string - x-auditable: true - type: array - tunnel_name: - description: Usage depends on specific alert type - items: - type: string - x-auditable: true - type: array - type: - description: Usage depends on specific alert type - items: - type: string - x-auditable: true - type: array - where: - description: Usage depends on specific alert type - items: - type: string - x-auditable: true - type: array - zones: - description: Usage depends on specific alert type - items: - type: string - x-auditable: true - type: array - type: object - aaaHistory: - properties: - alert_body: - $ref: '#/components/schemas/aaaAlertBody' - alert_type: - $ref: '#/components/schemas/aaaSchemasAlertType' - description: - $ref: '#/components/schemas/aaaComponentsSchemasDescription' - id: - $ref: '#/components/schemas/aaaUuid' - mechanism: - $ref: '#/components/schemas/aaaMechanism' - mechanism_type: - $ref: '#/components/schemas/aaaMechanismType' - name: - $ref: '#/components/schemas/aaaSchemasName' - policy_id: - $ref: '#/components/schemas/aaaPolicyId' - sent: - $ref: '#/components/schemas/aaaSent' - type: object - aaaHistoryComponentsSchemasResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/aaaSchemasResultInfo' - example: - count: 1 - page: 1 - per_page: 20 - type: object - result: - items: - $ref: '#/components/schemas/aaaHistory' - type: array - required: - - success - - errors - - messages - aaaIdResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - result: - properties: - id: - $ref: '#/components/schemas/aaaUuid' - type: object - required: - - success - - errors - - messages - aaaLastFailure: - description: >- - Timestamp of the last time an attempt to dispatch a notification to this - webhook failed. - example: '2020-10-26T18:25:04.532316Z' - format: date-time - readOnly: true - type: string - x-auditable: true - aaaLastSuccess: - description: >- - Timestamp of the last time Cloudflare was able to successfully dispatch - a notification using this webhook. - example: '2020-10-26T18:25:04.532316Z' - format: date-time - readOnly: true - type: string - x-auditable: true - aaaMechanism: - description: The mechanism to which the notification has been dispatched. - example: test@example.com - type: string - x-auditable: true - aaaMechanismType: - description: >- - The type of mechanism to which the notification has been dispatched. - This can be email/pagerduty/webhook based on the mechanism configured. - enum: - - email - - pagerduty - - webhook - example: email - type: string - aaaMechanisms: - description: >- - List of IDs that will be used when dispatching a notification. IDs for - email type will be the email address. - properties: - email: - items: - properties: - id: - description: The email address - type: string - x-auditable: true - type: object - type: array - pagerduty: - items: - properties: - id: - $ref: '#/components/schemas/aaaUuid' - type: object - type: array - webhooks: - items: - properties: - id: - $ref: '#/components/schemas/aaaUuid' - type: object - type: array - type: object - aaaName: - description: The name of the pagerduty service. - example: My PagerDuty Service - type: string - x-auditable: true - aaaPagerduty: - properties: - id: - $ref: '#/components/schemas/aaaUuid' - name: - $ref: '#/components/schemas/aaaName' - type: object - aaaPerPage: - default: 25 - description: Number of items per page. - maximum: 1000 - minimum: 5 - type: number - aaaPolicies: - properties: - alert_interval: - $ref: '#/components/schemas/aaaAlertInterval' - alert_type: - $ref: '#/components/schemas/aaaAlertType' - created: - $ref: '#/components/schemas/aaaTimestamp' - description: - $ref: '#/components/schemas/aaaSchemasDescription' - enabled: - $ref: '#/components/schemas/aaaEnabled' - filters: - $ref: '#/components/schemas/aaaFilters' - id: - $ref: '#/components/schemas/aaaPolicyId' - mechanisms: - $ref: '#/components/schemas/aaaMechanisms' - modified: - $ref: '#/components/schemas/aaaTimestamp' - name: - $ref: '#/components/schemas/aaaSchemasName' - type: object - aaaPoliciesComponentsSchemasResponseCollection: - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - result: - items: - $ref: '#/components/schemas/aaaPolicies' - type: array - required: - - success - - errors - - messages - type: object - aaaPolicyId: - description: The unique identifier of a notification policy - example: 0da2b59ef118439d8097bdfb215203c9 - maxLength: 32 - type: string - x-auditable: true - aaaSchemasAlertType: - description: Type of notification that has been dispatched. - example: universal_ssl_event_type - type: string - aaaSchemasApiResponseCommon: - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - type: object - aaaSchemasDescription: - description: Optional description for the Notification policy. - example: Something describing the policy. - type: string - x-auditable: true - aaaSchemasName: - description: Name of the policy. - example: SSL Notification Event Policy - type: string - x-auditable: true - aaaSchemasResponseCollection: - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - result: - type: object - required: - - success - - errors - - messages - type: object - aaaSchemasResultInfo: - properties: - count: - description: Total number of results for the requested service - example: 1 - type: number - page: - description: Current page within paginated list of results - example: 1 - type: number - per_page: - description: Number of results per page of results - example: 20 - type: number - total_count: - description: Total results available without any search parameters - example: 2000 - type: number - type: object - aaaSchemasSingleResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/aaaWebhooks' - required: - - success - - errors - - messages - aaaSecret: - description: >- - Optional secret that will be passed in the `cf-webhook-auth` header when - dispatching generic webhook notifications or formatted for supported - destinations. Secrets are not returned in any API response body. - type: string - writeOnly: true - x-sensitive: true - aaaSensitiveIdResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - result: - properties: - id: - $ref: '#/components/schemas/aaaToken' - type: object - required: - - success - - errors - - messages - aaaSent: - description: Timestamp of when the notification was dispatched in ISO 8601 format. - example: '2021-10-08T17:52:17.571336Z' - format: date-time - type: string - aaaSilence: - properties: - created_at: - description: When the silence was created. - example: '2022-01-01T00:00:00Z' - type: string - x-auditable: true - readOnly: true - end_time: - description: When the silence ends. - example: '2022-01-01T00:00:00Z' - type: string - x-auditable: true - id: - $ref: '#/components/schemas/aaaSilenceId' - policy_id: - $ref: '#/components/schemas/aaaPolicyId' - start_time: - description: When the silence starts. - example: '2022-01-01T00:00:00Z' - type: string - x-auditable: true - updated_at: - description: When the silence was modified. - example: '2022-01-01T00:00:00Z' - type: string - x-auditable: true - readOnly: true - type: object - aaaSilenceComponentsSchemasResponseCollection: - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/aaaSilence' - required: - - success - - errors - - messages - type: object - aaaSilenceCreateRequest: - properties: - end_time: - description: When the silence ends. - example: '2022-01-01T00:00:00Z' - type: string - x-auditable: true - policy_id: - $ref: '#/components/schemas/aaaPolicyId' - start_time: - description: When the silence starts. - example: '2022-01-01T00:00:00Z' - type: string - x-auditable: true - type: object - aaaSilenceId: - description: Silence ID - example: f878e90c23f44126ae3cfc399f646977 - maxLength: 32 - type: string - x-auditable: true - aaaSilenceUpdateRequest: - properties: - end_time: - description: When the silence ends. - example: '2022-01-01T00:00:00Z' - type: string - x-auditable: true - id: - $ref: '#/components/schemas/aaaSilenceId' - start_time: - description: When the silence starts. - example: '2022-01-01T00:00:00Z' - type: string - x-auditable: true - type: object - aaaSilencesComponentsSchemasResponseCollection: - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - result: - items: - $ref: '#/components/schemas/aaaSilence' - type: array - required: - - success - - errors - - messages - type: object - aaaSingleResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/aaaPolicies' - required: - - success - - errors - - messages - aaaTimestamp: - example: '2014-01-01T05:20:00.12345Z' - format: date-time - readOnly: true - type: string - x-auditable: true - aaaToken: - description: token in form of UUID - example: a313ba7d3e464c0ea40808fafbc3816a - maxLength: 32 - type: string - x-sensitive: true - aaaUnsubscribeEmail: - description: >- - Response body for the GET show-unsubscribe-details endpoint. All fields - are populated. - properties: - account_id: - $ref: '#/components/schemas/aaaAccountId' - email: - format: email - type: string - id: - $ref: '#/components/schemas/aaaPolicyId' - name: - $ref: '#/components/schemas/aaaSchemasName' - token: - type: string - x-sensitive: true - type: object - aaaUnsubscribeEmailPost: - description: >- - Response body for the POST unsubscribe endpoint. name and token are not - returned. - properties: - account_id: - $ref: '#/components/schemas/aaaAccountId' - email: - format: email - type: string - id: - $ref: '#/components/schemas/aaaPolicyId' - type: object - aaaUnsubscribeEmailPostSingleResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/aaaUnsubscribeEmailPost' - required: - - success - - errors - - messages - aaaUnsubscribeEmailSingleResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/aaaUnsubscribeEmail' - required: - - success - - errors - - messages - aaaUrl: - description: The POST endpoint to call when dispatching a notification. - example: https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd - type: string - aaaUuid: - description: UUID - example: f174e90afafe4643bbbc4a0ed4fc8415 - maxLength: 32 - type: string - x-auditable: true - aaaWebhookId: - description: The unique identifier of a webhook - example: b115d5ec15c641ee8b7692c449b5227b - maxLength: 32 - type: string - x-auditable: true - aaaWebhooks: - properties: - created_at: - $ref: '#/components/schemas/aaaCreatedAt' - readOnly: true - id: - $ref: '#/components/schemas/aaaWebhookId' - last_failure: - $ref: '#/components/schemas/aaaLastFailure' - last_success: - $ref: '#/components/schemas/aaaLastSuccess' - name: - $ref: '#/components/schemas/aaaComponentsSchemasName' - secret: - $ref: '#/components/schemas/aaaSecret' - type: - $ref: '#/components/schemas/aaaComponentsSchemasType' - url: - $ref: '#/components/schemas/aaaUrl' - type: object - aaaWebhooksComponentsSchemasResponseCollection: - properties: - errors: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - messages: - $ref: '#/components/schemas/aaaComponentsSchemasMessages' - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - result: - items: - $ref: '#/components/schemas/aaaWebhooks' - type: array - required: - - success - - errors - - messages - type: object - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - available_alerts: - id: cloudflare.alerting.available_alerts - name: available_alerts - title: Available Alerts - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1alerting~1v3~1available_alerts/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/available_alerts/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - eligability: - id: cloudflare.alerting.eligability - name: eligability - title: Eligability - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1alerting~1v3~1destinations~1eligible/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/eligability/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - pagerduty: - id: cloudflare.alerting.pagerduty - name: pagerduty - title: Pagerduty - methods: - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1alerting~1v3~1destinations~1pagerduty/delete - response: - mediaType: application/json - openAPIDocKey: '200' - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1alerting~1v3~1destinations~1pagerduty/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1alerting~1v3~1destinations~1pagerduty~1connect/post - response: - mediaType: application/json - openAPIDocKey: '201' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1alerting~1v3~1destinations~1pagerduty~1connect~1{token_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/pagerduty/methods/get' - - $ref: '#/components/x-stackQL-resources/pagerduty/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/pagerduty/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/pagerduty/methods/delete' - replace: [] - webhooks: - id: cloudflare.alerting.webhooks - name: webhooks - title: Webhooks - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1alerting~1v3~1destinations~1webhooks/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1alerting~1v3~1destinations~1webhooks/post - response: - mediaType: application/json - openAPIDocKey: '201' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1alerting~1v3~1destinations~1webhooks~1{webhook_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1alerting~1v3~1destinations~1webhooks~1{webhook_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1alerting~1v3~1destinations~1webhooks~1{webhook_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/webhooks/methods/get' - - $ref: '#/components/x-stackQL-resources/webhooks/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/webhooks/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/webhooks/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/webhooks/methods/update' - history: - id: cloudflare.alerting.history - name: history - title: History - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1history/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/history/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - policies: - id: cloudflare.alerting.policies - name: policies - title: Policies - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1policies/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1policies/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1alerting~1v3~1policies~1{policy_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1alerting~1v3~1policies~1{policy_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1alerting~1v3~1policies~1{policy_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/policies/methods/get' - - $ref: '#/components/x-stackQL-resources/policies/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/policies/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/policies/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/policies/methods/update' - unsubscribe: - id: cloudflare.alerting.unsubscribe - name: unsubscribe - title: Unsubscribe - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1alerting~1v3~1policies~1{policy_id}~1email~1unsubscribe/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - notification_policies_unsubscribe_email_from_notification_policy: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1alerting~1v3~1policies~1{policy_id}~1email~1unsubscribe/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/unsubscribe/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/unsubscribe/methods/notification_policies_unsubscribe_email_from_notification_policy - update: [] - delete: [] - replace: [] - silences: - id: cloudflare.alerting.silences - name: silences - title: Silences - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1silences/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1silences/post' - response: - mediaType: application/json - openAPIDocKey: '200' - notification_silences_update_silences: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1silences/put' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1alerting~1v3~1silences~1{silence_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1alerting~1v3~1silences~1{silence_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/silences/methods/get' - - $ref: '#/components/x-stackQL-resources/silences/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/silences/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/silences/methods/delete' - replace: - - $ref: >- - #/components/x-stackQL-resources/silences/methods/notification_silences_update_silences +openapi: 3.0.3 +info: + title: alerting API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/alerting/v3/available_alerts: + get: + description: Gets a list of all alert types for which an account is eligible. + operationId: notification-alert-types-get-alert-types + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/aaaAlertsResponseCollection' + description: Get Alert Types response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/aaaComponentsSchemasApiResponseCommonFailure' + description: Get Alert Types response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Alert Types + tags: + - Notification Alert Types + x-api-token-group: + - 'Zero Trust: PII Read' + - Notifications Write + - Notifications Read + - Account Settings Write + - Account Settings Read + x-stackql-sdk: + service: alerting + resource_chain: + - available_alerts + method: list + /accounts/{account_id}/alerting/v3/destinations/eligible: + get: + description: Get a list of all delivery mechanism types for which an account is eligible. + operationId: notification-mechanism-eligibility-get-delivery-mechanism-eligibility + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/aaaSchemasResponseCollection' + description: Get delivery mechanism eligibility response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/aaaComponentsSchemasApiResponseCommonFailure' + description: Get delivery mechanism eligibility response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get delivery mechanism eligibility + tags: + - Notification Mechanism Eligibility + x-stackql-sdk: + service: alerting + resource_chain: + - destinations + - eligible + method: get + /accounts/{account_id}/alerting/v3/destinations/pagerduty: + delete: + description: Deletes all the PagerDuty Services connected to the account. + operationId: notification-destinations-with-pager-duty-delete-pager-duty-services + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/aaaSchemasApiResponseCommon' + description: Delete PagerDuty Services response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/aaaComponentsSchemasApiResponseCommonFailure' + description: Delete PagerDuty Services response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete PagerDuty Services + tags: + - Notification destinations with PagerDuty + x-api-token-group: + - Notifications Write + - Account Settings Write + x-stackql-sdk: + service: alerting + resource_chain: + - destinations + - pagerduty + method: delete + get: + description: Get a list of all configured PagerDuty services. + operationId: notification-destinations-with-pager-duty-list-pager-duty-services + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/aaaComponentsSchemasResponseCollection' + description: List PagerDuty services response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/aaaComponentsSchemasApiResponseCommonFailure' + description: List PagerDuty services response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List PagerDuty services + tags: + - Notification destinations with PagerDuty + x-api-token-group: + - 'Zero Trust: PII Read' + - Notifications Write + - Notifications Read + - Account Settings Write + - Account Settings Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: alerting + resource_chain: + - destinations + - pagerduty + method: get + /accounts/{account_id}/alerting/v3/destinations/pagerduty/connect: + post: + description: Creates a new token for integrating with PagerDuty. + operationId: notification-destinations-with-pager-duty-connect-pager-duty + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/aaaSensitiveIdResponse' + description: Token for PagerDuty integration + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + result: + properties: + id: + $ref: '#/components/schemas/aaaUuid' + type: object + required: + - success + - errors + - messages + - success + - errors + - messages + description: Create a token for PagerDuty integration failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create PagerDuty integration token + tags: + - Notification destinations with PagerDuty + x-api-token-group: + - Notifications Write + - Account Settings Write + x-stackql-sdk: + service: alerting + resource_chain: + - destinations + - pagerduty + method: create + /accounts/{account_id}/alerting/v3/destinations/pagerduty/connect/{token_id}: + get: + description: Links PagerDuty with the account using the integration token. + operationId: notification-destinations-with-pager-duty-connect-pager-duty-token + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: token_id + in: path + required: true + description: The API token ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/aaaIdResponse' + description: Create a Notification policy response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + result: + properties: + id: + $ref: '#/components/schemas/aaaUuid' + type: object + required: + - success + - errors + - messages + - success + - errors + - messages + description: Create a Notification policy response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Connect PagerDuty + tags: + - Notification destinations with PagerDuty + x-api-token-group: + - Notifications Write + - Account Settings Write + x-stackql-sdk: + service: alerting + resource_chain: + - destinations + - pagerduty + method: link + /accounts/{account_id}/alerting/v3/destinations/webhooks: + get: + description: Gets a list of all configured webhook destinations. + operationId: notification-webhooks-list-webhooks + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/aaaWebhooksComponentsSchemasResponseCollection' + description: List webhooks response + 4XX: + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + result: + items: + $ref: '#/components/schemas/aaaWebhooks' + type: array + required: + - success + - errors + - messages + - success + - errors + - messages + type: object + description: List webhooks response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List webhooks + tags: + - Notification webhooks + x-api-token-group: + - 'Zero Trust: PII Read' + - Notifications Write + - Notifications Read + - Account Settings Write + - Account Settings Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: alerting + resource_chain: + - destinations + - webhooks + method: list + post: + description: Creates a new webhook destination. + operationId: notification-webhooks-create-a-webhook + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + name: + $ref: '#/components/schemas/aaaComponentsSchemasName' + secret: + $ref: '#/components/schemas/aaaSecret' + url: + $ref: '#/components/schemas/aaaUrl' + required: + - name + - url + type: object + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/aaaIdResponse' + description: Create a webhook response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + result: + properties: + id: + $ref: '#/components/schemas/aaaUuid' + type: object + required: + - success + - errors + - messages + - success + - errors + - messages + description: Create a webhook response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a webhook + tags: + - Notification webhooks + x-api-token-group: + - Notifications Write + - Account Settings Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: alerting + resource_chain: + - destinations + - webhooks + method: create + /accounts/{account_id}/alerting/v3/destinations/webhooks/{webhook_id}: + delete: + description: Delete a configured webhook destination. + operationId: notification-webhooks-delete-a-webhook + parameters: + - in: path + name: webhook_id + schema: + $ref: '#/components/schemas/aaaWebhookId' + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/aaaSchemasApiResponseCommon' + description: Delete a webhook response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/aaaComponentsSchemasApiResponseCommonFailure' + description: Delete a webhook response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete a webhook + tags: + - Notification webhooks + x-api-token-group: + - Notifications Write + - Account Settings Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: alerting + resource_chain: + - destinations + - webhooks + method: delete + get: + description: Get details for a single webhooks destination. + operationId: notification-webhooks-get-a-webhook + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: webhook_id + schema: + $ref: '#/components/schemas/aaaWebhookId' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/aaaSchemasSingleResponse' + description: Get a webhook response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/aaaWebhooks' + required: + - success + - errors + - messages + - success + - errors + - messages + description: Get a webhook response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get a webhook + tags: + - Notification webhooks + x-api-token-group: + - 'Zero Trust: PII Read' + - Notifications Write + - Notifications Read + - Account Settings Write + - Account Settings Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: alerting + resource_chain: + - destinations + - webhooks + method: get + put: + description: Update a webhook destination. + operationId: notification-webhooks-update-a-webhook + parameters: + - in: path + name: webhook_id + schema: + $ref: '#/components/schemas/aaaWebhookId' + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + name: + $ref: '#/components/schemas/aaaComponentsSchemasName' + secret: + $ref: '#/components/schemas/aaaSecret' + url: + $ref: '#/components/schemas/aaaUrl' + required: + - name + - url + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/aaaIdResponse' + description: Update a webhook response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + result: + properties: + id: + $ref: '#/components/schemas/aaaUuid' + type: object + required: + - success + - errors + - messages + - success + - errors + - messages + description: Update a webhook response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update a webhook + tags: + - Notification webhooks + x-api-token-group: + - Notifications Write + - Account Settings Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: alerting + resource_chain: + - destinations + - webhooks + method: update + /accounts/{account_id}/alerting/v3/history: + get: + description: Gets a list of history records for notifications sent to an account. The records are displayed for last `x` number of days based on the zone plan (free = 30, pro = 30, biz = 30, ent = 90). + operationId: notification-history-list-history + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: per_page + schema: + $ref: '#/components/schemas/aaaPerPage' + - in: query + name: before + schema: + $ref: '#/components/schemas/aaaBefore' + - in: query + name: page + schema: + default: 1 + description: Page number of paginated results. + minimum: 1 + type: number + - in: query + name: since + schema: + description: Limit the returned results to history records newer than the specified date. This must be a timestamp that conforms to RFC3339. + format: date-time + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/aaaHistoryComponentsSchemasResponseCollection' + description: List History response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/aaaSchemasResultInfo' + type: object + result: + items: + $ref: '#/components/schemas/aaaHistory' + type: array + required: + - success + - errors + - messages + - success + - errors + - messages + description: List History response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List History + tags: + - Notification History + x-api-token-group: + - 'Zero Trust: PII Read' + - Notifications Write + - Notifications Read + - Account Settings Write + - Account Settings Read + x-stackql-sdk: + service: alerting + resource_chain: + - history + method: list + /accounts/{account_id}/alerting/v3/policies: + get: + description: Get a list of all Notification policies. + operationId: notification-policies-list-notification-policies + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/aaaPoliciesComponentsSchemasResponseCollection' + description: List Notification policies response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/aaaComponentsSchemasApiResponseCommonFailure' + description: List Notification policies response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Notification policies + tags: + - Notification policies + x-api-token-group: + - 'Zero Trust: PII Read' + - Notifications Write + - Notifications Read + - Account Settings Write + - Account Settings Read + x-stackql-sdk: + service: alerting + resource_chain: + - policies + method: list + post: + description: Creates a new Notification policy. + operationId: notification-policies-create-a-notification-policy + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + alert_interval: + $ref: '#/components/schemas/aaaAlertInterval' + alert_type: + $ref: '#/components/schemas/aaaAlertType' + description: + $ref: '#/components/schemas/aaaSchemasDescription' + enabled: + $ref: '#/components/schemas/aaaEnabled' + filters: + $ref: '#/components/schemas/aaaFilters' + mechanisms: + $ref: '#/components/schemas/aaaMechanisms' + name: + $ref: '#/components/schemas/aaaSchemasName' + required: + - name + - alert_type + - enabled + - mechanisms + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/aaaIdResponse' + description: Create a Notification policy response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + result: + properties: + id: + $ref: '#/components/schemas/aaaUuid' + type: object + required: + - success + - errors + - messages + - success + - errors + - messages + description: Create a Notification policy response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a Notification policy + tags: + - Notification policies + x-api-token-group: + - Notifications Write + - Account Settings Write + x-stackql-sdk: + service: alerting + resource_chain: + - policies + method: create + /accounts/{account_id}/alerting/v3/policies/{policy_id}: + delete: + description: Delete a Notification policy. + operationId: notification-policies-delete-a-notification-policy + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: policy_id + in: path + required: true + description: The Access policy ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/aaaApiResponseCollection' + description: Delete a Notification policy response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/aaaSchemasResultInfo' + required: + - success + - errors + - messages + - success + - errors + - messages + description: Delete a Notification policy response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete a Notification policy + tags: + - Notification policies + x-api-token-group: + - Notifications Write + - Account Settings Write + x-stackql-sdk: + service: alerting + resource_chain: + - policies + method: delete + get: + description: Get details for a single policy. + operationId: notification-policies-get-a-notification-policy + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: policy_id + in: path + required: true + description: The Access policy ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/aaaSingleResponse' + description: Get a Notification policy response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/aaaPolicies' + required: + - success + - errors + - messages + - success + - errors + - messages + description: Get a Notification policy response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get a Notification policy + tags: + - Notification policies + x-api-token-group: + - 'Zero Trust: PII Read' + - Notifications Write + - Notifications Read + - Account Settings Write + - Account Settings Read + x-stackql-sdk: + service: alerting + resource_chain: + - policies + method: get + put: + description: Update a Notification policy. + operationId: notification-policies-update-a-notification-policy + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: policy_id + in: path + required: true + description: The Access policy ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + alert_interval: + $ref: '#/components/schemas/aaaAlertInterval' + alert_type: + $ref: '#/components/schemas/aaaAlertType' + description: + $ref: '#/components/schemas/aaaSchemasDescription' + enabled: + $ref: '#/components/schemas/aaaEnabled' + filters: + $ref: '#/components/schemas/aaaFilters' + mechanisms: + $ref: '#/components/schemas/aaaMechanisms' + name: + $ref: '#/components/schemas/aaaSchemasName' + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/aaaIdResponse' + description: Update a Notification policy response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + result: + properties: + id: + $ref: '#/components/schemas/aaaUuid' + type: object + required: + - success + - errors + - messages + - success + - errors + - messages + description: Update a Notification policy response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update a Notification policy + tags: + - Notification policies + x-api-token-group: + - Notifications Write + - Account Settings Write + x-stackql-sdk: + service: alerting + resource_chain: + - policies + method: update + /accounts/{account_id}/alerting/v3/policies/{policy_id}/email/unsubscribe: + get: + description: Shows details for unsubscribing an email address from a notification policy. + operationId: notification-policies-show-email-unsubscribe-details + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: policy_id + in: path + required: true + description: The Access policy ID. + schema: + type: string + - in: query + name: email + schema: + format: email + type: string + - in: query + name: token + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/aaaUnsubscribeEmailSingleResponse' + text/html: + schema: + type: string + description: Show email unsubscribe details response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/aaaComponentsSchemasApiResponseCommonFailure' + description: Show email unsubscribe details response failure + security: [] + summary: Show email unsubscribe details + tags: + - Notification policies + x-api-token-group: + - 'Zero Trust: PII Read' + - Notifications Write + - Notifications Read + - Account Settings Write + - Account Settings Read + post: + description: Unsubscribes an email address from a notification policy. + operationId: notification-policies-unsubscribe-email-from-notification-policy + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: policy_id + in: path + required: true + description: The Access policy ID. + schema: + type: string + - in: query + name: email + schema: + format: email + type: string + - in: query + name: token + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/aaaUnsubscribeEmailPostSingleResponse' + text/html: + schema: + type: string + description: Unsubscribe email from Notification policy response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/aaaComponentsSchemasApiResponseCommonFailure' + description: Unsubscribe email from Notification policy response failure + security: [] + summary: Unsubscribe email from a Notification policy + tags: + - Notification policies + /accounts/{account_id}/alerting/v3/silences: + get: + description: Gets a list of silences for an account. + operationId: notification-silences-list-silences + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/aaaSilencesComponentsSchemasResponseCollection' + description: List Silences response + 4XX: + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + result: + items: + $ref: '#/components/schemas/aaaSilence' + type: array + required: + - success + - errors + - messages + - success + - errors + - messages + type: object + description: List Silences response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Silences + tags: + - Notification Silences + x-api-token-group: + - 'Zero Trust: PII Read' + - Notifications Write + - Notifications Read + - Account Settings Write + - Account Settings Read + x-stackql-sdk: + service: alerting + resource_chain: + - silences + method: update + post: + description: Creates a new silence for an account. + operationId: notification-silences-create-silences + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/aaaSilenceCreateRequest' + type: array + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/aaaSchemasApiResponseCommon' + description: Create Silences response + 4XX: + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + result: + items: + $ref: '#/components/schemas/aaaSilence' + type: array + required: + - success + - errors + - messages + - success + - errors + - messages + type: object + description: Create Silences response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Silences + tags: + - Notification Silences + x-api-token-group: + - Notifications Write + - Account Settings Write + x-stackql-sdk: + service: alerting + resource_chain: + - silences + method: create + put: + description: Updates existing silences for an account. + operationId: notification-silences-update-silences + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/aaaSilenceUpdateRequest' + type: array + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/aaaSilencesComponentsSchemasResponseCollection' + description: Update Silences response + 4XX: + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + result: + items: + $ref: '#/components/schemas/aaaSilence' + type: array + required: + - success + - errors + - messages + - success + - errors + - messages + type: object + description: Update Silences response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Silences + tags: + - Notification Silences + x-api-token-group: + - Notifications Write + - Account Settings Write + /accounts/{account_id}/alerting/v3/silences/{silence_id}: + delete: + description: Deletes an existing silence for an account. + operationId: notification-silences-delete-silences + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: silence_id + schema: + $ref: '#/components/schemas/aaaSilenceId' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/aaaSchemasApiResponseCommon' + description: Delete Silence response + 4XX: + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/aaaSilence' + required: + - success + - errors + - messages + - success + - errors + - messages + type: object + description: Delete Silence response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Silence + tags: + - Notification Silences + x-api-token-group: + - Notifications Write + - Account Settings Write + x-stackql-sdk: + service: alerting + resource_chain: + - silences + method: delete + get: + description: Gets a specific silence for an account. + operationId: notification-silences-get-silence + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: silence_id + schema: + $ref: '#/components/schemas/aaaSilenceId' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/aaaSilenceComponentsSchemasResponseCollection' + description: Get Silence response + 4XX: + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/aaaSilence' + required: + - success + - errors + - messages + - success + - errors + - messages + type: object + description: Get Silence response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Silence + tags: + - Notification Silences + x-api-token-group: + - 'Zero Trust: PII Read' + - Notifications Write + - Notifications Read + - Account Settings Write + - Account Settings Read + x-stackql-sdk: + service: alerting + resource_chain: + - silences + method: get +components: + schemas: + aaaAccountId: + description: The account id + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + readOnly: true + type: string + x-auditable: true + aaaAlertBody: + description: Message body included in the notification sent. + example: SSL certificate has expired + type: string + aaaAlertInterval: + description: Optional specification of how often to re-alert from the same incident, not support on all alert types. + example: 30m + type: string + x-auditable: true + aaaAlertType: + description: Refers to which event will trigger a Notification dispatch. You can use the endpoint to get available alert types which then will give you a list of possible values. + enum: + - abuse_report_alert + - access_custom_certificate_expiration_type + - advanced_ddos_attack_l4_alert + - advanced_ddos_attack_l7_alert + - advanced_http_alert_error + - bgp_hijack_notification + - billing_usage_alert + - block_notification_block_removed + - block_notification_new_block + - block_notification_review_rejected + - bot_traffic_basic_alert + - brand_protection_alert + - brand_protection_digest + - clickhouse_alert_fw_anomaly + - clickhouse_alert_fw_ent_anomaly + - cloudforce_one_request_notification + - cni_maintenance_notification + - custom_analytics + - custom_bot_detection_alert + - custom_ssl_certificate_event_type + - dedicated_ssl_certificate_event_type + - device_connectivity_anomaly_alert + - dos_attack_l4 + - dos_attack_l7 + - expiring_service_token_alert + - failing_logpush_job_disabled_alert + - fbm_auto_advertisement + - fbm_dosd_attack + - fbm_volumetric_attack + - health_check_status_notification + - hostname_aop_custom_certificate_expiration_type + - http_alert_edge_error + - http_alert_origin_error + - image_notification + - image_resizing_notification + - incident_alert + - load_balancing_health_alert + - load_balancing_pool_enablement_alert + - logo_match_alert + - magic_tunnel_health_check_event + - magic_wan_tunnel_health + - maintenance_event_notification + - mtls_certificate_store_certificate_expiration_type + - pages_event_alert + - radar_notification + - real_origin_monitoring + - scriptmonitor_alert_new_code_change_detections + - scriptmonitor_alert_new_hosts + - scriptmonitor_alert_new_malicious_hosts + - scriptmonitor_alert_new_malicious_scripts + - scriptmonitor_alert_new_malicious_url + - scriptmonitor_alert_new_max_length_resource_url + - scriptmonitor_alert_new_resources + - secondary_dns_all_primaries_failing + - secondary_dns_primaries_failing + - secondary_dns_warning + - secondary_dns_zone_successfully_updated + - secondary_dns_zone_validation_warning + - security_insights_alert + - sentinel_alert + - stream_live_notifications + - synthetic_test_latency_alert + - synthetic_test_low_availability_alert + - traffic_anomalies_alert + - tunnel_health_event + - tunnel_update_event + - universal_ssl_event_type + - web_analytics_metrics_update + - zone_aop_custom_certificate_expiration_type + example: universal_ssl_event_type + type: string + x-auditable: true + aaaAlertsResponseCollection: + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + result: + example: + Origin Monitoring: + - description: High levels of 5xx HTTP errors at your origin. + display_name: Origin Error Rate Alert + filter_options: + - AvailableValues: null + ComparisonOperator: == + Key: zones + Range: 1-n + - AvailableValues: + - Description: Service-Level Objective of 99.7 + ID: '99.7' + - Description: Service-Level Objective of 99.8 + ID: '99.8' + ComparisonOperator: '>=' + Key: slo + Range: 0-1 + type: http_alert_origin_error + type: object + required: + - success + - errors + - messages + type: object + aaaApiResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/aaaSchemasResultInfo' + required: + - success + - errors + - messages + aaaBefore: + description: Limit the returned results to history records older than the specified date. This must be a timestamp that conforms to RFC3339. + example: '2022-05-20T20:29:58.679897Z' + format: date-time + type: string + aaaComponentsSchemasApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + example: [] + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + type: object + aaaComponentsSchemasDescription: + description: Description of the notification policy (if present). + example: Universal Certificate validation status, issuance, renewal, and expiration notices + type: string + aaaComponentsSchemasMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + message: + type: string + required: + - message + type: object + uniqueItems: true + type: array + aaaComponentsSchemasName: + description: The name of the webhook destination. This will be included in the request body when you receive a webhook notification. + example: Slack Webhook + type: string + x-auditable: true + aaaComponentsSchemasResponseCollection: + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + result: + items: + $ref: '#/components/schemas/aaaPagerduty' + type: array + required: + - success + - errors + - messages + type: object + aaaComponentsSchemasType: + description: Type of webhook endpoint. + enum: + - datadog + - discord + - feishu + - gchat + - generic + - opsgenie + - slack + - splunk + example: slack + type: string + x-auditable: true + aaaCreatedAt: + description: Timestamp of when the webhook destination was created. + example: '2020-10-26T18:25:04.532316Z' + format: date-time + readOnly: true + type: string + x-auditable: true + aaaEnabled: + default: true + description: Whether or not the Notification policy is enabled. + example: true + type: boolean + x-auditable: true + aaaFilters: + description: Optional filters that allow you to be alerted only on a subset of events for that alert type based on some criteria. This is only available for select alert types. See alert type documentation for more details. + example: + slo: + - '99.9' + properties: + actions: + description: Usage depends on specific alert type + items: + type: string + x-auditable: true + type: array + affected_asns: + description: Used for configuring radar_notification + items: + type: string + x-auditable: true + type: array + affected_components: + description: Used for configuring incident_alert + items: + type: string + x-auditable: true + type: array + affected_locations: + description: Used for configuring radar_notification + items: + type: string + x-auditable: true + type: array + airport_code: + description: Used for configuring maintenance_event_notification + items: + type: string + x-auditable: true + type: array + alert_trigger_preferences: + description: Usage depends on specific alert type + items: + type: string + x-auditable: true + type: array + alert_trigger_preferences_value: + description: Usage depends on specific alert type + items: + type: string + x-auditable: true + type: array + enabled: + description: Used for configuring load_balancing_pool_enablement_alert + items: + minItems: 1 + type: string + x-auditable: true + type: array + environment: + description: Used for configuring pages_event_alert + items: + minItems: 1 + type: string + x-auditable: true + type: array + event: + description: Used for configuring pages_event_alert + items: + minItems: 1 + type: string + x-auditable: true + type: array + event_source: + description: Used for configuring load_balancing_health_alert + items: + type: string + x-auditable: true + type: array + event_type: + description: Usage depends on specific alert type + items: + type: string + x-auditable: true + type: array + group_by: + description: Usage depends on specific alert type + items: + type: string + x-auditable: true + type: array + health_check_id: + description: Used for configuring health_check_status_notification + items: + type: string + x-auditable: true + type: array + incident_impact: + description: Used for configuring incident_alert + items: + enum: + - INCIDENT_IMPACT_NONE + - INCIDENT_IMPACT_MINOR + - INCIDENT_IMPACT_MAJOR + - INCIDENT_IMPACT_CRITICAL + type: string + x-auditable: true + type: array + input_id: + description: Used for configuring stream_live_notifications + items: + type: string + x-auditable: true + type: array + insight_class: + description: Used for configuring security_insights_alert + items: + type: string + x-auditable: true + type: array + limit: + description: Used for configuring billing_usage_alert + items: + minItems: 1 + type: string + x-auditable: true + type: array + logo_tag: + description: Used for configuring logo_match_alert + items: + type: string + x-auditable: true + type: array + megabits_per_second: + description: Used for configuring advanced_ddos_attack_l4_alert + items: + type: string + x-auditable: true + type: array + new_health: + description: Used for configuring load_balancing_health_alert + items: + type: string + x-auditable: true + type: array + new_status: + description: Used for configuring tunnel_health_event + items: + type: string + x-auditable: true + type: array + packets_per_second: + description: Used for configuring advanced_ddos_attack_l4_alert + items: + type: string + x-auditable: true + type: array + pool_id: + description: Usage depends on specific alert type + items: + type: string + x-auditable: true + type: array + pop_names: + description: Usage depends on specific alert type + items: + type: string + x-auditable: true + type: array + product: + description: Used for configuring billing_usage_alert + items: + minItems: 1 + type: string + x-auditable: true + type: array + project_id: + description: Used for configuring pages_event_alert + items: + minItems: 1 + type: string + x-auditable: true + type: array + protocol: + description: Used for configuring advanced_ddos_attack_l4_alert + items: + type: string + x-auditable: true + type: array + query_tag: + description: Usage depends on specific alert type + items: + type: string + x-auditable: true + type: array + requests_per_second: + description: Used for configuring advanced_ddos_attack_l7_alert + items: + type: string + x-auditable: true + type: array + selectors: + description: Usage depends on specific alert type + items: + type: string + x-auditable: true + type: array + services: + description: Used for configuring clickhouse_alert_fw_ent_anomaly + items: + minItems: 1 + type: string + x-auditable: true + type: array + slo: + description: Usage depends on specific alert type + items: + type: string + x-auditable: true + type: array + status: + description: Used for configuring health_check_status_notification + items: + minItems: 1 + type: string + x-auditable: true + type: array + target_hostname: + description: Used for configuring advanced_ddos_attack_l7_alert + items: + type: string + x-auditable: true + type: array + target_ip: + description: Used for configuring advanced_ddos_attack_l4_alert + items: + type: string + x-auditable: true + type: array + target_zone_name: + description: Used for configuring advanced_ddos_attack_l7_alert + items: + type: string + x-auditable: true + type: array + traffic_exclusions: + description: Used for configuring traffic_anomalies_alert + items: + enum: + - security_events + maxItems: 1 + type: string + x-auditable: true + type: array + tunnel_id: + description: Used for configuring tunnel_health_event + items: + type: string + x-auditable: true + type: array + tunnel_name: + description: Usage depends on specific alert type + items: + type: string + x-auditable: true + type: array + type: + description: Usage depends on specific alert type + items: + type: string + x-auditable: true + type: array + where: + description: Usage depends on specific alert type + items: + type: string + x-auditable: true + type: array + zones: + description: Usage depends on specific alert type + items: + type: string + x-auditable: true + type: array + type: object + aaaHistory: + properties: + alert_body: + $ref: '#/components/schemas/aaaAlertBody' + alert_type: + $ref: '#/components/schemas/aaaSchemasAlertType' + description: + $ref: '#/components/schemas/aaaComponentsSchemasDescription' + id: + $ref: '#/components/schemas/aaaUuid' + mechanism: + $ref: '#/components/schemas/aaaMechanism' + mechanism_type: + $ref: '#/components/schemas/aaaMechanismType' + name: + $ref: '#/components/schemas/aaaSchemasName' + policy_id: + $ref: '#/components/schemas/aaaPolicyId' + sent: + $ref: '#/components/schemas/aaaSent' + type: object + aaaHistoryComponentsSchemasResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/aaaSchemasResultInfo' + example: + count: 1 + page: 1 + per_page: 20 + type: object + result: + items: + $ref: '#/components/schemas/aaaHistory' + type: array + required: + - success + - errors + - messages + aaaIdResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + result: + properties: + id: + $ref: '#/components/schemas/aaaUuid' + type: object + required: + - success + - errors + - messages + aaaLastFailure: + description: Timestamp of the last time an attempt to dispatch a notification to this webhook failed. + example: '2020-10-26T18:25:04.532316Z' + format: date-time + readOnly: true + type: string + x-auditable: true + aaaLastSuccess: + description: Timestamp of the last time Cloudflare was able to successfully dispatch a notification using this webhook. + example: '2020-10-26T18:25:04.532316Z' + format: date-time + readOnly: true + type: string + x-auditable: true + aaaMechanism: + description: The mechanism to which the notification has been dispatched. + example: test@example.com + type: string + x-auditable: true + aaaMechanismType: + description: The type of mechanism to which the notification has been dispatched. This can be email/pagerduty/webhook based on the mechanism configured. + enum: + - email + - pagerduty + - webhook + example: email + type: string + aaaMechanisms: + description: List of IDs that will be used when dispatching a notification. IDs for email type will be the email address. + properties: + email: + items: + properties: + id: + description: The email address + type: string + x-auditable: true + type: object + type: array + pagerduty: + items: + properties: + id: + $ref: '#/components/schemas/aaaUuid' + type: object + type: array + webhooks: + items: + properties: + id: + $ref: '#/components/schemas/aaaUuid' + type: object + type: array + type: object + aaaName: + description: The name of the pagerduty service. + example: My PagerDuty Service + type: string + x-auditable: true + aaaPagerduty: + properties: + id: + $ref: '#/components/schemas/aaaUuid' + name: + $ref: '#/components/schemas/aaaName' + type: object + aaaPerPage: + default: 25 + description: Number of items per page. + maximum: 1000 + minimum: 5 + type: number + aaaPolicies: + properties: + alert_interval: + $ref: '#/components/schemas/aaaAlertInterval' + alert_type: + $ref: '#/components/schemas/aaaAlertType' + created: + $ref: '#/components/schemas/aaaTimestamp' + description: + $ref: '#/components/schemas/aaaSchemasDescription' + enabled: + $ref: '#/components/schemas/aaaEnabled' + filters: + $ref: '#/components/schemas/aaaFilters' + id: + $ref: '#/components/schemas/aaaPolicyId' + mechanisms: + $ref: '#/components/schemas/aaaMechanisms' + modified: + $ref: '#/components/schemas/aaaTimestamp' + name: + $ref: '#/components/schemas/aaaSchemasName' + type: object + aaaPoliciesComponentsSchemasResponseCollection: + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + result: + items: + $ref: '#/components/schemas/aaaPolicies' + type: array + required: + - success + - errors + - messages + type: object + aaaPolicyId: + description: The unique identifier of a notification policy + example: 0da2b59ef118439d8097bdfb215203c9 + maxLength: 32 + type: string + x-auditable: true + aaaSchemasAlertType: + description: Type of notification that has been dispatched. + example: universal_ssl_event_type + type: string + aaaSchemasApiResponseCommon: + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + type: object + aaaSchemasDescription: + description: Optional description for the Notification policy. + example: Something describing the policy. + type: string + x-auditable: true + aaaSchemasName: + description: Name of the policy. + example: SSL Notification Event Policy + type: string + x-auditable: true + aaaSchemasResponseCollection: + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + result: + type: object + required: + - success + - errors + - messages + type: object + aaaSchemasResultInfo: + properties: + count: + description: Total number of results for the requested service + example: 1 + type: number + page: + description: Current page within paginated list of results + example: 1 + type: number + per_page: + description: Number of results per page of results + example: 20 + type: number + total_count: + description: Total results available without any search parameters + example: 2000 + type: number + type: object + aaaSchemasSingleResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/aaaWebhooks' + required: + - success + - errors + - messages + aaaSecret: + description: Optional secret that will be passed in the `cf-webhook-auth` header when dispatching generic webhook notifications or formatted for supported destinations. Secrets are not returned in any API response body. + type: string + writeOnly: true + x-sensitive: true + aaaSensitiveIdResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + result: + properties: + id: + $ref: '#/components/schemas/aaaToken' + type: object + required: + - success + - errors + - messages + aaaSent: + description: Timestamp of when the notification was dispatched in ISO 8601 format. + example: '2021-10-08T17:52:17.571336Z' + format: date-time + type: string + aaaSilence: + properties: + created_at: + description: When the silence was created. + example: '2022-01-01T00:00:00Z' + type: string + x-auditable: true + readOnly: true + end_time: + description: When the silence ends. + example: '2022-01-01T00:00:00Z' + type: string + x-auditable: true + id: + $ref: '#/components/schemas/aaaSilenceId' + policy_id: + $ref: '#/components/schemas/aaaPolicyId' + start_time: + description: When the silence starts. + example: '2022-01-01T00:00:00Z' + type: string + x-auditable: true + updated_at: + description: When the silence was modified. + example: '2022-01-01T00:00:00Z' + type: string + x-auditable: true + readOnly: true + type: object + aaaSilenceComponentsSchemasResponseCollection: + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/aaaSilence' + required: + - success + - errors + - messages + type: object + aaaSilenceCreateRequest: + properties: + end_time: + description: When the silence ends. + example: '2022-01-01T00:00:00Z' + type: string + x-auditable: true + policy_id: + $ref: '#/components/schemas/aaaPolicyId' + start_time: + description: When the silence starts. + example: '2022-01-01T00:00:00Z' + type: string + x-auditable: true + type: object + aaaSilenceId: + description: Silence ID + example: f878e90c23f44126ae3cfc399f646977 + maxLength: 32 + type: string + x-auditable: true + aaaSilenceUpdateRequest: + properties: + end_time: + description: When the silence ends. + example: '2022-01-01T00:00:00Z' + type: string + x-auditable: true + id: + $ref: '#/components/schemas/aaaSilenceId' + start_time: + description: When the silence starts. + example: '2022-01-01T00:00:00Z' + type: string + x-auditable: true + type: object + aaaSilencesComponentsSchemasResponseCollection: + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + result: + items: + $ref: '#/components/schemas/aaaSilence' + type: array + required: + - success + - errors + - messages + type: object + aaaSingleResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/aaaPolicies' + required: + - success + - errors + - messages + aaaTimestamp: + example: '2014-01-01T05:20:00.12345Z' + format: date-time + readOnly: true + type: string + x-auditable: true + aaaToken: + description: token in form of UUID + example: a313ba7d3e464c0ea40808fafbc3816a + maxLength: 32 + type: string + x-sensitive: true + aaaUnsubscribeEmail: + description: Response body for the GET show-unsubscribe-details endpoint. All fields are populated. + properties: + account_id: + $ref: '#/components/schemas/aaaAccountId' + email: + format: email + type: string + id: + $ref: '#/components/schemas/aaaPolicyId' + name: + $ref: '#/components/schemas/aaaSchemasName' + token: + type: string + x-sensitive: true + type: object + aaaUnsubscribeEmailPost: + description: Response body for the POST unsubscribe endpoint. name and token are not returned. + properties: + account_id: + $ref: '#/components/schemas/aaaAccountId' + email: + format: email + type: string + id: + $ref: '#/components/schemas/aaaPolicyId' + type: object + aaaUnsubscribeEmailPostSingleResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/aaaUnsubscribeEmailPost' + required: + - success + - errors + - messages + aaaUnsubscribeEmailSingleResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/aaaUnsubscribeEmail' + required: + - success + - errors + - messages + aaaUrl: + description: The POST endpoint to call when dispatching a notification. + example: https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd + type: string + aaaUuid: + description: UUID + example: f174e90afafe4643bbbc4a0ed4fc8415 + maxLength: 32 + type: string + x-auditable: true + aaaWebhookId: + description: The unique identifier of a webhook + example: b115d5ec15c641ee8b7692c449b5227b + maxLength: 32 + type: string + x-auditable: true + aaaWebhooks: + properties: + created_at: + $ref: '#/components/schemas/aaaCreatedAt' + readOnly: true + id: + $ref: '#/components/schemas/aaaWebhookId' + last_failure: + $ref: '#/components/schemas/aaaLastFailure' + last_success: + $ref: '#/components/schemas/aaaLastSuccess' + name: + $ref: '#/components/schemas/aaaComponentsSchemasName' + secret: + $ref: '#/components/schemas/aaaSecret' + type: + $ref: '#/components/schemas/aaaComponentsSchemasType' + url: + $ref: '#/components/schemas/aaaUrl' + type: object + aaaWebhooksComponentsSchemasResponseCollection: + properties: + errors: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + messages: + $ref: '#/components/schemas/aaaComponentsSchemasMessages' + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + result: + items: + $ref: '#/components/schemas/aaaWebhooks' + type: array + required: + - success + - errors + - messages + type: object + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + available_alerts: + id: cloudflare.alerting.available_alerts + name: available_alerts + title: Available Alerts + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1available_alerts/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/available_alerts/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + eligability: + id: cloudflare.alerting.eligability + name: eligability + title: Eligability + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1destinations~1eligible/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/eligability/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + pagerduty: + id: cloudflare.alerting.pagerduty + name: pagerduty + title: Pagerduty + methods: + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1destinations~1pagerduty/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1destinations~1pagerduty/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1destinations~1pagerduty~1connect/post' + response: + mediaType: application/json + openAPIDocKey: '201' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1destinations~1pagerduty~1connect~1{token_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/pagerduty/methods/get' + - $ref: '#/components/x-stackQL-resources/pagerduty/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/pagerduty/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/pagerduty/methods/delete' + replace: [] + webhooks: + id: cloudflare.alerting.webhooks + name: webhooks + title: Webhooks + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1destinations~1webhooks/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1destinations~1webhooks/post' + response: + mediaType: application/json + openAPIDocKey: '201' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1destinations~1webhooks~1{webhook_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1destinations~1webhooks~1{webhook_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1destinations~1webhooks~1{webhook_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/webhooks/methods/get' + - $ref: '#/components/x-stackQL-resources/webhooks/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/webhooks/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/webhooks/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/webhooks/methods/update' + history: + id: cloudflare.alerting.history + name: history + title: History + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1history/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/history/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + policies: + id: cloudflare.alerting.policies + name: policies + title: Policies + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1policies/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1policies/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .alert_interval }}{{ $sep }}"alert_interval": {{ toJson .alert_interval }}{{- $sep = "," -}}{{ end }} + + {{- if .alert_type }}{{ $sep }}"alert_type": {{ toJson .alert_type }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .filters }}{{ $sep }}"filters": {{ if eq (kindOf .filters) "string" }}{{ .filters }}{{ else }}{{ toJson .filters }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .mechanisms }}{{ $sep }}"mechanisms": {{ if eq (kindOf .mechanisms) "string" }}{{ .mechanisms }}{{ else }}{{ toJson .mechanisms }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1policies~1{policy_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1policies~1{policy_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1policies~1{policy_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .alert_interval }}{{ $sep }}"alert_interval": {{ toJson .alert_interval }}{{- $sep = "," -}}{{ end }} + + {{- if .alert_type }}{{ $sep }}"alert_type": {{ toJson .alert_type }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .filters }}{{ $sep }}"filters": {{ if eq (kindOf .filters) "string" }}{{ .filters }}{{ else }}{{ toJson .filters }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .mechanisms }}{{ $sep }}"mechanisms": {{ if eq (kindOf .mechanisms) "string" }}{{ .mechanisms }}{{ else }}{{ toJson .mechanisms }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/policies/methods/get' + - $ref: '#/components/x-stackQL-resources/policies/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/policies/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/policies/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/policies/methods/update' + unsubscribe: + id: cloudflare.alerting.unsubscribe + name: unsubscribe + title: Unsubscribe + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1policies~1{policy_id}~1email~1unsubscribe/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + notification_policies_unsubscribe_email_from_notification_policy: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1policies~1{policy_id}~1email~1unsubscribe/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/unsubscribe/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/unsubscribe/methods/notification_policies_unsubscribe_email_from_notification_policy' + update: [] + delete: [] + replace: [] + silences: + id: cloudflare.alerting.silences + name: silences + title: Silences + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1silences/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1silences/post' + response: + mediaType: application/json + openAPIDocKey: '200' + notification_silences_update_silences: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1silences/put' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1silences~1{silence_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1alerting~1v3~1silences~1{silence_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/silences/methods/get' + - $ref: '#/components/x-stackQL-resources/silences/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/silences/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/silences/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/silences/methods/notification_silences_update_silences' diff --git a/providers/src/cloudflare/v00.00.00000/services/api_gateway.yaml b/providers/src/cloudflare/v00.00.00000/services/api_gateway.yaml index db0b0567..112d166c 100644 --- a/providers/src/cloudflare/v00.00.00000/services/api_gateway.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/api_gateway.yaml @@ -1,5168 +1,4980 @@ -openapi: 3.0.3 -info: - title: api_gateway API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /zones/{zone_id}/api_gateway/configuration: - get: - description: >- - Gets the current API Shield configuration settings for a zone, including - validation behavior and enforcement mode. - operationId: >- - api-shield-settings-retrieve-information-about-specific-configuration-properties - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldConfigurationSingleResponse' - description: >- - Retrieve information about specific configuration properties - response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: >- - Retrieve information about specific configuration properties - response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Retrieve information about specific configuration properties - tags: - - API Shield Settings - x-api-token-group: - - Account API Gateway - - Account API Gateway Read - - Domain API Gateway - - Domain API Gateway Read - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: >- - Ensures that the configuration is written or retrieved in normalized - fashion - in: query - name: normalize - schema: - type: boolean - x-stackql-sdk: - service: api_gateway - resource_chain: - - configurations - method: get - put: - description: >- - Updates API Shield configuration settings for a zone. Can modify - validation strictness, enforcement mode, and other global settings. - operationId: api-shield-settings-set-configuration-properties - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldConfiguration' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldConfigurationSingleResponse' - description: Set configuration properties response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: >- - Retrieve information about specific configuration properties - response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update configuration properties - tags: - - API Shield Settings - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: >- - Ensures that the configuration is written or retrieved in normalized - fashion - in: query - name: normalize - schema: - type: boolean - x-stackql-sdk: - service: api_gateway - resource_chain: - - configurations - method: update - /zones/{zone_id}/api_gateway/discovery: - get: - description: >- - Retrieve the most up to date view of discovered operations, rendered as - OpenAPI schemas - operationId: >- - api-shield-api-discovery-retrieve-discovered-operations-on-a-zone-as-openapi - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldSchemaResponseDiscovery' - description: >- - Retrieve discovered operations on a zone, rendered as OpenAPI - schemas response - 4XX: - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - schemas: - items: - $ref: '#/components/schemas/apiShieldOpenapi' - type: array - timestamp: - $ref: '#/components/schemas/apiShieldSchemasTimestamp' - required: - - timestamp - - schemas - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - type: object - description: >- - Retrieve discovered operations on a zone, rendered as OpenAPI - schemas response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Retrieve discovered operations on a zone rendered as OpenAPI schemas - tags: - - API Shield API Discovery - x-api-token-group: - - Account API Gateway - - Account API Gateway Read - - Domain API Gateway - - Domain API Gateway Read - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - x-stackql-sdk: - service: api_gateway - resource_chain: - - discovery - method: get - /zones/{zone_id}/api_gateway/discovery/operations: - get: - description: Retrieve the most up to date view of discovered operations - operationId: api-shield-api-discovery-retrieve-discovered-operations-on-a-zone - parameters: - - description: Page number of paginated results. - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - description: Maximum number of results per page. - in: query - name: per_page - schema: - default: 20 - maximum: 50 - minimum: 5 - type: integer - - in: query - name: host - schema: - description: Filter results to only include the specified hosts. - items: - type: string - type: array - uniqueItems: true - explode: true - - in: query - name: method - schema: - description: Filter results to only include the specified HTTP methods. - items: - type: string - type: array - uniqueItems: true - explode: true - - in: query - name: endpoint - schema: - description: Filter results to only include endpoints containing this pattern. - type: string - - in: query - name: direction - schema: - description: Direction to order results. - enum: - - asc - - desc - type: string - - in: query - name: order - schema: - description: Field to order by - enum: - - host - - method - - endpoint - - traffic_stats.requests - - traffic_stats.last_updated - type: string - - in: query - name: diff - schema: - description: >- - When `true`, only return API Discovery results that are not saved - into API Shield Endpoint Management - type: boolean - - description: >- - Filter results to only include discovery results sourced from a - particular discovery engine * `ML` - Discovered operations that were - sourced using ML API Discovery * `SessionIdentifier` - Discovered - operations that were sourced using Session Identifier API Discovery - in: query - name: origin - schema: - $ref: '#/components/schemas/apiShieldApiDiscoveryOrigin' - - description: >- - Filter results to only include discovery results in a particular - state. States are as follows * `review` - Discovered operations that - are not saved into API Shield Endpoint Management * `saved` - - Discovered operations that are already saved into API Shield - Endpoint Management * `ignored` - Discovered operations that have - been marked as ignored - in: query - name: state - schema: - $ref: '#/components/schemas/apiShieldApiDiscoveryState' - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: '#/components/schemas/apiShieldDiscoveryOperation' - type: array - required: - - success - - errors - - messages - - result - description: Retrieve discovered operations on a zone response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Retrieve discovered operations on a zone response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Retrieve discovered operations on a zone - tags: - - API Shield API Discovery - x-api-token-group: - - Account API Gateway - - Account API Gateway Read - - Domain API Gateway - - Domain API Gateway Read - x-stackql-sdk: - service: api_gateway - resource_chain: - - discovery - - operations - method: list - patch: - description: Update the `state` on one or more discovered operations - operationId: api-shield-api-patch-discovered-operations - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiDiscoveryPatchMultipleRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldPatchDiscoveriesResponse' - description: Patch discovered operations response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Patch discovered operations response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Patch discovered operations - tags: - - API Shield API Discovery - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - x-stackql-sdk: - service: api_gateway - resource_chain: - - discovery - - operations - method: bulk_edit - /zones/{zone_id}/api_gateway/discovery/operations/{operation_id}: - patch: - description: Update the `state` on a discovered operation - operationId: api-shield-api-patch-discovered-operation - requestBody: - content: - application/json: - schema: - properties: - state: - $ref: '#/components/schemas/apiShieldApiDiscoveryStatePatch' - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldPatchDiscoveryResponse' - description: Patch discovered operation response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Patch discovered operation response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Patch discovered operation - tags: - - API Shield API Discovery - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: Identifier for the discovered operation - in: path - name: operation_id - schema: - $ref: '#/components/schemas/apiShieldSchemasUuid' - required: true - /zones/{zone_id}/api_gateway/expression-template/fallthrough: - post: - description: >- - Creates an expression template fallthrough rule for API Shield. Used for - configuring default behavior when no other expression templates match. - operationId: api-shield-expression-templates-fallthrough - requestBody: - content: - application/json: - schema: - $ref: >- - #/components/schemas/apiShieldRequestExpressionTemplatesFallthrough - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: >- - #/components/schemas/apiShieldResponseExpressionTemplatesFallthrough - required: - - success - - errors - - messages - - result - type: object - description: Generate fallthrough WAF expression template response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Generate fallthrough WAF expression template failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Generate fallthrough WAF expression template from a set of API hosts - tags: - - API Shield WAF Expression Templates - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - x-stackql-sdk: - service: api_gateway - resource_chain: - - expression_template - - fallthrough - method: create - /zones/{zone_id}/api_gateway/labels: - get: - description: Retrieve all labels - operationId: api-shield-labels-get-labels - parameters: - - description: Page number of paginated results. - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - description: Maximum number of results per page. - in: query - name: per_page - schema: - default: 20 - maximum: 50 - minimum: 5 - type: integer - - in: query - name: order - schema: - description: Field to order by - enum: - - name - - description - - created_at - - last_updated - - mapped_resources.operations - type: string - - in: query - name: direction - schema: - description: Direction to order results. - enum: - - asc - - desc - type: string - - description: Filter for labels with source - in: query - name: source - schema: - $ref: '#/components/schemas/apiShieldLabelSource' - - description: >- - Filter for labels where the name or description matches using - substring match - in: query - name: filter - schema: - type: string - - description: Include `mapped_resources` for each label - in: query - name: with_mapped_resource_counts - schema: - default: false - type: boolean - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: '#/components/schemas/apiShieldFullLabel' - type: array - required: - - success - - errors - - messages - - result - description: Retrieve all labels response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Retrieve all labels response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Retrieve all labels - tags: - - API Shield Labels - x-api-token-group: - - Account API Gateway - - Account API Gateway Read - - Domain API Gateway - - Domain API Gateway Read - x-stackql-sdk: - service: api_gateway - resource_chain: - - labels - method: list - /zones/{zone_id}/api_gateway/labels/managed/{name}: - get: - description: Retrieve managed label - operationId: api-shield-labels-get-managed-label - parameters: - - description: Include `mapped_resources` for each label - in: query - name: with_mapped_resource_counts - schema: - default: false - type: boolean - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - name: name - in: path - required: true - description: Resource name. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/apiShieldFullManagedLabel' - required: - - success - - errors - - messages - - result - type: object - description: Retrieve managed label response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Retrieve managed label response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Retrieve managed label - tags: - - API Shield Labels - x-api-token-group: - - Account API Gateway - - Account API Gateway Read - - Domain API Gateway - - Domain API Gateway Read - x-stackql-sdk: - service: api_gateway - resource_chain: - - labels - - managed - method: get - /zones/{zone_id}/api_gateway/labels/managed/{name}/resources/operation: - put: - description: Replace all operations(s) attached to a managed label - operationId: api-shield-labels-replace-operations-attached-to-managed-label - requestBody: - content: - application/json: - schema: - $ref: >- - #/components/schemas/apiShieldReplaceOperationsAttachedToLabelRequest - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/apiShieldFullManagedLabel' - required: - - success - - errors - - messages - - result - type: object - description: Replace all operations(s) attached to a managed label response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Replace all operations(s) attached to a managed label failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Replace operation(s) attached to a managed label - tags: - - API Shield Labels - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - name: name - in: path - required: true - description: Resource name. - schema: - type: string - x-stackql-sdk: - service: api_gateway - resource_chain: - - labels - - managed - - resources - - operation - method: update - /zones/{zone_id}/api_gateway/labels/user: - delete: - operationId: api-shield-labels-delete-user-labels - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: '#/components/schemas/apiShieldLabel' - type: array - required: - - success - - errors - - messages - - result - description: Delete user labels response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Delete user labels response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete user labels - tags: - - API Shield Labels - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - post: - operationId: api-shield-labels-create-user-labels - requestBody: - content: - application/json: - schema: - items: - $ref: '#/components/schemas/apiShieldLabelRequest' - type: array - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: '#/components/schemas/apiShieldLabel' - type: array - required: - - success - - errors - - messages - - result - description: Create user labels response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Create user labels response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create user labels - tags: - - API Shield Labels - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - /zones/{zone_id}/api_gateway/labels/user/{name}: - delete: - description: Delete user label - operationId: api-shield-delete-user-label - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/apiShieldLabel' - required: - - success - - errors - - messages - - result - type: object - description: Delete user label response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Delete label response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete user label - tags: - - API Shield Labels - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - name: name - in: path - required: true - description: Resource name. - schema: - type: string - x-stackql-sdk: - service: api_gateway - resource_chain: - - labels - - user - method: delete - get: - description: Retrieve user label - operationId: api-shield-labels-get-user-label - parameters: - - description: Include `mapped_resources` for each label - in: query - name: with_mapped_resource_counts - schema: - default: false - type: boolean - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - name: name - in: path - required: true - description: Resource name. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/apiShieldFullLabel' - required: - - success - - errors - - messages - - result - type: object - description: Retrieve user label response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Retrieve user label response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Retrieve user label - tags: - - API Shield Labels - x-api-token-group: - - Account API Gateway - - Account API Gateway Read - - Domain API Gateway - - Domain API Gateway Read - x-stackql-sdk: - service: api_gateway - resource_chain: - - labels - - user - method: get - patch: - description: Update certain fields on a label - operationId: api-shield-patch-user-label - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldPatchLabelRequest' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/apiShieldLabel' - required: - - success - - errors - - messages - - result - type: object - description: Patch label response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Patch label response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Patch user label - tags: - - API Shield Labels - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - name: name - in: path - required: true - description: Resource name. - schema: - type: string - x-stackql-sdk: - service: api_gateway - resource_chain: - - labels - - user - method: edit - put: - description: Update all fields on a label - operationId: api-shield-put-user-label - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldPutLabelRequest' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/apiShieldLabel' - required: - - success - - errors - - messages - - result - type: object - description: Update label response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Update label response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update user label - tags: - - API Shield Labels - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - name: name - in: path - required: true - description: Resource name. - schema: - type: string - x-stackql-sdk: - service: api_gateway - resource_chain: - - labels - - user - method: update - /zones/{zone_id}/api_gateway/labels/user/{name}/resources/operation: - put: - description: Replace all operations(s) attached to a user label - operationId: api-shield-labels-replace-operations-attached-to-user-label - requestBody: - content: - application/json: - schema: - $ref: >- - #/components/schemas/apiShieldReplaceOperationsAttachedToLabelRequest - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/apiShieldFullLabel' - required: - - success - - errors - - messages - - result - type: object - description: Replace all operations(s) attached to a user label response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Replace all operations(s) attached to a user label failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Replace operation(s) attached to a user label - tags: - - API Shield Labels - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - name: name - in: path - required: true - description: Resource name. - schema: - type: string - x-stackql-sdk: - service: api_gateway - resource_chain: - - labels - - user - - resources - - operation - method: update - /zones/{zone_id}/api_gateway/operations: - delete: - description: >- - Bulk removes multiple API operations from API Shield endpoint management - in a single request. Efficient for cleaning up unused endpoints. - operationId: api-shield-endpoint-management-delete-multiple-operations - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommon' - description: Delete multiple operations response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Delete multiple operations response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete multiple operations - tags: - - API Shield Endpoint Management - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - x-stackql-sdk: - service: api_gateway - resource_chain: - - operations - method: bulk_delete - get: - description: >- - Lists all API operations tracked by API Shield for a zone with - pagination. Returns operation details including method, path, and - feature configurations. - operationId: >- - api-shield-endpoint-management-retrieve-information-about-all-operations-on-a-zone - parameters: - - description: Page number of paginated results. - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - description: Maximum number of results per page. - in: query - name: per_page - schema: - default: 20 - maximum: 50 - minimum: 5 - type: integer - - in: query - name: order - schema: - description: >- - Field to order by. When requesting a feature, the feature keys are - available for ordering as well, e.g., - `thresholds.suggested_threshold`. - enum: - - method - - host - - endpoint - - thresholds.$key - type: string - - in: query - name: direction - schema: - description: Direction to order results. - enum: - - asc - - desc - type: string - - in: query - name: host - schema: - description: Filter results to only include the specified hosts. - items: - type: string - type: array - uniqueItems: true - explode: true - - in: query - name: method - schema: - description: Filter results to only include the specified HTTP methods. - items: - type: string - type: array - uniqueItems: true - explode: true - - in: query - name: endpoint - schema: - description: Filter results to only include endpoints containing this pattern. - type: string - - description: >- - Add feature(s) to the results. The feature name that is given here - corresponds to the resulting feature object. Have a look at the - top-level object description for more details on the specific - meaning. - in: query - name: feature - schema: - items: - enum: - - thresholds - - parameter_schemas - - schema_info - type: string - type: array - uniqueItems: true - explode: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/apiShieldMultipleOperationResponsePaginated - description: Retrieve information about all operations on a zone response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Retrieve information about all operations on a zone response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Retrieve information about all operations on a zone - tags: - - API Shield Endpoint Management - x-api-token-group: - - Account API Gateway - - Account API Gateway Read - - Domain API Gateway - - Domain API Gateway Read - x-stackql-sdk: - service: api_gateway - resource_chain: - - operations - method: list - post: - description: >- - Add one or more operations to a zone. Endpoints can contain path - variables. Host, method, endpoint will be normalized to a canoncial form - when creating an operation and must be unique on the zone. Inserting an - operation that matches an existing one will return the record of the - already existing operation and update its last_updated date. - operationId: api-shield-endpoint-management-add-operations-to-a-zone - requestBody: - content: - application/json: - schema: - items: - $ref: '#/components/schemas/apiShieldBasicOperation' - type: array - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldMultipleOperationResponse' - description: Add operations to a zone response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Add operations to a zone response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Add operations to a zone - tags: - - API Shield Endpoint Management - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - /zones/{zone_id}/api_gateway/operations/item: - post: - description: >- - Add one operation to a zone. Endpoints can contain path variables. Host, - method, endpoint will be normalized to a canoncial form when creating an - operation and must be unique on the zone. Inserting an operation that - matches an existing one will return the record of the already existing - operation and update its last_updated date. - operationId: api-shield-endpoint-management-add-operation-to-a-zone - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldBasicOperation' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldSingleOperationResponse' - description: Add one operation to a zone response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Add one operation to a zone response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Add one operation to a zone - tags: - - API Shield Endpoint Management - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - x-stackql-sdk: - service: api_gateway - resource_chain: - - operations - method: create - /zones/{zone_id}/api_gateway/operations/labels: - delete: - description: Bulk remove label(s) on operation(s) in endpoint management - operationId: api-shield-operations-bulk-delete-labels-to-operations - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - items: - $ref: '#/components/schemas/apiShieldOperationWithLabelsOnly' - type: array - required: - - success - - errors - - messages - - result - type: object - description: Bulk remove label(s) on operation(s) in endpoint management response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: >- - Bulk remove label(s) on operation(s) in endpoint management response - failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Bulk remove label(s) on operation(s) in endpoint management - tags: - - API Shield Labels - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - post: - description: Bulk attach label(s) on operation(s) in endpoint management - operationId: api-shield-operations-bulk-post-labels-to-operations - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldBulkPostLabelsOnOperationRequest' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - items: - $ref: '#/components/schemas/apiShieldOperationWithLabelsOnly' - type: array - required: - - success - - errors - - messages - - result - type: object - description: Bulk attach label(s) on operation(s) in endpoint management response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: >- - Bulk attach label(s) on operation(s) in endpoint management response - failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Bulk attach label(s) on operation(s) in endpoint management - tags: - - API Shield Labels - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - put: - description: Bulk replace label(s) on operation(s) in endpoint management - operationId: api-shield-operations-bulk-put-labels-to-operations - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldBulkPutLabelsOnOperationRequest' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - items: - $ref: '#/components/schemas/apiShieldOperationWithLabelsOnly' - type: array - required: - - success - - errors - - messages - - result - type: object - description: >- - Bulk replace label(s) on operation(s) in endpoint management - response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: >- - Bulk replace label(s) on operation(s) in endpoint management - response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Bulk replace label(s) on operation(s) in endpoint management - tags: - - API Shield Labels - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - /zones/{zone_id}/api_gateway/operations/schema_validation: - patch: - deprecated: true - description: Updates multiple operation-level schema validation settings on the zone - operationId: api-shield-schema-validation-update-multiple-operation-level-settings - requestBody: - content: - application/json: - schema: - $ref: >- - #/components/schemas/apiShieldOldOperationSchemaValidationSettingsMultipleRequest - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: >- - #/components/schemas/apiShieldOldOperationSchemaValidationSettingsMultipleRequest - required: - - success - - errors - - messages - - result - type: object - description: Update multiple operation-level schema validation settings response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: >- - Update multiple operation-level schema validation settings response - failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update multiple operation-level schema validation settings - tags: - - API Shield Schema Validation 2.0 - x-api-token-group: - - Account API Gateway - - Domain API Gateway - x-stainless-deprecation-message: >- - Use [Schema Validation - API](https://developers.cloudflare.com/api/resources/schema_validation/) - instead. - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - x-stackql-sdk: - service: api_gateway - resource_chain: - - operations - - schema_validation - method: edit - /zones/{zone_id}/api_gateway/operations/{operation_id}: - delete: - description: >- - Removes a single API operation from API Shield endpoint management. The - operation will no longer be tracked or protected by API Shield rules. - operationId: api-shield-endpoint-management-delete-an-operation - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommon' - description: Delete an operation response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Delete an operation response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete an operation - tags: - - API Shield Endpoint Management - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: Identifier for the operation - in: path - name: operation_id - schema: - $ref: '#/components/schemas/apiShieldUuid' - required: true - x-stackql-sdk: - service: api_gateway - resource_chain: - - operations - method: delete - get: - description: >- - Gets detailed information about a specific API operation in API Shield, - including its schema validation settings and traffic statistics. - operationId: api-shield-endpoint-management-retrieve-information-about-an-operation - parameters: - - description: >- - Add feature(s) to the results. The feature name that is given here - corresponds to the resulting feature object. Have a look at the - top-level object description for more details on the specific - meaning. - in: query - name: feature - schema: - items: - enum: - - thresholds - - parameter_schemas - - schema_info - type: string - type: array - uniqueItems: true - explode: true - - description: >- - When true, includes OpenAPI schemas (both uploaded and learned) for - the operation in the response. Due to the conversion overhead, this - parameter is only supported on single-operation retrieval. - in: query - name: with_schemas - schema: - default: false - type: boolean - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: Identifier for the operation - in: path - name: operation_id - schema: - $ref: '#/components/schemas/apiShieldUuid' - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldSingleOperationResponse' - description: Retrieve information about an operation response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Retrieve information about an operation response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Retrieve information about an operation - tags: - - API Shield Endpoint Management - x-api-token-group: - - Account API Gateway - - Account API Gateway Read - - Domain API Gateway - - Domain API Gateway Read - x-stackql-sdk: - service: api_gateway - resource_chain: - - operations - method: get - /zones/{zone_id}/api_gateway/operations/{operation_id}/labels: - delete: - description: Remove label(s) on an operation in endpoint management - operationId: api-shield-operations-delete-labels-from-operation - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/apiShieldOperationWithLabelsOnly' - required: - - success - - errors - - messages - - result - type: object - description: Remove label(s) on an operation in endpoint management response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: >- - Remove label(s) on an operation in endpoint management response - failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Remove label(s) on an operation in endpoint management - tags: - - API Shield Labels - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: Identifier for the operation - in: path - name: operation_id - schema: - $ref: '#/components/schemas/apiShieldUuid' - required: true - x-stackql-sdk: - service: api_gateway - resource_chain: - - operations - - labels - method: delete - post: - description: Attach label(s) on an operation in endpoint management - operationId: api-shield-operations-post-labels-to-operation - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldPostLabelsOnOperationRequest' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/apiShieldOperationWithLabelsOnly' - required: - - success - - errors - - messages - - result - type: object - description: Attach label(s) on an operation in endpoint management response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: >- - Attach label(s) on an operation in endpoint management response - failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Attach label(s) on an operation in endpoint management - tags: - - API Shield Labels - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: Identifier for the operation - in: path - name: operation_id - schema: - $ref: '#/components/schemas/apiShieldUuid' - required: true - x-stackql-sdk: - service: api_gateway - resource_chain: - - operations - - labels - method: create - put: - description: Replace label(s) on an operation in endpoint management - operationId: api-shield-operations-put-labels-to-operation - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldPutLabelsOnOperationRequest' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/apiShieldOperationWithLabelsOnly' - required: - - success - - errors - - messages - - result - type: object - description: Replace label(s) on an operation in endpoint management response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: >- - Replace label(s) on an operation in endpoint management response - failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Replace label(s) on an operation in endpoint management - tags: - - API Shield Labels - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: Identifier for the operation - in: path - name: operation_id - schema: - $ref: '#/components/schemas/apiShieldUuid' - required: true - x-stackql-sdk: - service: api_gateway - resource_chain: - - operations - - labels - method: update - /zones/{zone_id}/api_gateway/operations/{operation_id}/schema_validation: - get: - deprecated: true - description: Retrieves operation-level schema validation settings on the zone - operationId: api-shield-schema-validation-retrieve-operation-level-settings - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/apiShieldOldOperationSchemaValidationSettings - description: Operation-level schema validation settings response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Operation-level schema validation settings response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Retrieve operation-level schema validation settings - tags: - - API Shield Schema Validation 2.0 - x-api-token-group: - - Account API Gateway - - Account API Gateway Read - - Domain API Gateway - - Domain API Gateway Read - x-stainless-deprecation-message: >- - Use [Schema Validation - API](https://developers.cloudflare.com/api/resources/schema_validation/) - instead. - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: Identifier for the operation - in: path - name: operation_id - schema: - $ref: '#/components/schemas/apiShieldUuid' - required: true - x-stackql-sdk: - service: api_gateway - resource_chain: - - operations - - schema_validation - method: get - put: - deprecated: true - description: Updates operation-level schema validation settings on the zone - operationId: api-shield-schema-validation-update-operation-level-settings - requestBody: - content: - application/json: - schema: - $ref: >- - #/components/schemas/apiShieldOldOperationSchemaValidationSettingsModifyRequest - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/apiShieldOldOperationSchemaValidationSettings - description: Update operation-level schema validation settings response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Update operation-level schema validation settings response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update operation-level schema validation settings - tags: - - API Shield Schema Validation 2.0 - x-api-token-group: - - Account API Gateway - - Domain API Gateway - x-stainless-deprecation-message: >- - Use [Schema Validation - API](https://developers.cloudflare.com/api/resources/schema_validation/) - instead. - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: Identifier for the operation - in: path - name: operation_id - schema: - $ref: '#/components/schemas/apiShieldUuid' - required: true - x-stackql-sdk: - service: api_gateway - resource_chain: - - operations - - schema_validation - method: update - /zones/{zone_id}/api_gateway/schemas: - get: - operationId: >- - api-shield-endpoint-management-retrieve-operations-and-features-as-open-api-schemas - parameters: - - in: query - name: host - schema: - description: Receive schema only for the given host(s). - items: - type: string - type: array - uniqueItems: true - explode: true - - description: >- - Add feature(s) to the results. The feature name that is given here - corresponds to the resulting feature object. Have a look at the - top-level object description for more details on the specific - meaning. - in: query - name: feature - schema: - items: - enum: - - thresholds - - parameter_schemas - - schema_info - type: string - type: array - uniqueItems: true - explode: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldSchemaResponseWithThresholds' - description: Retrieve operations and features as OpenAPI schemas response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Retrieve operations and features as OpenAPI schemas response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Retrieve operations and features as OpenAPI schemas - tags: - - API Shield Endpoint Management - x-api-token-group: - - Account API Gateway - - Account API Gateway Read - - Domain API Gateway - - Domain API Gateway Read - x-stackql-sdk: - service: api_gateway - resource_chain: - - schemas - method: list - /zones/{zone_id}/api_gateway/settings/schema_validation: - get: - deprecated: true - description: >- - Retrieves zone level schema validation settings currently set on the - zone - operationId: api-shield-schema-validation-retrieve-zone-level-settings - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldOldZoneSchemaValidationSettings' - description: Zone level schema validation settings response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Zone level schema validation settings response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Retrieve zone level schema validation settings - tags: - - API Shield Schema Validation 2.0 - x-api-token-group: - - Account API Gateway - - Account API Gateway Read - - Domain API Gateway - - Domain API Gateway Read - x-stainless-deprecation-message: >- - Use [Schema Validation - API](https://developers.cloudflare.com/api/resources/schema_validation/) - instead. - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - x-stackql-sdk: - service: api_gateway - resource_chain: - - settings - - schema_validation - method: get - patch: - deprecated: true - description: Updates zone level schema validation settings on the zone - operationId: api-shield-schema-validation-patch-zone-level-settings - requestBody: - content: - application/json: - schema: - $ref: >- - #/components/schemas/apiShieldOldZoneSchemaValidationSettingsPatch - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldOldZoneSchemaValidationSettings' - description: Update zone level schema validation settings response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Update zone level schema validation settings response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update zone level schema validation settings - tags: - - API Shield Schema Validation 2.0 - x-api-token-group: - - Account API Gateway - - Domain API Gateway - x-stainless-deprecation-message: >- - Use [Schema Validation - API](https://developers.cloudflare.com/api/resources/schema_validation/) - instead. - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - x-stackql-sdk: - service: api_gateway - resource_chain: - - settings - - schema_validation - method: edit - put: - deprecated: true - description: Updates zone level schema validation settings on the zone - operationId: api-shield-schema-validation-update-zone-level-settings - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldOldZoneSchemaValidationSettingsPut' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldOldZoneSchemaValidationSettings' - description: Update zone level schema validation settings response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Update zone level schema validation settings response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update zone level schema validation settings - tags: - - API Shield Schema Validation 2.0 - x-api-token-group: - - Account API Gateway - - Domain API Gateway - x-stainless-deprecation-message: >- - Use [Schema Validation - API](https://developers.cloudflare.com/api/resources/schema_validation/) - instead. - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - x-stackql-sdk: - service: api_gateway - resource_chain: - - settings - - schema_validation - method: update - /zones/{zone_id}/api_gateway/user_schemas: - get: - deprecated: true - description: >- - Lists all OpenAPI schemas uploaded to API Shield for the zone, including - their validation status and associated operations. - operationId: api-shield-schema-validation-retrieve-information-about-all-schemas - parameters: - - description: Page number of paginated results. - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - description: Maximum number of results per page. - in: query - name: per_page - schema: - default: 20 - maximum: 50 - minimum: 5 - type: integer - - description: Omit the source-files of schemas and only retrieve their meta-data. - in: query - name: omit_source - schema: - default: false - type: boolean - - in: query - name: validation_enabled - schema: - $ref: '#/components/schemas/apiShieldOldValidationEnabled' - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: '#/components/schemas/apiShieldOldPublicSchema' - type: array - required: - - success - - errors - - messages - - result - description: Retrieve information about all schemas on a zone response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Retrieve information about all schemas on a zone response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Retrieve information about all schemas on a zone - tags: - - API Shield Schema Validation 2.0 - x-api-token-group: - - Account API Gateway - - Account API Gateway Read - - Domain API Gateway - - Domain API Gateway Read - x-stainless-deprecation-message: >- - Use [Schema Validation - API](https://developers.cloudflare.com/api/resources/schema_validation/) - instead. - x-stackql-sdk: - service: api_gateway - resource_chain: - - user_schemas - method: list - post: - deprecated: true - operationId: api-shield-schema-validation-post-schema - requestBody: - content: - multipart/form-data: - schema: - properties: - file: - description: Schema file bytes - format: binary - type: string - kind: - $ref: '#/components/schemas/apiShieldOldKind' - name: - description: Name of the schema - type: string - validation_enabled: - description: Flag whether schema is enabled for validation. - enum: - - 'true' - - 'false' - type: string - required: - - file - - kind - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/apiShieldOldSchemaUploadResponse' - required: - - success - - errors - - messages - - result - type: object - description: Upload a schema response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldOldSchemaUploadFailure' - description: Upload a schema response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Upload a schema to a zone - tags: - - API Shield Schema Validation 2.0 - x-api-token-group: - - Account API Gateway - - Domain API Gateway - x-stainless-deprecation-message: >- - Use [Schema Validation - API](https://developers.cloudflare.com/api/resources/schema_validation/) - instead. - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - x-stackql-sdk: - service: api_gateway - resource_chain: - - user_schemas - method: create - /zones/{zone_id}/api_gateway/user_schemas/hosts: - get: - deprecated: true - description: >- - Lists all unique hosts found in uploaded OpenAPI schemas for the zone. - Useful for understanding which domains have schema coverage. - operationId: api-shield-schema-validation-retrieve-user-schema-hosts - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: >- - #/components/schemas/apiShieldOldResponseUserSchemasHosts - type: array - required: - - success - - errors - - messages - description: Retrieve schema hosts in a zone response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Retrieve schema hosts in a zone response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Retrieve schema hosts in a zone - tags: - - API Shield Schema Validation 2.0 - x-api-token-group: - - Account API Gateway - - Account API Gateway Read - - Domain API Gateway - - Domain API Gateway Read - x-stainless-deprecation-message: >- - Use [Schema Validation - API](https://developers.cloudflare.com/api/resources/schema_validation/) - instead. - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: Page number of paginated results. - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - description: Maximum number of results per page. - in: query - name: per_page - schema: - default: 20 - maximum: 50 - minimum: 5 - type: integer - x-stackql-sdk: - service: api_gateway - resource_chain: - - user_schemas - - hosts - method: list - /zones/{zone_id}/api_gateway/user_schemas/{schema_id}: - delete: - deprecated: true - description: >- - Permanently removes an uploaded OpenAPI schema from API Shield schema - validation. Operations using this schema will lose their validation - rules. - operationId: api-shield-schema-delete-a-schema - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseSingle' - description: Delete a schema response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Delete a schema response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete a schema - tags: - - API Shield Schema Validation 2.0 - x-api-token-group: - - Account API Gateway - - Domain API Gateway - x-stainless-deprecation-message: >- - Use [Schema Validation - API](https://developers.cloudflare.com/api/resources/schema_validation/) - instead. - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: Identifier for the schema-ID - in: path - name: schema_id - schema: - format: uuid - maxLength: 36 - readOnly: true - type: string - required: true - x-stackql-sdk: - service: api_gateway - resource_chain: - - user_schemas - method: delete - get: - deprecated: true - description: >- - Gets detailed information about a specific uploaded OpenAPI schema, - including its contents and validation configuration. - operationId: api-shield-schema-validation-retrieve-information-about-specific-schema - parameters: - - description: Omit the source-files of schemas and only retrieve their meta-data. - in: query - name: omit_source - schema: - default: false - type: boolean - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: Identifier for the schema-ID - in: path - name: schema_id - schema: - format: uuid - maxLength: 36 - readOnly: true - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/apiShieldOldPublicSchema' - required: - - success - - errors - - messages - - result - type: object - description: Retrieve information about a specific schema on a zone response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Retrieve information about a specific schema zone response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Retrieve information about a specific schema on a zone - tags: - - API Shield Schema Validation 2.0 - x-api-token-group: - - Account API Gateway - - Account API Gateway Read - - Domain API Gateway - - Domain API Gateway Read - x-stainless-deprecation-message: >- - Use [Schema Validation - API](https://developers.cloudflare.com/api/resources/schema_validation/) - instead. - x-stackql-sdk: - service: api_gateway - resource_chain: - - user_schemas - method: get - patch: - deprecated: true - description: >- - Activates schema validation for an uploaded OpenAPI schema. Requests to - matching endpoints will be validated against the schema definitions. - operationId: api-shield-schema-validation-enable-validation-for-a-schema - requestBody: - content: - application/json: - schema: - properties: - validation_enabled: - description: Flag whether schema is enabled for validation. - type: boolean - x-auditable: true - enum: - - true - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/apiShieldOldPublicSchema' - required: - - success - - errors - - messages - - result - type: object - description: Enable validation for a schema response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Enable validation for a schema response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Enable validation for a schema - tags: - - API Shield Schema Validation 2.0 - x-api-token-group: - - Account API Gateway - - Domain API Gateway - x-stainless-deprecation-message: >- - Use [Schema Validation - API](https://developers.cloudflare.com/api/resources/schema_validation/) - instead. - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: Identifier for the schema-ID - in: path - name: schema_id - schema: - format: uuid - maxLength: 36 - readOnly: true - type: string - required: true - x-stackql-sdk: - service: api_gateway - resource_chain: - - user_schemas - method: edit - /zones/{zone_id}/api_gateway/user_schemas/{schema_id}/operations: - get: - deprecated: true - description: >- - Retrieves all operations from the schema. Operations that already exist - in API Shield Endpoint Management will be returned as full operations. - operationId: api-shield-schema-validation-extract-operations-from-schema - parameters: - - description: >- - Add feature(s) to the results. The feature name that is given here - corresponds to the resulting feature object. Have a look at the - top-level object description for more details on the specific - meaning. - in: query - name: feature - schema: - items: - enum: - - thresholds - - parameter_schemas - - schema_info - type: string - type: array - uniqueItems: true - explode: true - - in: query - name: host - schema: - description: Filter results to only include the specified hosts. - items: - type: string - type: array - uniqueItems: true - explode: true - - in: query - name: method - schema: - description: Filter results to only include the specified HTTP methods. - items: - type: string - type: array - uniqueItems: true - explode: true - - in: query - name: endpoint - schema: - description: Filter results to only include endpoints containing this pattern. - type: string - - description: Page number of paginated results. - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - description: Maximum number of results per page. - in: query - name: per_page - schema: - default: 20 - maximum: 50 - minimum: 5 - type: integer - - description: >- - Filter results by whether operations exist in API Shield Endpoint - Management or not. `new` will just return operations from the schema - that do not exist in API Shield Endpoint Management. `existing` will - just return operations from the schema that already exist in API - Shield Endpoint Management. - in: query - name: operation_status - schema: - enum: - - new - - existing - type: string - - description: Identifier for the schema-ID - in: path - name: schema_id - schema: - format: uuid - maxLength: 36 - readOnly: true - type: string - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - type: object - properties: - endpoint: - $ref: '#/components/schemas/apiShieldEndpoint' - host: - $ref: '#/components/schemas/apiShieldHost' - method: - $ref: '#/components/schemas/apiShieldMethod' - last_updated: - $ref: '#/components/schemas/apiShieldSchemasTimestamp' - operation_id: - $ref: '#/components/schemas/apiShieldSchemasUuid' - features: - $ref: '#/components/schemas/apiShieldOperationFeatures' - required: - - endpoint - - host - - method - type: array - required: - - success - - errors - - messages - - result - description: Retrieve all operations from a schema response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Retrieve all operations from a schema response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Retrieve all operations from a schema. - tags: - - API Shield Schema Validation 2.0 - x-api-token-group: - - Account API Gateway - - Account API Gateway Read - - Domain API Gateway - - Domain API Gateway Read - x-stainless-deprecation-message: >- - Use [Schema Validation - API](https://developers.cloudflare.com/api/resources/schema_validation/) - instead. - x-stackql-sdk: - service: api_gateway - resource_chain: - - user_schemas - - operations - method: list -components: - schemas: - apiShieldApiDiscoveryOrigin: - description: >- - * `ML` - Discovered operation was sourced using ML API Discovery * - `SessionIdentifier` - Discovered operation was sourced using Session - Identifier API Discovery * `LabelDiscovery` - Discovered operation was - identified to have a specific label - enum: - - ML - - SessionIdentifier - - LabelDiscovery - type: string - x-auditable: true - apiShieldApiDiscoveryPatchMultipleRequest: - example: - 3818d821-5901-4147-a474-f5f5aec1d54e: - state: ignored - b17c8043-99a0-4202-b7d9-8f7cdbee02cd: - state: review - type: object - apiShieldApiDiscoveryState: - description: >- - State of operation in API Discovery * `review` - Operation is not saved - into API Shield Endpoint Management * `saved` - Operation is saved into - API Shield Endpoint Management * `ignored` - Operation is marked as - ignored - enum: - - review - - saved - - ignored - type: string - x-auditable: true - apiShieldApiDiscoveryStatePatch: - description: >- - Mark state of operation in API Discovery * `review` - Mark operation as - for review * `ignored` - Mark operation as ignored - enum: - - review - - ignored - type: string - x-auditable: true - apiShieldApiResponseCommon: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - type: object - apiShieldApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/apiShieldMessages' - messages: - example: [] - $ref: '#/components/schemas/apiShieldMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - apiShieldApiResponseSingle: - type: object - $ref: '#/components/schemas/apiShieldApiResponseCommon' - apiShieldAuthIdCharacteristics: - items: - type: object - description: Auth ID Characteristic - properties: - name: - description: >- - The name of the characteristic field, i.e., the header or cookie - name. - example: authorization - maxLength: 128 - type: string - x-auditable: true - type: - description: The type of characteristic. - enum: - - header - - cookie - example: header - type: string - x-auditable: true - required: - - name - - type - maxItems: 10 - type: array - uniqueItems: true - apiShieldAuthIdTokens: - description: The total number of auth-ids seen across this calculation. - readOnly: true - type: integer - x-auditable: true - apiShieldBasicOperation: - properties: - endpoint: - $ref: '#/components/schemas/apiShieldEndpoint' - host: - $ref: '#/components/schemas/apiShieldHost' - method: - $ref: '#/components/schemas/apiShieldMethod' - required: - - method - - host - - endpoint - type: object - apiShieldBulkPostLabelsOnOperationRequest: - properties: - managed: - properties: - labels: - description: List of managed label names. - items: - $ref: '#/components/schemas/apiShieldLabelName' - minItems: 1 - type: array - type: object - selector: - $ref: '#/components/schemas/apiShieldOperationIdSelector' - user: - properties: - labels: - description: List of user label names. - items: - $ref: '#/components/schemas/apiShieldLabelName' - minItems: 1 - type: array - type: object - required: - - selector - type: object - apiShieldBulkPutLabelsOnOperationRequest: - properties: - managed: - description: Managed labels to replace for all affected operations - properties: - labels: - description: >- - List of managed label names. Providing an empty array will - result in all managed labels being removed from all affected - operations - items: - $ref: '#/components/schemas/apiShieldLabelName' - type: array - required: - - labels - type: object - selector: - $ref: '#/components/schemas/apiShieldOperationIdSelector' - user: - description: User labels to replace for all affected operations - properties: - labels: - description: >- - List of user label names. Providing an empty array will result - in all user labels being removed from all affected operations - items: - $ref: '#/components/schemas/apiShieldLabelName' - type: array - required: - - labels - type: object - required: - - selector - - user - - managed - type: object - apiShieldConfidenceIntervalsBounds: - description: Upper and lower bound for percentile estimate - properties: - lower: - description: Lower bound for percentile estimate - example: 20.5 - type: number - x-auditable: true - upper: - description: Upper bound for percentile estimate - example: 30.4 - type: number - x-auditable: true - readOnly: true - type: object - apiShieldConfiguration: - properties: - auth_id_characteristics: - $ref: '#/components/schemas/apiShieldAuthIdCharacteristics' - required: - - auth_id_characteristics - type: object - apiShieldConfigurationSingleResponse: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/apiShieldConfiguration' - required: - - success - - errors - - messages - - result - type: object - apiShieldDataPoints: - description: The number of data points used for the threshold suggestion calculation. - readOnly: true - type: integer - x-auditable: true - apiShieldDiscoveryOperation: - properties: - features: - $ref: '#/components/schemas/apiShieldTrafficStats' - id: - $ref: '#/components/schemas/apiShieldSchemasUuid' - last_updated: - $ref: '#/components/schemas/apiShieldSchemasTimestamp' - origin: - description: API discovery engine(s) that discovered this operation - items: - $ref: '#/components/schemas/apiShieldApiDiscoveryOrigin' - type: array - state: - $ref: '#/components/schemas/apiShieldApiDiscoveryState' - endpoint: - $ref: '#/components/schemas/apiShieldEndpoint' - host: - $ref: '#/components/schemas/apiShieldHost' - method: - $ref: '#/components/schemas/apiShieldMethod' - required: - - id - - last_updated - - state - - origin - - method - - host - - endpoint - type: object - apiShieldEndpoint: - description: >- - The endpoint which can contain path parameter templates in curly braces, - each will be replaced from left to right with {varN}, starting with - {var1}, during insertion. This will further be Cloudflare-normalized - upon insertion. See: - https://developers.cloudflare.com/rules/normalization/how-it-works/. - example: /api/v1/users/{var1} - format: uri-template - maxLength: 4096 - type: string - x-auditable: true - apiShieldFullLabel: - type: object - properties: - created_at: - $ref: '#/components/schemas/apiShieldSchemasTimestamp' - readOnly: true - description: - $ref: '#/components/schemas/apiShieldLabelDescription' - last_updated: - $ref: '#/components/schemas/apiShieldSchemasTimestamp' - metadata: - $ref: '#/components/schemas/apiShieldLabelMetadata' - name: - $ref: '#/components/schemas/apiShieldLabelName' - source: - $ref: '#/components/schemas/apiShieldLabelSource' - mapped_resources: - $ref: '#/components/schemas/apiShieldLabelMappedResources' - required: - - name - - description - - metadata - - source - - last_updated - - created_at - apiShieldFullManagedLabel: - type: object - properties: - created_at: - $ref: '#/components/schemas/apiShieldSchemasTimestamp' - readOnly: true - description: - $ref: '#/components/schemas/apiShieldLabelDescription' - last_updated: - $ref: '#/components/schemas/apiShieldSchemasTimestamp' - metadata: - $ref: '#/components/schemas/apiShieldLabelMetadata' - name: - $ref: '#/components/schemas/apiShieldLabelName' - source: - $ref: '#/components/schemas/apiShieldLabelSource' - example: managed - mapped_resources: - $ref: '#/components/schemas/apiShieldLabelMappedResources' - required: - - name - - description - - metadata - - source - - last_updated - - created_at - apiShieldHost: - description: RFC3986-compliant host. - example: www.example.com - format: hostname - maxLength: 255 - type: string - x-auditable: true - apiShieldLabel: - type: object - properties: - created_at: - $ref: '#/components/schemas/apiShieldSchemasTimestamp' - readOnly: true - description: - $ref: '#/components/schemas/apiShieldLabelDescription' - last_updated: - $ref: '#/components/schemas/apiShieldSchemasTimestamp' - metadata: - $ref: '#/components/schemas/apiShieldLabelMetadata' - name: - $ref: '#/components/schemas/apiShieldLabelName' - source: - $ref: '#/components/schemas/apiShieldLabelSource' - required: - - name - - description - - metadata - - source - - last_updated - - created_at - apiShieldLabelDescription: - description: The description of the label - example: All endpoints that deal with logins - type: string - x-auditable: true - apiShieldLabelMappedResources: - description: Provides counts of what resources are linked to this label - example: - operations: 29 - type: object - apiShieldLabelMetadata: - description: Metadata for the label - example: - foo: bar - type: object - apiShieldLabelName: - description: The name of the label - example: login - type: string - x-auditable: true - apiShieldLabelRequest: - properties: - description: - $ref: '#/components/schemas/apiShieldLabelDescription' - metadata: - $ref: '#/components/schemas/apiShieldLabelMetadata' - name: - $ref: '#/components/schemas/apiShieldLabelName' - required: - - name - type: object - apiShieldLabelSource: - description: >- - * `user` - label is owned by the user * `managed` - label is owned by - cloudflare - enum: - - user - - managed - type: string - x-auditable: true - apiShieldMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - apiShieldMethod: - description: The HTTP method used to access the endpoint. - enum: - - GET - - POST - - HEAD - - OPTIONS - - PUT - - DELETE - - CONNECT - - PATCH - - TRACE - example: GET - type: string - x-auditable: true - apiShieldMultipleOperationResponse: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - items: - $ref: '#/components/schemas/apiShieldOperation' - type: array - required: - - success - - errors - - messages - - result - type: object - apiShieldMultipleOperationResponsePaginated: - type: object - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 2000 - type: number - total_pages: - description: The number of total pages in the entire result set. - example: 100 - type: number - type: object - result: - items: - $ref: '#/components/schemas/apiShieldOperation' - type: array - required: - - success - - errors - - messages - - result - apiShieldOldKind: - description: Kind of schema - enum: - - openapi_v3 - example: openapi_v3 - type: string - x-auditable: true - apiShieldOldOperationMitigationAction: - description: >- - When set, this applies a mitigation action to this operation - `log` log - request when request does not conform to schema for this operation - - `block` deny access to the site when request does not conform to schema - for this operation - `none` will skip mitigation for this operation - - `null` indicates that no operation level mitigation is in place, see - Zone Level Schema Validation Settings for mitigation action that will be - applied - enum: - - log - - block - - none - - null - example: block - nullable: true - type: string - x-auditable: true - apiShieldOldOperationSchemaValidationSettings: - properties: - mitigation_action: - $ref: '#/components/schemas/apiShieldOldOperationMitigationAction' - operation_id: - $ref: '#/components/schemas/apiShieldSchemasUuid' - type: object - apiShieldOldOperationSchemaValidationSettingsModifyRequest: - properties: - mitigation_action: - $ref: '#/components/schemas/apiShieldOldOperationMitigationAction' - type: object - apiShieldOldOperationSchemaValidationSettingsMultipleRequest: - example: - 3818d821-5901-4147-a474-f5f5aec1d54e: - mitigation_action: log - b17c8043-99a0-4202-b7d9-8f7cdbee02cd: - mitigation_action: block - type: object - apiShieldOldPublicSchema: - properties: - created_at: - $ref: '#/components/schemas/apiShieldSchemasTimestamp' - readOnly: true - kind: - $ref: '#/components/schemas/apiShieldOldKind' - name: - description: Name of the schema - example: petstore schema - type: string - x-auditable: true - schema_id: - $ref: '#/components/schemas/apiShieldSchemasUuid' - source: - description: Source of the schema - example: - type: string - x-auditable: true - validation_enabled: - $ref: '#/components/schemas/apiShieldOldValidationEnabled' - required: - - schema_id - - name - - kind - - created_at - type: object - apiShieldOldResponseUserSchemasHosts: - properties: - created_at: - $ref: '#/components/schemas/apiShieldSchemasTimestamp' - readOnly: true - hosts: - description: Hosts serving the schema, e.g zone.host.com - items: - type: string - type: array - name: - description: Name of the schema - example: petstore schema - type: string - x-auditable: true - schema_id: - $ref: '#/components/schemas/apiShieldSchemasUuid' - required: - - schema_id - - name - - hosts - - created_at - type: object - apiShieldOldSchemaUploadDetailsErrorsCritical: - properties: - critical: - description: Diagnostic critical error events that occurred during processing. - items: - $ref: '#/components/schemas/apiShieldOldSchemaUploadLogEvent' - type: array - errors: - description: Diagnostic error events that occurred during processing. - items: - $ref: '#/components/schemas/apiShieldOldSchemaUploadLogEvent' - type: array - type: object - apiShieldOldSchemaUploadDetailsWarningsOnly: - properties: - warnings: - description: >- - Diagnostic warning events that occurred during processing. These - events are non-critical errors found within the schema. - items: - $ref: '#/components/schemas/apiShieldOldSchemaUploadLogEvent' - type: array - type: object - apiShieldOldSchemaUploadFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/apiShieldMessages' - messages: - example: [] - $ref: '#/components/schemas/apiShieldMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - upload_details: - $ref: '#/components/schemas/apiShieldOldSchemaUploadDetailsErrorsCritical' - required: - - success - - errors - - messages - - result - type: object - apiShieldOldSchemaUploadLogEvent: - properties: - code: - description: Code that identifies the event that occurred. - example: 28 - type: integer - x-auditable: true - locations: - description: >- - JSONPath location(s) in the schema where these events were - encountered. See - [https://goessner.net/articles/JsonPath/](https://goessner.net/articles/JsonPath/) - for JSONPath specification. - items: - description: >- - JSONPath location in the schema where these events were - encountered. See - [https://goessner.net/articles/JsonPath/](https://goessner.net/articles/JsonPath/) - for JSONPath specification. - example: .paths["/user/{username}"].put - type: string - x-auditable: true - type: array - message: - description: Diagnostic message that describes the event. - example: 'unsupported media type: application/octet-stream' - type: string - x-auditable: true - required: - - code - type: object - apiShieldOldSchemaUploadResponse: - properties: - schema: - $ref: '#/components/schemas/apiShieldOldPublicSchema' - upload_details: - $ref: '#/components/schemas/apiShieldOldSchemaUploadDetailsWarningsOnly' - required: - - schema - type: object - apiShieldOldValidationDefaultMitigationAction: - description: >- - The default mitigation action used when there is no mitigation action - defined on the operation Mitigation actions are as follows: * `log` - - log request when request does not conform to schema * `block` - deny - access to the site when request does not conform to schema A special - value of of `none` will skip running schema validation entirely for the - request when there is no mitigation action defined on the operation - enum: - - none - - log - - block - example: block - type: string - x-auditable: true - apiShieldOldValidationDefaultMitigationActionPatch: - description: >- - The default mitigation action used when there is no mitigation action - defined on the operation Mitigation actions are as follows: * `log` - - log request when request does not conform to schema * `block` - deny - access to the site when request does not conform to schema A special - value of of `none` will skip running schema validation entirely for the - request when there is no mitigation action defined on the operation - `null` will have no effect. - enum: - - none - - log - - block - - null - example: block - nullable: true - type: string - x-auditable: true - apiShieldOldValidationEnabled: - description: Flag whether schema is enabled for validation. - type: boolean - x-auditable: true - apiShieldOldValidationOverrideMitigationAction: - description: >- - When set, this overrides both zone level and operation level mitigation - actions. - `none` will skip running schema validation entirely for the - request - `null` indicates that no override is in place - enum: - - none - - null - nullable: true - type: string - x-auditable: true - apiShieldOldValidationOverrideMitigationActionPatch: - description: >- - When set, this overrides both zone level and operation level mitigation - actions. - `none` will skip running schema validation entirely for the - request To clear any override, use the special value `disable_override` - `null` will have no effect. - enum: - - none - - disable_override - - null - example: none - nullable: true - type: string - x-auditable: true - apiShieldOldValidationOverrideMitigationActionWrite: - description: >- - When set, this overrides both zone level and operation level mitigation - actions. - `none` will skip running schema validation entirely for the - request - `null` indicates that no override is in place To clear any - override, use the special value `disable_override` or `null` - enum: - - none - - disable_override - - null - example: none - nullable: true - type: string - x-auditable: true - apiShieldOldZoneSchemaValidationSettings: - properties: - validation_default_mitigation_action: - $ref: '#/components/schemas/apiShieldOldValidationDefaultMitigationAction' - validation_override_mitigation_action: - $ref: '#/components/schemas/apiShieldOldValidationOverrideMitigationAction' - type: object - apiShieldOldZoneSchemaValidationSettingsPatch: - properties: - validation_default_mitigation_action: - $ref: >- - #/components/schemas/apiShieldOldValidationDefaultMitigationActionPatch - validation_override_mitigation_action: - $ref: >- - #/components/schemas/apiShieldOldValidationOverrideMitigationActionPatch - type: object - apiShieldOldZoneSchemaValidationSettingsPut: - properties: - validation_default_mitigation_action: - $ref: '#/components/schemas/apiShieldOldValidationDefaultMitigationAction' - validation_override_mitigation_action: - $ref: >- - #/components/schemas/apiShieldOldValidationOverrideMitigationActionWrite - required: - - validation_default_mitigation_action - type: object - apiShieldOpenapi: - description: A OpenAPI 3.0.0 compliant schema. - example: - info: - title: OpenAPI JSON schema for www.example.com - version: '1.0' - openapi: 3.0.0 - paths: - ... Further paths ...: {} - /api/v1/users/{var1}: - get: - parameters: - - in: path - name: var1 - schema: - type: string - servers: - - url: www.example.com - type: object - apiShieldOpenapiWithThresholds: - description: A OpenAPI 3.0.0 compliant schema. - example: - info: - title: OpenAPI JSON schema for www.example.com - version: '1.0' - openapi: 3.0.0 - paths: - ... Further paths ...: {} - /api/v1/users/{var1}: - get: - parameters: - - in: path - name: var1 - schema: - type: string - servers: - - url: www.example.com - type: object - apiShieldOperation: - properties: - endpoint: - $ref: '#/components/schemas/apiShieldEndpoint' - host: - $ref: '#/components/schemas/apiShieldHost' - method: - $ref: '#/components/schemas/apiShieldMethod' - last_updated: - $ref: '#/components/schemas/apiShieldSchemasTimestamp' - operation_id: - $ref: '#/components/schemas/apiShieldSchemasUuid' - features: - $ref: '#/components/schemas/apiShieldOperationFeatures' - required: - - method - - host - - endpoint - - operation_id - - last_updated - type: object - apiShieldOperationFeatures: - readOnly: true - type: object - properties: - thresholds: - properties: - auth_id_tokens: - $ref: '#/components/schemas/apiShieldAuthIdTokens' - data_points: - $ref: '#/components/schemas/apiShieldDataPoints' - last_updated: - $ref: '#/components/schemas/apiShieldTimestamp' - p50: - $ref: '#/components/schemas/apiShieldP50' - p90: - $ref: '#/components/schemas/apiShieldP90' - p99: - $ref: '#/components/schemas/apiShieldP99' - period_seconds: - $ref: '#/components/schemas/apiShieldPeriodSeconds' - requests: - $ref: '#/components/schemas/apiShieldRequests' - suggested_threshold: - $ref: '#/components/schemas/apiShieldSuggestedThreshold' - type: object - parameter_schemas: - properties: - last_updated: - $ref: '#/components/schemas/apiShieldTimestamp' - parameter_schemas: - $ref: '#/components/schemas/apiShieldParameterSchemasDefinition' - type: object - api_routing: - description: API Routing settings on endpoint. - properties: - last_updated: - $ref: '#/components/schemas/apiShieldTimestamp' - route: - description: Target route. - example: https://api.example.com/api/service - type: string - x-auditable: true - type: object - confidence_intervals: - properties: - last_updated: - $ref: '#/components/schemas/apiShieldTimestamp' - suggested_threshold: - properties: - confidence_intervals: - properties: - p90: - $ref: '#/components/schemas/apiShieldConfidenceIntervalsBounds' - p95: - $ref: '#/components/schemas/apiShieldConfidenceIntervalsBounds' - p99: - $ref: '#/components/schemas/apiShieldConfidenceIntervalsBounds' - type: object - mean: - description: Suggested threshold. - example: 25.5 - type: number - x-auditable: true - type: object - type: object - schema_info: - properties: - active_schema: - description: Schema active on endpoint. - properties: - created_at: - $ref: '#/components/schemas/apiShieldTimestamp' - readOnly: true - id: - $ref: '#/components/schemas/apiShieldSchemasUuid' - is_learned: - description: True if schema is Cloudflare-provided. - example: true - type: boolean - x-auditable: true - name: - description: Schema file name. - example: >- - api-endpoints-8694824bf5c04d019edcbf399c03c103-api-discovery.example.com-thresholds.json - type: string - x-auditable: true - type: object - learned_available: - description: >- - True if a Cloudflare-provided learned schema is available for - this endpoint. - example: true - type: boolean - x-auditable: true - mitigation_action: - description: Action taken on requests failing validation. - enum: - - none - - log - - block - example: block - nullable: true - type: string - x-auditable: true - type: object - required: - - last_updated - example: - api_routing: - last_updated: '2014-01-01T05:20:00.12345Z' - route: https://api.example.com/api/service - apiShieldOperationIdSelector: - description: Operation IDs selector - properties: - include: - properties: - operation_ids: - items: - $ref: '#/components/schemas/apiShieldSchemasUuid' - minItems: 1 - type: array - required: - - operation_ids - type: object - required: - - include - type: object - apiShieldOperationSchemaFragment: - description: >- - An OpenAPI operation object fragment containing schema information for - an operation. May include parameter definitions, request body - specifications, and a component schema extension. - nullable: true - properties: - parameters: - description: >- - OpenAPI parameter objects describing path, query, header, or cookie - parameters. - items: - type: object - type: array - requestBody: - description: OpenAPI request body object describing the expected request payload. - type: object - type: object - apiShieldOperationSchemas: - description: >- - OpenAPI JSON schemas for an operation, including both user-uploaded and - Cloudflare-learned schemas. - properties: - learned: - $ref: '#/components/schemas/apiShieldOperationSchemaFragment' - uploaded: - $ref: '#/components/schemas/apiShieldOperationSchemaFragment' - readOnly: true - type: object - apiShieldOperationWithLabelsOnly: - properties: - endpoint: - $ref: '#/components/schemas/apiShieldEndpoint' - host: - $ref: '#/components/schemas/apiShieldHost' - method: - $ref: '#/components/schemas/apiShieldMethod' - last_updated: - $ref: '#/components/schemas/apiShieldSchemasTimestamp' - operation_id: - $ref: '#/components/schemas/apiShieldSchemasUuid' - labels: - items: - $ref: '#/components/schemas/apiShieldLabel' - type: array - required: - - method - - host - - endpoint - - operation_id - - last_updated - type: object - apiShieldP50: - description: The p50 quantile of requests (in period_seconds). - readOnly: true - type: integer - x-auditable: true - apiShieldP90: - description: The p90 quantile of requests (in period_seconds). - readOnly: true - type: integer - x-auditable: true - apiShieldP99: - description: The p99 quantile of requests (in period_seconds). - readOnly: true - type: integer - x-auditable: true - apiShieldParameterSchemasDefinition: - description: An operation schema object containing a response. - example: - parameters: - - description: >- - Sufficient requests have been observed for this parameter to - provide high confidence in this parameter schema. - in: path - name: var1 - schema: - maximum: 10 - minimum: 1 - type: integer - responses: null - properties: - parameters: - description: An array containing the learned parameter schemas. - example: - - description: >- - Sufficient requests have been observed for this parameter to - provide high confidence in this parameter schema. - in: path - name: var1 - schema: - maximum: 10 - minimum: 1 - type: integer - items: - type: object - readOnly: true - type: array - responses: - description: >- - An empty response object. This field is required to yield a valid - operation schema. - nullable: true - readOnly: true - type: object - readOnly: true - type: object - apiShieldPatchDiscoveriesResponse: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/apiShieldApiDiscoveryPatchMultipleRequest' - required: - - success - - errors - - messages - - result - type: object - apiShieldPatchDiscoveryResponse: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - properties: - state: - $ref: '#/components/schemas/apiShieldApiDiscoveryState' - type: object - required: - - success - - errors - - messages - - result - type: object - apiShieldPatchLabelRequest: - properties: - description: - $ref: '#/components/schemas/apiShieldLabelDescription' - metadata: - $ref: '#/components/schemas/apiShieldLabelMetadata' - type: object - apiShieldPeriodSeconds: - description: The period over which this threshold is suggested. - readOnly: true - type: integer - x-auditable: true - apiShieldPostLabelsOnOperationRequest: - properties: - managed: - description: List of managed label names. - items: - $ref: '#/components/schemas/apiShieldLabelName' - minItems: 1 - type: array - user: - description: List of user label names. - items: - $ref: '#/components/schemas/apiShieldLabelName' - minItems: 1 - type: array - type: object - apiShieldPutLabelRequest: - properties: - description: - $ref: '#/components/schemas/apiShieldLabelDescription' - metadata: - $ref: '#/components/schemas/apiShieldLabelMetadata' - type: object - apiShieldPutLabelsOnOperationRequest: - properties: - managed: - description: >- - List of managed label names. Omitting this property or passing an - empty array will result in all managed labels being removed from the - operation - items: - $ref: '#/components/schemas/apiShieldLabelName' - type: array - user: - description: >- - List of user label names. Omitting this property or passing an empty - array will result in all user labels being removed from the - operation - items: - $ref: '#/components/schemas/apiShieldLabelName' - type: array - type: object - apiShieldReplaceOperationsAttachedToLabelRequest: - properties: - selector: - $ref: '#/components/schemas/apiShieldOperationIdSelector' - required: - - selector - type: object - apiShieldRequestExpressionTemplatesFallthrough: - properties: - hosts: - description: List of hosts to be targeted in the expression - example: - - '{zone}.domain1.tld' - - domain2.tld - items: - type: string - x-auditable: true - type: array - required: - - hosts - type: object - apiShieldRequests: - description: The estimated number of requests covered by these calculations. - readOnly: true - type: integer - x-auditable: true - apiShieldResponseExpressionTemplatesFallthrough: - properties: - expression: - description: WAF Expression for fallthrough - example: (cf.api_gateway.fallthrough_detected) - type: string - x-auditable: true - title: - description: Title for the expression - example: Fallthrough Expression for [zone.domain.tld] - type: string - x-auditable: true - required: - - title - - expression - type: object - apiShieldSchemaResponseDiscovery: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - properties: - schemas: - items: - $ref: '#/components/schemas/apiShieldOpenapi' - type: array - timestamp: - $ref: '#/components/schemas/apiShieldSchemasTimestamp' - required: - - timestamp - - schemas - type: object - required: - - success - - errors - - messages - - result - type: object - apiShieldSchemaResponseWithThresholds: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - properties: - schemas: - items: - $ref: '#/components/schemas/apiShieldOpenapiWithThresholds' - type: array - timestamp: - type: string - x-auditable: true - type: object - required: - - success - - errors - - messages - - result - type: object - apiShieldSchemasTimestamp: - $ref: '#/components/schemas/apiShieldTimestamp' - readOnly: true - type: string - x-auditable: true - apiShieldSchemasUuid: - minLength: 36 - type: string - x-auditable: true - $ref: '#/components/schemas/apiShieldUuid' - apiShieldSingleOperationResponse: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - properties: - endpoint: - $ref: '#/components/schemas/apiShieldEndpoint' - host: - $ref: '#/components/schemas/apiShieldHost' - method: - $ref: '#/components/schemas/apiShieldMethod' - last_updated: - $ref: '#/components/schemas/apiShieldSchemasTimestamp' - operation_id: - $ref: '#/components/schemas/apiShieldSchemasUuid' - features: - $ref: '#/components/schemas/apiShieldOperationFeatures' - schemas: - $ref: '#/components/schemas/apiShieldOperationSchemas' - required: - - method - - host - - endpoint - - operation_id - - last_updated - type: object - required: - - success - - errors - - messages - - result - type: object - apiShieldSuggestedThreshold: - description: >- - The suggested threshold in requests done by the same auth_id or - period_seconds. - readOnly: true - type: integer - x-auditable: true - apiShieldTimestamp: - example: '2014-01-01T05:20:00.12345Z' - format: date-time - type: string - x-auditable: true - apiShieldTrafficStats: - properties: - traffic_stats: - properties: - last_updated: - $ref: '#/components/schemas/apiShieldSchemasTimestamp' - period_seconds: - description: The period in seconds these statistics were computed over - example: 3600 - readOnly: true - type: integer - x-auditable: true - requests: - description: The average number of requests seen during this period - example: 1987.06 - format: float - readOnly: true - type: number - x-auditable: true - required: - - period_seconds - - requests - - last_updated - type: object - readOnly: true - type: object - apiShieldUuid: - description: UUID. - example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 - maxLength: 36 - type: string - x-auditable: true - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - configurations: - id: cloudflare.api_gateway.configurations - name: configurations - title: Configurations - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1configuration/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result.auth_id_characteristics - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1configuration/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/configurations/methods/list' - insert: [] - update: [] - delete: [] - replace: - - $ref: '#/components/x-stackQL-resources/configurations/methods/update' - discovery: - id: cloudflare.api_gateway.discovery - name: discovery - title: Discovery - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1discovery/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/discovery/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - discovery_operations: - id: cloudflare.api_gateway.discovery_operations - name: discovery_operations - title: Discovery Operations - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1discovery~1operations/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/discovery_operations/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - operations: - id: cloudflare.api_gateway.operations - name: operations - title: Operations - methods: - bulk_edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1api_gateway~1discovery~1operations/patch - response: - mediaType: application/json - openAPIDocKey: '200' - api_shield_api_patch_discovered_operation: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1api_gateway~1discovery~1operations~1{operation_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - bulk_delete: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1operations/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1api_gateway~1operations~1{operation_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1api_gateway~1operations~1{operation_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - list: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1api_gateway~1user_schemas~1{schema_id}~1operations/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/operations/methods/get' - - $ref: '#/components/x-stackQL-resources/operations/methods/list' - insert: [] - update: - - $ref: >- - #/components/x-stackQL-resources/operations/methods/api_shield_api_patch_discovered_operation - - $ref: '#/components/x-stackQL-resources/operations/methods/bulk_edit' - delete: - - $ref: '#/components/x-stackQL-resources/operations/methods/delete' - - $ref: '#/components/x-stackQL-resources/operations/methods/bulk_delete' - replace: [] - fallthrough: - id: cloudflare.api_gateway.fallthrough - name: fallthrough - title: Fallthrough - methods: - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1api_gateway~1expression-template~1fallthrough/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: '#/components/x-stackQL-resources/fallthrough/methods/create' - update: [] - delete: [] - replace: [] - labels: - id: cloudflare.api_gateway.labels - name: labels - title: Labels - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1labels/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - api_shield_operations_bulk_delete_labels_to_operations: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1operations~1labels/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - api_shield_operations_bulk_post_labels_to_operations: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1operations~1labels/post' - response: - mediaType: application/json - openAPIDocKey: '200' - api_shield_operations_bulk_put_labels_to_operations: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1operations~1labels/put' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1api_gateway~1operations~1{operation_id}~1labels/delete - response: - mediaType: application/json - openAPIDocKey: '200' - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1api_gateway~1operations~1{operation_id}~1labels/post - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1api_gateway~1operations~1{operation_id}~1labels/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/labels/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/labels/methods/create' - - $ref: >- - #/components/x-stackQL-resources/labels/methods/api_shield_operations_bulk_post_labels_to_operations - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/labels/methods/delete' - - $ref: >- - #/components/x-stackQL-resources/labels/methods/api_shield_operations_bulk_delete_labels_to_operations - replace: - - $ref: '#/components/x-stackQL-resources/labels/methods/update' - - $ref: >- - #/components/x-stackQL-resources/labels/methods/api_shield_operations_bulk_put_labels_to_operations - managed: - id: cloudflare.api_gateway.managed - name: managed - title: Managed - methods: - get: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1api_gateway~1labels~1managed~1{name}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/managed/methods/get' - insert: [] - update: [] - delete: [] - replace: [] - managed_resources_operation: - id: cloudflare.api_gateway.managed_resources_operation - name: managed_resources_operation - title: Managed Resources Operation - methods: - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1api_gateway~1labels~1managed~1{name}~1resources~1operation/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: - - $ref: >- - #/components/x-stackQL-resources/managed_resources_operation/methods/update - user: - id: cloudflare.api_gateway.user - name: user - title: User - methods: - api_shield_labels_delete_user_labels: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1labels~1user/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - api_shield_labels_create_user_labels: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1labels~1user/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1api_gateway~1labels~1user~1{name}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1labels~1user~1{name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1api_gateway~1labels~1user~1{name}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1labels~1user~1{name}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/user/methods/get' - insert: - - $ref: >- - #/components/x-stackQL-resources/user/methods/api_shield_labels_create_user_labels - update: - - $ref: '#/components/x-stackQL-resources/user/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/user/methods/delete' - - $ref: >- - #/components/x-stackQL-resources/user/methods/api_shield_labels_delete_user_labels - replace: - - $ref: '#/components/x-stackQL-resources/user/methods/update' - user_resources_operation: - id: cloudflare.api_gateway.user_resources_operation - name: user_resources_operation - title: User Resources Operation - methods: - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1api_gateway~1labels~1user~1{name}~1resources~1operation/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: - - $ref: >- - #/components/x-stackQL-resources/user_resources_operation/methods/update - api_gateway_operations: - id: cloudflare.api_gateway.api_gateway_operations - name: api_gateway_operations - title: Api Gateway Operations - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1operations/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - api_shield_endpoint_management_add_operations_to_a_zone: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1operations/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/api_gateway_operations/methods/list - insert: - - $ref: >- - #/components/x-stackQL-resources/api_gateway_operations/methods/api_shield_endpoint_management_add_operations_to_a_zone - update: [] - delete: [] - replace: [] - operations_item: - id: cloudflare.api_gateway.operations_item - name: operations_item - title: Operations Item - methods: - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1operations~1item/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: '#/components/x-stackQL-resources/operations_item/methods/create' - update: [] - delete: [] - replace: [] - operations_schema_validation: - id: cloudflare.api_gateway.operations_schema_validation - name: operations_schema_validation - title: Operations Schema Validation - methods: - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1api_gateway~1operations~1schema_validation/patch - response: - mediaType: application/json - openAPIDocKey: '200' - list_by_zone: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1api_gateway~1operations~1{operation_id}~1schema_validation/get - response: - mediaType: application/json - openAPIDocKey: '200' - update_by_zone: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1api_gateway~1operations~1{operation_id}~1schema_validation/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/operations_schema_validation/methods/list_by_zone - insert: [] - update: - - $ref: >- - #/components/x-stackQL-resources/operations_schema_validation/methods/edit - delete: [] - replace: - - $ref: >- - #/components/x-stackQL-resources/operations_schema_validation/methods/update_by_zone - schemas: - id: cloudflare.api_gateway.schemas - name: schemas - title: Schemas - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1schemas/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/schemas/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - settings_schema_validation: - id: cloudflare.api_gateway.settings_schema_validation - name: settings_schema_validation - title: Settings Schema Validation - methods: - list_by_zone: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1api_gateway~1settings~1schema_validation/get - response: - mediaType: application/json - openAPIDocKey: '200' - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1api_gateway~1settings~1schema_validation/patch - response: - mediaType: application/json - openAPIDocKey: '200' - update_by_zone: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1api_gateway~1settings~1schema_validation/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/settings_schema_validation/methods/list_by_zone - insert: [] - update: - - $ref: >- - #/components/x-stackQL-resources/settings_schema_validation/methods/edit - delete: [] - replace: - - $ref: >- - #/components/x-stackQL-resources/settings_schema_validation/methods/update_by_zone - user_schemas: - id: cloudflare.api_gateway.user_schemas - name: user_schemas - title: User Schemas - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1user_schemas/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1user_schemas/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1api_gateway~1user_schemas~1{schema_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1api_gateway~1user_schemas~1{schema_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1api_gateway~1user_schemas~1{schema_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/user_schemas/methods/get' - - $ref: '#/components/x-stackQL-resources/user_schemas/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/user_schemas/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/user_schemas/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/user_schemas/methods/delete' - replace: [] - hosts: - id: cloudflare.api_gateway.hosts - name: hosts - title: Hosts - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1user_schemas~1hosts/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/hosts/methods/list' - insert: [] - update: [] - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: api_gateway API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /zones/{zone_id}/api_gateway/configuration: + get: + description: Gets the current API Shield configuration settings for a zone, including validation behavior and enforcement mode. + operationId: api-shield-settings-retrieve-information-about-specific-configuration-properties + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldConfigurationSingleResponse' + description: Retrieve information about specific configuration properties response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Retrieve information about specific configuration properties response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Retrieve information about specific configuration properties + tags: + - API Shield Settings + x-api-token-group: + - Account API Gateway + - Account API Gateway Read + - Domain API Gateway + - Domain API Gateway Read + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Ensures that the configuration is written or retrieved in normalized fashion + in: query + name: normalize + schema: + type: boolean + x-stackql-sdk: + service: api_gateway + resource_chain: + - configurations + method: get + put: + description: Updates API Shield configuration settings for a zone. Can modify validation strictness, enforcement mode, and other global settings. + operationId: api-shield-settings-set-configuration-properties + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldConfiguration' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldConfigurationSingleResponse' + description: Set configuration properties response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Retrieve information about specific configuration properties response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update configuration properties + tags: + - API Shield Settings + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Ensures that the configuration is written or retrieved in normalized fashion + in: query + name: normalize + schema: + type: boolean + x-stackql-sdk: + service: api_gateway + resource_chain: + - configurations + method: update + /zones/{zone_id}/api_gateway/discovery: + get: + description: Retrieve the most up to date view of discovered operations, rendered as OpenAPI schemas + operationId: api-shield-api-discovery-retrieve-discovered-operations-on-a-zone-as-openapi + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldSchemaResponseDiscovery' + description: Retrieve discovered operations on a zone, rendered as OpenAPI schemas response + 4XX: + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + schemas: + items: + $ref: '#/components/schemas/apiShieldOpenapi' + type: array + timestamp: + $ref: '#/components/schemas/apiShieldSchemasTimestamp' + required: + - timestamp + - schemas + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + type: object + description: Retrieve discovered operations on a zone, rendered as OpenAPI schemas response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Retrieve discovered operations on a zone rendered as OpenAPI schemas + tags: + - API Shield API Discovery + x-api-token-group: + - Account API Gateway + - Account API Gateway Read + - Domain API Gateway + - Domain API Gateway Read + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + x-stackql-sdk: + service: api_gateway + resource_chain: + - discovery + method: get + /zones/{zone_id}/api_gateway/discovery/operations: + get: + description: Retrieve the most up to date view of discovered operations + operationId: api-shield-api-discovery-retrieve-discovered-operations-on-a-zone + parameters: + - description: Page number of paginated results. + in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - description: Maximum number of results per page. + in: query + name: per_page + schema: + default: 20 + maximum: 50 + minimum: 5 + type: integer + - in: query + name: host + schema: + description: Filter results to only include the specified hosts. + items: + type: string + type: array + uniqueItems: true + explode: true + - in: query + name: method + schema: + description: Filter results to only include the specified HTTP methods. + items: + type: string + type: array + uniqueItems: true + explode: true + - in: query + name: endpoint + schema: + description: Filter results to only include endpoints containing this pattern. + type: string + - in: query + name: direction + schema: + description: Direction to order results. + enum: + - asc + - desc + type: string + - in: query + name: order + schema: + description: Field to order by + enum: + - host + - method + - endpoint + - traffic_stats.requests + - traffic_stats.last_updated + type: string + - in: query + name: diff + schema: + description: When `true`, only return API Discovery results that are not saved into API Shield Endpoint Management + type: boolean + - description: Filter results to only include discovery results sourced from a particular discovery engine * `ML` - Discovered operations that were sourced using ML API Discovery * `SessionIdentifier` - Discovered operations that were sourced using Session Identifier API Discovery + in: query + name: origin + schema: + $ref: '#/components/schemas/apiShieldApiDiscoveryOrigin' + - description: Filter results to only include discovery results in a particular state. States are as follows * `review` - Discovered operations that are not saved into API Shield Endpoint Management * `saved` - Discovered operations that are already saved into API Shield Endpoint Management * `ignored` - Discovered operations that have been marked as ignored + in: query + name: state + schema: + $ref: '#/components/schemas/apiShieldApiDiscoveryState' + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/apiShieldDiscoveryOperation' + type: array + required: + - success + - errors + - messages + - result + description: Retrieve discovered operations on a zone response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Retrieve discovered operations on a zone response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Retrieve discovered operations on a zone + tags: + - API Shield API Discovery + x-api-token-group: + - Account API Gateway + - Account API Gateway Read + - Domain API Gateway + - Domain API Gateway Read + x-stackql-sdk: + service: api_gateway + resource_chain: + - discovery + - operations + method: list + patch: + description: Update the `state` on one or more discovered operations + operationId: api-shield-api-patch-discovered-operations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiDiscoveryPatchMultipleRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldPatchDiscoveriesResponse' + description: Patch discovered operations response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Patch discovered operations response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Patch discovered operations + tags: + - API Shield API Discovery + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + x-stackql-sdk: + service: api_gateway + resource_chain: + - discovery + - operations + method: bulk_edit + /zones/{zone_id}/api_gateway/discovery/operations/{operation_id}: + patch: + description: Update the `state` on a discovered operation + operationId: api-shield-api-patch-discovered-operation + requestBody: + content: + application/json: + schema: + properties: + state: + $ref: '#/components/schemas/apiShieldApiDiscoveryStatePatch' + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldPatchDiscoveryResponse' + description: Patch discovered operation response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Patch discovered operation response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Patch discovered operation + tags: + - API Shield API Discovery + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Identifier for the discovered operation + in: path + name: operation_id + schema: + $ref: '#/components/schemas/apiShieldSchemasUuid' + required: true + /zones/{zone_id}/api_gateway/expression-template/fallthrough: + post: + description: Creates an expression template fallthrough rule for API Shield. Used for configuring default behavior when no other expression templates match. + operationId: api-shield-expression-templates-fallthrough + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldRequestExpressionTemplatesFallthrough' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/apiShieldResponseExpressionTemplatesFallthrough' + required: + - success + - errors + - messages + - result + type: object + description: Generate fallthrough WAF expression template response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Generate fallthrough WAF expression template failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Generate fallthrough WAF expression template from a set of API hosts + tags: + - API Shield WAF Expression Templates + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + x-stackql-sdk: + service: api_gateway + resource_chain: + - expression_template + - fallthrough + method: create + /zones/{zone_id}/api_gateway/labels: + get: + description: Retrieve all labels + operationId: api-shield-labels-get-labels + parameters: + - description: Page number of paginated results. + in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - description: Maximum number of results per page. + in: query + name: per_page + schema: + default: 20 + maximum: 50 + minimum: 5 + type: integer + - in: query + name: order + schema: + description: Field to order by + enum: + - name + - description + - created_at + - last_updated + - mapped_resources.operations + type: string + - in: query + name: direction + schema: + description: Direction to order results. + enum: + - asc + - desc + type: string + - description: Filter for labels with source + in: query + name: source + schema: + $ref: '#/components/schemas/apiShieldLabelSource' + - description: Filter for labels where the name or description matches using substring match + in: query + name: filter + schema: + type: string + - description: Include `mapped_resources` for each label + in: query + name: with_mapped_resource_counts + schema: + default: false + type: boolean + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/apiShieldFullLabel' + type: array + required: + - success + - errors + - messages + - result + description: Retrieve all labels response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Retrieve all labels response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Retrieve all labels + tags: + - API Shield Labels + x-api-token-group: + - Account API Gateway + - Account API Gateway Read + - Domain API Gateway + - Domain API Gateway Read + x-stackql-sdk: + service: api_gateway + resource_chain: + - labels + method: list + /zones/{zone_id}/api_gateway/labels/managed/{name}: + get: + description: Retrieve managed label + operationId: api-shield-labels-get-managed-label + parameters: + - description: Include `mapped_resources` for each label + in: query + name: with_mapped_resource_counts + schema: + default: false + type: boolean + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - name: name + in: path + required: true + description: Resource name. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/apiShieldFullManagedLabel' + required: + - success + - errors + - messages + - result + type: object + description: Retrieve managed label response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Retrieve managed label response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Retrieve managed label + tags: + - API Shield Labels + x-api-token-group: + - Account API Gateway + - Account API Gateway Read + - Domain API Gateway + - Domain API Gateway Read + x-stackql-sdk: + service: api_gateway + resource_chain: + - labels + - managed + method: get + /zones/{zone_id}/api_gateway/labels/managed/{name}/resources/operation: + put: + description: Replace all operations(s) attached to a managed label + operationId: api-shield-labels-replace-operations-attached-to-managed-label + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldReplaceOperationsAttachedToLabelRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/apiShieldFullManagedLabel' + required: + - success + - errors + - messages + - result + type: object + description: Replace all operations(s) attached to a managed label response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Replace all operations(s) attached to a managed label failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Replace operation(s) attached to a managed label + tags: + - API Shield Labels + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - name: name + in: path + required: true + description: Resource name. + schema: + type: string + x-stackql-sdk: + service: api_gateway + resource_chain: + - labels + - managed + - resources + - operation + method: update + /zones/{zone_id}/api_gateway/labels/user: + delete: + operationId: api-shield-labels-delete-user-labels + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/apiShieldLabel' + type: array + required: + - success + - errors + - messages + - result + description: Delete user labels response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Delete user labels response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete user labels + tags: + - API Shield Labels + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + post: + operationId: api-shield-labels-create-user-labels + requestBody: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/apiShieldLabelRequest' + type: array + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/apiShieldLabel' + type: array + required: + - success + - errors + - messages + - result + description: Create user labels response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Create user labels response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create user labels + tags: + - API Shield Labels + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + /zones/{zone_id}/api_gateway/labels/user/{name}: + delete: + description: Delete user label + operationId: api-shield-delete-user-label + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/apiShieldLabel' + required: + - success + - errors + - messages + - result + type: object + description: Delete user label response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Delete label response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete user label + tags: + - API Shield Labels + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - name: name + in: path + required: true + description: Resource name. + schema: + type: string + x-stackql-sdk: + service: api_gateway + resource_chain: + - labels + - user + method: delete + get: + description: Retrieve user label + operationId: api-shield-labels-get-user-label + parameters: + - description: Include `mapped_resources` for each label + in: query + name: with_mapped_resource_counts + schema: + default: false + type: boolean + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - name: name + in: path + required: true + description: Resource name. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/apiShieldFullLabel' + required: + - success + - errors + - messages + - result + type: object + description: Retrieve user label response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Retrieve user label response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Retrieve user label + tags: + - API Shield Labels + x-api-token-group: + - Account API Gateway + - Account API Gateway Read + - Domain API Gateway + - Domain API Gateway Read + x-stackql-sdk: + service: api_gateway + resource_chain: + - labels + - user + method: get + patch: + description: Update certain fields on a label + operationId: api-shield-patch-user-label + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldPatchLabelRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/apiShieldLabel' + required: + - success + - errors + - messages + - result + type: object + description: Patch label response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Patch label response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Patch user label + tags: + - API Shield Labels + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - name: name + in: path + required: true + description: Resource name. + schema: + type: string + x-stackql-sdk: + service: api_gateway + resource_chain: + - labels + - user + method: edit + put: + description: Update all fields on a label + operationId: api-shield-put-user-label + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldPutLabelRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/apiShieldLabel' + required: + - success + - errors + - messages + - result + type: object + description: Update label response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Update label response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update user label + tags: + - API Shield Labels + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - name: name + in: path + required: true + description: Resource name. + schema: + type: string + x-stackql-sdk: + service: api_gateway + resource_chain: + - labels + - user + method: update + /zones/{zone_id}/api_gateway/labels/user/{name}/resources/operation: + put: + description: Replace all operations(s) attached to a user label + operationId: api-shield-labels-replace-operations-attached-to-user-label + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldReplaceOperationsAttachedToLabelRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/apiShieldFullLabel' + required: + - success + - errors + - messages + - result + type: object + description: Replace all operations(s) attached to a user label response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Replace all operations(s) attached to a user label failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Replace operation(s) attached to a user label + tags: + - API Shield Labels + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - name: name + in: path + required: true + description: Resource name. + schema: + type: string + x-stackql-sdk: + service: api_gateway + resource_chain: + - labels + - user + - resources + - operation + method: update + /zones/{zone_id}/api_gateway/operations: + delete: + description: Bulk removes multiple API operations from API Shield endpoint management in a single request. Efficient for cleaning up unused endpoints. + operationId: api-shield-endpoint-management-delete-multiple-operations + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommon' + description: Delete multiple operations response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Delete multiple operations response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete multiple operations + tags: + - API Shield Endpoint Management + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + x-stackql-sdk: + service: api_gateway + resource_chain: + - operations + method: bulk_delete + get: + description: Lists all API operations tracked by API Shield for a zone with pagination. Returns operation details including method, path, and feature configurations. + operationId: api-shield-endpoint-management-retrieve-information-about-all-operations-on-a-zone + parameters: + - description: Page number of paginated results. + in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - description: Maximum number of results per page. + in: query + name: per_page + schema: + default: 20 + maximum: 50 + minimum: 5 + type: integer + - in: query + name: order + schema: + description: Field to order by. When requesting a feature, the feature keys are available for ordering as well, e.g., `thresholds.suggested_threshold`. + enum: + - method + - host + - endpoint + - thresholds.$key + type: string + - in: query + name: direction + schema: + description: Direction to order results. + enum: + - asc + - desc + type: string + - in: query + name: host + schema: + description: Filter results to only include the specified hosts. + items: + type: string + type: array + uniqueItems: true + explode: true + - in: query + name: method + schema: + description: Filter results to only include the specified HTTP methods. + items: + type: string + type: array + uniqueItems: true + explode: true + - in: query + name: endpoint + schema: + description: Filter results to only include endpoints containing this pattern. + type: string + - description: Add feature(s) to the results. The feature name that is given here corresponds to the resulting feature object. Have a look at the top-level object description for more details on the specific meaning. + in: query + name: feature + schema: + items: + enum: + - thresholds + - parameter_schemas + - schema_info + type: string + type: array + uniqueItems: true + explode: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldMultipleOperationResponsePaginated' + description: Retrieve information about all operations on a zone response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Retrieve information about all operations on a zone response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Retrieve information about all operations on a zone + tags: + - API Shield Endpoint Management + x-api-token-group: + - Account API Gateway + - Account API Gateway Read + - Domain API Gateway + - Domain API Gateway Read + x-stackql-sdk: + service: api_gateway + resource_chain: + - operations + method: list + post: + description: Add one or more operations to a zone. Endpoints can contain path variables. Host, method, endpoint will be normalized to a canoncial form when creating an operation and must be unique on the zone. Inserting an operation that matches an existing one will return the record of the already existing operation and update its last_updated date. + operationId: api-shield-endpoint-management-add-operations-to-a-zone + requestBody: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/apiShieldBasicOperation' + type: array + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldMultipleOperationResponse' + description: Add operations to a zone response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Add operations to a zone response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Add operations to a zone + tags: + - API Shield Endpoint Management + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + /zones/{zone_id}/api_gateway/operations/item: + post: + description: Add one operation to a zone. Endpoints can contain path variables. Host, method, endpoint will be normalized to a canoncial form when creating an operation and must be unique on the zone. Inserting an operation that matches an existing one will return the record of the already existing operation and update its last_updated date. + operationId: api-shield-endpoint-management-add-operation-to-a-zone + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldBasicOperation' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldSingleOperationResponse' + description: Add one operation to a zone response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Add one operation to a zone response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Add one operation to a zone + tags: + - API Shield Endpoint Management + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + x-stackql-sdk: + service: api_gateway + resource_chain: + - operations + method: create + /zones/{zone_id}/api_gateway/operations/labels: + delete: + description: Bulk remove label(s) on operation(s) in endpoint management + operationId: api-shield-operations-bulk-delete-labels-to-operations + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + items: + $ref: '#/components/schemas/apiShieldOperationWithLabelsOnly' + type: array + required: + - success + - errors + - messages + - result + type: object + description: Bulk remove label(s) on operation(s) in endpoint management response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Bulk remove label(s) on operation(s) in endpoint management response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Bulk remove label(s) on operation(s) in endpoint management + tags: + - API Shield Labels + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + post: + description: Bulk attach label(s) on operation(s) in endpoint management + operationId: api-shield-operations-bulk-post-labels-to-operations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldBulkPostLabelsOnOperationRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + items: + $ref: '#/components/schemas/apiShieldOperationWithLabelsOnly' + type: array + required: + - success + - errors + - messages + - result + type: object + description: Bulk attach label(s) on operation(s) in endpoint management response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Bulk attach label(s) on operation(s) in endpoint management response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Bulk attach label(s) on operation(s) in endpoint management + tags: + - API Shield Labels + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + put: + description: Bulk replace label(s) on operation(s) in endpoint management + operationId: api-shield-operations-bulk-put-labels-to-operations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldBulkPutLabelsOnOperationRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + items: + $ref: '#/components/schemas/apiShieldOperationWithLabelsOnly' + type: array + required: + - success + - errors + - messages + - result + type: object + description: Bulk replace label(s) on operation(s) in endpoint management response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Bulk replace label(s) on operation(s) in endpoint management response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Bulk replace label(s) on operation(s) in endpoint management + tags: + - API Shield Labels + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + /zones/{zone_id}/api_gateway/operations/schema_validation: + patch: + deprecated: true + description: Updates multiple operation-level schema validation settings on the zone + operationId: api-shield-schema-validation-update-multiple-operation-level-settings + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldOldOperationSchemaValidationSettingsMultipleRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/apiShieldOldOperationSchemaValidationSettingsMultipleRequest' + required: + - success + - errors + - messages + - result + type: object + description: Update multiple operation-level schema validation settings response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Update multiple operation-level schema validation settings response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update multiple operation-level schema validation settings + tags: + - API Shield Schema Validation 2.0 + x-api-token-group: + - Account API Gateway + - Domain API Gateway + x-stainless-deprecation-message: Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead. + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + x-stackql-sdk: + service: api_gateway + resource_chain: + - operations + - schema_validation + method: edit + /zones/{zone_id}/api_gateway/operations/{operation_id}: + delete: + description: Removes a single API operation from API Shield endpoint management. The operation will no longer be tracked or protected by API Shield rules. + operationId: api-shield-endpoint-management-delete-an-operation + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommon' + description: Delete an operation response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Delete an operation response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete an operation + tags: + - API Shield Endpoint Management + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Identifier for the operation + in: path + name: operation_id + schema: + $ref: '#/components/schemas/apiShieldUuid' + required: true + x-stackql-sdk: + service: api_gateway + resource_chain: + - operations + method: delete + get: + description: Gets detailed information about a specific API operation in API Shield, including its schema validation settings and traffic statistics. + operationId: api-shield-endpoint-management-retrieve-information-about-an-operation + parameters: + - description: Add feature(s) to the results. The feature name that is given here corresponds to the resulting feature object. Have a look at the top-level object description for more details on the specific meaning. + in: query + name: feature + schema: + items: + enum: + - thresholds + - parameter_schemas + - schema_info + type: string + type: array + uniqueItems: true + explode: true + - description: When true, includes OpenAPI schemas (both uploaded and learned) for the operation in the response. Due to the conversion overhead, this parameter is only supported on single-operation retrieval. + in: query + name: with_schemas + schema: + default: false + type: boolean + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Identifier for the operation + in: path + name: operation_id + schema: + $ref: '#/components/schemas/apiShieldUuid' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldSingleOperationResponse' + description: Retrieve information about an operation response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Retrieve information about an operation response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Retrieve information about an operation + tags: + - API Shield Endpoint Management + x-api-token-group: + - Account API Gateway + - Account API Gateway Read + - Domain API Gateway + - Domain API Gateway Read + x-stackql-sdk: + service: api_gateway + resource_chain: + - operations + method: get + /zones/{zone_id}/api_gateway/operations/{operation_id}/labels: + delete: + description: Remove label(s) on an operation in endpoint management + operationId: api-shield-operations-delete-labels-from-operation + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/apiShieldOperationWithLabelsOnly' + required: + - success + - errors + - messages + - result + type: object + description: Remove label(s) on an operation in endpoint management response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Remove label(s) on an operation in endpoint management response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Remove label(s) on an operation in endpoint management + tags: + - API Shield Labels + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Identifier for the operation + in: path + name: operation_id + schema: + $ref: '#/components/schemas/apiShieldUuid' + required: true + x-stackql-sdk: + service: api_gateway + resource_chain: + - operations + - labels + method: delete + post: + description: Attach label(s) on an operation in endpoint management + operationId: api-shield-operations-post-labels-to-operation + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldPostLabelsOnOperationRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/apiShieldOperationWithLabelsOnly' + required: + - success + - errors + - messages + - result + type: object + description: Attach label(s) on an operation in endpoint management response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Attach label(s) on an operation in endpoint management response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Attach label(s) on an operation in endpoint management + tags: + - API Shield Labels + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Identifier for the operation + in: path + name: operation_id + schema: + $ref: '#/components/schemas/apiShieldUuid' + required: true + x-stackql-sdk: + service: api_gateway + resource_chain: + - operations + - labels + method: create + put: + description: Replace label(s) on an operation in endpoint management + operationId: api-shield-operations-put-labels-to-operation + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldPutLabelsOnOperationRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/apiShieldOperationWithLabelsOnly' + required: + - success + - errors + - messages + - result + type: object + description: Replace label(s) on an operation in endpoint management response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Replace label(s) on an operation in endpoint management response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Replace label(s) on an operation in endpoint management + tags: + - API Shield Labels + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Identifier for the operation + in: path + name: operation_id + schema: + $ref: '#/components/schemas/apiShieldUuid' + required: true + x-stackql-sdk: + service: api_gateway + resource_chain: + - operations + - labels + method: update + /zones/{zone_id}/api_gateway/operations/{operation_id}/schema_validation: + get: + deprecated: true + description: Retrieves operation-level schema validation settings on the zone + operationId: api-shield-schema-validation-retrieve-operation-level-settings + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldOldOperationSchemaValidationSettings' + description: Operation-level schema validation settings response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Operation-level schema validation settings response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Retrieve operation-level schema validation settings + tags: + - API Shield Schema Validation 2.0 + x-api-token-group: + - Account API Gateway + - Account API Gateway Read + - Domain API Gateway + - Domain API Gateway Read + x-stainless-deprecation-message: Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead. + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Identifier for the operation + in: path + name: operation_id + schema: + $ref: '#/components/schemas/apiShieldUuid' + required: true + x-stackql-sdk: + service: api_gateway + resource_chain: + - operations + - schema_validation + method: get + put: + deprecated: true + description: Updates operation-level schema validation settings on the zone + operationId: api-shield-schema-validation-update-operation-level-settings + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldOldOperationSchemaValidationSettingsModifyRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldOldOperationSchemaValidationSettings' + description: Update operation-level schema validation settings response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Update operation-level schema validation settings response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update operation-level schema validation settings + tags: + - API Shield Schema Validation 2.0 + x-api-token-group: + - Account API Gateway + - Domain API Gateway + x-stainless-deprecation-message: Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead. + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Identifier for the operation + in: path + name: operation_id + schema: + $ref: '#/components/schemas/apiShieldUuid' + required: true + x-stackql-sdk: + service: api_gateway + resource_chain: + - operations + - schema_validation + method: update + /zones/{zone_id}/api_gateway/schemas: + get: + operationId: api-shield-endpoint-management-retrieve-operations-and-features-as-open-api-schemas + parameters: + - in: query + name: host + schema: + description: Receive schema only for the given host(s). + items: + type: string + type: array + uniqueItems: true + explode: true + - description: Add feature(s) to the results. The feature name that is given here corresponds to the resulting feature object. Have a look at the top-level object description for more details on the specific meaning. + in: query + name: feature + schema: + items: + enum: + - thresholds + - parameter_schemas + - schema_info + type: string + type: array + uniqueItems: true + explode: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldSchemaResponseWithThresholds' + description: Retrieve operations and features as OpenAPI schemas response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Retrieve operations and features as OpenAPI schemas response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Retrieve operations and features as OpenAPI schemas + tags: + - API Shield Endpoint Management + x-api-token-group: + - Account API Gateway + - Account API Gateway Read + - Domain API Gateway + - Domain API Gateway Read + x-stackql-sdk: + service: api_gateway + resource_chain: + - schemas + method: list + /zones/{zone_id}/api_gateway/settings/schema_validation: + get: + deprecated: true + description: Retrieves zone level schema validation settings currently set on the zone + operationId: api-shield-schema-validation-retrieve-zone-level-settings + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldOldZoneSchemaValidationSettings' + description: Zone level schema validation settings response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Zone level schema validation settings response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Retrieve zone level schema validation settings + tags: + - API Shield Schema Validation 2.0 + x-api-token-group: + - Account API Gateway + - Account API Gateway Read + - Domain API Gateway + - Domain API Gateway Read + x-stainless-deprecation-message: Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead. + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + x-stackql-sdk: + service: api_gateway + resource_chain: + - settings + - schema_validation + method: get + patch: + deprecated: true + description: Updates zone level schema validation settings on the zone + operationId: api-shield-schema-validation-patch-zone-level-settings + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldOldZoneSchemaValidationSettingsPatch' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldOldZoneSchemaValidationSettings' + description: Update zone level schema validation settings response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Update zone level schema validation settings response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update zone level schema validation settings + tags: + - API Shield Schema Validation 2.0 + x-api-token-group: + - Account API Gateway + - Domain API Gateway + x-stainless-deprecation-message: Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead. + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + x-stackql-sdk: + service: api_gateway + resource_chain: + - settings + - schema_validation + method: edit + put: + deprecated: true + description: Updates zone level schema validation settings on the zone + operationId: api-shield-schema-validation-update-zone-level-settings + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldOldZoneSchemaValidationSettingsPut' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldOldZoneSchemaValidationSettings' + description: Update zone level schema validation settings response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Update zone level schema validation settings response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update zone level schema validation settings + tags: + - API Shield Schema Validation 2.0 + x-api-token-group: + - Account API Gateway + - Domain API Gateway + x-stainless-deprecation-message: Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead. + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + x-stackql-sdk: + service: api_gateway + resource_chain: + - settings + - schema_validation + method: update + /zones/{zone_id}/api_gateway/user_schemas: + get: + deprecated: true + description: Lists all OpenAPI schemas uploaded to API Shield for the zone, including their validation status and associated operations. + operationId: api-shield-schema-validation-retrieve-information-about-all-schemas + parameters: + - description: Page number of paginated results. + in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - description: Maximum number of results per page. + in: query + name: per_page + schema: + default: 20 + maximum: 50 + minimum: 5 + type: integer + - description: Omit the source-files of schemas and only retrieve their meta-data. + in: query + name: omit_source + schema: + default: false + type: boolean + - in: query + name: validation_enabled + schema: + $ref: '#/components/schemas/apiShieldOldValidationEnabled' + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/apiShieldOldPublicSchema' + type: array + required: + - success + - errors + - messages + - result + description: Retrieve information about all schemas on a zone response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Retrieve information about all schemas on a zone response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Retrieve information about all schemas on a zone + tags: + - API Shield Schema Validation 2.0 + x-api-token-group: + - Account API Gateway + - Account API Gateway Read + - Domain API Gateway + - Domain API Gateway Read + x-stainless-deprecation-message: Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead. + x-stackql-sdk: + service: api_gateway + resource_chain: + - user_schemas + method: list + post: + deprecated: true + operationId: api-shield-schema-validation-post-schema + requestBody: + content: + multipart/form-data: + schema: + properties: + file: + description: Schema file bytes + format: binary + type: string + kind: + $ref: '#/components/schemas/apiShieldOldKind' + name: + description: Name of the schema + type: string + validation_enabled: + description: Flag whether schema is enabled for validation. + enum: + - 'true' + - 'false' + type: string + required: + - file + - kind + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/apiShieldOldSchemaUploadResponse' + required: + - success + - errors + - messages + - result + type: object + description: Upload a schema response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldOldSchemaUploadFailure' + description: Upload a schema response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Upload a schema to a zone + tags: + - API Shield Schema Validation 2.0 + x-api-token-group: + - Account API Gateway + - Domain API Gateway + x-stainless-deprecation-message: Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead. + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + x-stackql-sdk: + service: api_gateway + resource_chain: + - user_schemas + method: create + /zones/{zone_id}/api_gateway/user_schemas/hosts: + get: + deprecated: true + description: Lists all unique hosts found in uploaded OpenAPI schemas for the zone. Useful for understanding which domains have schema coverage. + operationId: api-shield-schema-validation-retrieve-user-schema-hosts + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/apiShieldOldResponseUserSchemasHosts' + type: array + required: + - success + - errors + - messages + description: Retrieve schema hosts in a zone response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Retrieve schema hosts in a zone response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Retrieve schema hosts in a zone + tags: + - API Shield Schema Validation 2.0 + x-api-token-group: + - Account API Gateway + - Account API Gateway Read + - Domain API Gateway + - Domain API Gateway Read + x-stainless-deprecation-message: Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead. + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Page number of paginated results. + in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - description: Maximum number of results per page. + in: query + name: per_page + schema: + default: 20 + maximum: 50 + minimum: 5 + type: integer + x-stackql-sdk: + service: api_gateway + resource_chain: + - user_schemas + - hosts + method: list + /zones/{zone_id}/api_gateway/user_schemas/{schema_id}: + delete: + deprecated: true + description: Permanently removes an uploaded OpenAPI schema from API Shield schema validation. Operations using this schema will lose their validation rules. + operationId: api-shield-schema-delete-a-schema + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseSingle' + description: Delete a schema response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Delete a schema response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete a schema + tags: + - API Shield Schema Validation 2.0 + x-api-token-group: + - Account API Gateway + - Domain API Gateway + x-stainless-deprecation-message: Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead. + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Identifier for the schema-ID + in: path + name: schema_id + schema: + format: uuid + maxLength: 36 + readOnly: true + type: string + required: true + x-stackql-sdk: + service: api_gateway + resource_chain: + - user_schemas + method: delete + get: + deprecated: true + description: Gets detailed information about a specific uploaded OpenAPI schema, including its contents and validation configuration. + operationId: api-shield-schema-validation-retrieve-information-about-specific-schema + parameters: + - description: Omit the source-files of schemas and only retrieve their meta-data. + in: query + name: omit_source + schema: + default: false + type: boolean + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Identifier for the schema-ID + in: path + name: schema_id + schema: + format: uuid + maxLength: 36 + readOnly: true + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/apiShieldOldPublicSchema' + required: + - success + - errors + - messages + - result + type: object + description: Retrieve information about a specific schema on a zone response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Retrieve information about a specific schema zone response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Retrieve information about a specific schema on a zone + tags: + - API Shield Schema Validation 2.0 + x-api-token-group: + - Account API Gateway + - Account API Gateway Read + - Domain API Gateway + - Domain API Gateway Read + x-stainless-deprecation-message: Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead. + x-stackql-sdk: + service: api_gateway + resource_chain: + - user_schemas + method: get + patch: + deprecated: true + description: Activates schema validation for an uploaded OpenAPI schema. Requests to matching endpoints will be validated against the schema definitions. + operationId: api-shield-schema-validation-enable-validation-for-a-schema + requestBody: + content: + application/json: + schema: + properties: + validation_enabled: + description: Flag whether schema is enabled for validation. + type: boolean + x-auditable: true + enum: + - true + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/apiShieldOldPublicSchema' + required: + - success + - errors + - messages + - result + type: object + description: Enable validation for a schema response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Enable validation for a schema response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Enable validation for a schema + tags: + - API Shield Schema Validation 2.0 + x-api-token-group: + - Account API Gateway + - Domain API Gateway + x-stainless-deprecation-message: Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead. + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Identifier for the schema-ID + in: path + name: schema_id + schema: + format: uuid + maxLength: 36 + readOnly: true + type: string + required: true + x-stackql-sdk: + service: api_gateway + resource_chain: + - user_schemas + method: edit + /zones/{zone_id}/api_gateway/user_schemas/{schema_id}/operations: + get: + deprecated: true + description: Retrieves all operations from the schema. Operations that already exist in API Shield Endpoint Management will be returned as full operations. + operationId: api-shield-schema-validation-extract-operations-from-schema + parameters: + - description: Add feature(s) to the results. The feature name that is given here corresponds to the resulting feature object. Have a look at the top-level object description for more details on the specific meaning. + in: query + name: feature + schema: + items: + enum: + - thresholds + - parameter_schemas + - schema_info + type: string + type: array + uniqueItems: true + explode: true + - in: query + name: host + schema: + description: Filter results to only include the specified hosts. + items: + type: string + type: array + uniqueItems: true + explode: true + - in: query + name: method + schema: + description: Filter results to only include the specified HTTP methods. + items: + type: string + type: array + uniqueItems: true + explode: true + - in: query + name: endpoint + schema: + description: Filter results to only include endpoints containing this pattern. + type: string + - description: Page number of paginated results. + in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - description: Maximum number of results per page. + in: query + name: per_page + schema: + default: 20 + maximum: 50 + minimum: 5 + type: integer + - description: Filter results by whether operations exist in API Shield Endpoint Management or not. `new` will just return operations from the schema that do not exist in API Shield Endpoint Management. `existing` will just return operations from the schema that already exist in API Shield Endpoint Management. + in: query + name: operation_status + schema: + enum: + - new + - existing + type: string + - description: Identifier for the schema-ID + in: path + name: schema_id + schema: + format: uuid + maxLength: 36 + readOnly: true + type: string + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + type: object + properties: + endpoint: + $ref: '#/components/schemas/apiShieldEndpoint' + host: + $ref: '#/components/schemas/apiShieldHost' + method: + $ref: '#/components/schemas/apiShieldMethod' + last_updated: + $ref: '#/components/schemas/apiShieldSchemasTimestamp' + operation_id: + $ref: '#/components/schemas/apiShieldSchemasUuid' + features: + $ref: '#/components/schemas/apiShieldOperationFeatures' + required: + - endpoint + - host + - method + type: array + required: + - success + - errors + - messages + - result + description: Retrieve all operations from a schema response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Retrieve all operations from a schema response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Retrieve all operations from a schema. + tags: + - API Shield Schema Validation 2.0 + x-api-token-group: + - Account API Gateway + - Account API Gateway Read + - Domain API Gateway + - Domain API Gateway Read + x-stainless-deprecation-message: Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead. + x-stackql-sdk: + service: api_gateway + resource_chain: + - user_schemas + - operations + method: list +components: + schemas: + apiShieldApiDiscoveryOrigin: + description: '* `ML` - Discovered operation was sourced using ML API Discovery * `SessionIdentifier` - Discovered operation was sourced using Session Identifier API Discovery * `LabelDiscovery` - Discovered operation was identified to have a specific label' + enum: + - ML + - SessionIdentifier + - LabelDiscovery + type: string + x-auditable: true + apiShieldApiDiscoveryPatchMultipleRequest: + example: + 3818d821-5901-4147-a474-f5f5aec1d54e: + state: ignored + b17c8043-99a0-4202-b7d9-8f7cdbee02cd: + state: review + type: object + apiShieldApiDiscoveryState: + description: State of operation in API Discovery * `review` - Operation is not saved into API Shield Endpoint Management * `saved` - Operation is saved into API Shield Endpoint Management * `ignored` - Operation is marked as ignored + enum: + - review + - saved + - ignored + type: string + x-auditable: true + apiShieldApiDiscoveryStatePatch: + description: Mark state of operation in API Discovery * `review` - Mark operation as for review * `ignored` - Mark operation as ignored + enum: + - review + - ignored + type: string + x-auditable: true + apiShieldApiResponseCommon: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + type: object + apiShieldApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/apiShieldMessages' + messages: + example: [] + $ref: '#/components/schemas/apiShieldMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + apiShieldApiResponseSingle: + type: object + $ref: '#/components/schemas/apiShieldApiResponseCommon' + apiShieldAuthIdCharacteristics: + items: + type: object + description: Auth ID Characteristic + properties: + name: + description: The name of the characteristic field, i.e., the header or cookie name. + example: authorization + maxLength: 128 + type: string + x-auditable: true + type: + description: The type of characteristic. + enum: + - header + - cookie + example: header + type: string + x-auditable: true + required: + - name + - type + maxItems: 10 + type: array + uniqueItems: true + apiShieldAuthIdTokens: + description: The total number of auth-ids seen across this calculation. + readOnly: true + type: integer + x-auditable: true + apiShieldBasicOperation: + properties: + endpoint: + $ref: '#/components/schemas/apiShieldEndpoint' + host: + $ref: '#/components/schemas/apiShieldHost' + method: + $ref: '#/components/schemas/apiShieldMethod' + required: + - method + - host + - endpoint + type: object + apiShieldBulkPostLabelsOnOperationRequest: + properties: + managed: + properties: + labels: + description: List of managed label names. + items: + $ref: '#/components/schemas/apiShieldLabelName' + minItems: 1 + type: array + type: object + selector: + $ref: '#/components/schemas/apiShieldOperationIdSelector' + user: + properties: + labels: + description: List of user label names. + items: + $ref: '#/components/schemas/apiShieldLabelName' + minItems: 1 + type: array + type: object + required: + - selector + type: object + apiShieldBulkPutLabelsOnOperationRequest: + properties: + managed: + description: Managed labels to replace for all affected operations + properties: + labels: + description: List of managed label names. Providing an empty array will result in all managed labels being removed from all affected operations + items: + $ref: '#/components/schemas/apiShieldLabelName' + type: array + required: + - labels + type: object + selector: + $ref: '#/components/schemas/apiShieldOperationIdSelector' + user: + description: User labels to replace for all affected operations + properties: + labels: + description: List of user label names. Providing an empty array will result in all user labels being removed from all affected operations + items: + $ref: '#/components/schemas/apiShieldLabelName' + type: array + required: + - labels + type: object + required: + - selector + - user + - managed + type: object + apiShieldConfidenceIntervalsBounds: + description: Upper and lower bound for percentile estimate + properties: + lower: + description: Lower bound for percentile estimate + example: 20.5 + type: number + x-auditable: true + upper: + description: Upper bound for percentile estimate + example: 30.4 + type: number + x-auditable: true + readOnly: true + type: object + apiShieldConfiguration: + properties: + auth_id_characteristics: + $ref: '#/components/schemas/apiShieldAuthIdCharacteristics' + required: + - auth_id_characteristics + type: object + apiShieldConfigurationSingleResponse: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/apiShieldConfiguration' + required: + - success + - errors + - messages + - result + type: object + apiShieldDataPoints: + description: The number of data points used for the threshold suggestion calculation. + readOnly: true + type: integer + x-auditable: true + apiShieldDiscoveryOperation: + properties: + features: + $ref: '#/components/schemas/apiShieldTrafficStats' + id: + $ref: '#/components/schemas/apiShieldSchemasUuid' + last_updated: + $ref: '#/components/schemas/apiShieldSchemasTimestamp' + origin: + description: API discovery engine(s) that discovered this operation + items: + $ref: '#/components/schemas/apiShieldApiDiscoveryOrigin' + type: array + state: + $ref: '#/components/schemas/apiShieldApiDiscoveryState' + endpoint: + $ref: '#/components/schemas/apiShieldEndpoint' + host: + $ref: '#/components/schemas/apiShieldHost' + method: + $ref: '#/components/schemas/apiShieldMethod' + required: + - id + - last_updated + - state + - origin + - method + - host + - endpoint + type: object + apiShieldEndpoint: + description: 'The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.' + example: /api/v1/users/{var1} + format: uri-template + maxLength: 4096 + type: string + x-auditable: true + apiShieldFullLabel: + type: object + properties: + created_at: + $ref: '#/components/schemas/apiShieldSchemasTimestamp' + readOnly: true + description: + $ref: '#/components/schemas/apiShieldLabelDescription' + last_updated: + $ref: '#/components/schemas/apiShieldSchemasTimestamp' + metadata: + $ref: '#/components/schemas/apiShieldLabelMetadata' + name: + $ref: '#/components/schemas/apiShieldLabelName' + source: + $ref: '#/components/schemas/apiShieldLabelSource' + mapped_resources: + $ref: '#/components/schemas/apiShieldLabelMappedResources' + required: + - name + - description + - metadata + - source + - last_updated + - created_at + apiShieldFullManagedLabel: + type: object + properties: + created_at: + $ref: '#/components/schemas/apiShieldSchemasTimestamp' + readOnly: true + description: + $ref: '#/components/schemas/apiShieldLabelDescription' + last_updated: + $ref: '#/components/schemas/apiShieldSchemasTimestamp' + metadata: + $ref: '#/components/schemas/apiShieldLabelMetadata' + name: + $ref: '#/components/schemas/apiShieldLabelName' + source: + $ref: '#/components/schemas/apiShieldLabelSource' + example: managed + mapped_resources: + $ref: '#/components/schemas/apiShieldLabelMappedResources' + required: + - name + - description + - metadata + - source + - last_updated + - created_at + apiShieldHost: + description: RFC3986-compliant host. + example: www.example.com + format: hostname + maxLength: 255 + type: string + x-auditable: true + apiShieldLabel: + type: object + properties: + created_at: + $ref: '#/components/schemas/apiShieldSchemasTimestamp' + readOnly: true + description: + $ref: '#/components/schemas/apiShieldLabelDescription' + last_updated: + $ref: '#/components/schemas/apiShieldSchemasTimestamp' + metadata: + $ref: '#/components/schemas/apiShieldLabelMetadata' + name: + $ref: '#/components/schemas/apiShieldLabelName' + source: + $ref: '#/components/schemas/apiShieldLabelSource' + required: + - name + - description + - metadata + - source + - last_updated + - created_at + apiShieldLabelDescription: + description: The description of the label + example: All endpoints that deal with logins + type: string + x-auditable: true + apiShieldLabelMappedResources: + description: Provides counts of what resources are linked to this label + example: + operations: 29 + type: object + apiShieldLabelMetadata: + description: Metadata for the label + example: + foo: bar + type: object + apiShieldLabelName: + description: The name of the label + example: login + type: string + x-auditable: true + apiShieldLabelRequest: + properties: + description: + $ref: '#/components/schemas/apiShieldLabelDescription' + metadata: + $ref: '#/components/schemas/apiShieldLabelMetadata' + name: + $ref: '#/components/schemas/apiShieldLabelName' + required: + - name + type: object + apiShieldLabelSource: + description: '* `user` - label is owned by the user * `managed` - label is owned by cloudflare' + enum: + - user + - managed + type: string + x-auditable: true + apiShieldMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + apiShieldMethod: + description: The HTTP method used to access the endpoint. + enum: + - GET + - POST + - HEAD + - OPTIONS + - PUT + - DELETE + - CONNECT + - PATCH + - TRACE + example: GET + type: string + x-auditable: true + apiShieldMultipleOperationResponse: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + items: + $ref: '#/components/schemas/apiShieldOperation' + type: array + required: + - success + - errors + - messages + - result + type: object + apiShieldMultipleOperationResponsePaginated: + type: object + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 2000 + type: number + total_pages: + description: The number of total pages in the entire result set. + example: 100 + type: number + type: object + result: + items: + $ref: '#/components/schemas/apiShieldOperation' + type: array + required: + - success + - errors + - messages + - result + apiShieldOldKind: + description: Kind of schema + enum: + - openapi_v3 + example: openapi_v3 + type: string + x-auditable: true + apiShieldOldOperationMitigationAction: + description: When set, this applies a mitigation action to this operation - `log` log request when request does not conform to schema for this operation - `block` deny access to the site when request does not conform to schema for this operation - `none` will skip mitigation for this operation - `null` indicates that no operation level mitigation is in place, see Zone Level Schema Validation Settings for mitigation action that will be applied + enum: + - log + - block + - none + - null + example: block + nullable: true + type: string + x-auditable: true + apiShieldOldOperationSchemaValidationSettings: + properties: + mitigation_action: + $ref: '#/components/schemas/apiShieldOldOperationMitigationAction' + operation_id: + $ref: '#/components/schemas/apiShieldSchemasUuid' + type: object + apiShieldOldOperationSchemaValidationSettingsModifyRequest: + properties: + mitigation_action: + $ref: '#/components/schemas/apiShieldOldOperationMitigationAction' + type: object + apiShieldOldOperationSchemaValidationSettingsMultipleRequest: + example: + 3818d821-5901-4147-a474-f5f5aec1d54e: + mitigation_action: log + b17c8043-99a0-4202-b7d9-8f7cdbee02cd: + mitigation_action: block + type: object + apiShieldOldPublicSchema: + properties: + created_at: + $ref: '#/components/schemas/apiShieldSchemasTimestamp' + readOnly: true + kind: + $ref: '#/components/schemas/apiShieldOldKind' + name: + description: Name of the schema + example: petstore schema + type: string + x-auditable: true + schema_id: + $ref: '#/components/schemas/apiShieldSchemasUuid' + source: + description: Source of the schema + example: + type: string + x-auditable: true + validation_enabled: + $ref: '#/components/schemas/apiShieldOldValidationEnabled' + required: + - schema_id + - name + - kind + - created_at + type: object + apiShieldOldResponseUserSchemasHosts: + properties: + created_at: + $ref: '#/components/schemas/apiShieldSchemasTimestamp' + readOnly: true + hosts: + description: Hosts serving the schema, e.g zone.host.com + items: + type: string + type: array + name: + description: Name of the schema + example: petstore schema + type: string + x-auditable: true + schema_id: + $ref: '#/components/schemas/apiShieldSchemasUuid' + required: + - schema_id + - name + - hosts + - created_at + type: object + apiShieldOldSchemaUploadDetailsErrorsCritical: + properties: + critical: + description: Diagnostic critical error events that occurred during processing. + items: + $ref: '#/components/schemas/apiShieldOldSchemaUploadLogEvent' + type: array + errors: + description: Diagnostic error events that occurred during processing. + items: + $ref: '#/components/schemas/apiShieldOldSchemaUploadLogEvent' + type: array + type: object + apiShieldOldSchemaUploadDetailsWarningsOnly: + properties: + warnings: + description: Diagnostic warning events that occurred during processing. These events are non-critical errors found within the schema. + items: + $ref: '#/components/schemas/apiShieldOldSchemaUploadLogEvent' + type: array + type: object + apiShieldOldSchemaUploadFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/apiShieldMessages' + messages: + example: [] + $ref: '#/components/schemas/apiShieldMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + upload_details: + $ref: '#/components/schemas/apiShieldOldSchemaUploadDetailsErrorsCritical' + required: + - success + - errors + - messages + - result + type: object + apiShieldOldSchemaUploadLogEvent: + properties: + code: + description: Code that identifies the event that occurred. + example: 28 + type: integer + x-auditable: true + locations: + description: JSONPath location(s) in the schema where these events were encountered. See [https://goessner.net/articles/JsonPath/](https://goessner.net/articles/JsonPath/) for JSONPath specification. + items: + description: JSONPath location in the schema where these events were encountered. See [https://goessner.net/articles/JsonPath/](https://goessner.net/articles/JsonPath/) for JSONPath specification. + example: .paths["/user/{username}"].put + type: string + x-auditable: true + type: array + message: + description: Diagnostic message that describes the event. + example: 'unsupported media type: application/octet-stream' + type: string + x-auditable: true + required: + - code + type: object + apiShieldOldSchemaUploadResponse: + properties: + schema: + $ref: '#/components/schemas/apiShieldOldPublicSchema' + upload_details: + $ref: '#/components/schemas/apiShieldOldSchemaUploadDetailsWarningsOnly' + required: + - schema + type: object + apiShieldOldValidationDefaultMitigationAction: + description: 'The default mitigation action used when there is no mitigation action defined on the operation Mitigation actions are as follows: * `log` - log request when request does not conform to schema * `block` - deny access to the site when request does not conform to schema A special value of of `none` will skip running schema validation entirely for the request when there is no mitigation action defined on the operation' + enum: + - none + - log + - block + example: block + type: string + x-auditable: true + apiShieldOldValidationDefaultMitigationActionPatch: + description: 'The default mitigation action used when there is no mitigation action defined on the operation Mitigation actions are as follows: * `log` - log request when request does not conform to schema * `block` - deny access to the site when request does not conform to schema A special value of of `none` will skip running schema validation entirely for the request when there is no mitigation action defined on the operation `null` will have no effect.' + enum: + - none + - log + - block + - null + example: block + nullable: true + type: string + x-auditable: true + apiShieldOldValidationEnabled: + description: Flag whether schema is enabled for validation. + type: boolean + x-auditable: true + apiShieldOldValidationOverrideMitigationAction: + description: When set, this overrides both zone level and operation level mitigation actions. - `none` will skip running schema validation entirely for the request - `null` indicates that no override is in place + enum: + - none + - null + nullable: true + type: string + x-auditable: true + apiShieldOldValidationOverrideMitigationActionPatch: + description: When set, this overrides both zone level and operation level mitigation actions. - `none` will skip running schema validation entirely for the request To clear any override, use the special value `disable_override` `null` will have no effect. + enum: + - none + - disable_override + - null + example: none + nullable: true + type: string + x-auditable: true + apiShieldOldValidationOverrideMitigationActionWrite: + description: When set, this overrides both zone level and operation level mitigation actions. - `none` will skip running schema validation entirely for the request - `null` indicates that no override is in place To clear any override, use the special value `disable_override` or `null` + enum: + - none + - disable_override + - null + example: none + nullable: true + type: string + x-auditable: true + apiShieldOldZoneSchemaValidationSettings: + properties: + validation_default_mitigation_action: + $ref: '#/components/schemas/apiShieldOldValidationDefaultMitigationAction' + validation_override_mitigation_action: + $ref: '#/components/schemas/apiShieldOldValidationOverrideMitigationAction' + type: object + apiShieldOldZoneSchemaValidationSettingsPatch: + properties: + validation_default_mitigation_action: + $ref: '#/components/schemas/apiShieldOldValidationDefaultMitigationActionPatch' + validation_override_mitigation_action: + $ref: '#/components/schemas/apiShieldOldValidationOverrideMitigationActionPatch' + type: object + apiShieldOldZoneSchemaValidationSettingsPut: + properties: + validation_default_mitigation_action: + $ref: '#/components/schemas/apiShieldOldValidationDefaultMitigationAction' + validation_override_mitigation_action: + $ref: '#/components/schemas/apiShieldOldValidationOverrideMitigationActionWrite' + required: + - validation_default_mitigation_action + type: object + apiShieldOpenapi: + description: A OpenAPI 3.0.0 compliant schema. + example: + info: + title: OpenAPI JSON schema for www.example.com + version: '1.0' + openapi: 3.0.0 + paths: + '... Further paths ...': {} + /api/v1/users/{var1}: + get: + parameters: + - in: path + name: var1 + schema: + type: string + servers: + - url: www.example.com + type: object + apiShieldOpenapiWithThresholds: + description: A OpenAPI 3.0.0 compliant schema. + example: + info: + title: OpenAPI JSON schema for www.example.com + version: '1.0' + openapi: 3.0.0 + paths: + '... Further paths ...': {} + /api/v1/users/{var1}: + get: + parameters: + - in: path + name: var1 + schema: + type: string + servers: + - url: www.example.com + type: object + apiShieldOperation: + properties: + endpoint: + $ref: '#/components/schemas/apiShieldEndpoint' + host: + $ref: '#/components/schemas/apiShieldHost' + method: + $ref: '#/components/schemas/apiShieldMethod' + last_updated: + $ref: '#/components/schemas/apiShieldSchemasTimestamp' + operation_id: + $ref: '#/components/schemas/apiShieldSchemasUuid' + features: + $ref: '#/components/schemas/apiShieldOperationFeatures' + required: + - method + - host + - endpoint + - operation_id + - last_updated + type: object + apiShieldOperationFeatures: + readOnly: true + type: object + properties: + thresholds: + properties: + auth_id_tokens: + $ref: '#/components/schemas/apiShieldAuthIdTokens' + data_points: + $ref: '#/components/schemas/apiShieldDataPoints' + last_updated: + $ref: '#/components/schemas/apiShieldTimestamp' + p50: + $ref: '#/components/schemas/apiShieldP50' + p90: + $ref: '#/components/schemas/apiShieldP90' + p99: + $ref: '#/components/schemas/apiShieldP99' + period_seconds: + $ref: '#/components/schemas/apiShieldPeriodSeconds' + requests: + $ref: '#/components/schemas/apiShieldRequests' + suggested_threshold: + $ref: '#/components/schemas/apiShieldSuggestedThreshold' + type: object + parameter_schemas: + properties: + last_updated: + $ref: '#/components/schemas/apiShieldTimestamp' + parameter_schemas: + $ref: '#/components/schemas/apiShieldParameterSchemasDefinition' + type: object + api_routing: + description: API Routing settings on endpoint. + properties: + last_updated: + $ref: '#/components/schemas/apiShieldTimestamp' + route: + description: Target route. + example: https://api.example.com/api/service + type: string + x-auditable: true + type: object + confidence_intervals: + properties: + last_updated: + $ref: '#/components/schemas/apiShieldTimestamp' + suggested_threshold: + properties: + confidence_intervals: + properties: + p90: + $ref: '#/components/schemas/apiShieldConfidenceIntervalsBounds' + p95: + $ref: '#/components/schemas/apiShieldConfidenceIntervalsBounds' + p99: + $ref: '#/components/schemas/apiShieldConfidenceIntervalsBounds' + type: object + mean: + description: Suggested threshold. + example: 25.5 + type: number + x-auditable: true + type: object + type: object + schema_info: + properties: + active_schema: + description: Schema active on endpoint. + properties: + created_at: + $ref: '#/components/schemas/apiShieldTimestamp' + readOnly: true + id: + $ref: '#/components/schemas/apiShieldSchemasUuid' + is_learned: + description: True if schema is Cloudflare-provided. + example: true + type: boolean + x-auditable: true + name: + description: Schema file name. + example: api-endpoints-8694824bf5c04d019edcbf399c03c103-api-discovery.example.com-thresholds.json + type: string + x-auditable: true + type: object + learned_available: + description: True if a Cloudflare-provided learned schema is available for this endpoint. + example: true + type: boolean + x-auditable: true + mitigation_action: + description: Action taken on requests failing validation. + enum: + - none + - log + - block + example: block + nullable: true + type: string + x-auditable: true + type: object + required: + - last_updated + example: + api_routing: + last_updated: '2014-01-01T05:20:00.12345Z' + route: https://api.example.com/api/service + apiShieldOperationIdSelector: + description: Operation IDs selector + properties: + include: + properties: + operation_ids: + items: + $ref: '#/components/schemas/apiShieldSchemasUuid' + minItems: 1 + type: array + required: + - operation_ids + type: object + required: + - include + type: object + apiShieldOperationSchemaFragment: + description: An OpenAPI operation object fragment containing schema information for an operation. May include parameter definitions, request body specifications, and a component schema extension. + nullable: true + properties: + parameters: + description: OpenAPI parameter objects describing path, query, header, or cookie parameters. + items: + type: object + type: array + requestBody: + description: OpenAPI request body object describing the expected request payload. + type: object + type: object + apiShieldOperationSchemas: + description: OpenAPI JSON schemas for an operation, including both user-uploaded and Cloudflare-learned schemas. + properties: + learned: + $ref: '#/components/schemas/apiShieldOperationSchemaFragment' + uploaded: + $ref: '#/components/schemas/apiShieldOperationSchemaFragment' + readOnly: true + type: object + apiShieldOperationWithLabelsOnly: + properties: + endpoint: + $ref: '#/components/schemas/apiShieldEndpoint' + host: + $ref: '#/components/schemas/apiShieldHost' + method: + $ref: '#/components/schemas/apiShieldMethod' + last_updated: + $ref: '#/components/schemas/apiShieldSchemasTimestamp' + operation_id: + $ref: '#/components/schemas/apiShieldSchemasUuid' + labels: + items: + $ref: '#/components/schemas/apiShieldLabel' + type: array + required: + - method + - host + - endpoint + - operation_id + - last_updated + type: object + apiShieldP50: + description: The p50 quantile of requests (in period_seconds). + readOnly: true + type: integer + x-auditable: true + apiShieldP90: + description: The p90 quantile of requests (in period_seconds). + readOnly: true + type: integer + x-auditable: true + apiShieldP99: + description: The p99 quantile of requests (in period_seconds). + readOnly: true + type: integer + x-auditable: true + apiShieldParameterSchemasDefinition: + description: An operation schema object containing a response. + example: + parameters: + - description: Sufficient requests have been observed for this parameter to provide high confidence in this parameter schema. + in: path + name: var1 + schema: + maximum: 10 + minimum: 1 + type: integer + responses: null + properties: + parameters: + description: An array containing the learned parameter schemas. + example: + - description: Sufficient requests have been observed for this parameter to provide high confidence in this parameter schema. + in: path + name: var1 + schema: + maximum: 10 + minimum: 1 + type: integer + items: + type: object + readOnly: true + type: array + responses: + description: An empty response object. This field is required to yield a valid operation schema. + nullable: true + readOnly: true + type: object + readOnly: true + type: object + apiShieldPatchDiscoveriesResponse: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/apiShieldApiDiscoveryPatchMultipleRequest' + required: + - success + - errors + - messages + - result + type: object + apiShieldPatchDiscoveryResponse: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + properties: + state: + $ref: '#/components/schemas/apiShieldApiDiscoveryState' + type: object + required: + - success + - errors + - messages + - result + type: object + apiShieldPatchLabelRequest: + properties: + description: + $ref: '#/components/schemas/apiShieldLabelDescription' + metadata: + $ref: '#/components/schemas/apiShieldLabelMetadata' + type: object + apiShieldPeriodSeconds: + description: The period over which this threshold is suggested. + readOnly: true + type: integer + x-auditable: true + apiShieldPostLabelsOnOperationRequest: + properties: + managed: + description: List of managed label names. + items: + $ref: '#/components/schemas/apiShieldLabelName' + minItems: 1 + type: array + user: + description: List of user label names. + items: + $ref: '#/components/schemas/apiShieldLabelName' + minItems: 1 + type: array + type: object + apiShieldPutLabelRequest: + properties: + description: + $ref: '#/components/schemas/apiShieldLabelDescription' + metadata: + $ref: '#/components/schemas/apiShieldLabelMetadata' + type: object + apiShieldPutLabelsOnOperationRequest: + properties: + managed: + description: List of managed label names. Omitting this property or passing an empty array will result in all managed labels being removed from the operation + items: + $ref: '#/components/schemas/apiShieldLabelName' + type: array + user: + description: List of user label names. Omitting this property or passing an empty array will result in all user labels being removed from the operation + items: + $ref: '#/components/schemas/apiShieldLabelName' + type: array + type: object + apiShieldReplaceOperationsAttachedToLabelRequest: + properties: + selector: + $ref: '#/components/schemas/apiShieldOperationIdSelector' + required: + - selector + type: object + apiShieldRequestExpressionTemplatesFallthrough: + properties: + hosts: + description: List of hosts to be targeted in the expression + example: + - '{zone}.domain1.tld' + - domain2.tld + items: + type: string + x-auditable: true + type: array + required: + - hosts + type: object + apiShieldRequests: + description: The estimated number of requests covered by these calculations. + readOnly: true + type: integer + x-auditable: true + apiShieldResponseExpressionTemplatesFallthrough: + properties: + expression: + description: WAF Expression for fallthrough + example: (cf.api_gateway.fallthrough_detected) + type: string + x-auditable: true + title: + description: Title for the expression + example: Fallthrough Expression for [zone.domain.tld] + type: string + x-auditable: true + required: + - title + - expression + type: object + apiShieldSchemaResponseDiscovery: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + properties: + schemas: + items: + $ref: '#/components/schemas/apiShieldOpenapi' + type: array + timestamp: + $ref: '#/components/schemas/apiShieldSchemasTimestamp' + required: + - timestamp + - schemas + type: object + required: + - success + - errors + - messages + - result + type: object + apiShieldSchemaResponseWithThresholds: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + properties: + schemas: + items: + $ref: '#/components/schemas/apiShieldOpenapiWithThresholds' + type: array + timestamp: + type: string + x-auditable: true + type: object + required: + - success + - errors + - messages + - result + type: object + apiShieldSchemasTimestamp: + $ref: '#/components/schemas/apiShieldTimestamp' + readOnly: true + type: string + x-auditable: true + apiShieldSchemasUuid: + minLength: 36 + type: string + x-auditable: true + $ref: '#/components/schemas/apiShieldUuid' + apiShieldSingleOperationResponse: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + properties: + endpoint: + $ref: '#/components/schemas/apiShieldEndpoint' + host: + $ref: '#/components/schemas/apiShieldHost' + method: + $ref: '#/components/schemas/apiShieldMethod' + last_updated: + $ref: '#/components/schemas/apiShieldSchemasTimestamp' + operation_id: + $ref: '#/components/schemas/apiShieldSchemasUuid' + features: + $ref: '#/components/schemas/apiShieldOperationFeatures' + schemas: + $ref: '#/components/schemas/apiShieldOperationSchemas' + required: + - method + - host + - endpoint + - operation_id + - last_updated + type: object + required: + - success + - errors + - messages + - result + type: object + apiShieldSuggestedThreshold: + description: The suggested threshold in requests done by the same auth_id or period_seconds. + readOnly: true + type: integer + x-auditable: true + apiShieldTimestamp: + example: '2014-01-01T05:20:00.12345Z' + format: date-time + type: string + x-auditable: true + apiShieldTrafficStats: + properties: + traffic_stats: + properties: + last_updated: + $ref: '#/components/schemas/apiShieldSchemasTimestamp' + period_seconds: + description: The period in seconds these statistics were computed over + example: 3600 + readOnly: true + type: integer + x-auditable: true + requests: + description: The average number of requests seen during this period + example: 1987.06 + format: float + readOnly: true + type: number + x-auditable: true + required: + - period_seconds + - requests + - last_updated + type: object + readOnly: true + type: object + apiShieldUuid: + description: UUID. + example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 + maxLength: 36 + type: string + x-auditable: true + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + configurations: + id: cloudflare.api_gateway.configurations + name: configurations + title: Configurations + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1configuration/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result.auth_id_characteristics + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1configuration/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .auth_id_characteristics }}{{ $sep }}"auth_id_characteristics": {{ if eq (kindOf .auth_id_characteristics) "string" }}{{ .auth_id_characteristics }}{{ else }}{{ toJson .auth_id_characteristics }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/configurations/methods/list' + insert: [] + update: [] + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/configurations/methods/update' + discovery: + id: cloudflare.api_gateway.discovery + name: discovery + title: Discovery + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1discovery/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/discovery/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + discovery_operations: + id: cloudflare.api_gateway.discovery_operations + name: discovery_operations + title: Discovery Operations + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1discovery~1operations/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/discovery_operations/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + operations: + id: cloudflare.api_gateway.operations + name: operations + title: Operations + methods: + bulk_edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1discovery~1operations/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + api_shield_api_patch_discovered_operation: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1discovery~1operations~1{operation_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + bulk_delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1operations/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1operations~1{operation_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1operations~1{operation_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1user_schemas~1{schema_id}~1operations/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/operations/methods/get' + - $ref: '#/components/x-stackQL-resources/operations/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/operations/methods/api_shield_api_patch_discovered_operation' + - $ref: '#/components/x-stackQL-resources/operations/methods/bulk_edit' + delete: + - $ref: '#/components/x-stackQL-resources/operations/methods/delete' + - $ref: '#/components/x-stackQL-resources/operations/methods/bulk_delete' + replace: [] + fallthrough: + id: cloudflare.api_gateway.fallthrough + name: fallthrough + title: Fallthrough + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1expression-template~1fallthrough/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .hosts }}{{ $sep }}"hosts": {{ if eq (kindOf .hosts) "string" }}{{ .hosts }}{{ else }}{{ toJson .hosts }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/fallthrough/methods/create' + update: [] + delete: [] + replace: [] + labels: + id: cloudflare.api_gateway.labels + name: labels + title: Labels + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1labels/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + api_shield_operations_bulk_delete_labels_to_operations: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1operations~1labels/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + api_shield_operations_bulk_post_labels_to_operations: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1operations~1labels/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .managed }}{{ $sep }}"managed": {{ if eq (kindOf .managed) "string" }}{{ .managed }}{{ else }}{{ toJson .managed }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .selector }}{{ $sep }}"selector": {{ if eq (kindOf .selector) "string" }}{{ .selector }}{{ else }}{{ toJson .selector }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .user }}{{ $sep }}"user": {{ if eq (kindOf .user) "string" }}{{ .user }}{{ else }}{{ toJson .user }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + api_shield_operations_bulk_put_labels_to_operations: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1operations~1labels/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .managed }}{{ $sep }}"managed": {{ if eq (kindOf .managed) "string" }}{{ .managed }}{{ else }}{{ toJson .managed }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .selector }}{{ $sep }}"selector": {{ if eq (kindOf .selector) "string" }}{{ .selector }}{{ else }}{{ toJson .selector }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .user }}{{ $sep }}"user": {{ if eq (kindOf .user) "string" }}{{ .user }}{{ else }}{{ toJson .user }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1operations~1{operation_id}~1labels/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1operations~1{operation_id}~1labels/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .managed }}{{ $sep }}"managed": {{ if eq (kindOf .managed) "string" }}{{ .managed }}{{ else }}{{ toJson .managed }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .user }}{{ $sep }}"user": {{ if eq (kindOf .user) "string" }}{{ .user }}{{ else }}{{ toJson .user }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1operations~1{operation_id}~1labels/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .managed }}{{ $sep }}"managed": {{ if eq (kindOf .managed) "string" }}{{ .managed }}{{ else }}{{ toJson .managed }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .user }}{{ $sep }}"user": {{ if eq (kindOf .user) "string" }}{{ .user }}{{ else }}{{ toJson .user }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/labels/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/labels/methods/create' + - $ref: '#/components/x-stackQL-resources/labels/methods/api_shield_operations_bulk_post_labels_to_operations' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/labels/methods/delete' + - $ref: '#/components/x-stackQL-resources/labels/methods/api_shield_operations_bulk_delete_labels_to_operations' + replace: + - $ref: '#/components/x-stackQL-resources/labels/methods/update' + - $ref: '#/components/x-stackQL-resources/labels/methods/api_shield_operations_bulk_put_labels_to_operations' + managed: + id: cloudflare.api_gateway.managed + name: managed + title: Managed + methods: + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1labels~1managed~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/managed/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + managed_resources_operation: + id: cloudflare.api_gateway.managed_resources_operation + name: managed_resources_operation + title: Managed Resources Operation + methods: + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1labels~1managed~1{name}~1resources~1operation/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .selector }}{{ $sep }}"selector": {{ if eq (kindOf .selector) "string" }}{{ .selector }}{{ else }}{{ toJson .selector }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/managed_resources_operation/methods/update' + user: + id: cloudflare.api_gateway.user + name: user + title: User + methods: + api_shield_labels_delete_user_labels: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1labels~1user/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + api_shield_labels_create_user_labels: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1labels~1user/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1labels~1user~1{name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1labels~1user~1{name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1labels~1user~1{name}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .metadata }}{{ $sep }}"metadata": {{ if eq (kindOf .metadata) "string" }}{{ .metadata }}{{ else }}{{ toJson .metadata }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1labels~1user~1{name}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .metadata }}{{ $sep }}"metadata": {{ if eq (kindOf .metadata) "string" }}{{ .metadata }}{{ else }}{{ toJson .metadata }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/user/methods/get' + insert: + - $ref: '#/components/x-stackQL-resources/user/methods/api_shield_labels_create_user_labels' + update: + - $ref: '#/components/x-stackQL-resources/user/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/user/methods/delete' + - $ref: '#/components/x-stackQL-resources/user/methods/api_shield_labels_delete_user_labels' + replace: + - $ref: '#/components/x-stackQL-resources/user/methods/update' + user_resources_operation: + id: cloudflare.api_gateway.user_resources_operation + name: user_resources_operation + title: User Resources Operation + methods: + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1labels~1user~1{name}~1resources~1operation/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .selector }}{{ $sep }}"selector": {{ if eq (kindOf .selector) "string" }}{{ .selector }}{{ else }}{{ toJson .selector }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/user_resources_operation/methods/update' + api_gateway_operations: + id: cloudflare.api_gateway.api_gateway_operations + name: api_gateway_operations + title: Api Gateway Operations + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1operations/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + api_shield_endpoint_management_add_operations_to_a_zone: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1operations/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/api_gateway_operations/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/api_gateway_operations/methods/api_shield_endpoint_management_add_operations_to_a_zone' + update: [] + delete: [] + replace: [] + operations_item: + id: cloudflare.api_gateway.operations_item + name: operations_item + title: Operations Item + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1operations~1item/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/operations_item/methods/create' + update: [] + delete: [] + replace: [] + operations_schema_validation: + id: cloudflare.api_gateway.operations_schema_validation + name: operations_schema_validation + title: Operations Schema Validation + methods: + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1operations~1schema_validation/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + list_by_zone: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1operations~1{operation_id}~1schema_validation/get' + response: + mediaType: application/json + openAPIDocKey: '200' + update_by_zone: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1operations~1{operation_id}~1schema_validation/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/operations_schema_validation/methods/list_by_zone' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/operations_schema_validation/methods/edit' + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/operations_schema_validation/methods/update_by_zone' + schemas: + id: cloudflare.api_gateway.schemas + name: schemas + title: Schemas + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1schemas/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/schemas/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + settings_schema_validation: + id: cloudflare.api_gateway.settings_schema_validation + name: settings_schema_validation + title: Settings Schema Validation + methods: + list_by_zone: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1settings~1schema_validation/get' + response: + mediaType: application/json + openAPIDocKey: '200' + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1settings~1schema_validation/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + update_by_zone: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1settings~1schema_validation/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/settings_schema_validation/methods/list_by_zone' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/settings_schema_validation/methods/edit' + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/settings_schema_validation/methods/update_by_zone' + user_schemas: + id: cloudflare.api_gateway.user_schemas + name: user_schemas + title: User Schemas + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1user_schemas/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1user_schemas/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1user_schemas~1{schema_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1user_schemas~1{schema_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1user_schemas~1{schema_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/user_schemas/methods/get' + - $ref: '#/components/x-stackQL-resources/user_schemas/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/user_schemas/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/user_schemas/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/user_schemas/methods/delete' + replace: [] + hosts: + id: cloudflare.api_gateway.hosts + name: hosts + title: Hosts + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1api_gateway~1user_schemas~1hosts/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/hosts/methods/list' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/audit_logs.yaml b/providers/src/cloudflare/v00.00.00000/services/audit_logs.yaml index 51eaecd1..cc5f1758 100644 --- a/providers/src/cloudflare/v00.00.00000/services/audit_logs.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/audit_logs.yaml @@ -272,8 +272,8 @@ components: type: boolean required: - errors - - success - messages + - success aaaIdentifier: description: Identifier example: 023e105f4ecef8ad9ca31a8372d0c353 diff --git a/providers/src/cloudflare/v00.00.00000/services/billing.yaml b/providers/src/cloudflare/v00.00.00000/services/billing.yaml index 08b58e37..75375319 100644 --- a/providers/src/cloudflare/v00.00.00000/services/billing.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/billing.yaml @@ -1,1466 +1,1447 @@ -openapi: 3.0.3 -info: - title: billing API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/billing/profile: - get: - deprecated: true - description: Gets the current billing profile for the account. - operationId: account-billing-profile-(-deprecated)-billing-profile-details - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/billSubsApiBillingResponseSingle' - description: Billing Profile Details response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - properties: - account_type: - type: string - address: - type: string - address2: - type: string - balance: - type: string - card_expiry_month: - type: integer - card_expiry_year: - type: integer - card_number: - type: string - city: - type: string - company: - type: string - country: - type: string - created_on: - format: date-time - type: string - readOnly: true - device_data: - type: string - edited_on: - format: date-time - type: string - enterprise_billing_email: - type: string - x-auditable: true - enterprise_primary_email: - type: string - x-auditable: true - first_name: - type: string - id: - $ref: >- - #/components/schemas/billSubsApiComponentsSchemasIdentifier - is_partner: - type: boolean - last_name: - type: string - next_bill_date: - format: date-time - type: string - payment_address: - type: string - payment_address2: - type: string - payment_city: - type: string - payment_country: - type: string - payment_email: - type: string - payment_first_name: - type: string - payment_gateway: - type: string - payment_last_name: - type: string - payment_nonce: - type: string - payment_state: - type: string - payment_zipcode: - type: string - primary_email: - type: string - x-auditable: true - state: - type: string - tax_id_type: - type: string - telephone: - type: string - use_legacy: - type: boolean - validation_code: - type: string - vat: - type: string - zipcode: - type: string - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Billing Profile Details response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Billing Profile Details - tags: - - Account Billing Profile - x-api-token-group: - - Billing Write - - Billing Read - x-cfPermissionsRequired: - enum: - - '#billing:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: billing - resource_chain: - - profiles - method: get - /accounts/{account_id}/billing/usage/paygo: - get: - description: >- - Returns billable usage data for PayGo (self-serve) accounts. When no - query parameters are provided, returns usage for the current billing - period. This endpoint is currently in alpha and access is restricted to - select accounts. While in alpha, the endpoint may get breaking changes. - operationId: billable-usage-get-paygo-account-usage - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Defines the start date for the usage query (e.g., 2025-02-01). - in: query - name: from - schema: - format: date - type: string - - description: Defines the end date for the usage query (e.g., 2025-03-01). - in: query - name: to - schema: - format: date - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/billableUsageApiUsageResponse' - description: Indicates PayGo account usage data was successfully retrieved. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/billableUsageApiApiResponseCommonFailure' - description: Indicates the request failed. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get PayGo Account Billable Usage (Alpha) - tags: - - Billable Usage - x-api-token-group: - - Billing Write - - Billing Read - x-cfPlanAvailability: - business: true - enterprise: false - free: true - pro: true - x-stackql-sdk: - service: billing - resource_chain: - - usage - method: paygo - /accounts/{account_id}/pay-per-crawl/crawler/stripe: - delete: - description: Deletes the stripe config for a crawler. - operationId: pay-per-crawl.crawlerDeleteStripeConfig - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/payPerCrawlApiNoResultResponse' - description: OK - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/payPerCrawlApiErrorResponse' - description: Bad Request - security: - - api_email: [] - api_key: [] - summary: Deletes the stripe config for a crawler - tags: - - ppc_stripe - x-api-token-group: - - Account Settings Write - get: - description: Gets the stripe config for a crawler. - operationId: pay-per-crawl.crawlerGetStripeConfig - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/payPerCrawlGetStripeConfigResponse' - description: OK - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/payPerCrawlApiErrorResponse' - description: Bad Request - security: - - api_email: [] - api_key: [] - summary: Gets the stripe config for a crawler - tags: - - ppc_stripe - x-api-token-group: - - Trust and Safety Write - - Trust and Safety Read - - DNS View Write - - DNS View Read - - SCIM Provisioning - - Load Balancers Account Write - - Load Balancers Account Read - - 'Zero Trust: PII Read' - - DDoS Botnet Feed Write - - DDoS Botnet Feed Read - - Workers R2 Storage Write - - Workers R2 Storage Read - - DDoS Protection Write - - DDoS Protection Read - - Workers Tail Read - - Workers KV Storage Write - - Workers KV Storage Read - - Workers Scripts Write - - Workers Scripts Read - - 'Load Balancing: Monitors and Pools Write' - - 'Load Balancing: Monitors and Pools Read' - - Account Firewall Access Rules Write - - Account Firewall Access Rules Read - - DNS Firewall Write - - DNS Firewall Read - - Billing Write - - Billing Read - - Account Settings Write - - Account Settings Read - post: - description: Creates the stripe config for a crawler. - operationId: pay-per-crawl.crawlerCreateStripeConfig - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/payPerCrawlCreateStripeConfigResponse' - description: OK - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/payPerCrawlApiErrorResponse' - description: Bad Request - security: - - api_email: [] - api_key: [] - summary: Creates the stripe config for a crawler - tags: - - ppc_stripe - x-api-token-group: - - Account Settings Write - /accounts/{account_id}/pay-per-crawl/publisher/stripe: - delete: - description: Deletes the stripe config for a publisher. - operationId: pay-per-crawl.publisherDeleteStripeConfig - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/payPerCrawlApiNoResultResponse' - description: OK - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/payPerCrawlApiErrorResponse' - description: Bad Request - security: - - api_email: [] - api_key: [] - summary: Deletes the stripe config for a publisher - tags: - - ppc_stripe - x-api-token-group: - - Account Settings Write - get: - description: Gets the stripe config for a publisher. - operationId: pay-per-crawl.publisherGetStripeConfig - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/payPerCrawlGetStripeConfigResponse' - description: OK - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/payPerCrawlApiErrorResponse' - description: Bad Request - security: - - api_email: [] - api_key: [] - summary: Gets the stripe config for a publisher - tags: - - ppc_stripe - x-api-token-group: - - Trust and Safety Write - - Trust and Safety Read - - DNS View Write - - DNS View Read - - SCIM Provisioning - - Load Balancers Account Write - - Load Balancers Account Read - - 'Zero Trust: PII Read' - - DDoS Botnet Feed Write - - DDoS Botnet Feed Read - - Workers R2 Storage Write - - Workers R2 Storage Read - - DDoS Protection Write - - DDoS Protection Read - - Workers Tail Read - - Workers KV Storage Write - - Workers KV Storage Read - - Workers Scripts Write - - Workers Scripts Read - - 'Load Balancing: Monitors and Pools Write' - - 'Load Balancing: Monitors and Pools Read' - - Account Firewall Access Rules Write - - Account Firewall Access Rules Read - - DNS Firewall Write - - DNS Firewall Read - - Billing Write - - Billing Read - - Account Settings Write - - Account Settings Read - post: - description: Creates the stripe config for a publisher. - operationId: pay-per-crawl.publisherCreateStripeConfig - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/payPerCrawlCreateStripeConfigResponse' - description: OK - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/payPerCrawlApiErrorResponse' - description: Bad Request - security: - - api_email: [] - api_key: [] - summary: Creates the stripe config for a publisher - tags: - - ppc_stripe - x-api-token-group: - - Account Settings Write - /accounts/{account_id}/pay-per-crawl/zones_can_be_enabled: - patch: - description: >- - Allows an account admin to set the can_be_enabled setting on a list of - zones. - operationId: pay-per-crawl.setZonesCanBeEnabled - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/payPerCrawlZonesCanBeEnabledPayload' - description: Data for setting flag on zones - x-auditable: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/payPerCrawlApiNoResultResponse' - description: OK - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/payPerCrawlApiErrorResponse' - description: Bad Request - security: - - api_email: [] - api_key: [] - summary: Set can_be_enabled setting on zones - tags: - - ppc_config - x-api-token-group: - - Account Settings Write - /accounts/{account_id}/pay-per-crawl/zones_can_be_enabled/query: - post: - description: >- - Provided a list of pay-per-crawl configured zones this method will - return whether they can enable PPC or not. - operationId: pay-per-crawl.queryZonesCanBeEnabled - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/payPerCrawlZonesCanBeEnabledPayload' - description: Data for setting flag on zones - x-auditable: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/payPerCrawlQueryZonesCanBeEnabledResponse' - description: OK - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/payPerCrawlApiErrorResponse' - description: Bad Request - security: - - api_email: [] - api_key: [] - summary: Gets the can_be_enabled zone setting - tags: - - ppc_config - x-api-token-group: - - Trust and Safety Write - - Trust and Safety Read - - DNS View Write - - DNS View Read - - SCIM Provisioning - - Load Balancers Account Write - - Load Balancers Account Read - - 'Zero Trust: PII Read' - - DDoS Botnet Feed Write - - DDoS Botnet Feed Read - - Workers R2 Storage Write - - Workers R2 Storage Read - - DDoS Protection Write - - DDoS Protection Read - - Workers Tail Read - - Workers KV Storage Write - - Workers KV Storage Read - - Workers Scripts Write - - Workers Scripts Read - - 'Load Balancing: Monitors and Pools Write' - - 'Load Balancing: Monitors and Pools Read' - - Account Firewall Access Rules Write - - Account Firewall Access Rules Read - - DNS Firewall Write - - DNS Firewall Read - - Billing Write - - Billing Read - - Account Settings Write - - Account Settings Read - /zones/{zone_id}/pay-per-crawl/configuration: - get: - description: >- - Gets the pay-per-crawl config for a zone including the bot - configuration. - operationId: pay-per-crawl.getConfig - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/payPerCrawlGetConfigResponse' - description: OK - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/payPerCrawlApiErrorResponse' - description: Bad Request - security: - - api_email: [] - api_key: [] - summary: Get the pay-per-crawl config - tags: - - ppc_config - x-api-token-group: - - Zone Settings Write - - Zone Settings Read - patch: - description: Changes the pay-per-crawl config for a zone. - operationId: pay-per-crawl.patchConfig - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/payPerCrawlDaricConfig' - description: Data for setting flag on zones - x-auditable: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/payPerCrawlGetConfigResponse' - description: OK - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/payPerCrawlApiErrorResponse' - description: Bad Request - security: - - api_email: [] - api_key: [] - summary: Changes pay-per-crawl config for a zone - tags: - - ppc_config - x-api-token-group: - - Zone Settings Write - post: - description: Creates the pay-per-crawl config for a zone. - operationId: pay-per-crawl.createConfig - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/payPerCrawlDaricConfig' - description: Data for setting flag on zones - x-auditable: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/payPerCrawlGetConfigResponse' - description: OK - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/payPerCrawlApiErrorResponse' - description: Bad Request - security: - - api_email: [] - api_key: [] - summary: Creates pay-per-crawl config for a zone - tags: - - ppc_config - x-api-token-group: - - Zone Settings Write -components: - schemas: - billSubsApiBillingResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - properties: - account_type: - example: type - type: string - address: - example: 123 Main Street - type: string - address2: - example: Apt 1 - type: string - balance: - example: '0' - type: string - card_expiry_month: - example: 12 - type: integer - card_expiry_year: - example: 2099 - type: integer - card_number: - example: '4242424242424242' - type: string - city: - example: Anytown - type: string - company: - example: Company - type: string - country: - example: Anycountry - type: string - created_on: - example: '2014-03-01T12:21:59.3456Z' - format: date-time - type: string - readOnly: true - device_data: - example: sample_data - type: string - edited_on: - example: '2014-03-01T12:21:59.3456Z' - format: date-time - type: string - enterprise_billing_email: - example: johndoe@gmail.com - type: string - x-auditable: true - enterprise_primary_email: - example: johndoe@gmail.com - type: string - x-auditable: true - first_name: - example: John - type: string - id: - $ref: '#/components/schemas/billSubsApiComponentsSchemasIdentifier' - is_partner: - example: false - type: boolean - last_name: - example: Doe - type: string - next_bill_date: - example: '2014-03-01T12:21:59.3456Z' - format: date-time - type: string - payment_address: - example: 123 Main Street - type: string - payment_address2: - example: Apt 1 - type: string - payment_city: - example: Anytown - type: string - payment_country: - example: Anycountry - type: string - payment_email: - example: johndoe@gmail.com - type: string - payment_first_name: - example: John - type: string - payment_gateway: - example: gateway - type: string - payment_last_name: - example: Doe - type: string - payment_nonce: - example: abc123 - type: string - payment_state: - example: state - type: string - payment_zipcode: - example: '12345' - type: string - primary_email: - example: johndoe@gmail.com - type: string - x-auditable: true - state: - example: AnyState - type: string - tax_id_type: - example: type - type: string - telephone: - example: '1234567899' - type: string - use_legacy: - example: false - type: boolean - validation_code: - example: '1111' - type: string - vat: - example: GB123456789 - type: string - zipcode: - example: '12345' - type: string - type: object - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - billSubsApiComponentsSchemasIdentifier: - description: Billing item identifier tag. - example: b69a9f3492637782896352daae219e7d - maxLength: 32 - readOnly: true - type: string - x-auditable: true - billSubsApiMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - billableUsageApiApiResponseCommonFailure: - description: Represents a failed API response. - properties: - errors: - description: Contains error details describing why the request failed. - example: - - code: 1183 - message: >- - Invalid request parameters: Please ensure all required - parameters are included and correctly formatted. - items: - $ref: '#/components/schemas/billableUsageApiMessage' - minItems: 1 - type: array - messages: - description: Contains informational notices about the response. - items: - $ref: '#/components/schemas/billableUsageApiMessage' - nullable: true - type: array - result: - description: Contains the response payload (always null on failure). - nullable: true - type: object - success: - description: Indicates whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - billableUsageApiMessage: - description: Represents an API notice or error detail. - properties: - code: - description: Identifies the error or notice type. - type: integer - message: - description: Describes the error or notice. - type: string - required: - - message - type: object - billableUsageApiUsageRecord: - description: Represents a single billable usage record. - properties: - BillingCurrency: - description: Specifies the billing currency code (ISO 4217). - example: USD - type: string - BillingPeriodStart: - description: Indicates the start of the billing period. - example: '2025-02-01T00:00:00Z' - format: date-time - type: string - ChargePeriodEnd: - description: Indicates the end of the charge period. - example: '2025-02-02T00:00:00Z' - format: date-time - type: string - ChargePeriodStart: - description: Indicates the start of the charge period. - example: '2025-02-01T00:00:00Z' - format: date-time - type: string - ConsumedQuantity: - description: Specifies the quantity consumed during this charge period. - example: 150000 - type: number - ConsumedUnit: - description: Specifies the unit of measurement for consumed quantity. - example: Requests - type: string - ContractedCost: - description: Specifies the cost for this charge period in the billing currency. - example: 0.75 - type: number - CumulatedContractedCost: - description: >- - Specifies the cumulated cost for the billing period in the billing - currency. - example: 2.25 - type: number - CumulatedPricingQuantity: - description: Specifies the cumulated pricing quantity for the billing period. - example: 4500000 - type: integer - PricingQuantity: - description: Specifies the pricing quantity for this charge period. - example: 150000 - type: integer - ServiceName: - description: Identifies the Cloudflare service. - example: Workers Standard - type: string - required: - - ChargePeriodStart - - ChargePeriodEnd - - BillingPeriodStart - - ServiceName - - ConsumedQuantity - - ConsumedUnit - - PricingQuantity - - CumulatedPricingQuantity - - ContractedCost - - CumulatedContractedCost - - BillingCurrency - type: object - billableUsageApiUsageResponse: - description: Represents a successful response containing billable usage records. - properties: - errors: - description: Contains error details if the request failed. - items: - $ref: '#/components/schemas/billableUsageApiMessage' - nullable: true - type: array - messages: - description: Contains informational notices about the response. - items: - $ref: '#/components/schemas/billableUsageApiMessage' - nullable: true - type: array - result: - description: Contains the array of billable usage records. - items: - $ref: '#/components/schemas/billableUsageApiUsageRecord' - type: array - success: - description: Indicates whether the API call was successful. - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - type: object - payPerCrawlApiErrorResponse: - properties: - errors: - items: - $ref: '#/components/schemas/payPerCrawlRESTError' - type: array - result: {} - success: - type: boolean - type: object - payPerCrawlApiNoResultResponse: - properties: - errors: - items: - $ref: '#/components/schemas/payPerCrawlMsg' - type: array - messages: - items: - $ref: '#/components/schemas/payPerCrawlMsg' - type: array - result_info: - $ref: '#/components/schemas/payPerCrawlResultInfo' - success: - type: boolean - type: object - payPerCrawlCreateStripeConfigResponse: - properties: - errors: - items: - $ref: '#/components/schemas/payPerCrawlMsg' - type: array - messages: - items: - $ref: '#/components/schemas/payPerCrawlMsg' - type: array - result: - $ref: '#/components/schemas/payPerCrawlStripeConnectResp' - result_info: - $ref: '#/components/schemas/payPerCrawlResultInfo' - success: - type: boolean - type: object - payPerCrawlDaricConfig: - properties: - bot_overrides: - type: object - enabled: - type: boolean - price_usd_microcents: - type: integer - type: object - payPerCrawlDaricZoneCanBeEnabled: - properties: - can_be_enabled: - type: boolean - id: - type: string - type: object - payPerCrawlErrorSource: - properties: - pointer: - type: string - type: object - payPerCrawlGetConfigResponse: - properties: - errors: - items: - $ref: '#/components/schemas/payPerCrawlMsg' - type: array - messages: - items: - $ref: '#/components/schemas/payPerCrawlMsg' - type: array - result: - $ref: '#/components/schemas/payPerCrawlDaricConfig' - result_info: - $ref: '#/components/schemas/payPerCrawlResultInfo' - success: - type: boolean - type: object - payPerCrawlGetStripeConfigResponse: - properties: - errors: - items: - $ref: '#/components/schemas/payPerCrawlMsg' - type: array - messages: - items: - $ref: '#/components/schemas/payPerCrawlMsg' - type: array - result: - $ref: '#/components/schemas/payPerCrawlStripeConnection' - result_info: - $ref: '#/components/schemas/payPerCrawlResultInfo' - success: - type: boolean - type: object - payPerCrawlMsg: - properties: - code: - type: integer - documentation_url: - type: string - error_chain: - items: - $ref: '#/components/schemas/payPerCrawlMsg' - type: array - message: - type: string - meta: - description: >- - Meta object containing non-standard meta-information about the - error. This field must be an object or null! - source: - $ref: '#/components/schemas/payPerCrawlSource' - type: object - payPerCrawlQueryZonesCanBeEnabledResponse: - properties: - errors: - items: - $ref: '#/components/schemas/payPerCrawlMsg' - type: array - messages: - items: - $ref: '#/components/schemas/payPerCrawlMsg' - type: array - result: - $ref: '#/components/schemas/payPerCrawlZonesCanBeEnabledPayload' - result_info: - $ref: '#/components/schemas/payPerCrawlResultInfo' - success: - type: boolean - type: object - payPerCrawlRESTError: - properties: - code: - type: integer - documentation_url: - type: string - error: - type: string - source: - $ref: '#/components/schemas/payPerCrawlErrorSource' - type: object - payPerCrawlResultInfo: - properties: - count: - type: integer - page: - type: integer - per_page: - type: integer - total_count: - type: integer - total_pages: - description: >- - TotalPages is a pointer so that if TotalPages == 0 we return that - there are indeed 0 pages. omitempty would have removed the field - otherwise. This is important as a customer may be relying on always - reading this property and it should not be absent just because it is - 0, only absent if a value is never provided. - type: integer - type: object - payPerCrawlSource: - properties: - parameter: - description: >- - Parameter is a string indicating which URI query parameter caused - the error. - type: string - parameter_value_index: - description: >- - ParameterPosition indicates position of parameter value which caused - the error, for cases when there are multiple values for the same - parameter. - type: integer - pointer: - description: >- - Pointer is a JSON Pointer [RFC6901] to the associated entity in the - request document e.g. "/data" for a primary data object, or - "/data/attributes/title" for a specific attribute. - items: - type: string - type: array - type: object - payPerCrawlStripeConnectResp: - properties: - url: - type: string - type: object - payPerCrawlStripeConnection: - properties: - connect_status: - type: string - stripe_account_id: - type: string - type: object - payPerCrawlZonesCanBeEnabledPayload: - properties: - zones: - items: - $ref: '#/components/schemas/payPerCrawlDaricZoneCanBeEnabled' - type: array - type: object - responseInfo: - properties: - code: - minimum: 1000 - type: integer - message: - type: string - documentation_url: - type: string - source: - type: object - properties: - pointer: - type: string - required: - - code - - message - type: object - uniqueItems: true - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - profiles: - id: cloudflare.billing.profiles - name: profiles - title: Profiles - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1billing~1profile/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/profiles/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - usage: - id: cloudflare.billing.usage - name: usage - title: Usage - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1billing~1usage~1paygo/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/usage/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - crawler_stripe: - id: cloudflare.billing.crawler_stripe - name: crawler_stripe - title: Crawler Stripe - methods: - pay_per_crawl_crawler_delete_stripe_config: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pay-per-crawl~1crawler~1stripe/delete - response: - mediaType: application/json - openAPIDocKey: '200' - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pay-per-crawl~1crawler~1stripe/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - pay_per_crawl_crawler_create_stripe_config: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pay-per-crawl~1crawler~1stripe/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/crawler_stripe/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/crawler_stripe/methods/pay_per_crawl_crawler_create_stripe_config - update: [] - delete: - - $ref: >- - #/components/x-stackQL-resources/crawler_stripe/methods/pay_per_crawl_crawler_delete_stripe_config - replace: [] - publisher_stripe: - id: cloudflare.billing.publisher_stripe - name: publisher_stripe - title: Publisher Stripe - methods: - pay_per_crawl_publisher_delete_stripe_config: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pay-per-crawl~1publisher~1stripe/delete - response: - mediaType: application/json - openAPIDocKey: '200' - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pay-per-crawl~1publisher~1stripe/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - pay_per_crawl_publisher_create_stripe_config: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pay-per-crawl~1publisher~1stripe/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/publisher_stripe/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/publisher_stripe/methods/pay_per_crawl_publisher_create_stripe_config - update: [] - delete: - - $ref: >- - #/components/x-stackQL-resources/publisher_stripe/methods/pay_per_crawl_publisher_delete_stripe_config - replace: [] - accounts: - id: cloudflare.billing.accounts - name: accounts - title: Accounts - methods: - set_pay_per_crawl_zones: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pay-per-crawl~1zones_can_be_enabled/patch - response: - mediaType: application/json - openAPIDocKey: '200' - query_pay_per_crawl_zones: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pay-per-crawl~1zones_can_be_enabled~1query/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] - configuration: - id: cloudflare.billing.configuration - name: configuration - title: Configuration - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1pay-per-crawl~1configuration/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - pay_per_crawl_patch_config: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1pay-per-crawl~1configuration/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - pay_per_crawl_create_config: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1pay-per-crawl~1configuration/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/configuration/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/configuration/methods/pay_per_crawl_create_config - update: - - $ref: >- - #/components/x-stackQL-resources/configuration/methods/pay_per_crawl_patch_config - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: billing API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/billing/profile: + get: + deprecated: true + description: Gets the current billing profile for the account. + operationId: account-billing-profile-(-deprecated)-billing-profile-details + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/billSubsApiBillingResponseSingle' + description: Billing Profile Details response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + properties: + account_type: + type: string + address: + type: string + address2: + type: string + balance: + type: string + card_expiry_month: + type: integer + card_expiry_year: + type: integer + card_number: + type: string + city: + type: string + company: + type: string + country: + type: string + created_on: + format: date-time + type: string + readOnly: true + device_data: + type: string + edited_on: + format: date-time + type: string + enterprise_billing_email: + type: string + x-auditable: true + enterprise_primary_email: + type: string + x-auditable: true + first_name: + type: string + id: + $ref: '#/components/schemas/billSubsApiComponentsSchemasIdentifier' + is_partner: + type: boolean + last_name: + type: string + next_bill_date: + format: date-time + type: string + payment_address: + type: string + payment_address2: + type: string + payment_city: + type: string + payment_country: + type: string + payment_email: + type: string + payment_first_name: + type: string + payment_gateway: + type: string + payment_last_name: + type: string + payment_nonce: + type: string + payment_state: + type: string + payment_zipcode: + type: string + primary_email: + type: string + x-auditable: true + state: + type: string + tax_id_type: + type: string + telephone: + type: string + use_legacy: + type: boolean + validation_code: + type: string + vat: + type: string + zipcode: + type: string + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Billing Profile Details response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Billing Profile Details + tags: + - Account Billing Profile + x-api-token-group: + - Billing Write + - Billing Read + x-cfPermissionsRequired: + enum: + - '#billing:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: billing + resource_chain: + - profiles + method: get + /accounts/{account_id}/billing/usage/paygo: + get: + description: Returns billable usage data for PayGo (self-serve) accounts. When no query parameters are provided, returns usage for the current billing period. This endpoint is currently in alpha and access is restricted to select accounts. While in alpha, the endpoint may get breaking changes. + operationId: billable-usage-get-paygo-account-usage + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Defines the start date for the usage query (e.g., 2025-02-01). + in: query + name: from + schema: + format: date + type: string + - description: Defines the end date for the usage query (e.g., 2025-03-01). + in: query + name: to + schema: + format: date + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/billableUsageApiUsageResponse' + description: Indicates PayGo account usage data was successfully retrieved. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/billableUsageApiApiResponseCommonFailure' + description: Indicates the request failed. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get PayGo Account Billable Usage (Alpha) + tags: + - Billable Usage + x-api-token-group: + - Billing Write + - Billing Read + x-cfPlanAvailability: + business: true + enterprise: false + free: true + pro: true + x-stackql-sdk: + service: billing + resource_chain: + - usage + method: paygo + /accounts/{account_id}/pay-per-crawl/crawler/stripe: + delete: + description: Deletes the stripe config for a crawler. + operationId: pay-per-crawl.crawlerDeleteStripeConfig + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/payPerCrawlApiNoResultResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/payPerCrawlApiErrorResponse' + description: Bad Request + security: + - api_email: [] + api_key: [] + summary: Deletes the stripe config for a crawler + tags: + - ppc_stripe + x-api-token-group: + - Account Settings Write + get: + description: Gets the stripe config for a crawler. + operationId: pay-per-crawl.crawlerGetStripeConfig + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/payPerCrawlGetStripeConfigResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/payPerCrawlApiErrorResponse' + description: Bad Request + security: + - api_email: [] + api_key: [] + summary: Gets the stripe config for a crawler + tags: + - ppc_stripe + x-api-token-group: + - Trust and Safety Write + - Trust and Safety Read + - DNS View Write + - DNS View Read + - SCIM Provisioning + - Load Balancers Account Write + - Load Balancers Account Read + - 'Zero Trust: PII Read' + - DDoS Botnet Feed Write + - DDoS Botnet Feed Read + - Workers R2 Storage Write + - Workers R2 Storage Read + - DDoS Protection Write + - DDoS Protection Read + - Workers Tail Read + - Workers KV Storage Write + - Workers KV Storage Read + - Workers Scripts Write + - Workers Scripts Read + - 'Load Balancing: Monitors and Pools Write' + - 'Load Balancing: Monitors and Pools Read' + - Account Firewall Access Rules Write + - Account Firewall Access Rules Read + - DNS Firewall Write + - DNS Firewall Read + - Billing Write + - Billing Read + - Account Settings Write + - Account Settings Read + post: + description: Creates the stripe config for a crawler. + operationId: pay-per-crawl.crawlerCreateStripeConfig + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/payPerCrawlCreateStripeConfigResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/payPerCrawlApiErrorResponse' + description: Bad Request + security: + - api_email: [] + api_key: [] + summary: Creates the stripe config for a crawler + tags: + - ppc_stripe + x-api-token-group: + - Account Settings Write + /accounts/{account_id}/pay-per-crawl/publisher/stripe: + delete: + description: Deletes the stripe config for a publisher. + operationId: pay-per-crawl.publisherDeleteStripeConfig + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/payPerCrawlApiNoResultResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/payPerCrawlApiErrorResponse' + description: Bad Request + security: + - api_email: [] + api_key: [] + summary: Deletes the stripe config for a publisher + tags: + - ppc_stripe + x-api-token-group: + - Account Settings Write + get: + description: Gets the stripe config for a publisher. + operationId: pay-per-crawl.publisherGetStripeConfig + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/payPerCrawlGetStripeConfigResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/payPerCrawlApiErrorResponse' + description: Bad Request + security: + - api_email: [] + api_key: [] + summary: Gets the stripe config for a publisher + tags: + - ppc_stripe + x-api-token-group: + - Trust and Safety Write + - Trust and Safety Read + - DNS View Write + - DNS View Read + - SCIM Provisioning + - Load Balancers Account Write + - Load Balancers Account Read + - 'Zero Trust: PII Read' + - DDoS Botnet Feed Write + - DDoS Botnet Feed Read + - Workers R2 Storage Write + - Workers R2 Storage Read + - DDoS Protection Write + - DDoS Protection Read + - Workers Tail Read + - Workers KV Storage Write + - Workers KV Storage Read + - Workers Scripts Write + - Workers Scripts Read + - 'Load Balancing: Monitors and Pools Write' + - 'Load Balancing: Monitors and Pools Read' + - Account Firewall Access Rules Write + - Account Firewall Access Rules Read + - DNS Firewall Write + - DNS Firewall Read + - Billing Write + - Billing Read + - Account Settings Write + - Account Settings Read + post: + description: Creates the stripe config for a publisher. + operationId: pay-per-crawl.publisherCreateStripeConfig + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/payPerCrawlCreateStripeConfigResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/payPerCrawlApiErrorResponse' + description: Bad Request + security: + - api_email: [] + api_key: [] + summary: Creates the stripe config for a publisher + tags: + - ppc_stripe + x-api-token-group: + - Account Settings Write + /accounts/{account_id}/pay-per-crawl/zones_can_be_enabled: + patch: + description: Allows an account admin to set the can_be_enabled setting on a list of zones. + operationId: pay-per-crawl.setZonesCanBeEnabled + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/payPerCrawlZonesCanBeEnabledPayload' + description: Data for setting flag on zones + x-auditable: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/payPerCrawlApiNoResultResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/payPerCrawlApiErrorResponse' + description: Bad Request + security: + - api_email: [] + api_key: [] + summary: Set can_be_enabled setting on zones + tags: + - ppc_config + x-api-token-group: + - Account Settings Write + /accounts/{account_id}/pay-per-crawl/zones_can_be_enabled/query: + post: + description: Provided a list of pay-per-crawl configured zones this method will return whether they can enable PPC or not. + operationId: pay-per-crawl.queryZonesCanBeEnabled + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/payPerCrawlZonesCanBeEnabledPayload' + description: Data for setting flag on zones + x-auditable: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/payPerCrawlQueryZonesCanBeEnabledResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/payPerCrawlApiErrorResponse' + description: Bad Request + security: + - api_email: [] + api_key: [] + summary: Gets the can_be_enabled zone setting + tags: + - ppc_config + x-api-token-group: + - Trust and Safety Write + - Trust and Safety Read + - DNS View Write + - DNS View Read + - SCIM Provisioning + - Load Balancers Account Write + - Load Balancers Account Read + - 'Zero Trust: PII Read' + - DDoS Botnet Feed Write + - DDoS Botnet Feed Read + - Workers R2 Storage Write + - Workers R2 Storage Read + - DDoS Protection Write + - DDoS Protection Read + - Workers Tail Read + - Workers KV Storage Write + - Workers KV Storage Read + - Workers Scripts Write + - Workers Scripts Read + - 'Load Balancing: Monitors and Pools Write' + - 'Load Balancing: Monitors and Pools Read' + - Account Firewall Access Rules Write + - Account Firewall Access Rules Read + - DNS Firewall Write + - DNS Firewall Read + - Billing Write + - Billing Read + - Account Settings Write + - Account Settings Read + /zones/{zone_id}/pay-per-crawl/configuration: + get: + description: Gets the pay-per-crawl config for a zone including the bot configuration. + operationId: pay-per-crawl.getConfig + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/payPerCrawlGetConfigResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/payPerCrawlApiErrorResponse' + description: Bad Request + security: + - api_email: [] + api_key: [] + summary: Get the pay-per-crawl config + tags: + - ppc_config + x-api-token-group: + - Zone Settings Write + - Zone Settings Read + patch: + description: Changes the pay-per-crawl config for a zone. + operationId: pay-per-crawl.patchConfig + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/payPerCrawlDaricConfig' + description: Data for setting flag on zones + x-auditable: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/payPerCrawlGetConfigResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/payPerCrawlApiErrorResponse' + description: Bad Request + security: + - api_email: [] + api_key: [] + summary: Changes pay-per-crawl config for a zone + tags: + - ppc_config + x-api-token-group: + - Zone Settings Write + post: + description: Creates the pay-per-crawl config for a zone. + operationId: pay-per-crawl.createConfig + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/payPerCrawlDaricConfig' + description: Data for setting flag on zones + x-auditable: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/payPerCrawlGetConfigResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/payPerCrawlApiErrorResponse' + description: Bad Request + security: + - api_email: [] + api_key: [] + summary: Creates pay-per-crawl config for a zone + tags: + - ppc_config + x-api-token-group: + - Zone Settings Write +components: + schemas: + billSubsApiBillingResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + properties: + account_type: + example: type + type: string + address: + example: 123 Main Street + type: string + address2: + example: Apt 1 + type: string + balance: + example: '0' + type: string + card_expiry_month: + example: 12 + type: integer + card_expiry_year: + example: 2099 + type: integer + card_number: + example: '4242424242424242' + type: string + city: + example: Anytown + type: string + company: + example: Company + type: string + country: + example: Anycountry + type: string + created_on: + example: '2014-03-01T12:21:59.3456Z' + format: date-time + type: string + readOnly: true + device_data: + example: sample_data + type: string + edited_on: + example: '2014-03-01T12:21:59.3456Z' + format: date-time + type: string + enterprise_billing_email: + example: johndoe@gmail.com + type: string + x-auditable: true + enterprise_primary_email: + example: johndoe@gmail.com + type: string + x-auditable: true + first_name: + example: John + type: string + id: + $ref: '#/components/schemas/billSubsApiComponentsSchemasIdentifier' + is_partner: + example: false + type: boolean + last_name: + example: Doe + type: string + next_bill_date: + example: '2014-03-01T12:21:59.3456Z' + format: date-time + type: string + payment_address: + example: 123 Main Street + type: string + payment_address2: + example: Apt 1 + type: string + payment_city: + example: Anytown + type: string + payment_country: + example: Anycountry + type: string + payment_email: + example: johndoe@gmail.com + type: string + payment_first_name: + example: John + type: string + payment_gateway: + example: gateway + type: string + payment_last_name: + example: Doe + type: string + payment_nonce: + example: abc123 + type: string + payment_state: + example: state + type: string + payment_zipcode: + example: '12345' + type: string + primary_email: + example: johndoe@gmail.com + type: string + x-auditable: true + state: + example: AnyState + type: string + tax_id_type: + example: type + type: string + telephone: + example: '1234567899' + type: string + use_legacy: + example: false + type: boolean + validation_code: + example: '1111' + type: string + vat: + example: GB123456789 + type: string + zipcode: + example: '12345' + type: string + type: object + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + billSubsApiComponentsSchemasIdentifier: + description: Billing item identifier tag. + example: b69a9f3492637782896352daae219e7d + maxLength: 32 + readOnly: true + type: string + x-auditable: true + billSubsApiMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + billableUsageApiApiResponseCommonFailure: + description: Represents a failed API response. + properties: + errors: + description: Contains error details describing why the request failed. + example: + - code: 1183 + message: 'Invalid request parameters: Please ensure all required parameters are included and correctly formatted.' + items: + $ref: '#/components/schemas/billableUsageApiMessage' + minItems: 1 + type: array + messages: + description: Contains informational notices about the response. + items: + $ref: '#/components/schemas/billableUsageApiMessage' + nullable: true + type: array + result: + description: Contains the response payload (always null on failure). + nullable: true + type: object + success: + description: Indicates whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + billableUsageApiMessage: + description: Represents an API notice or error detail. + properties: + code: + description: Identifies the error or notice type. + type: integer + message: + description: Describes the error or notice. + type: string + required: + - message + type: object + billableUsageApiUsageRecord: + description: Represents a single billable usage record. + properties: + BillingCurrency: + description: Specifies the billing currency code (ISO 4217). + example: USD + type: string + BillingPeriodStart: + description: Indicates the start of the billing period. + example: '2025-02-01T00:00:00Z' + format: date-time + type: string + ChargePeriodEnd: + description: Indicates the end of the charge period. + example: '2025-02-02T00:00:00Z' + format: date-time + type: string + ChargePeriodStart: + description: Indicates the start of the charge period. + example: '2025-02-01T00:00:00Z' + format: date-time + type: string + ConsumedQuantity: + description: Specifies the quantity consumed during this charge period. + example: 150000 + type: number + ConsumedUnit: + description: Specifies the unit of measurement for consumed quantity. + example: Requests + type: string + ContractedCost: + description: Specifies the cost for this charge period in the billing currency. + example: 0.75 + type: number + CumulatedContractedCost: + description: Specifies the cumulated cost for the billing period in the billing currency. + example: 2.25 + type: number + CumulatedPricingQuantity: + description: Specifies the cumulated pricing quantity for the billing period. + example: 4500000 + type: integer + PricingQuantity: + description: Specifies the pricing quantity for this charge period. + example: 150000 + type: integer + ServiceName: + description: Identifies the Cloudflare service. + example: Workers Standard + type: string + required: + - ChargePeriodStart + - ChargePeriodEnd + - BillingPeriodStart + - ServiceName + - ConsumedQuantity + - ConsumedUnit + - PricingQuantity + - CumulatedPricingQuantity + - ContractedCost + - CumulatedContractedCost + - BillingCurrency + type: object + billableUsageApiUsageResponse: + description: Represents a successful response containing billable usage records. + properties: + errors: + description: Contains error details if the request failed. + items: + $ref: '#/components/schemas/billableUsageApiMessage' + nullable: true + type: array + messages: + description: Contains informational notices about the response. + items: + $ref: '#/components/schemas/billableUsageApiMessage' + nullable: true + type: array + result: + description: Contains the array of billable usage records. + items: + $ref: '#/components/schemas/billableUsageApiUsageRecord' + type: array + success: + description: Indicates whether the API call was successful. + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + type: object + payPerCrawlApiErrorResponse: + properties: + errors: + items: + $ref: '#/components/schemas/payPerCrawlRESTError' + type: array + result: {} + success: + type: boolean + type: object + payPerCrawlApiNoResultResponse: + properties: + errors: + items: + $ref: '#/components/schemas/payPerCrawlMsg' + type: array + messages: + items: + $ref: '#/components/schemas/payPerCrawlMsg' + type: array + result_info: + $ref: '#/components/schemas/payPerCrawlResultInfo' + success: + type: boolean + type: object + payPerCrawlCreateStripeConfigResponse: + properties: + errors: + items: + $ref: '#/components/schemas/payPerCrawlMsg' + type: array + messages: + items: + $ref: '#/components/schemas/payPerCrawlMsg' + type: array + result: + $ref: '#/components/schemas/payPerCrawlStripeConnectResp' + result_info: + $ref: '#/components/schemas/payPerCrawlResultInfo' + success: + type: boolean + type: object + payPerCrawlDaricConfig: + properties: + bot_overrides: + type: object + enabled: + type: boolean + price_usd_microcents: + type: integer + type: object + payPerCrawlDaricZoneCanBeEnabled: + properties: + can_be_enabled: + type: boolean + id: + type: string + type: object + payPerCrawlErrorSource: + properties: + pointer: + type: string + type: object + payPerCrawlGetConfigResponse: + properties: + errors: + items: + $ref: '#/components/schemas/payPerCrawlMsg' + type: array + messages: + items: + $ref: '#/components/schemas/payPerCrawlMsg' + type: array + result: + $ref: '#/components/schemas/payPerCrawlDaricConfig' + result_info: + $ref: '#/components/schemas/payPerCrawlResultInfo' + success: + type: boolean + type: object + payPerCrawlGetStripeConfigResponse: + properties: + errors: + items: + $ref: '#/components/schemas/payPerCrawlMsg' + type: array + messages: + items: + $ref: '#/components/schemas/payPerCrawlMsg' + type: array + result: + $ref: '#/components/schemas/payPerCrawlStripeConnection' + result_info: + $ref: '#/components/schemas/payPerCrawlResultInfo' + success: + type: boolean + type: object + payPerCrawlMsg: + properties: + code: + type: integer + documentation_url: + type: string + error_chain: + items: + $ref: '#/components/schemas/payPerCrawlMsg' + type: array + message: + type: string + meta: + description: Meta object containing non-standard meta-information about the error. This field must be an object or null! + source: + $ref: '#/components/schemas/payPerCrawlSource' + type: object + payPerCrawlQueryZonesCanBeEnabledResponse: + properties: + errors: + items: + $ref: '#/components/schemas/payPerCrawlMsg' + type: array + messages: + items: + $ref: '#/components/schemas/payPerCrawlMsg' + type: array + result: + $ref: '#/components/schemas/payPerCrawlZonesCanBeEnabledPayload' + result_info: + $ref: '#/components/schemas/payPerCrawlResultInfo' + success: + type: boolean + type: object + payPerCrawlRESTError: + properties: + code: + type: integer + documentation_url: + type: string + error: + type: string + source: + $ref: '#/components/schemas/payPerCrawlErrorSource' + type: object + payPerCrawlResultInfo: + properties: + count: + type: integer + page: + type: integer + per_page: + type: integer + total_count: + type: integer + total_pages: + description: TotalPages is a pointer so that if TotalPages == 0 we return that there are indeed 0 pages. omitempty would have removed the field otherwise. This is important as a customer may be relying on always reading this property and it should not be absent just because it is 0, only absent if a value is never provided. + type: integer + type: object + payPerCrawlSource: + properties: + parameter: + description: Parameter is a string indicating which URI query parameter caused the error. + type: string + parameter_value_index: + description: ParameterPosition indicates position of parameter value which caused the error, for cases when there are multiple values for the same parameter. + type: integer + pointer: + description: Pointer is a JSON Pointer [RFC6901] to the associated entity in the request document e.g. "/data" for a primary data object, or "/data/attributes/title" for a specific attribute. + items: + type: string + type: array + type: object + payPerCrawlStripeConnectResp: + properties: + url: + type: string + type: object + payPerCrawlStripeConnection: + properties: + connect_status: + type: string + stripe_account_id: + type: string + type: object + payPerCrawlZonesCanBeEnabledPayload: + properties: + zones: + items: + $ref: '#/components/schemas/payPerCrawlDaricZoneCanBeEnabled' + type: array + type: object + responseInfo: + properties: + code: + minimum: 1000 + type: integer + message: + type: string + documentation_url: + type: string + source: + type: object + properties: + pointer: + type: string + required: + - code + - message + type: object + uniqueItems: true + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + profiles: + id: cloudflare.billing.profiles + name: profiles + title: Profiles + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1billing~1profile/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/profiles/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + usage: + id: cloudflare.billing.usage + name: usage + title: Usage + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1billing~1usage~1paygo/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/usage/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + crawler_stripe: + id: cloudflare.billing.crawler_stripe + name: crawler_stripe + title: Crawler Stripe + methods: + pay_per_crawl_crawler_delete_stripe_config: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pay-per-crawl~1crawler~1stripe/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pay-per-crawl~1crawler~1stripe/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + pay_per_crawl_crawler_create_stripe_config: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pay-per-crawl~1crawler~1stripe/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/crawler_stripe/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/crawler_stripe/methods/pay_per_crawl_crawler_create_stripe_config' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/crawler_stripe/methods/pay_per_crawl_crawler_delete_stripe_config' + replace: [] + publisher_stripe: + id: cloudflare.billing.publisher_stripe + name: publisher_stripe + title: Publisher Stripe + methods: + pay_per_crawl_publisher_delete_stripe_config: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pay-per-crawl~1publisher~1stripe/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pay-per-crawl~1publisher~1stripe/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + pay_per_crawl_publisher_create_stripe_config: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pay-per-crawl~1publisher~1stripe/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/publisher_stripe/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/publisher_stripe/methods/pay_per_crawl_publisher_create_stripe_config' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/publisher_stripe/methods/pay_per_crawl_publisher_delete_stripe_config' + replace: [] + accounts: + id: cloudflare.billing.accounts + name: accounts + title: Accounts + methods: + set_pay_per_crawl_zones: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pay-per-crawl~1zones_can_be_enabled/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .zones }}{{ $sep }}"zones": {{ if eq (kindOf .zones) "string" }}{{ .zones }}{{ else }}{{ toJson .zones }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + query_pay_per_crawl_zones: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pay-per-crawl~1zones_can_be_enabled~1query/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .zones }}{{ $sep }}"zones": {{ if eq (kindOf .zones) "string" }}{{ .zones }}{{ else }}{{ toJson .zones }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + configuration: + id: cloudflare.billing.configuration + name: configuration + title: Configuration + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1pay-per-crawl~1configuration/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + pay_per_crawl_patch_config: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1pay-per-crawl~1configuration/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .bot_overrides }}{{ $sep }}"bot_overrides": {{ if eq (kindOf .bot_overrides) "string" }}{{ .bot_overrides }}{{ else }}{{ toJson .bot_overrides }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .price_usd_microcents }}{{ $sep }}"price_usd_microcents": {{ toJson .price_usd_microcents }}{{- $sep = "," -}}{{ end }} + + } + + ' + pay_per_crawl_create_config: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1pay-per-crawl~1configuration/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .bot_overrides }}{{ $sep }}"bot_overrides": {{ if eq (kindOf .bot_overrides) "string" }}{{ .bot_overrides }}{{ else }}{{ toJson .bot_overrides }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .price_usd_microcents }}{{ $sep }}"price_usd_microcents": {{ toJson .price_usd_microcents }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/configuration/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/configuration/methods/pay_per_crawl_create_config' + update: + - $ref: '#/components/x-stackQL-resources/configuration/methods/pay_per_crawl_patch_config' + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/bot_management.yaml b/providers/src/cloudflare/v00.00.00000/services/bot_management.yaml index 427c3ba0..0c7c8875 100644 --- a/providers/src/cloudflare/v00.00.00000/services/bot_management.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/bot_management.yaml @@ -1,943 +1,836 @@ -openapi: 3.0.3 -info: - title: bot_management API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /zones/{zone_id}/bot_management: - get: - description: Retrieve a zone's Bot Management Config - operationId: bot-management-for-a-zone-get-config - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/botManagementBotManagementResponseBody' - description: Bot Management config response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/botManagementMessages' - messages: - $ref: '#/components/schemas/botManagementMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - enum: - - null - type: object - title: Bot Fight Mode - properties: - ai_bots_protection: - $ref: '#/components/schemas/botManagementAiBotsProtection' - cf_robots_variant: - $ref: '#/components/schemas/botManagementCfRobotsVariant' - content_bots_protection: - $ref: >- - #/components/schemas/botManagementContentBotsProtection - crawler_protection: - $ref: '#/components/schemas/botManagementCrawlerProtection' - enable_js: - $ref: '#/components/schemas/botManagementEnableJs' - is_robots_txt_managed: - $ref: '#/components/schemas/botManagementIsRobotsTxtManaged' - using_latest_model: - $ref: '#/components/schemas/botManagementUsingLatestModel' - fight_mode: - $ref: '#/components/schemas/botManagementFightMode' - stale_zone_configuration: - description: >- - A read-only field that shows which unauthorized - settings are currently active on the zone. These - settings typically result from upgrades or downgrades. - properties: - optimize_wordpress: - $ref: >- - #/components/schemas/botManagementOptimizeWordpressTurnedOn - sbfm_definitely_automated: - $ref: >- - #/components/schemas/botManagementSbfmDefinitelyAutomatedTurnedOn - sbfm_likely_automated: - $ref: >- - #/components/schemas/botManagementSbfmLikelyAutomatedTurnedOn - sbfm_static_resource_protection: - $ref: >- - #/components/schemas/botManagementSbfmStaticResourceProtectionTurnedOn - sbfm_verified_bots: - $ref: >- - #/components/schemas/botManagementSbfmVerifiedBotsTurnedOn - suppress_session_score: - $ref: >- - #/components/schemas/botManagementSuppressSessionScoreTurnedOff - readOnly: true - title: stale_zone_configuration - type: object - optimize_wordpress: - $ref: '#/components/schemas/botManagementOptimizeWordpress' - sbfm_definitely_automated: - $ref: >- - #/components/schemas/botManagementSbfmDefinitelyAutomated - sbfm_static_resource_protection: - $ref: >- - #/components/schemas/botManagementSbfmStaticResourceProtection - sbfm_verified_bots: - $ref: '#/components/schemas/botManagementSbfmVerifiedBots' - sbfm_likely_automated: - $ref: '#/components/schemas/botManagementSbfmLikelyAutomated' - auto_update_model: - $ref: '#/components/schemas/botManagementAutoUpdateModel' - bm_cookie_enabled: - $ref: '#/components/schemas/botManagementBmCookieEnabled' - suppress_session_score: - $ref: '#/components/schemas/botManagementSuppressSessionScore' - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Bot Management config response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Zone Bot Management Config - tags: - - Bot Settings - x-api-token-group: - - Bot Management Write - - Bot Management Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: bot_management - resource_chain: [] - method: get - put: - description: >- - Updates the Bot Management configuration for a zone. This API is used to - update: - **Bot Fight Mode** - **Super Bot Fight Mode** - **Bot - Management for Enterprise** See [Bot - Plans](https://developers.cloudflare.com/bots/plans/) for more - information on the different plans \ If you recently upgraded or - downgraded your plan, refer to the following examples to clean up old - configurations. Copy and paste the example body to remove old zone - configurations based on your current plan. **Clean up configuration for - Bot Fight Mode plan:** ```json { "sbfm_likely_automated": "allow", - "sbfm_definitely_automated": "allow", "sbfm_verified_bots": "allow", - "sbfm_static_resource_protection": false, "optimize_wordpress": false, - "suppress_session_score": false } ``` **Clean up configuration for SBFM - Pro plan:** ```json { "sbfm_likely_automated": "allow", "fight_mode": - false } ``` **Clean up configuration for SBFM Biz plan:** ```json { - "fight_mode": false } ``` **Clean up configuration for BM Enterprise - Subscription plan:** It is strongly recommended that you ensure you have - [custom rules](https://developers.cloudflare.com/waf/custom-rules/) in - place to protect your zone before disabling the SBFM rules. Without - these protections, your zone is vulnerable to attacks. ```json { - "sbfm_likely_automated": "allow", "sbfm_definitely_automated": "allow", - "sbfm_verified_bots": "allow", "sbfm_static_resource_protection": false, - "optimize_wordpress": false, "fight_mode": false } ``` - operationId: bot-management-for-a-zone-update-config - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/botManagementConfigSingle' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/botManagementBotManagementResponseBody' - description: Update Bot Management response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/botManagementMessages' - messages: - $ref: '#/components/schemas/botManagementMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - enum: - - null - type: object - title: Bot Fight Mode - properties: - ai_bots_protection: - $ref: '#/components/schemas/botManagementAiBotsProtection' - cf_robots_variant: - $ref: '#/components/schemas/botManagementCfRobotsVariant' - content_bots_protection: - $ref: >- - #/components/schemas/botManagementContentBotsProtection - crawler_protection: - $ref: '#/components/schemas/botManagementCrawlerProtection' - enable_js: - $ref: '#/components/schemas/botManagementEnableJs' - is_robots_txt_managed: - $ref: '#/components/schemas/botManagementIsRobotsTxtManaged' - using_latest_model: - $ref: '#/components/schemas/botManagementUsingLatestModel' - fight_mode: - $ref: '#/components/schemas/botManagementFightMode' - stale_zone_configuration: - description: >- - A read-only field that shows which unauthorized - settings are currently active on the zone. These - settings typically result from upgrades or downgrades. - properties: - optimize_wordpress: - $ref: >- - #/components/schemas/botManagementOptimizeWordpressTurnedOn - sbfm_definitely_automated: - $ref: >- - #/components/schemas/botManagementSbfmDefinitelyAutomatedTurnedOn - sbfm_likely_automated: - $ref: >- - #/components/schemas/botManagementSbfmLikelyAutomatedTurnedOn - sbfm_static_resource_protection: - $ref: >- - #/components/schemas/botManagementSbfmStaticResourceProtectionTurnedOn - sbfm_verified_bots: - $ref: >- - #/components/schemas/botManagementSbfmVerifiedBotsTurnedOn - suppress_session_score: - $ref: >- - #/components/schemas/botManagementSuppressSessionScoreTurnedOff - readOnly: true - title: stale_zone_configuration - type: object - optimize_wordpress: - $ref: '#/components/schemas/botManagementOptimizeWordpress' - sbfm_definitely_automated: - $ref: >- - #/components/schemas/botManagementSbfmDefinitelyAutomated - sbfm_static_resource_protection: - $ref: >- - #/components/schemas/botManagementSbfmStaticResourceProtection - sbfm_verified_bots: - $ref: '#/components/schemas/botManagementSbfmVerifiedBots' - sbfm_likely_automated: - $ref: '#/components/schemas/botManagementSbfmLikelyAutomated' - auto_update_model: - $ref: '#/components/schemas/botManagementAutoUpdateModel' - bm_cookie_enabled: - $ref: '#/components/schemas/botManagementBmCookieEnabled' - suppress_session_score: - $ref: '#/components/schemas/botManagementSuppressSessionScore' - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Update Bot Management response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Zone Bot Management Config - tags: - - Bot Settings - x-api-token-group: - - Bot Management Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: bot_management - resource_chain: [] - method: update - /zones/{zone_id}/bot_management/feedback: - get: - description: >- - Returns all feedback reports previously submitted for the specified - zone. Feedback reports help improve detection by sharing samples of - traffic that were misclassified as bots or humans. - operationId: bot-management-zone-feedback-list - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - items: - $ref: '#/components/schemas/botManagementFeedbackReport' - type: array - description: List of feedback reports - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/botManagementApiResponseCommonFailure' - description: Feedback list failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List zone feedback reports - tags: - - Feedback - x-api-token-group: - - Bot Management Feedback Report Write - - Bot Management Feedback Report Read - - Bot Management Write - - Bot Management Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: false - post: - description: >- - Submit a feedback report for the specified zone. Use `type` to indicate - whether the report is a false positive (good traffic flagged as bot) or - a false negative (bot traffic missed). Furthermore, you can also use - `expression` as a wirefilter to identify the affected traffic sample. - See more accepted API fields and expression types at - https://developers.cloudflare.com/bots/concepts/feedback-loop/#api-fields - and - https://developers.cloudflare.com/bots/concepts/feedback-loop/#expression-fields, - respectively. - operationId: bot-management-zone-feedback-create - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/botManagementFeedbackReport' - responses: - '201': - description: Feedback report created - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/botManagementApiResponseCommonFailure' - description: Feedback creation failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Submit a feedback report - tags: - - Feedback - x-api-token-group: - - Bot Management Feedback Report Write - - Bot Management Feedback Report Read - - Bot Management Write - - Bot Management Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: false -components: - schemas: - botManagementAiBotsProtection: - description: >- - Enable rule to block AI Scrapers and Crawlers. Please note the value - `only_on_ad_pages` is currently not available for Enterprise customers. - enum: - - block - - disabled - - only_on_ad_pages - example: block - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - botManagementApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/botManagementMessages' - messages: - example: [] - $ref: '#/components/schemas/botManagementMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - botManagementAutoUpdateModel: - description: >- - Automatically update to the newest bot detection models created by - Cloudflare as they are released. [Learn - more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes) - example: true - type: boolean - x-auditable: true - x-stainless-terraform-configurability: computed_optional - botManagementBmCookieEnabled: - description: >- - Indicates that the bot management cookie can be placed on end user - devices accessing the site. Defaults to true - example: true - type: boolean - x-auditable: true - x-stainless-terraform-configurability: computed_optional - botManagementBotManagementResponseBody: - type: object - properties: - errors: - $ref: '#/components/schemas/botManagementMessages' - messages: - $ref: '#/components/schemas/botManagementMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - type: object - title: Bot Fight Mode - properties: - ai_bots_protection: - $ref: '#/components/schemas/botManagementAiBotsProtection' - cf_robots_variant: - $ref: '#/components/schemas/botManagementCfRobotsVariant' - content_bots_protection: - $ref: '#/components/schemas/botManagementContentBotsProtection' - crawler_protection: - $ref: '#/components/schemas/botManagementCrawlerProtection' - enable_js: - $ref: '#/components/schemas/botManagementEnableJs' - is_robots_txt_managed: - $ref: '#/components/schemas/botManagementIsRobotsTxtManaged' - using_latest_model: - $ref: '#/components/schemas/botManagementUsingLatestModel' - fight_mode: - $ref: '#/components/schemas/botManagementFightMode' - stale_zone_configuration: - description: >- - A read-only field that shows which unauthorized settings are - currently active on the zone. These settings typically result - from upgrades or downgrades. - properties: - optimize_wordpress: - $ref: '#/components/schemas/botManagementOptimizeWordpressTurnedOn' - sbfm_definitely_automated: - $ref: >- - #/components/schemas/botManagementSbfmDefinitelyAutomatedTurnedOn - sbfm_likely_automated: - $ref: >- - #/components/schemas/botManagementSbfmLikelyAutomatedTurnedOn - sbfm_static_resource_protection: - $ref: >- - #/components/schemas/botManagementSbfmStaticResourceProtectionTurnedOn - sbfm_verified_bots: - $ref: '#/components/schemas/botManagementSbfmVerifiedBotsTurnedOn' - suppress_session_score: - $ref: >- - #/components/schemas/botManagementSuppressSessionScoreTurnedOff - readOnly: true - title: stale_zone_configuration - type: object - optimize_wordpress: - $ref: '#/components/schemas/botManagementOptimizeWordpress' - sbfm_definitely_automated: - $ref: '#/components/schemas/botManagementSbfmDefinitelyAutomated' - sbfm_static_resource_protection: - $ref: '#/components/schemas/botManagementSbfmStaticResourceProtection' - sbfm_verified_bots: - $ref: '#/components/schemas/botManagementSbfmVerifiedBots' - sbfm_likely_automated: - $ref: '#/components/schemas/botManagementSbfmLikelyAutomated' - auto_update_model: - $ref: '#/components/schemas/botManagementAutoUpdateModel' - bm_cookie_enabled: - $ref: '#/components/schemas/botManagementBmCookieEnabled' - suppress_session_score: - $ref: '#/components/schemas/botManagementSuppressSessionScore' - required: - - success - - errors - - messages - botManagementCfRobotsVariant: - description: Specifies the Robots Access Control License variant to use. - enum: - - 'off' - - policy_only - example: policy_only - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - botManagementConfigSingle: - type: object - title: Bot Fight Mode - properties: - ai_bots_protection: - $ref: '#/components/schemas/botManagementAiBotsProtection' - cf_robots_variant: - $ref: '#/components/schemas/botManagementCfRobotsVariant' - content_bots_protection: - $ref: '#/components/schemas/botManagementContentBotsProtection' - crawler_protection: - $ref: '#/components/schemas/botManagementCrawlerProtection' - enable_js: - $ref: '#/components/schemas/botManagementEnableJs' - is_robots_txt_managed: - $ref: '#/components/schemas/botManagementIsRobotsTxtManaged' - using_latest_model: - $ref: '#/components/schemas/botManagementUsingLatestModel' - fight_mode: - $ref: '#/components/schemas/botManagementFightMode' - stale_zone_configuration: - description: >- - A read-only field that shows which unauthorized settings are - currently active on the zone. These settings typically result from - upgrades or downgrades. - properties: - optimize_wordpress: - $ref: '#/components/schemas/botManagementOptimizeWordpressTurnedOn' - sbfm_definitely_automated: - $ref: >- - #/components/schemas/botManagementSbfmDefinitelyAutomatedTurnedOn - sbfm_likely_automated: - $ref: '#/components/schemas/botManagementSbfmLikelyAutomatedTurnedOn' - sbfm_static_resource_protection: - $ref: >- - #/components/schemas/botManagementSbfmStaticResourceProtectionTurnedOn - sbfm_verified_bots: - $ref: '#/components/schemas/botManagementSbfmVerifiedBotsTurnedOn' - suppress_session_score: - $ref: '#/components/schemas/botManagementSuppressSessionScoreTurnedOff' - readOnly: true - title: stale_zone_configuration - type: object - optimize_wordpress: - $ref: '#/components/schemas/botManagementOptimizeWordpress' - sbfm_definitely_automated: - $ref: '#/components/schemas/botManagementSbfmDefinitelyAutomated' - sbfm_static_resource_protection: - $ref: '#/components/schemas/botManagementSbfmStaticResourceProtection' - sbfm_verified_bots: - $ref: '#/components/schemas/botManagementSbfmVerifiedBots' - sbfm_likely_automated: - $ref: '#/components/schemas/botManagementSbfmLikelyAutomated' - auto_update_model: - $ref: '#/components/schemas/botManagementAutoUpdateModel' - bm_cookie_enabled: - $ref: '#/components/schemas/botManagementBmCookieEnabled' - suppress_session_score: - $ref: '#/components/schemas/botManagementSuppressSessionScore' - botManagementContentBotsProtection: - description: >- - Enable rule to block content bots. When enabled, blocks automated - traffic with low bot scores, excluding safe verified bot categories. - Exceptions should be managed via skip rules. - enum: - - block - - disabled - example: disabled - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - botManagementCrawlerProtection: - description: Enable rule to punish AI Scrapers and Crawlers via a link maze. - enum: - - enabled - - disabled - example: enabled - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - botManagementEnableJs: - description: >- - Use lightweight, invisible JavaScript detections to improve Bot - Management. [Learn more about JavaScript - Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). - example: true - type: boolean - x-auditable: true - x-stainless-terraform-configurability: computed_optional - botManagementFeedbackReport: - properties: - created_at: - format: date-time - readOnly: true - type: string - description: - type: string - expression: - description: Wirefilter expression describing the traffic being reported. - type: string - first_request_seen_at: - format: date-time - type: string - last_request_seen_at: - format: date-time - type: string - requests: - format: int64 - type: integer - requests_by_attribute: - $ref: '#/components/schemas/botManagementRequestsByAttribute' - requests_by_score: - $ref: '#/components/schemas/botManagementRequestsByScore' - requests_by_score_src: - $ref: '#/components/schemas/botManagementRequestsByScoreSrc' - subtype: - type: string - type: - $ref: '#/components/schemas/botManagementFeedbackType' - required: - - type - - description - - expression - - first_request_seen_at - - last_request_seen_at - - requests - - requests_by_score - - requests_by_score_src - - requests_by_attribute - type: object - botManagementFeedbackType: - description: Type of feedback report. - enum: - - false_positive - - false_negative - example: false_positive - type: string - botManagementFightMode: - description: Whether to enable Bot Fight Mode. - example: true - type: boolean - x-auditable: true - x-stainless-terraform-configurability: computed_optional - botManagementIsRobotsTxtManaged: - default: false - description: >- - Enable cloudflare managed robots.txt. If an existing robots.txt is - detected, then managed robots.txt will be prepended to the existing - robots.txt. - example: false - type: boolean - x-auditable: true - x-stainless-terraform-configurability: computed_optional - botManagementMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - botManagementOptimizeWordpress: - description: Whether to optimize Super Bot Fight Mode protections for Wordpress. - example: true - type: boolean - x-auditable: true - x-stainless-terraform-configurability: computed_optional - botManagementOptimizeWordpressTurnedOn: - description: Indicates that the zone's wordpress optimization for SBFM is turned on. - title: optimize_wordpress - type: boolean - x-auditable: true - x-stainless-terraform-configurability: computed_optional - botManagementRequestsByAttribute: - description: >- - Top attributes contributing to the feedback sample. Keys include - topASNs, topCountries, topHosts, topIPs, topJA3Hashes, topJA4s, - topPaths, topUserAgents. - type: object - botManagementRequestsByScore: - description: Map of bot scores (1-99) to request counts. Sum must equal `requests`. - type: object - botManagementRequestsByScoreSrc: - description: Map of score source to request counts. Sum must equal `requests`. - type: object - botManagementSbfmDefinitelyAutomated: - description: >- - Super Bot Fight Mode (SBFM) action to take on definitely automated - requests. - enum: - - allow - - block - - managed_challenge - example: allow - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - botManagementSbfmDefinitelyAutomatedTurnedOn: - description: >- - Indicates that the zone's definitely automated requests are being - blocked or challenged. - title: sbfm_definitely_automated - type: string - x-auditable: true - botManagementSbfmLikelyAutomated: - description: Super Bot Fight Mode (SBFM) action to take on likely automated requests. - enum: - - allow - - block - - managed_challenge - example: allow - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - botManagementSbfmLikelyAutomatedTurnedOn: - description: >- - Indicates that the zone's likely automated requests are being blocked or - challenged. - title: sbfm_likely_automated - type: string - x-auditable: true - botManagementSbfmStaticResourceProtection: - description: >- - Super Bot Fight Mode (SBFM) to enable static resource protection. Enable - if static resources on your application need bot protection. Note: - Static resource protection can also result in legitimate traffic being - blocked. - example: true - type: boolean - x-auditable: true - x-stainless-terraform-configurability: computed_optional - botManagementSbfmStaticResourceProtectionTurnedOn: - description: Indicates that the zone's static resource protection is turned on. - title: sbfm_static_resource_protection - type: string - x-auditable: true - botManagementSbfmVerifiedBots: - description: Super Bot Fight Mode (SBFM) action to take on verified bots requests. - enum: - - allow - - block - example: allow - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - botManagementSbfmVerifiedBotsTurnedOn: - description: Indicates that the zone's verified bot requests are being blocked. - title: sbfm_verified_bots - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - botManagementSuppressSessionScore: - description: >- - Whether to disable tracking the highest bot score for a session in the - Bot Management cookie. - example: false - type: boolean - x-auditable: true - x-stainless-terraform-configurability: computed_optional - botManagementSuppressSessionScoreTurnedOff: - description: Indicates that the zone's session score tracking is disabled. - title: suppress_session_score - type: boolean - x-auditable: true - x-stainless-terraform-configurability: computed_optional - botManagementUsingLatestModel: - description: >- - A read-only field that indicates whether the zone currently is running - the latest ML model. - example: true - readOnly: true - type: boolean - x-auditable: true - x-stainless-terraform-configurability: computed_optional - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - bot_management: - id: cloudflare.bot_management.bot_management - name: bot_management - title: Bot Management - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1bot_management/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1bot_management/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/bot_management/methods/list' - insert: [] - update: [] - delete: [] - replace: - - $ref: '#/components/x-stackQL-resources/bot_management/methods/update' - feedback: - id: cloudflare.bot_management.feedback - name: feedback - title: Feedback - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1bot_management~1feedback/get' - response: - mediaType: application/json - openAPIDocKey: '200' - bot_management_zone_feedback_create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1bot_management~1feedback/post' - response: - mediaType: application/json - openAPIDocKey: '201' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/feedback/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/feedback/methods/bot_management_zone_feedback_create - update: [] - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: bot_management API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /zones/{zone_id}/bot_management: + get: + description: Retrieve a zone's Bot Management Config + operationId: bot-management-for-a-zone-get-config + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/botManagementBotManagementResponseBody' + description: Bot Management config response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/botManagementMessages' + messages: + $ref: '#/components/schemas/botManagementMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + enum: + - null + type: object + title: Bot Fight Mode + properties: + ai_bots_protection: + $ref: '#/components/schemas/botManagementAiBotsProtection' + cf_robots_variant: + $ref: '#/components/schemas/botManagementCfRobotsVariant' + content_bots_protection: + $ref: '#/components/schemas/botManagementContentBotsProtection' + crawler_protection: + $ref: '#/components/schemas/botManagementCrawlerProtection' + enable_js: + $ref: '#/components/schemas/botManagementEnableJs' + is_robots_txt_managed: + $ref: '#/components/schemas/botManagementIsRobotsTxtManaged' + using_latest_model: + $ref: '#/components/schemas/botManagementUsingLatestModel' + fight_mode: + $ref: '#/components/schemas/botManagementFightMode' + stale_zone_configuration: + description: A read-only field that shows which unauthorized settings are currently active on the zone. These settings typically result from upgrades or downgrades. + properties: + optimize_wordpress: + $ref: '#/components/schemas/botManagementOptimizeWordpressTurnedOn' + sbfm_definitely_automated: + $ref: '#/components/schemas/botManagementSbfmDefinitelyAutomatedTurnedOn' + sbfm_likely_automated: + $ref: '#/components/schemas/botManagementSbfmLikelyAutomatedTurnedOn' + sbfm_static_resource_protection: + $ref: '#/components/schemas/botManagementSbfmStaticResourceProtectionTurnedOn' + sbfm_verified_bots: + $ref: '#/components/schemas/botManagementSbfmVerifiedBotsTurnedOn' + suppress_session_score: + $ref: '#/components/schemas/botManagementSuppressSessionScoreTurnedOff' + readOnly: true + title: stale_zone_configuration + type: object + optimize_wordpress: + $ref: '#/components/schemas/botManagementOptimizeWordpress' + sbfm_definitely_automated: + $ref: '#/components/schemas/botManagementSbfmDefinitelyAutomated' + sbfm_static_resource_protection: + $ref: '#/components/schemas/botManagementSbfmStaticResourceProtection' + sbfm_verified_bots: + $ref: '#/components/schemas/botManagementSbfmVerifiedBots' + sbfm_likely_automated: + $ref: '#/components/schemas/botManagementSbfmLikelyAutomated' + auto_update_model: + $ref: '#/components/schemas/botManagementAutoUpdateModel' + bm_cookie_enabled: + $ref: '#/components/schemas/botManagementBmCookieEnabled' + suppress_session_score: + $ref: '#/components/schemas/botManagementSuppressSessionScore' + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Bot Management config response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Zone Bot Management Config + tags: + - Bot Settings + x-api-token-group: + - Bot Management Write + - Bot Management Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: bot_management + resource_chain: [] + method: get + put: + description: 'Updates the Bot Management configuration for a zone. This API is used to update: - **Bot Fight Mode** - **Super Bot Fight Mode** - **Bot Management for Enterprise** See [Bot Plans](https://developers.cloudflare.com/bots/plans/) for more information on the different plans \ If you recently upgraded or downgraded your plan, refer to the following examples to clean up old configurations. Copy and paste the example body to remove old zone configurations based on your current plan. **Clean up configuration for Bot Fight Mode plan:** ```json { "sbfm_likely_automated": "allow", "sbfm_definitely_automated": "allow", "sbfm_verified_bots": "allow", "sbfm_static_resource_protection": false, "optimize_wordpress": false, "suppress_session_score": false } ``` **Clean up configuration for SBFM Pro plan:** ```json { "sbfm_likely_automated": "allow", "fight_mode": false } ``` **Clean up configuration for SBFM Biz plan:** ```json { "fight_mode": false } ``` **Clean up configuration for + BM Enterprise Subscription plan:** It is strongly recommended that you ensure you have [custom rules](https://developers.cloudflare.com/waf/custom-rules/) in place to protect your zone before disabling the SBFM rules. Without these protections, your zone is vulnerable to attacks. ```json { "sbfm_likely_automated": "allow", "sbfm_definitely_automated": "allow", "sbfm_verified_bots": "allow", "sbfm_static_resource_protection": false, "optimize_wordpress": false, "fight_mode": false } ```' + operationId: bot-management-for-a-zone-update-config + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/botManagementConfigSingle' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/botManagementBotManagementResponseBody' + description: Update Bot Management response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/botManagementMessages' + messages: + $ref: '#/components/schemas/botManagementMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + enum: + - null + type: object + title: Bot Fight Mode + properties: + ai_bots_protection: + $ref: '#/components/schemas/botManagementAiBotsProtection' + cf_robots_variant: + $ref: '#/components/schemas/botManagementCfRobotsVariant' + content_bots_protection: + $ref: '#/components/schemas/botManagementContentBotsProtection' + crawler_protection: + $ref: '#/components/schemas/botManagementCrawlerProtection' + enable_js: + $ref: '#/components/schemas/botManagementEnableJs' + is_robots_txt_managed: + $ref: '#/components/schemas/botManagementIsRobotsTxtManaged' + using_latest_model: + $ref: '#/components/schemas/botManagementUsingLatestModel' + fight_mode: + $ref: '#/components/schemas/botManagementFightMode' + stale_zone_configuration: + description: A read-only field that shows which unauthorized settings are currently active on the zone. These settings typically result from upgrades or downgrades. + properties: + optimize_wordpress: + $ref: '#/components/schemas/botManagementOptimizeWordpressTurnedOn' + sbfm_definitely_automated: + $ref: '#/components/schemas/botManagementSbfmDefinitelyAutomatedTurnedOn' + sbfm_likely_automated: + $ref: '#/components/schemas/botManagementSbfmLikelyAutomatedTurnedOn' + sbfm_static_resource_protection: + $ref: '#/components/schemas/botManagementSbfmStaticResourceProtectionTurnedOn' + sbfm_verified_bots: + $ref: '#/components/schemas/botManagementSbfmVerifiedBotsTurnedOn' + suppress_session_score: + $ref: '#/components/schemas/botManagementSuppressSessionScoreTurnedOff' + readOnly: true + title: stale_zone_configuration + type: object + optimize_wordpress: + $ref: '#/components/schemas/botManagementOptimizeWordpress' + sbfm_definitely_automated: + $ref: '#/components/schemas/botManagementSbfmDefinitelyAutomated' + sbfm_static_resource_protection: + $ref: '#/components/schemas/botManagementSbfmStaticResourceProtection' + sbfm_verified_bots: + $ref: '#/components/schemas/botManagementSbfmVerifiedBots' + sbfm_likely_automated: + $ref: '#/components/schemas/botManagementSbfmLikelyAutomated' + auto_update_model: + $ref: '#/components/schemas/botManagementAutoUpdateModel' + bm_cookie_enabled: + $ref: '#/components/schemas/botManagementBmCookieEnabled' + suppress_session_score: + $ref: '#/components/schemas/botManagementSuppressSessionScore' + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Update Bot Management response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Zone Bot Management Config + tags: + - Bot Settings + x-api-token-group: + - Bot Management Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: bot_management + resource_chain: [] + method: update + /zones/{zone_id}/bot_management/feedback: + get: + description: Returns all feedback reports previously submitted for the specified zone. Feedback reports help improve detection by sharing samples of traffic that were misclassified as bots or humans. + operationId: bot-management-zone-feedback-list + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + items: + $ref: '#/components/schemas/botManagementFeedbackReport' + type: array + description: List of feedback reports + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/botManagementApiResponseCommonFailure' + description: Feedback list failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List zone feedback reports + tags: + - Feedback + x-api-token-group: + - Bot Management Feedback Report Write + - Bot Management Feedback Report Read + - Bot Management Write + - Bot Management Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: false + post: + description: Submit a feedback report for the specified zone. Use `type` to indicate whether the report is a false positive (good traffic flagged as bot) or a false negative (bot traffic missed). Furthermore, you can also use `expression` as a wirefilter to identify the affected traffic sample. See more accepted API fields and expression types at https://developers.cloudflare.com/bots/concepts/feedback-loop/#api-fields and https://developers.cloudflare.com/bots/concepts/feedback-loop/#expression-fields, respectively. + operationId: bot-management-zone-feedback-create + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/botManagementFeedbackReport' + responses: + '201': + description: Feedback report created + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/botManagementApiResponseCommonFailure' + description: Feedback creation failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Submit a feedback report + tags: + - Feedback + x-api-token-group: + - Bot Management Feedback Report Write + - Bot Management Feedback Report Read + - Bot Management Write + - Bot Management Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: false +components: + schemas: + botManagementAiBotsProtection: + description: Enable rule to block AI Scrapers and Crawlers. Please note the value `only_on_ad_pages` is currently not available for Enterprise customers. + enum: + - block + - disabled + - only_on_ad_pages + example: block + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + botManagementApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/botManagementMessages' + messages: + example: [] + $ref: '#/components/schemas/botManagementMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + botManagementAutoUpdateModel: + description: Automatically update to the newest bot detection models created by Cloudflare as they are released. [Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes) + example: true + type: boolean + x-auditable: true + x-stainless-terraform-configurability: computed_optional + botManagementBmCookieEnabled: + description: Indicates that the bot management cookie can be placed on end user devices accessing the site. Defaults to true + example: true + type: boolean + x-auditable: true + x-stainless-terraform-configurability: computed_optional + botManagementBotManagementResponseBody: + type: object + properties: + errors: + $ref: '#/components/schemas/botManagementMessages' + messages: + $ref: '#/components/schemas/botManagementMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + type: object + title: Bot Fight Mode + properties: + ai_bots_protection: + $ref: '#/components/schemas/botManagementAiBotsProtection' + cf_robots_variant: + $ref: '#/components/schemas/botManagementCfRobotsVariant' + content_bots_protection: + $ref: '#/components/schemas/botManagementContentBotsProtection' + crawler_protection: + $ref: '#/components/schemas/botManagementCrawlerProtection' + enable_js: + $ref: '#/components/schemas/botManagementEnableJs' + is_robots_txt_managed: + $ref: '#/components/schemas/botManagementIsRobotsTxtManaged' + using_latest_model: + $ref: '#/components/schemas/botManagementUsingLatestModel' + fight_mode: + $ref: '#/components/schemas/botManagementFightMode' + stale_zone_configuration: + description: A read-only field that shows which unauthorized settings are currently active on the zone. These settings typically result from upgrades or downgrades. + properties: + optimize_wordpress: + $ref: '#/components/schemas/botManagementOptimizeWordpressTurnedOn' + sbfm_definitely_automated: + $ref: '#/components/schemas/botManagementSbfmDefinitelyAutomatedTurnedOn' + sbfm_likely_automated: + $ref: '#/components/schemas/botManagementSbfmLikelyAutomatedTurnedOn' + sbfm_static_resource_protection: + $ref: '#/components/schemas/botManagementSbfmStaticResourceProtectionTurnedOn' + sbfm_verified_bots: + $ref: '#/components/schemas/botManagementSbfmVerifiedBotsTurnedOn' + suppress_session_score: + $ref: '#/components/schemas/botManagementSuppressSessionScoreTurnedOff' + readOnly: true + title: stale_zone_configuration + type: object + optimize_wordpress: + $ref: '#/components/schemas/botManagementOptimizeWordpress' + sbfm_definitely_automated: + $ref: '#/components/schemas/botManagementSbfmDefinitelyAutomated' + sbfm_static_resource_protection: + $ref: '#/components/schemas/botManagementSbfmStaticResourceProtection' + sbfm_verified_bots: + $ref: '#/components/schemas/botManagementSbfmVerifiedBots' + sbfm_likely_automated: + $ref: '#/components/schemas/botManagementSbfmLikelyAutomated' + auto_update_model: + $ref: '#/components/schemas/botManagementAutoUpdateModel' + bm_cookie_enabled: + $ref: '#/components/schemas/botManagementBmCookieEnabled' + suppress_session_score: + $ref: '#/components/schemas/botManagementSuppressSessionScore' + required: + - success + - errors + - messages + botManagementCfRobotsVariant: + description: Specifies the Robots Access Control License variant to use. + enum: + - 'off' + - policy_only + example: policy_only + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + botManagementConfigSingle: + type: object + title: Bot Fight Mode + properties: + ai_bots_protection: + $ref: '#/components/schemas/botManagementAiBotsProtection' + cf_robots_variant: + $ref: '#/components/schemas/botManagementCfRobotsVariant' + content_bots_protection: + $ref: '#/components/schemas/botManagementContentBotsProtection' + crawler_protection: + $ref: '#/components/schemas/botManagementCrawlerProtection' + enable_js: + $ref: '#/components/schemas/botManagementEnableJs' + is_robots_txt_managed: + $ref: '#/components/schemas/botManagementIsRobotsTxtManaged' + using_latest_model: + $ref: '#/components/schemas/botManagementUsingLatestModel' + fight_mode: + $ref: '#/components/schemas/botManagementFightMode' + stale_zone_configuration: + description: A read-only field that shows which unauthorized settings are currently active on the zone. These settings typically result from upgrades or downgrades. + properties: + optimize_wordpress: + $ref: '#/components/schemas/botManagementOptimizeWordpressTurnedOn' + sbfm_definitely_automated: + $ref: '#/components/schemas/botManagementSbfmDefinitelyAutomatedTurnedOn' + sbfm_likely_automated: + $ref: '#/components/schemas/botManagementSbfmLikelyAutomatedTurnedOn' + sbfm_static_resource_protection: + $ref: '#/components/schemas/botManagementSbfmStaticResourceProtectionTurnedOn' + sbfm_verified_bots: + $ref: '#/components/schemas/botManagementSbfmVerifiedBotsTurnedOn' + suppress_session_score: + $ref: '#/components/schemas/botManagementSuppressSessionScoreTurnedOff' + readOnly: true + title: stale_zone_configuration + type: object + optimize_wordpress: + $ref: '#/components/schemas/botManagementOptimizeWordpress' + sbfm_definitely_automated: + $ref: '#/components/schemas/botManagementSbfmDefinitelyAutomated' + sbfm_static_resource_protection: + $ref: '#/components/schemas/botManagementSbfmStaticResourceProtection' + sbfm_verified_bots: + $ref: '#/components/schemas/botManagementSbfmVerifiedBots' + sbfm_likely_automated: + $ref: '#/components/schemas/botManagementSbfmLikelyAutomated' + auto_update_model: + $ref: '#/components/schemas/botManagementAutoUpdateModel' + bm_cookie_enabled: + $ref: '#/components/schemas/botManagementBmCookieEnabled' + suppress_session_score: + $ref: '#/components/schemas/botManagementSuppressSessionScore' + botManagementContentBotsProtection: + description: Enable rule to block content bots. When enabled, blocks automated traffic with low bot scores, excluding safe verified bot categories. Exceptions should be managed via skip rules. + enum: + - block + - disabled + example: disabled + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + botManagementCrawlerProtection: + description: Enable rule to punish AI Scrapers and Crawlers via a link maze. + enum: + - enabled + - disabled + example: enabled + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + botManagementEnableJs: + description: Use lightweight, invisible JavaScript detections to improve Bot Management. [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). + example: true + type: boolean + x-auditable: true + x-stainless-terraform-configurability: computed_optional + botManagementFeedbackReport: + properties: + created_at: + format: date-time + readOnly: true + type: string + description: + type: string + expression: + description: Wirefilter expression describing the traffic being reported. + type: string + first_request_seen_at: + format: date-time + type: string + last_request_seen_at: + format: date-time + type: string + requests: + format: int64 + type: integer + requests_by_attribute: + $ref: '#/components/schemas/botManagementRequestsByAttribute' + requests_by_score: + $ref: '#/components/schemas/botManagementRequestsByScore' + requests_by_score_src: + $ref: '#/components/schemas/botManagementRequestsByScoreSrc' + subtype: + type: string + type: + $ref: '#/components/schemas/botManagementFeedbackType' + required: + - type + - description + - expression + - first_request_seen_at + - last_request_seen_at + - requests + - requests_by_score + - requests_by_score_src + - requests_by_attribute + type: object + botManagementFeedbackType: + description: Type of feedback report. + enum: + - false_positive + - false_negative + example: false_positive + type: string + botManagementFightMode: + description: Whether to enable Bot Fight Mode. + example: true + type: boolean + x-auditable: true + x-stainless-terraform-configurability: computed_optional + botManagementIsRobotsTxtManaged: + default: false + description: Enable cloudflare managed robots.txt. If an existing robots.txt is detected, then managed robots.txt will be prepended to the existing robots.txt. + example: false + type: boolean + x-auditable: true + x-stainless-terraform-configurability: computed_optional + botManagementMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + botManagementOptimizeWordpress: + description: Whether to optimize Super Bot Fight Mode protections for Wordpress. + example: true + type: boolean + x-auditable: true + x-stainless-terraform-configurability: computed_optional + botManagementOptimizeWordpressTurnedOn: + description: Indicates that the zone's wordpress optimization for SBFM is turned on. + title: optimize_wordpress + type: boolean + x-auditable: true + x-stainless-terraform-configurability: computed_optional + botManagementRequestsByAttribute: + description: Top attributes contributing to the feedback sample. Keys include topASNs, topCountries, topHosts, topIPs, topJA3Hashes, topJA4s, topPaths, topUserAgents. + type: object + botManagementRequestsByScore: + description: Map of bot scores (1-99) to request counts. Sum must equal `requests`. + type: object + botManagementRequestsByScoreSrc: + description: Map of score source to request counts. Sum must equal `requests`. + type: object + botManagementSbfmDefinitelyAutomated: + description: Super Bot Fight Mode (SBFM) action to take on definitely automated requests. + enum: + - allow + - block + - managed_challenge + example: allow + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + botManagementSbfmDefinitelyAutomatedTurnedOn: + description: Indicates that the zone's definitely automated requests are being blocked or challenged. + title: sbfm_definitely_automated + type: string + x-auditable: true + botManagementSbfmLikelyAutomated: + description: Super Bot Fight Mode (SBFM) action to take on likely automated requests. + enum: + - allow + - block + - managed_challenge + example: allow + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + botManagementSbfmLikelyAutomatedTurnedOn: + description: Indicates that the zone's likely automated requests are being blocked or challenged. + title: sbfm_likely_automated + type: string + x-auditable: true + botManagementSbfmStaticResourceProtection: + description: 'Super Bot Fight Mode (SBFM) to enable static resource protection. Enable if static resources on your application need bot protection. Note: Static resource protection can also result in legitimate traffic being blocked.' + example: true + type: boolean + x-auditable: true + x-stainless-terraform-configurability: computed_optional + botManagementSbfmStaticResourceProtectionTurnedOn: + description: Indicates that the zone's static resource protection is turned on. + title: sbfm_static_resource_protection + type: string + x-auditable: true + botManagementSbfmVerifiedBots: + description: Super Bot Fight Mode (SBFM) action to take on verified bots requests. + enum: + - allow + - block + example: allow + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + botManagementSbfmVerifiedBotsTurnedOn: + description: Indicates that the zone's verified bot requests are being blocked. + title: sbfm_verified_bots + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + botManagementSuppressSessionScore: + description: Whether to disable tracking the highest bot score for a session in the Bot Management cookie. + example: false + type: boolean + x-auditable: true + x-stainless-terraform-configurability: computed_optional + botManagementSuppressSessionScoreTurnedOff: + description: Indicates that the zone's session score tracking is disabled. + title: suppress_session_score + type: boolean + x-auditable: true + x-stainless-terraform-configurability: computed_optional + botManagementUsingLatestModel: + description: A read-only field that indicates whether the zone currently is running the latest ML model. + example: true + readOnly: true + type: boolean + x-auditable: true + x-stainless-terraform-configurability: computed_optional + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + bot_management: + id: cloudflare.bot_management.bot_management + name: bot_management + title: Bot Management + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1bot_management/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1bot_management/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/bot_management/methods/list' + insert: [] + update: [] + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/bot_management/methods/update' + feedback: + id: cloudflare.bot_management.feedback + name: feedback + title: Feedback + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1bot_management~1feedback/get' + response: + mediaType: application/json + openAPIDocKey: '200' + bot_management_zone_feedback_create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1bot_management~1feedback/post' + response: + mediaType: application/json + openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .expression }}{{ $sep }}"expression": {{ toJson .expression }}{{- $sep = "," -}}{{ end }} + + {{- if .first_request_seen_at }}{{ $sep }}"first_request_seen_at": {{ toJson .first_request_seen_at }}{{- $sep = "," -}}{{ end }} + + {{- if .last_request_seen_at }}{{ $sep }}"last_request_seen_at": {{ toJson .last_request_seen_at }}{{- $sep = "," -}}{{ end }} + + {{- if .requests }}{{ $sep }}"requests": {{ toJson .requests }}{{- $sep = "," -}}{{ end }} + + {{- if .requests_by_attribute }}{{ $sep }}"requests_by_attribute": {{ if eq (kindOf .requests_by_attribute) "string" }}{{ .requests_by_attribute }}{{ else }}{{ toJson .requests_by_attribute }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .requests_by_score }}{{ $sep }}"requests_by_score": {{ if eq (kindOf .requests_by_score) "string" }}{{ .requests_by_score }}{{ else }}{{ toJson .requests_by_score }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .requests_by_score_src }}{{ $sep }}"requests_by_score_src": {{ if eq (kindOf .requests_by_score_src) "string" }}{{ .requests_by_score_src }}{{ else }}{{ toJson .requests_by_score_src }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .subtype }}{{ $sep }}"subtype": {{ toJson .subtype }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/feedback/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/feedback/methods/bot_management_zone_feedback_create' + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/brand_protection.yaml b/providers/src/cloudflare/v00.00.00000/services/brand_protection.yaml index 1d5b321a..15e3c8f4 100644 --- a/providers/src/cloudflare/v00.00.00000/services/brand_protection.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/brand_protection.yaml @@ -1,1548 +1,1475 @@ -openapi: 3.0.3 -info: - title: brand_protection API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/brand-protection/logo-matches: - get: - description: Return matches for logo queries based on ID - parameters: - - explode: true - in: query - name: logo_id - schema: - items: - type: string - type: array - style: form - - in: query - name: offset - schema: - type: string - - in: query - name: limit - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiLogoMatch' - description: OK - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiError' - description: Unprocessable Content - default: - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiError' - description: Default error response - security: - - api_token: [] - summary: Read matches for logo queries by ID - tags: - - logo_match - x-api-token-group: - - Intel Write - - Intel Read - x-stackql-sdk: - service: brand_protection - resource_chain: - - logo_matches - method: get - operationId: get_accounts_account_id_brand_protection_logo_matches - /accounts/{account_id}/brand-protection/logo-matches/download: - get: - description: Return matches as CSV for logo queries based on ID - parameters: - - explode: true - in: query - name: logo_id - schema: - items: - type: string - type: array - style: form - - in: query - name: offset - schema: - type: string - - in: query - name: limit - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiLogoMatch' - description: OK - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiError' - description: Unprocessable Content - default: - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiError' - description: Default error response - security: - - api_token: [] - summary: Download matches for logo queries by ID - tags: - - logo_match - x-api-token-group: - - Intel Write - - Intel Read - x-stackql-sdk: - service: brand_protection - resource_chain: - - logo_matches - method: download - operationId: get_accounts_account_id_brand_protection_logo_matches_download - /accounts/{account_id}/brand-protection/logos: - post: - description: Return new saved logo queries created from image files - parameters: - - in: query - name: tag - schema: - type: string - - in: query - name: match_type - schema: - type: string - - in: query - name: threshold - schema: - type: number - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/brandProtectionApiImageFile' - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiLogo' - description: Created - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiError' - description: Unprocessable Content - default: - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiError' - description: Default error response - security: - - api_token: [] - summary: Create new saved logo queries from image files - tags: - - logo_match - x-api-token-group: - - Intel Write - x-stackql-sdk: - service: brand_protection - resource_chain: - - logos - method: create - operationId: post_accounts_account_id_brand_protection_logos - /accounts/{account_id}/brand-protection/logos/{logo_id}: - delete: - description: Return a success message after deleting saved logo queries by ID - responses: - '204': - description: No Content - default: - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiError' - description: Default error response - security: - - api_token: [] - summary: Delete saved logo queries by ID - tags: - - logo_match - x-api-token-group: - - Intel Write - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: logo_id - schema: - minLength: 1 - type: string - required: true - x-stackql-sdk: - service: brand_protection - resource_chain: - - logos - method: delete - operationId: delete_accounts_account_id_brand_protection_logos_logo_id - /accounts/{account_id}/brand-protection/matches: - get: - description: Return matches for string queries based on ID - parameters: - - in: query - name: id - schema: - type: string - - in: query - name: offset - schema: - type: integer - - in: query - name: limit - schema: - type: integer - - in: query - name: include_domain_id - schema: - type: boolean - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiQueryMatch' - description: OK - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiError' - description: Unprocessable Content - default: - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiError' - description: Default error response - security: - - api_token: [] - summary: Read matches for string queries by ID - tags: - - domain_search - x-api-token-group: - - Intel Write - - Intel Read - x-stackql-sdk: - service: brand_protection - resource_chain: - - matches - method: get - operationId: get_accounts_account_id_brand_protection_matches - /accounts/{account_id}/brand-protection/matches/download: - get: - description: Return matches as CSV for string queries based on ID - parameters: - - in: query - name: id - schema: - type: string - - in: query - name: offset - schema: - type: integer - - in: query - name: limit - schema: - type: integer - - in: query - name: include_domain_id - schema: - type: boolean - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiQueryMatch' - description: OK - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiError' - description: Unprocessable Content - default: - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiError' - description: Default error response - security: - - api_token: [] - summary: Download matches for string queries by ID - tags: - - domain_search - x-api-token-group: - - Intel Write - - Intel Read - x-stackql-sdk: - service: brand_protection - resource_chain: - - matches - method: download - operationId: get_accounts_account_id_brand_protection_matches_download - /accounts/{account_id}/brand-protection/queries: - delete: - description: Return a success message after deleting saved string queries by ID - parameters: - - in: query - name: id - schema: - type: string - - in: query - name: tag - schema: - type: string - - in: query - name: scan - schema: - type: boolean - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '204': - description: No Content - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiError' - description: Unprocessable Content - default: - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiError' - description: Default error response - security: - - api_token: [] - summary: Delete saved string queries by ID - tags: - - domain_search - x-api-token-group: - - Intel Write - x-stackql-sdk: - service: brand_protection - resource_chain: - - queries - method: delete - operationId: delete_accounts_account_id_brand_protection_queries - post: - description: Return a success message after creating new saved string queries - parameters: - - in: query - name: id - schema: - type: string - - in: query - name: tag - schema: - type: string - - in: query - name: scan - schema: - type: boolean - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiQuery' - responses: - '204': - description: No Content - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiError' - description: Unprocessable Content - default: - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiError' - description: Default error response - security: - - api_token: [] - summary: Create new saved string queries - tags: - - domain_search - x-api-token-group: - - Intel Write - x-stackql-sdk: - service: brand_protection - resource_chain: - - queries - method: create - operationId: post_accounts_account_id_brand_protection_queries - /accounts/{account_id}/brand-protection/queries/bulk: - post: - description: Return a success message after creating new saved string queries in bulk - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiQueryBulk' - responses: - '204': - description: No Content - '422': - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiError' - description: Unprocessable Content - default: - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiError' - description: Default error response - security: - - api_token: [] - summary: Create new saved string queries in bulk - tags: - - domain_search - x-api-token-group: - - Intel Write - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - x-stackql-sdk: - service: brand_protection - resource_chain: - - queries - method: bulk - operationId: post_accounts_account_id_brand_protection_queries_bulk - /accounts/{account_id}/brand-protection/submit: - post: - description: Return new URL submissions - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiURLSubmit' - description: Created - default: - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiError' - description: Default error response - security: - - api_token: [] - summary: Create new URL submissions - tags: - - brand_protection - x-api-token-group: - - Intel Write - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - x-stackql-sdk: - service: brand_protection - resource_chain: [] - method: submit - operationId: post_accounts_account_id_brand_protection_submit - /accounts/{account_id}/brand-protection/url-info: - get: - description: Return submitted URLs based on ID - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiURLInfo' - description: OK - default: - content: - application/json: - schema: - $ref: '#/components/schemas/brandProtectionApiError' - description: Default error response - security: - - api_token: [] - summary: Read submitted URLs by ID - tags: - - brand_protection - x-api-token-group: - - Intel Write - - Intel Read - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - x-stackql-sdk: - service: brand_protection - resource_chain: [] - method: url_info - operationId: get_accounts_account_id_brand_protection_url_info - /accounts/{account_id}/cloudforce-one/v2/brand-protection/domain/matches: - get: - description: >- - Get paginated list of domain matches for one or more brand protection - queries. When multiple query_ids are provided (comma-separated), matches - are deduplicated across queries and each match includes a match_details - array with per-match query metadata and individual dismissed state. - operationId: get_DomainMatchList - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: offset - schema: - default: '0' - type: string - - in: query - name: limit - schema: - default: '50' - type: string - - in: query - name: query_id - schema: - description: >- - Query ID or comma-separated list of Query IDs. When multiple IDs - are provided, matches are deduplicated across queries and each - match includes a match_details array with per-match query metadata - and dismissed state. - items: - type: string - type: array - explode: true - - in: query - name: include_domain_id - schema: - default: 'false' - type: string - - in: query - name: include_dismissed - schema: - type: string - - in: query - name: domain_search - schema: - description: Filter matches by domain name (substring match) - type: string - - in: query - name: orderBy - schema: - description: 'Column to sort by. Options: ''domain'', ''first_seen'', or ''registrar''' - enum: - - domain - - first_seen - - registrar - type: string - - in: query - name: order - schema: - description: 'Sort order. Options: ''asc'' (ascending) or ''desc'' (descending)' - enum: - - asc - - desc - type: string - responses: - '200': - content: - application/json: - schema: - properties: - matches: - items: - properties: - dismissed: - description: >- - Whether the match is dismissed. Only present for - single-query requests. For multi-query requests, use - the dismissed field in each match_details entry. - type: boolean - domain: - type: string - first_seen: - type: string - match_details: - description: >- - Per-match detail objects with query metadata and - individual dismissed state. Only present when - multiple query_ids are requested. - items: - properties: - dismissed: - description: >- - Individual dismissed state for this specific - match. - type: boolean - match_id: - type: integer - query_id: - type: integer - query_tag: - description: Tag associated with the query, if one exists. - nullable: true - type: string - required: - - query_id - - query_tag - - match_id - - dismissed - type: object - type: array - public_scans: - nullable: true - properties: - submission_id: - type: string - required: - - submission_id - type: object - registrar: - nullable: true - type: string - scan_status: - type: string - scan_submission_id: - nullable: true - type: integer - source: - nullable: true - type: string - required: - - domain - - first_seen - - public_scans - - scan_status - - scan_submission_id - - source - - registrar - type: object - type: array - total: - minimum: 0 - type: integer - required: - - matches - - total - type: object - description: Successfully retrieved query matches - security: - - api_token: [] - summary: List saved query matches - tags: - - Brand Protection - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: brand_protection - resource_chain: - - v2 - - matches - method: get - /accounts/{account_id}/cloudforce-one/v2/brand-protection/domain/queries: - get: - description: Get all saved brand protection queries for an account - operationId: get_GetDomainQueries - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: id - schema: - type: string - responses: - '200': - content: - application/json: - schema: - items: - properties: - created: - type: string - parameters: - nullable: true - properties: - max_time: - type: string - min_time: - type: string - string_matches: - items: - properties: - max_edit_distance: - maximum: 1 - minimum: 0 - type: number - pattern: - minLength: 1 - type: string - required: - - pattern - - max_edit_distance - type: object - type: array - required: - - string_matches - type: object - query_id: - type: integer - query_tag: - type: string - scan: - type: boolean - updated: - type: string - required: - - query_id - - query_tag - - scan - - parameters - - created - - updated - type: object - type: array - description: Successfully retrieved queries - security: - - api_token: [] - summary: Get queries - tags: - - Brand Protection - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: brand_protection - resource_chain: - - v2 - - queries - method: get - /accounts/{account_id}/cloudforce-one/v2/brand-protection/logo/matches: - get: - description: >- - Get paginated list of logo matches for a specific brand protection logo - query - operationId: get_LogoMatchList - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: offset - schema: - default: '0' - type: string - - in: query - name: limit - schema: - default: '50' - type: string - - in: query - name: query_id - schema: - minLength: 1 - type: string - - in: query - name: download - schema: - type: string - - in: query - name: orderBy - schema: - description: >- - Column to sort by. Options: 'matchedAt', 'domain', - 'similarityScore', or 'registrar' - enum: - - matchedAt - - domain - - similarityScore - - registrar - type: string - - in: query - name: order - schema: - description: 'Sort order. Options: ''asc'' (ascending) or ''desc'' (descending)' - enum: - - asc - - desc - type: string - responses: - '200': - content: - application/json: - schema: - properties: - matches: - items: - properties: - content_type: - type: string - domain: - nullable: true - type: string - id: - type: integer - image_data: - type: string - matched_at: - nullable: true - type: string - query_id: - type: integer - registrar: - nullable: true - type: string - similarity_score: - type: number - url_scan_id: - nullable: true - type: string - required: - - id - - query_id - - url_scan_id - - similarity_score - - matched_at - - domain - - registrar - type: object - type: array - total: - minimum: 0 - type: integer - required: - - matches - - total - type: object - description: Successfully retrieved logo matches - security: - - api_token: [] - summary: List logo matches - tags: - - Brand Protection - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: brand_protection - resource_chain: - - v2 - - logo_matches - method: get - /accounts/{account_id}/cloudforce-one/v2/brand-protection/logo/queries: - get: - description: >- - Get all saved brand protection logo queries for an account. Optionally - specify id to get a single query. Set download=true to include - base64-encoded image data. - operationId: get_GetLogoQueries - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Optional query ID to retrieve a specific logo query - in: query - name: id - schema: - description: Optional query ID to retrieve a specific logo query - type: string - - description: If true, include base64-encoded image data in the response - in: query - name: download - schema: - description: If true, include base64-encoded image data in the response - type: string - responses: - '200': - content: - application/json: - schema: - items: - properties: - content_type: - description: MIME type of the image (only present when download=true) - type: string - id: - type: integer - image_data: - description: >- - Base64-encoded image data (only present when - download=true) - type: string - r2_path: - type: string - similarity_threshold: - type: number - tag: - type: string - uploaded_at: - nullable: true - type: string - required: - - id - - tag - - r2_path - - similarity_threshold - - uploaded_at - type: object - type: array - description: Successfully retrieved logo queries - security: - - api_token: [] - summary: Get logo queries - tags: - - Brand Protection - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: brand_protection - resource_chain: - - v2 - - logos - method: get - post: - description: >- - Create a new saved brand protection logo query for visual similarity - matching - operationId: post_InsertLogoQuery - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - image_data: - description: >- - Base64 encoded image data. Can include data URI prefix - (e.g., 'data:image/png;base64,...') or just the base64 - string. - minLength: 1 - type: string - search_lookback: - default: true - description: >- - If true, search historic scanned images for matches above - the similarity threshold - type: boolean - similarity_threshold: - description: Minimum similarity score (0-1) required for visual matches - maximum: 1 - minimum: 0 - type: number - tag: - description: Unique identifier for the logo query - minLength: 1 - type: string - required: - - tag - - image_data - - similarity_threshold - type: object - responses: - '200': - content: - application/json: - schema: - properties: - message: - type: string - query_id: - type: integer - success: - type: boolean - required: - - success - - message - type: object - description: Logo query inserted successfully - security: - - api_token: [] - summary: Insert logo query - tags: - - Brand Protection - x-api-token-group: - - Cloudforce One Write - x-stackql-sdk: - service: brand_protection - resource_chain: - - v2 - - logos - method: create - /accounts/{account_id}/cloudforce-one/v2/brand-protection/logo/queries/{query_id}: - delete: - description: >- - Delete a saved brand protection logo query. Returns 404 if the query ID - doesn't exist. - operationId: delete_DeleteLogoQuery - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: query_id - schema: - minLength: 1 - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - message: - type: string - success: - type: boolean - required: - - success - - message - type: object - description: Logo query deleted successfully - security: - - api_token: [] - summary: Delete logo query - tags: - - Brand Protection - x-api-token-group: - - Cloudforce One Write - x-stackql-sdk: - service: brand_protection - resource_chain: - - v2 - - logos - method: delete -components: - schemas: - brandProtectionApiError: - properties: - code: - description: Error code - type: integer - errors: - description: Errors - type: object - message: - description: Error message - type: string - status: - description: Error name - type: string - type: object - brandProtectionApiImageFile: - properties: - image: - format: binary - type: string - type: object - brandProtectionApiLogo: - properties: - id: - type: integer - tag: - type: string - upload_path: - type: string - type: object - brandProtectionApiLogoMatch: - properties: - matches: - items: - type: object - type: array - total: - type: integer - type: object - brandProtectionApiQuery: - properties: - max_time: - format: date-time - nullable: true - type: string - min_time: - format: date-time - nullable: true - type: string - scan: - type: boolean - string_matches: {} - tag: - type: string - type: object - brandProtectionApiQueryBulk: - properties: - queries: - items: - type: object - type: array - type: object - brandProtectionApiQueryMatch: - properties: - matches: - items: - type: object - type: array - total: - type: integer - type: object - brandProtectionApiURLInfo: - properties: - result: - items: - type: object - type: array - type: object - brandProtectionApiURLSubmit: - properties: - skipped_urls: - items: - type: object - type: array - submitted_urls: - items: - type: object - type: array - type: object - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - brand_protection_logo_matches: - id: cloudflare.brand_protection.brand_protection_logo_matches - name: brand_protection_logo_matches - title: Brand Protection Logo Matches - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1brand-protection~1logo-matches/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/brand_protection_logo_matches/methods/list - insert: [] - update: [] - delete: [] - replace: [] - logo_matches_download: - id: cloudflare.brand_protection.logo_matches_download - name: logo_matches_download - title: Logo Matches Download - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1brand-protection~1logo-matches~1download/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/logo_matches_download/methods/list - insert: [] - update: [] - delete: [] - replace: [] - brand_protection_logos: - id: cloudflare.brand_protection.brand_protection_logos - name: brand_protection_logos - title: Brand Protection Logos - methods: - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1brand-protection~1logos/post' - response: - mediaType: application/json - openAPIDocKey: '201' - delete_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1brand-protection~1logos~1{logo_id}/delete - response: - mediaType: application/json - openAPIDocKey: '204' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/brand_protection_logos/methods/create - update: [] - delete: - - $ref: >- - #/components/x-stackQL-resources/brand_protection_logos/methods/delete_by_account - replace: [] - brand_protection_matches: - id: cloudflare.brand_protection.brand_protection_matches - name: brand_protection_matches - title: Brand Protection Matches - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1brand-protection~1matches/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/brand_protection_matches/methods/list - insert: [] - update: [] - delete: [] - replace: [] - matches_download: - id: cloudflare.brand_protection.matches_download - name: matches_download - title: Matches Download - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1brand-protection~1matches~1download/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/matches_download/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - queries: - id: cloudflare.brand_protection.queries - name: queries - title: Queries - methods: - delete: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1brand-protection~1queries/delete' - response: - mediaType: application/json - openAPIDocKey: '204' - bulk: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1brand-protection~1queries~1bulk/post - response: - mediaType: application/json - openAPIDocKey: '204' - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1domain~1queries/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/queries/methods/list' - insert: [] - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/queries/methods/delete' - replace: [] - brand_protection: - id: cloudflare.brand_protection.brand_protection - name: brand_protection - title: Brand Protection - methods: - create_queries: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1brand-protection~1queries/post' - response: - mediaType: application/json - openAPIDocKey: '204' - submit: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1brand-protection~1submit/post' - response: - mediaType: application/json - openAPIDocKey: '201' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] - url_info: - id: cloudflare.brand_protection.url_info - name: url_info - title: Url Info - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1brand-protection~1url-info/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/url_info/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - domain_matches: - id: cloudflare.brand_protection.domain_matches - name: domain_matches - title: Domain Matches - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1domain~1matches/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.matches - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/domain_matches/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - logo_matches: - id: cloudflare.brand_protection.logo_matches - name: logo_matches - title: Logo Matches - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1logo~1matches/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.matches - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/logo_matches/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - logos: - id: cloudflare.brand_protection.logos - name: logos - title: Logos - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1logo~1queries/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/logos/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - logo_queries: - id: cloudflare.brand_protection.logo_queries - name: logo_queries - title: Logo Queries - methods: - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1logo~1queries/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1logo~1queries~1{query_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: '#/components/x-stackQL-resources/logo_queries/methods/create' - update: [] - delete: - - $ref: >- - #/components/x-stackQL-resources/logo_queries/methods/delete_by_account - replace: [] +openapi: 3.0.3 +info: + title: brand_protection API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/brand-protection/logo-matches: + get: + description: Return matches for logo queries based on ID + parameters: + - explode: true + in: query + name: logo_id + schema: + items: + type: string + type: array + style: form + - in: query + name: offset + schema: + type: string + - in: query + name: limit + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiLogoMatch' + description: OK + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiError' + description: Unprocessable Content + default: + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiError' + description: Default error response + security: + - api_token: [] + summary: Read matches for logo queries by ID + tags: + - logo_match + x-api-token-group: + - Intel Write + - Intel Read + x-stackql-sdk: + service: brand_protection + resource_chain: + - logo_matches + method: get + operationId: get_accounts_account_id_brand_protection_logo_matches + /accounts/{account_id}/brand-protection/logo-matches/download: + get: + description: Return matches as CSV for logo queries based on ID + parameters: + - explode: true + in: query + name: logo_id + schema: + items: + type: string + type: array + style: form + - in: query + name: offset + schema: + type: string + - in: query + name: limit + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiLogoMatch' + description: OK + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiError' + description: Unprocessable Content + default: + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiError' + description: Default error response + security: + - api_token: [] + summary: Download matches for logo queries by ID + tags: + - logo_match + x-api-token-group: + - Intel Write + - Intel Read + x-stackql-sdk: + service: brand_protection + resource_chain: + - logo_matches + method: download + operationId: get_accounts_account_id_brand_protection_logo_matches_download + /accounts/{account_id}/brand-protection/logos: + post: + description: Return new saved logo queries created from image files + parameters: + - in: query + name: tag + schema: + type: string + - in: query + name: match_type + schema: + type: string + - in: query + name: threshold + schema: + type: number + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/brandProtectionApiImageFile' + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiLogo' + description: Created + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiError' + description: Unprocessable Content + default: + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiError' + description: Default error response + security: + - api_token: [] + summary: Create new saved logo queries from image files + tags: + - logo_match + x-api-token-group: + - Intel Write + x-stackql-sdk: + service: brand_protection + resource_chain: + - logos + method: create + operationId: post_accounts_account_id_brand_protection_logos + /accounts/{account_id}/brand-protection/logos/{logo_id}: + delete: + description: Return a success message after deleting saved logo queries by ID + responses: + '204': + description: No Content + default: + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiError' + description: Default error response + security: + - api_token: [] + summary: Delete saved logo queries by ID + tags: + - logo_match + x-api-token-group: + - Intel Write + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: logo_id + schema: + minLength: 1 + type: string + required: true + x-stackql-sdk: + service: brand_protection + resource_chain: + - logos + method: delete + operationId: delete_accounts_account_id_brand_protection_logos_logo_id + /accounts/{account_id}/brand-protection/matches: + get: + description: Return matches for string queries based on ID + parameters: + - in: query + name: id + schema: + type: string + - in: query + name: offset + schema: + type: integer + - in: query + name: limit + schema: + type: integer + - in: query + name: include_domain_id + schema: + type: boolean + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiQueryMatch' + description: OK + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiError' + description: Unprocessable Content + default: + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiError' + description: Default error response + security: + - api_token: [] + summary: Read matches for string queries by ID + tags: + - domain_search + x-api-token-group: + - Intel Write + - Intel Read + x-stackql-sdk: + service: brand_protection + resource_chain: + - matches + method: get + operationId: get_accounts_account_id_brand_protection_matches + /accounts/{account_id}/brand-protection/matches/download: + get: + description: Return matches as CSV for string queries based on ID + parameters: + - in: query + name: id + schema: + type: string + - in: query + name: offset + schema: + type: integer + - in: query + name: limit + schema: + type: integer + - in: query + name: include_domain_id + schema: + type: boolean + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiQueryMatch' + description: OK + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiError' + description: Unprocessable Content + default: + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiError' + description: Default error response + security: + - api_token: [] + summary: Download matches for string queries by ID + tags: + - domain_search + x-api-token-group: + - Intel Write + - Intel Read + x-stackql-sdk: + service: brand_protection + resource_chain: + - matches + method: download + operationId: get_accounts_account_id_brand_protection_matches_download + /accounts/{account_id}/brand-protection/queries: + delete: + description: Return a success message after deleting saved string queries by ID + parameters: + - in: query + name: id + schema: + type: string + - in: query + name: tag + schema: + type: string + - in: query + name: scan + schema: + type: boolean + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '204': + description: No Content + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiError' + description: Unprocessable Content + default: + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiError' + description: Default error response + security: + - api_token: [] + summary: Delete saved string queries by ID + tags: + - domain_search + x-api-token-group: + - Intel Write + x-stackql-sdk: + service: brand_protection + resource_chain: + - queries + method: delete + operationId: delete_accounts_account_id_brand_protection_queries + post: + description: Return a success message after creating new saved string queries + parameters: + - in: query + name: id + schema: + type: string + - in: query + name: tag + schema: + type: string + - in: query + name: scan + schema: + type: boolean + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiQuery' + responses: + '204': + description: No Content + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiError' + description: Unprocessable Content + default: + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiError' + description: Default error response + security: + - api_token: [] + summary: Create new saved string queries + tags: + - domain_search + x-api-token-group: + - Intel Write + x-stackql-sdk: + service: brand_protection + resource_chain: + - queries + method: create + operationId: post_accounts_account_id_brand_protection_queries + /accounts/{account_id}/brand-protection/queries/bulk: + post: + description: Return a success message after creating new saved string queries in bulk + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiQueryBulk' + responses: + '204': + description: No Content + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiError' + description: Unprocessable Content + default: + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiError' + description: Default error response + security: + - api_token: [] + summary: Create new saved string queries in bulk + tags: + - domain_search + x-api-token-group: + - Intel Write + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + x-stackql-sdk: + service: brand_protection + resource_chain: + - queries + method: bulk + operationId: post_accounts_account_id_brand_protection_queries_bulk + /accounts/{account_id}/brand-protection/submit: + post: + description: Return new URL submissions + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiURLSubmit' + description: Created + default: + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiError' + description: Default error response + security: + - api_token: [] + summary: Create new URL submissions + tags: + - brand_protection + x-api-token-group: + - Intel Write + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + x-stackql-sdk: + service: brand_protection + resource_chain: [] + method: submit + operationId: post_accounts_account_id_brand_protection_submit + /accounts/{account_id}/brand-protection/url-info: + get: + description: Return submitted URLs based on ID + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiURLInfo' + description: OK + default: + content: + application/json: + schema: + $ref: '#/components/schemas/brandProtectionApiError' + description: Default error response + security: + - api_token: [] + summary: Read submitted URLs by ID + tags: + - brand_protection + x-api-token-group: + - Intel Write + - Intel Read + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + x-stackql-sdk: + service: brand_protection + resource_chain: [] + method: url_info + operationId: get_accounts_account_id_brand_protection_url_info + /accounts/{account_id}/cloudforce-one/v2/brand-protection/domain/matches: + get: + description: Get paginated list of domain matches for one or more brand protection queries. When multiple query_ids are provided (comma-separated), matches are deduplicated across queries and each match includes a match_details array with per-match query metadata and individual dismissed state. + operationId: get_DomainMatchList + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: offset + schema: + default: '0' + type: string + - in: query + name: limit + schema: + default: '50' + type: string + - in: query + name: query_id + schema: + description: Query ID or comma-separated list of Query IDs. When multiple IDs are provided, matches are deduplicated across queries and each match includes a match_details array with per-match query metadata and dismissed state. + items: + type: string + type: array + explode: true + - in: query + name: include_domain_id + schema: + default: 'false' + type: string + - in: query + name: include_dismissed + schema: + type: string + - in: query + name: domain_search + schema: + description: Filter matches by domain name (substring match) + type: string + - in: query + name: orderBy + schema: + description: 'Column to sort by. Options: ''domain'', ''first_seen'', or ''registrar''' + enum: + - domain + - first_seen + - registrar + type: string + - in: query + name: order + schema: + description: 'Sort order. Options: ''asc'' (ascending) or ''desc'' (descending)' + enum: + - asc + - desc + type: string + responses: + '200': + content: + application/json: + schema: + properties: + matches: + items: + properties: + dismissed: + description: Whether the match is dismissed. Only present for single-query requests. For multi-query requests, use the dismissed field in each match_details entry. + type: boolean + domain: + type: string + first_seen: + type: string + match_details: + description: Per-match detail objects with query metadata and individual dismissed state. Only present when multiple query_ids are requested. + items: + properties: + dismissed: + description: Individual dismissed state for this specific match. + type: boolean + match_id: + type: integer + query_id: + type: integer + query_tag: + description: Tag associated with the query, if one exists. + nullable: true + type: string + required: + - query_id + - query_tag + - match_id + - dismissed + type: object + type: array + public_scans: + nullable: true + properties: + submission_id: + type: string + required: + - submission_id + type: object + registrar: + nullable: true + type: string + scan_status: + type: string + scan_submission_id: + nullable: true + type: integer + source: + nullable: true + type: string + required: + - domain + - first_seen + - public_scans + - scan_status + - scan_submission_id + - source + - registrar + type: object + type: array + total: + minimum: 0 + type: integer + required: + - matches + - total + type: object + description: Successfully retrieved query matches + security: + - api_token: [] + summary: List saved query matches + tags: + - Brand Protection + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: brand_protection + resource_chain: + - v2 + - matches + method: get + /accounts/{account_id}/cloudforce-one/v2/brand-protection/domain/queries: + get: + description: Get all saved brand protection queries for an account + operationId: get_GetDomainQueries + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: id + schema: + type: string + responses: + '200': + content: + application/json: + schema: + items: + properties: + created: + type: string + parameters: + nullable: true + properties: + max_time: + type: string + min_time: + type: string + string_matches: + items: + properties: + max_edit_distance: + maximum: 1 + minimum: 0 + type: number + pattern: + minLength: 1 + type: string + required: + - pattern + - max_edit_distance + type: object + type: array + required: + - string_matches + type: object + query_id: + type: integer + query_tag: + type: string + scan: + type: boolean + updated: + type: string + required: + - query_id + - query_tag + - scan + - parameters + - created + - updated + type: object + type: array + description: Successfully retrieved queries + security: + - api_token: [] + summary: Get queries + tags: + - Brand Protection + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: brand_protection + resource_chain: + - v2 + - queries + method: get + /accounts/{account_id}/cloudforce-one/v2/brand-protection/logo/matches: + get: + description: Get paginated list of logo matches for a specific brand protection logo query + operationId: get_LogoMatchList + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: offset + schema: + default: '0' + type: string + - in: query + name: limit + schema: + default: '50' + type: string + - in: query + name: query_id + schema: + minLength: 1 + type: string + - in: query + name: download + schema: + type: string + - in: query + name: orderBy + schema: + description: 'Column to sort by. Options: ''matchedAt'', ''domain'', ''similarityScore'', or ''registrar''' + enum: + - matchedAt + - domain + - similarityScore + - registrar + type: string + - in: query + name: order + schema: + description: 'Sort order. Options: ''asc'' (ascending) or ''desc'' (descending)' + enum: + - asc + - desc + type: string + responses: + '200': + content: + application/json: + schema: + properties: + matches: + items: + properties: + content_type: + type: string + domain: + nullable: true + type: string + id: + type: integer + image_data: + type: string + matched_at: + nullable: true + type: string + query_id: + type: integer + registrar: + nullable: true + type: string + similarity_score: + type: number + url_scan_id: + nullable: true + type: string + required: + - id + - query_id + - url_scan_id + - similarity_score + - matched_at + - domain + - registrar + type: object + type: array + total: + minimum: 0 + type: integer + required: + - matches + - total + type: object + description: Successfully retrieved logo matches + security: + - api_token: [] + summary: List logo matches + tags: + - Brand Protection + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: brand_protection + resource_chain: + - v2 + - logo_matches + method: get + /accounts/{account_id}/cloudforce-one/v2/brand-protection/logo/queries: + get: + description: Get all saved brand protection logo queries for an account. Optionally specify id to get a single query. Set download=true to include base64-encoded image data. + operationId: get_GetLogoQueries + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Optional query ID to retrieve a specific logo query + in: query + name: id + schema: + description: Optional query ID to retrieve a specific logo query + type: string + - description: If true, include base64-encoded image data in the response + in: query + name: download + schema: + description: If true, include base64-encoded image data in the response + type: string + responses: + '200': + content: + application/json: + schema: + items: + properties: + content_type: + description: MIME type of the image (only present when download=true) + type: string + id: + type: integer + image_data: + description: Base64-encoded image data (only present when download=true) + type: string + r2_path: + type: string + similarity_threshold: + type: number + tag: + type: string + uploaded_at: + nullable: true + type: string + required: + - id + - tag + - r2_path + - similarity_threshold + - uploaded_at + type: object + type: array + description: Successfully retrieved logo queries + security: + - api_token: [] + summary: Get logo queries + tags: + - Brand Protection + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: brand_protection + resource_chain: + - v2 + - logos + method: get + post: + description: Create a new saved brand protection logo query for visual similarity matching + operationId: post_InsertLogoQuery + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + image_data: + description: Base64 encoded image data. Can include data URI prefix (e.g., 'data:image/png;base64,...') or just the base64 string. + minLength: 1 + type: string + search_lookback: + default: true + description: If true, search historic scanned images for matches above the similarity threshold + type: boolean + similarity_threshold: + description: Minimum similarity score (0-1) required for visual matches + maximum: 1 + minimum: 0 + type: number + tag: + description: Unique identifier for the logo query + minLength: 1 + type: string + required: + - tag + - image_data + - similarity_threshold + type: object + responses: + '200': + content: + application/json: + schema: + properties: + message: + type: string + query_id: + type: integer + success: + type: boolean + required: + - success + - message + type: object + description: Logo query inserted successfully + security: + - api_token: [] + summary: Insert logo query + tags: + - Brand Protection + x-api-token-group: + - Cloudforce One Write + x-stackql-sdk: + service: brand_protection + resource_chain: + - v2 + - logos + method: create + /accounts/{account_id}/cloudforce-one/v2/brand-protection/logo/queries/{query_id}: + delete: + description: Delete a saved brand protection logo query. Returns 404 if the query ID doesn't exist. + operationId: delete_DeleteLogoQuery + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: query_id + schema: + minLength: 1 + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + message: + type: string + success: + type: boolean + required: + - success + - message + type: object + description: Logo query deleted successfully + security: + - api_token: [] + summary: Delete logo query + tags: + - Brand Protection + x-api-token-group: + - Cloudforce One Write + x-stackql-sdk: + service: brand_protection + resource_chain: + - v2 + - logos + method: delete +components: + schemas: + brandProtectionApiError: + properties: + code: + description: Error code + type: integer + errors: + description: Errors + type: object + message: + description: Error message + type: string + status: + description: Error name + type: string + type: object + brandProtectionApiImageFile: + properties: + image: + format: binary + type: string + type: object + brandProtectionApiLogo: + properties: + id: + type: integer + tag: + type: string + upload_path: + type: string + type: object + brandProtectionApiLogoMatch: + properties: + matches: + items: + type: object + type: array + total: + type: integer + type: object + brandProtectionApiQuery: + properties: + max_time: + format: date-time + nullable: true + type: string + min_time: + format: date-time + nullable: true + type: string + scan: + type: boolean + string_matches: {} + tag: + type: string + type: object + brandProtectionApiQueryBulk: + properties: + queries: + items: + type: object + type: array + type: object + brandProtectionApiQueryMatch: + properties: + matches: + items: + type: object + type: array + total: + type: integer + type: object + brandProtectionApiURLInfo: + properties: + result: + items: + type: object + type: array + type: object + brandProtectionApiURLSubmit: + properties: + skipped_urls: + items: + type: object + type: array + submitted_urls: + items: + type: object + type: array + type: object + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + brand_protection_logo_matches: + id: cloudflare.brand_protection.brand_protection_logo_matches + name: brand_protection_logo_matches + title: Brand Protection Logo Matches + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1brand-protection~1logo-matches/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/brand_protection_logo_matches/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + logo_matches_download: + id: cloudflare.brand_protection.logo_matches_download + name: logo_matches_download + title: Logo Matches Download + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1brand-protection~1logo-matches~1download/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/logo_matches_download/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + brand_protection_logos: + id: cloudflare.brand_protection.brand_protection_logos + name: brand_protection_logos + title: Brand Protection Logos + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1brand-protection~1logos/post' + response: + mediaType: application/json + openAPIDocKey: '201' + delete_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1brand-protection~1logos~1{logo_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '204' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/brand_protection_logos/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/brand_protection_logos/methods/delete_by_account' + replace: [] + brand_protection_matches: + id: cloudflare.brand_protection.brand_protection_matches + name: brand_protection_matches + title: Brand Protection Matches + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1brand-protection~1matches/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/brand_protection_matches/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + matches_download: + id: cloudflare.brand_protection.matches_download + name: matches_download + title: Matches Download + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1brand-protection~1matches~1download/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/matches_download/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + queries: + id: cloudflare.brand_protection.queries + name: queries + title: Queries + methods: + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1brand-protection~1queries/delete' + response: + mediaType: application/json + openAPIDocKey: '204' + bulk: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1brand-protection~1queries~1bulk/post' + response: + mediaType: application/json + openAPIDocKey: '204' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .queries }}{{ $sep }}"queries": {{ if eq (kindOf .queries) "string" }}{{ .queries }}{{ else }}{{ toJson .queries }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1domain~1queries/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/queries/methods/list' + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/queries/methods/delete' + replace: [] + brand_protection: + id: cloudflare.brand_protection.brand_protection + name: brand_protection + title: Brand Protection + methods: + create_queries: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1brand-protection~1queries/post' + response: + mediaType: application/json + openAPIDocKey: '204' + submit: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1brand-protection~1submit/post' + response: + mediaType: application/json + openAPIDocKey: '201' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + url_info: + id: cloudflare.brand_protection.url_info + name: url_info + title: Url Info + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1brand-protection~1url-info/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/url_info/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + domain_matches: + id: cloudflare.brand_protection.domain_matches + name: domain_matches + title: Domain Matches + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1domain~1matches/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.matches + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/domain_matches/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + logo_matches: + id: cloudflare.brand_protection.logo_matches + name: logo_matches + title: Logo Matches + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1logo~1matches/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.matches + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/logo_matches/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + logos: + id: cloudflare.brand_protection.logos + name: logos + title: Logos + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1logo~1queries/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/logos/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + logo_queries: + id: cloudflare.brand_protection.logo_queries + name: logo_queries + title: Logo Queries + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1logo~1queries/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1logo~1queries~1{query_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/logo_queries/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/logo_queries/methods/delete_by_account' + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/browser_rendering.yaml b/providers/src/cloudflare/v00.00.00000/services/browser_rendering.yaml index 1488a908..25f37c50 100644 --- a/providers/src/cloudflare/v00.00.00000/services/browser_rendering.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/browser_rendering.yaml @@ -235,7 +235,6 @@ paths: description: 'Set the content of the page, eg: `

Hello World!!

`. Either `html` or `url` must be set.' minLength: 1 type: string - required: [] responses: '200': content: @@ -2979,7 +2978,6 @@ paths: description: URL to navigate to, eg. `https://example.com`. format: uri type: string - required: [] responses: '200': content: @@ -3375,7 +3373,6 @@ paths: description: URL to navigate to, eg. `https://example.com`. format: uri type: string - required: [] responses: '200': content: @@ -3764,7 +3761,6 @@ paths: description: 'Set the content of the page, eg: `

Hello World!!

`. Either `html` or `url` must be set.' minLength: 1 type: string - required: [] responses: '200': content: @@ -4237,7 +4233,6 @@ paths: description: URL to navigate to, eg. `https://example.com`. format: uri type: string - required: [] responses: '200': content: @@ -5103,7 +5098,6 @@ paths: description: URL to navigate to, eg. `https://example.com`. format: uri type: string - required: [] responses: '200': content: @@ -5542,7 +5536,6 @@ paths: description: URL to navigate to, eg. `https://example.com`. format: uri type: string - required: [] responses: '200': content: @@ -5760,6 +5753,57 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .actionTimeout }}{{ $sep }}"actionTimeout": {{ toJson .actionTimeout }}{{- $sep = "," -}}{{ end }} + + {{- if .addScriptTag }}{{ $sep }}"addScriptTag": {{ if eq (kindOf .addScriptTag) "string" }}{{ .addScriptTag }}{{ else }}{{ toJson .addScriptTag }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .addStyleTag }}{{ $sep }}"addStyleTag": {{ if eq (kindOf .addStyleTag) "string" }}{{ .addStyleTag }}{{ else }}{{ toJson .addStyleTag }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .allowRequestPattern }}{{ $sep }}"allowRequestPattern": {{ if eq (kindOf .allowRequestPattern) "string" }}{{ .allowRequestPattern }}{{ else }}{{ toJson .allowRequestPattern }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .allowResourceTypes }}{{ $sep }}"allowResourceTypes": {{ if eq (kindOf .allowResourceTypes) "string" }}{{ .allowResourceTypes }}{{ else }}{{ toJson .allowResourceTypes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .authenticate }}{{ $sep }}"authenticate": {{ if eq (kindOf .authenticate) "string" }}{{ .authenticate }}{{ else }}{{ toJson .authenticate }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .bestAttempt }}{{ $sep }}"bestAttempt": {{ toJson .bestAttempt }}{{- $sep = "," -}}{{ end }} + + {{- if .cookies }}{{ $sep }}"cookies": {{ if eq (kindOf .cookies) "string" }}{{ .cookies }}{{ else }}{{ toJson .cookies }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .emulateMediaType }}{{ $sep }}"emulateMediaType": {{ toJson .emulateMediaType }}{{- $sep = "," -}}{{ end }} + + {{- if .gotoOptions }}{{ $sep }}"gotoOptions": {{ if eq (kindOf .gotoOptions) "string" }}{{ .gotoOptions }}{{ else }}{{ toJson .gotoOptions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .rejectRequestPattern }}{{ $sep }}"rejectRequestPattern": {{ if eq (kindOf .rejectRequestPattern) "string" }}{{ .rejectRequestPattern }}{{ else }}{{ toJson .rejectRequestPattern }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .rejectResourceTypes }}{{ $sep }}"rejectResourceTypes": {{ if eq (kindOf .rejectResourceTypes) "string" }}{{ .rejectResourceTypes }}{{ else }}{{ toJson .rejectResourceTypes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .setExtraHTTPHeaders }}{{ $sep }}"setExtraHTTPHeaders": {{ if eq (kindOf .setExtraHTTPHeaders) "string" }}{{ .setExtraHTTPHeaders }}{{ else }}{{ toJson .setExtraHTTPHeaders }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .setJavaScriptEnabled }}{{ $sep }}"setJavaScriptEnabled": {{ toJson .setJavaScriptEnabled }}{{- $sep = "," -}}{{ end }} + + {{- if .url }}{{ $sep }}"url": {{ toJson .url }}{{- $sep = "," -}}{{ end }} + + {{- if .userAgent }}{{ $sep }}"userAgent": {{ toJson .userAgent }}{{- $sep = "," -}}{{ end }} + + {{- if .viewport }}{{ $sep }}"viewport": {{ if eq (kindOf .viewport) "string" }}{{ .viewport }}{{ else }}{{ toJson .viewport }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .waitForSelector }}{{ $sep }}"waitForSelector": {{ if eq (kindOf .waitForSelector) "string" }}{{ .waitForSelector }}{{ else }}{{ toJson .waitForSelector }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .waitForTimeout }}{{ $sep }}"waitForTimeout": {{ toJson .waitForTimeout }}{{- $sep = "," -}}{{ end }} + + {{- if .html }}{{ $sep }}"html": {{ toJson .html }}{{- $sep = "," -}}{{ end }} + + } + + ' create_links: config: requestBodyTranslate: @@ -5769,6 +5813,61 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .actionTimeout }}{{ $sep }}"actionTimeout": {{ toJson .actionTimeout }}{{- $sep = "," -}}{{ end }} + + {{- if .addScriptTag }}{{ $sep }}"addScriptTag": {{ if eq (kindOf .addScriptTag) "string" }}{{ .addScriptTag }}{{ else }}{{ toJson .addScriptTag }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .addStyleTag }}{{ $sep }}"addStyleTag": {{ if eq (kindOf .addStyleTag) "string" }}{{ .addStyleTag }}{{ else }}{{ toJson .addStyleTag }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .allowRequestPattern }}{{ $sep }}"allowRequestPattern": {{ if eq (kindOf .allowRequestPattern) "string" }}{{ .allowRequestPattern }}{{ else }}{{ toJson .allowRequestPattern }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .allowResourceTypes }}{{ $sep }}"allowResourceTypes": {{ if eq (kindOf .allowResourceTypes) "string" }}{{ .allowResourceTypes }}{{ else }}{{ toJson .allowResourceTypes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .authenticate }}{{ $sep }}"authenticate": {{ if eq (kindOf .authenticate) "string" }}{{ .authenticate }}{{ else }}{{ toJson .authenticate }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .bestAttempt }}{{ $sep }}"bestAttempt": {{ toJson .bestAttempt }}{{- $sep = "," -}}{{ end }} + + {{- if .cookies }}{{ $sep }}"cookies": {{ if eq (kindOf .cookies) "string" }}{{ .cookies }}{{ else }}{{ toJson .cookies }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .emulateMediaType }}{{ $sep }}"emulateMediaType": {{ toJson .emulateMediaType }}{{- $sep = "," -}}{{ end }} + + {{- if .excludeExternalLinks }}{{ $sep }}"excludeExternalLinks": {{ toJson .excludeExternalLinks }}{{- $sep = "," -}}{{ end }} + + {{- if .gotoOptions }}{{ $sep }}"gotoOptions": {{ if eq (kindOf .gotoOptions) "string" }}{{ .gotoOptions }}{{ else }}{{ toJson .gotoOptions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .html }}{{ $sep }}"html": {{ toJson .html }}{{- $sep = "," -}}{{ end }} + + {{- if .rejectRequestPattern }}{{ $sep }}"rejectRequestPattern": {{ if eq (kindOf .rejectRequestPattern) "string" }}{{ .rejectRequestPattern }}{{ else }}{{ toJson .rejectRequestPattern }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .rejectResourceTypes }}{{ $sep }}"rejectResourceTypes": {{ if eq (kindOf .rejectResourceTypes) "string" }}{{ .rejectResourceTypes }}{{ else }}{{ toJson .rejectResourceTypes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .setExtraHTTPHeaders }}{{ $sep }}"setExtraHTTPHeaders": {{ if eq (kindOf .setExtraHTTPHeaders) "string" }}{{ .setExtraHTTPHeaders }}{{ else }}{{ toJson .setExtraHTTPHeaders }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .setJavaScriptEnabled }}{{ $sep }}"setJavaScriptEnabled": {{ toJson .setJavaScriptEnabled }}{{- $sep = "," -}}{{ end }} + + {{- if .userAgent }}{{ $sep }}"userAgent": {{ toJson .userAgent }}{{- $sep = "," -}}{{ end }} + + {{- if .viewport }}{{ $sep }}"viewport": {{ if eq (kindOf .viewport) "string" }}{{ .viewport }}{{ else }}{{ toJson .viewport }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .visibleLinksOnly }}{{ $sep }}"visibleLinksOnly": {{ toJson .visibleLinksOnly }}{{- $sep = "," -}}{{ end }} + + {{- if .waitForSelector }}{{ $sep }}"waitForSelector": {{ if eq (kindOf .waitForSelector) "string" }}{{ .waitForSelector }}{{ else }}{{ toJson .waitForSelector }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .waitForTimeout }}{{ $sep }}"waitForTimeout": {{ toJson .waitForTimeout }}{{- $sep = "," -}}{{ end }} + + {{- if .url }}{{ $sep }}"url": {{ toJson .url }}{{- $sep = "," -}}{{ end }} + + } + + ' create_markdown: config: requestBodyTranslate: @@ -5778,6 +5877,57 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .actionTimeout }}{{ $sep }}"actionTimeout": {{ toJson .actionTimeout }}{{- $sep = "," -}}{{ end }} + + {{- if .addScriptTag }}{{ $sep }}"addScriptTag": {{ if eq (kindOf .addScriptTag) "string" }}{{ .addScriptTag }}{{ else }}{{ toJson .addScriptTag }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .addStyleTag }}{{ $sep }}"addStyleTag": {{ if eq (kindOf .addStyleTag) "string" }}{{ .addStyleTag }}{{ else }}{{ toJson .addStyleTag }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .allowRequestPattern }}{{ $sep }}"allowRequestPattern": {{ if eq (kindOf .allowRequestPattern) "string" }}{{ .allowRequestPattern }}{{ else }}{{ toJson .allowRequestPattern }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .allowResourceTypes }}{{ $sep }}"allowResourceTypes": {{ if eq (kindOf .allowResourceTypes) "string" }}{{ .allowResourceTypes }}{{ else }}{{ toJson .allowResourceTypes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .authenticate }}{{ $sep }}"authenticate": {{ if eq (kindOf .authenticate) "string" }}{{ .authenticate }}{{ else }}{{ toJson .authenticate }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .bestAttempt }}{{ $sep }}"bestAttempt": {{ toJson .bestAttempt }}{{- $sep = "," -}}{{ end }} + + {{- if .cookies }}{{ $sep }}"cookies": {{ if eq (kindOf .cookies) "string" }}{{ .cookies }}{{ else }}{{ toJson .cookies }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .emulateMediaType }}{{ $sep }}"emulateMediaType": {{ toJson .emulateMediaType }}{{- $sep = "," -}}{{ end }} + + {{- if .gotoOptions }}{{ $sep }}"gotoOptions": {{ if eq (kindOf .gotoOptions) "string" }}{{ .gotoOptions }}{{ else }}{{ toJson .gotoOptions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .rejectRequestPattern }}{{ $sep }}"rejectRequestPattern": {{ if eq (kindOf .rejectRequestPattern) "string" }}{{ .rejectRequestPattern }}{{ else }}{{ toJson .rejectRequestPattern }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .rejectResourceTypes }}{{ $sep }}"rejectResourceTypes": {{ if eq (kindOf .rejectResourceTypes) "string" }}{{ .rejectResourceTypes }}{{ else }}{{ toJson .rejectResourceTypes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .setExtraHTTPHeaders }}{{ $sep }}"setExtraHTTPHeaders": {{ if eq (kindOf .setExtraHTTPHeaders) "string" }}{{ .setExtraHTTPHeaders }}{{ else }}{{ toJson .setExtraHTTPHeaders }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .setJavaScriptEnabled }}{{ $sep }}"setJavaScriptEnabled": {{ toJson .setJavaScriptEnabled }}{{- $sep = "," -}}{{ end }} + + {{- if .url }}{{ $sep }}"url": {{ toJson .url }}{{- $sep = "," -}}{{ end }} + + {{- if .userAgent }}{{ $sep }}"userAgent": {{ toJson .userAgent }}{{- $sep = "," -}}{{ end }} + + {{- if .viewport }}{{ $sep }}"viewport": {{ if eq (kindOf .viewport) "string" }}{{ .viewport }}{{ else }}{{ toJson .viewport }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .waitForSelector }}{{ $sep }}"waitForSelector": {{ if eq (kindOf .waitForSelector) "string" }}{{ .waitForSelector }}{{ else }}{{ toJson .waitForSelector }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .waitForTimeout }}{{ $sep }}"waitForTimeout": {{ toJson .waitForTimeout }}{{- $sep = "," -}}{{ end }} + + {{- if .html }}{{ $sep }}"html": {{ toJson .html }}{{- $sep = "," -}}{{ end }} + + } + + ' create_pdf: config: requestBodyTranslate: @@ -5791,6 +5941,59 @@ components: transform: body: '[{"contents": {{ toJson . }}}]' type: golang_template_text_v0.3.0 + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .actionTimeout }}{{ $sep }}"actionTimeout": {{ toJson .actionTimeout }}{{- $sep = "," -}}{{ end }} + + {{- if .addScriptTag }}{{ $sep }}"addScriptTag": {{ if eq (kindOf .addScriptTag) "string" }}{{ .addScriptTag }}{{ else }}{{ toJson .addScriptTag }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .addStyleTag }}{{ $sep }}"addStyleTag": {{ if eq (kindOf .addStyleTag) "string" }}{{ .addStyleTag }}{{ else }}{{ toJson .addStyleTag }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .allowRequestPattern }}{{ $sep }}"allowRequestPattern": {{ if eq (kindOf .allowRequestPattern) "string" }}{{ .allowRequestPattern }}{{ else }}{{ toJson .allowRequestPattern }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .allowResourceTypes }}{{ $sep }}"allowResourceTypes": {{ if eq (kindOf .allowResourceTypes) "string" }}{{ .allowResourceTypes }}{{ else }}{{ toJson .allowResourceTypes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .authenticate }}{{ $sep }}"authenticate": {{ if eq (kindOf .authenticate) "string" }}{{ .authenticate }}{{ else }}{{ toJson .authenticate }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .bestAttempt }}{{ $sep }}"bestAttempt": {{ toJson .bestAttempt }}{{- $sep = "," -}}{{ end }} + + {{- if .cookies }}{{ $sep }}"cookies": {{ if eq (kindOf .cookies) "string" }}{{ .cookies }}{{ else }}{{ toJson .cookies }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .emulateMediaType }}{{ $sep }}"emulateMediaType": {{ toJson .emulateMediaType }}{{- $sep = "," -}}{{ end }} + + {{- if .gotoOptions }}{{ $sep }}"gotoOptions": {{ if eq (kindOf .gotoOptions) "string" }}{{ .gotoOptions }}{{ else }}{{ toJson .gotoOptions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .html }}{{ $sep }}"html": {{ toJson .html }}{{- $sep = "," -}}{{ end }} + + {{- if .pdfOptions }}{{ $sep }}"pdfOptions": {{ if eq (kindOf .pdfOptions) "string" }}{{ .pdfOptions }}{{ else }}{{ toJson .pdfOptions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .rejectRequestPattern }}{{ $sep }}"rejectRequestPattern": {{ if eq (kindOf .rejectRequestPattern) "string" }}{{ .rejectRequestPattern }}{{ else }}{{ toJson .rejectRequestPattern }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .rejectResourceTypes }}{{ $sep }}"rejectResourceTypes": {{ if eq (kindOf .rejectResourceTypes) "string" }}{{ .rejectResourceTypes }}{{ else }}{{ toJson .rejectResourceTypes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .setExtraHTTPHeaders }}{{ $sep }}"setExtraHTTPHeaders": {{ if eq (kindOf .setExtraHTTPHeaders) "string" }}{{ .setExtraHTTPHeaders }}{{ else }}{{ toJson .setExtraHTTPHeaders }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .setJavaScriptEnabled }}{{ $sep }}"setJavaScriptEnabled": {{ toJson .setJavaScriptEnabled }}{{- $sep = "," -}}{{ end }} + + {{- if .userAgent }}{{ $sep }}"userAgent": {{ toJson .userAgent }}{{- $sep = "," -}}{{ end }} + + {{- if .viewport }}{{ $sep }}"viewport": {{ if eq (kindOf .viewport) "string" }}{{ .viewport }}{{ else }}{{ toJson .viewport }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .waitForSelector }}{{ $sep }}"waitForSelector": {{ if eq (kindOf .waitForSelector) "string" }}{{ .waitForSelector }}{{ else }}{{ toJson .waitForSelector }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .waitForTimeout }}{{ $sep }}"waitForTimeout": {{ toJson .waitForTimeout }}{{- $sep = "," -}}{{ end }} + + {{- if .url }}{{ $sep }}"url": {{ toJson .url }}{{- $sep = "," -}}{{ end }} + + } + + ' create_scrape: config: requestBodyTranslate: @@ -5800,6 +6003,59 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .actionTimeout }}{{ $sep }}"actionTimeout": {{ toJson .actionTimeout }}{{- $sep = "," -}}{{ end }} + + {{- if .addScriptTag }}{{ $sep }}"addScriptTag": {{ if eq (kindOf .addScriptTag) "string" }}{{ .addScriptTag }}{{ else }}{{ toJson .addScriptTag }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .addStyleTag }}{{ $sep }}"addStyleTag": {{ if eq (kindOf .addStyleTag) "string" }}{{ .addStyleTag }}{{ else }}{{ toJson .addStyleTag }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .allowRequestPattern }}{{ $sep }}"allowRequestPattern": {{ if eq (kindOf .allowRequestPattern) "string" }}{{ .allowRequestPattern }}{{ else }}{{ toJson .allowRequestPattern }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .allowResourceTypes }}{{ $sep }}"allowResourceTypes": {{ if eq (kindOf .allowResourceTypes) "string" }}{{ .allowResourceTypes }}{{ else }}{{ toJson .allowResourceTypes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .authenticate }}{{ $sep }}"authenticate": {{ if eq (kindOf .authenticate) "string" }}{{ .authenticate }}{{ else }}{{ toJson .authenticate }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .bestAttempt }}{{ $sep }}"bestAttempt": {{ toJson .bestAttempt }}{{- $sep = "," -}}{{ end }} + + {{- if .cookies }}{{ $sep }}"cookies": {{ if eq (kindOf .cookies) "string" }}{{ .cookies }}{{ else }}{{ toJson .cookies }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .elements }}{{ $sep }}"elements": {{ if eq (kindOf .elements) "string" }}{{ .elements }}{{ else }}{{ toJson .elements }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .emulateMediaType }}{{ $sep }}"emulateMediaType": {{ toJson .emulateMediaType }}{{- $sep = "," -}}{{ end }} + + {{- if .gotoOptions }}{{ $sep }}"gotoOptions": {{ if eq (kindOf .gotoOptions) "string" }}{{ .gotoOptions }}{{ else }}{{ toJson .gotoOptions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .html }}{{ $sep }}"html": {{ toJson .html }}{{- $sep = "," -}}{{ end }} + + {{- if .rejectRequestPattern }}{{ $sep }}"rejectRequestPattern": {{ if eq (kindOf .rejectRequestPattern) "string" }}{{ .rejectRequestPattern }}{{ else }}{{ toJson .rejectRequestPattern }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .rejectResourceTypes }}{{ $sep }}"rejectResourceTypes": {{ if eq (kindOf .rejectResourceTypes) "string" }}{{ .rejectResourceTypes }}{{ else }}{{ toJson .rejectResourceTypes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .setExtraHTTPHeaders }}{{ $sep }}"setExtraHTTPHeaders": {{ if eq (kindOf .setExtraHTTPHeaders) "string" }}{{ .setExtraHTTPHeaders }}{{ else }}{{ toJson .setExtraHTTPHeaders }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .setJavaScriptEnabled }}{{ $sep }}"setJavaScriptEnabled": {{ toJson .setJavaScriptEnabled }}{{- $sep = "," -}}{{ end }} + + {{- if .userAgent }}{{ $sep }}"userAgent": {{ toJson .userAgent }}{{- $sep = "," -}}{{ end }} + + {{- if .viewport }}{{ $sep }}"viewport": {{ if eq (kindOf .viewport) "string" }}{{ .viewport }}{{ else }}{{ toJson .viewport }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .waitForSelector }}{{ $sep }}"waitForSelector": {{ if eq (kindOf .waitForSelector) "string" }}{{ .waitForSelector }}{{ else }}{{ toJson .waitForSelector }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .waitForTimeout }}{{ $sep }}"waitForTimeout": {{ toJson .waitForTimeout }}{{- $sep = "," -}}{{ end }} + + {{- if .url }}{{ $sep }}"url": {{ toJson .url }}{{- $sep = "," -}}{{ end }} + + } + + ' create_screenshot: config: requestBodyTranslate: @@ -5809,6 +6065,63 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .actionTimeout }}{{ $sep }}"actionTimeout": {{ toJson .actionTimeout }}{{- $sep = "," -}}{{ end }} + + {{- if .addScriptTag }}{{ $sep }}"addScriptTag": {{ if eq (kindOf .addScriptTag) "string" }}{{ .addScriptTag }}{{ else }}{{ toJson .addScriptTag }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .addStyleTag }}{{ $sep }}"addStyleTag": {{ if eq (kindOf .addStyleTag) "string" }}{{ .addStyleTag }}{{ else }}{{ toJson .addStyleTag }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .allowRequestPattern }}{{ $sep }}"allowRequestPattern": {{ if eq (kindOf .allowRequestPattern) "string" }}{{ .allowRequestPattern }}{{ else }}{{ toJson .allowRequestPattern }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .allowResourceTypes }}{{ $sep }}"allowResourceTypes": {{ if eq (kindOf .allowResourceTypes) "string" }}{{ .allowResourceTypes }}{{ else }}{{ toJson .allowResourceTypes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .authenticate }}{{ $sep }}"authenticate": {{ if eq (kindOf .authenticate) "string" }}{{ .authenticate }}{{ else }}{{ toJson .authenticate }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .bestAttempt }}{{ $sep }}"bestAttempt": {{ toJson .bestAttempt }}{{- $sep = "," -}}{{ end }} + + {{- if .cookies }}{{ $sep }}"cookies": {{ if eq (kindOf .cookies) "string" }}{{ .cookies }}{{ else }}{{ toJson .cookies }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .emulateMediaType }}{{ $sep }}"emulateMediaType": {{ toJson .emulateMediaType }}{{- $sep = "," -}}{{ end }} + + {{- if .gotoOptions }}{{ $sep }}"gotoOptions": {{ if eq (kindOf .gotoOptions) "string" }}{{ .gotoOptions }}{{ else }}{{ toJson .gotoOptions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .html }}{{ $sep }}"html": {{ toJson .html }}{{- $sep = "," -}}{{ end }} + + {{- if .rejectRequestPattern }}{{ $sep }}"rejectRequestPattern": {{ if eq (kindOf .rejectRequestPattern) "string" }}{{ .rejectRequestPattern }}{{ else }}{{ toJson .rejectRequestPattern }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .rejectResourceTypes }}{{ $sep }}"rejectResourceTypes": {{ if eq (kindOf .rejectResourceTypes) "string" }}{{ .rejectResourceTypes }}{{ else }}{{ toJson .rejectResourceTypes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .screenshotOptions }}{{ $sep }}"screenshotOptions": {{ if eq (kindOf .screenshotOptions) "string" }}{{ .screenshotOptions }}{{ else }}{{ toJson .screenshotOptions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .scrollPage }}{{ $sep }}"scrollPage": {{ toJson .scrollPage }}{{- $sep = "," -}}{{ end }} + + {{- if .selector }}{{ $sep }}"selector": {{ toJson .selector }}{{- $sep = "," -}}{{ end }} + + {{- if .setExtraHTTPHeaders }}{{ $sep }}"setExtraHTTPHeaders": {{ if eq (kindOf .setExtraHTTPHeaders) "string" }}{{ .setExtraHTTPHeaders }}{{ else }}{{ toJson .setExtraHTTPHeaders }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .setJavaScriptEnabled }}{{ $sep }}"setJavaScriptEnabled": {{ toJson .setJavaScriptEnabled }}{{- $sep = "," -}}{{ end }} + + {{- if .userAgent }}{{ $sep }}"userAgent": {{ toJson .userAgent }}{{- $sep = "," -}}{{ end }} + + {{- if .viewport }}{{ $sep }}"viewport": {{ if eq (kindOf .viewport) "string" }}{{ .viewport }}{{ else }}{{ toJson .viewport }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .waitForSelector }}{{ $sep }}"waitForSelector": {{ if eq (kindOf .waitForSelector) "string" }}{{ .waitForSelector }}{{ else }}{{ toJson .waitForSelector }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .waitForTimeout }}{{ $sep }}"waitForTimeout": {{ toJson .waitForTimeout }}{{- $sep = "," -}}{{ end }} + + {{- if .url }}{{ $sep }}"url": {{ toJson .url }}{{- $sep = "," -}}{{ end }} + + } + + ' snapshot: config: requestBodyTranslate: @@ -5818,6 +6131,59 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .actionTimeout }}{{ $sep }}"actionTimeout": {{ toJson .actionTimeout }}{{- $sep = "," -}}{{ end }} + + {{- if .addScriptTag }}{{ $sep }}"addScriptTag": {{ if eq (kindOf .addScriptTag) "string" }}{{ .addScriptTag }}{{ else }}{{ toJson .addScriptTag }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .addStyleTag }}{{ $sep }}"addStyleTag": {{ if eq (kindOf .addStyleTag) "string" }}{{ .addStyleTag }}{{ else }}{{ toJson .addStyleTag }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .allowRequestPattern }}{{ $sep }}"allowRequestPattern": {{ if eq (kindOf .allowRequestPattern) "string" }}{{ .allowRequestPattern }}{{ else }}{{ toJson .allowRequestPattern }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .allowResourceTypes }}{{ $sep }}"allowResourceTypes": {{ if eq (kindOf .allowResourceTypes) "string" }}{{ .allowResourceTypes }}{{ else }}{{ toJson .allowResourceTypes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .authenticate }}{{ $sep }}"authenticate": {{ if eq (kindOf .authenticate) "string" }}{{ .authenticate }}{{ else }}{{ toJson .authenticate }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .bestAttempt }}{{ $sep }}"bestAttempt": {{ toJson .bestAttempt }}{{- $sep = "," -}}{{ end }} + + {{- if .cookies }}{{ $sep }}"cookies": {{ if eq (kindOf .cookies) "string" }}{{ .cookies }}{{ else }}{{ toJson .cookies }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .emulateMediaType }}{{ $sep }}"emulateMediaType": {{ toJson .emulateMediaType }}{{- $sep = "," -}}{{ end }} + + {{- if .gotoOptions }}{{ $sep }}"gotoOptions": {{ if eq (kindOf .gotoOptions) "string" }}{{ .gotoOptions }}{{ else }}{{ toJson .gotoOptions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .html }}{{ $sep }}"html": {{ toJson .html }}{{- $sep = "," -}}{{ end }} + + {{- if .rejectRequestPattern }}{{ $sep }}"rejectRequestPattern": {{ if eq (kindOf .rejectRequestPattern) "string" }}{{ .rejectRequestPattern }}{{ else }}{{ toJson .rejectRequestPattern }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .rejectResourceTypes }}{{ $sep }}"rejectResourceTypes": {{ if eq (kindOf .rejectResourceTypes) "string" }}{{ .rejectResourceTypes }}{{ else }}{{ toJson .rejectResourceTypes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .screenshotOptions }}{{ $sep }}"screenshotOptions": {{ if eq (kindOf .screenshotOptions) "string" }}{{ .screenshotOptions }}{{ else }}{{ toJson .screenshotOptions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .setExtraHTTPHeaders }}{{ $sep }}"setExtraHTTPHeaders": {{ if eq (kindOf .setExtraHTTPHeaders) "string" }}{{ .setExtraHTTPHeaders }}{{ else }}{{ toJson .setExtraHTTPHeaders }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .setJavaScriptEnabled }}{{ $sep }}"setJavaScriptEnabled": {{ toJson .setJavaScriptEnabled }}{{- $sep = "," -}}{{ end }} + + {{- if .userAgent }}{{ $sep }}"userAgent": {{ toJson .userAgent }}{{- $sep = "," -}}{{ end }} + + {{- if .viewport }}{{ $sep }}"viewport": {{ if eq (kindOf .viewport) "string" }}{{ .viewport }}{{ else }}{{ toJson .viewport }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .waitForSelector }}{{ $sep }}"waitForSelector": {{ if eq (kindOf .waitForSelector) "string" }}{{ .waitForSelector }}{{ else }}{{ toJson .waitForSelector }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .waitForTimeout }}{{ $sep }}"waitForTimeout": {{ toJson .waitForTimeout }}{{- $sep = "," -}}{{ end }} + + {{- if .url }}{{ $sep }}"url": {{ toJson .url }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: [] insert: [] @@ -5838,6 +6204,73 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .actionTimeout }}{{ $sep }}"actionTimeout": {{ toJson .actionTimeout }}{{- $sep = "," -}}{{ end }} + + {{- if .addScriptTag }}{{ $sep }}"addScriptTag": {{ if eq (kindOf .addScriptTag) "string" }}{{ .addScriptTag }}{{ else }}{{ toJson .addScriptTag }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .addStyleTag }}{{ $sep }}"addStyleTag": {{ if eq (kindOf .addStyleTag) "string" }}{{ .addStyleTag }}{{ else }}{{ toJson .addStyleTag }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .allowRequestPattern }}{{ $sep }}"allowRequestPattern": {{ if eq (kindOf .allowRequestPattern) "string" }}{{ .allowRequestPattern }}{{ else }}{{ toJson .allowRequestPattern }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .allowResourceTypes }}{{ $sep }}"allowResourceTypes": {{ if eq (kindOf .allowResourceTypes) "string" }}{{ .allowResourceTypes }}{{ else }}{{ toJson .allowResourceTypes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .authenticate }}{{ $sep }}"authenticate": {{ if eq (kindOf .authenticate) "string" }}{{ .authenticate }}{{ else }}{{ toJson .authenticate }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .bestAttempt }}{{ $sep }}"bestAttempt": {{ toJson .bestAttempt }}{{- $sep = "," -}}{{ end }} + + {{- if .cookies }}{{ $sep }}"cookies": {{ if eq (kindOf .cookies) "string" }}{{ .cookies }}{{ else }}{{ toJson .cookies }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .crawlPurposes }}{{ $sep }}"crawlPurposes": {{ if eq (kindOf .crawlPurposes) "string" }}{{ .crawlPurposes }}{{ else }}{{ toJson .crawlPurposes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .depth }}{{ $sep }}"depth": {{ toJson .depth }}{{- $sep = "," -}}{{ end }} + + {{- if .emulateMediaType }}{{ $sep }}"emulateMediaType": {{ toJson .emulateMediaType }}{{- $sep = "," -}}{{ end }} + + {{- if .formats }}{{ $sep }}"formats": {{ if eq (kindOf .formats) "string" }}{{ .formats }}{{ else }}{{ toJson .formats }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .gotoOptions }}{{ $sep }}"gotoOptions": {{ if eq (kindOf .gotoOptions) "string" }}{{ .gotoOptions }}{{ else }}{{ toJson .gotoOptions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .jsonOptions }}{{ $sep }}"jsonOptions": {{ if eq (kindOf .jsonOptions) "string" }}{{ .jsonOptions }}{{ else }}{{ toJson .jsonOptions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .limit }}{{ $sep }}"limit": {{ toJson .limit }}{{- $sep = "," -}}{{ end }} + + {{- if .maxAge }}{{ $sep }}"maxAge": {{ toJson .maxAge }}{{- $sep = "," -}}{{ end }} + + {{- if .modifiedSince }}{{ $sep }}"modifiedSince": {{ toJson .modifiedSince }}{{- $sep = "," -}}{{ end }} + + {{- if .options }}{{ $sep }}"options": {{ if eq (kindOf .options) "string" }}{{ .options }}{{ else }}{{ toJson .options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .rejectRequestPattern }}{{ $sep }}"rejectRequestPattern": {{ if eq (kindOf .rejectRequestPattern) "string" }}{{ .rejectRequestPattern }}{{ else }}{{ toJson .rejectRequestPattern }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .rejectResourceTypes }}{{ $sep }}"rejectResourceTypes": {{ if eq (kindOf .rejectResourceTypes) "string" }}{{ .rejectResourceTypes }}{{ else }}{{ toJson .rejectResourceTypes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .render }}{{ $sep }}"render": {{ toJson .render }}{{- $sep = "," -}}{{ end }} + + {{- if .setExtraHTTPHeaders }}{{ $sep }}"setExtraHTTPHeaders": {{ if eq (kindOf .setExtraHTTPHeaders) "string" }}{{ .setExtraHTTPHeaders }}{{ else }}{{ toJson .setExtraHTTPHeaders }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .setJavaScriptEnabled }}{{ $sep }}"setJavaScriptEnabled": {{ toJson .setJavaScriptEnabled }}{{- $sep = "," -}}{{ end }} + + {{- if .source }}{{ $sep }}"source": {{ toJson .source }}{{- $sep = "," -}}{{ end }} + + {{- if .url }}{{ $sep }}"url": {{ toJson .url }}{{- $sep = "," -}}{{ end }} + + {{- if .viewport }}{{ $sep }}"viewport": {{ if eq (kindOf .viewport) "string" }}{{ .viewport }}{{ else }}{{ toJson .viewport }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .waitForSelector }}{{ $sep }}"waitForSelector": {{ if eq (kindOf .waitForSelector) "string" }}{{ .waitForSelector }}{{ else }}{{ toJson .waitForSelector }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .waitForTimeout }}{{ $sep }}"waitForTimeout": {{ toJson .waitForTimeout }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1browser-rendering~1crawl~1{job_id}/delete' @@ -5905,6 +6338,63 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .actionTimeout }}{{ $sep }}"actionTimeout": {{ toJson .actionTimeout }}{{- $sep = "," -}}{{ end }} + + {{- if .addScriptTag }}{{ $sep }}"addScriptTag": {{ if eq (kindOf .addScriptTag) "string" }}{{ .addScriptTag }}{{ else }}{{ toJson .addScriptTag }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .addStyleTag }}{{ $sep }}"addStyleTag": {{ if eq (kindOf .addStyleTag) "string" }}{{ .addStyleTag }}{{ else }}{{ toJson .addStyleTag }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .allowRequestPattern }}{{ $sep }}"allowRequestPattern": {{ if eq (kindOf .allowRequestPattern) "string" }}{{ .allowRequestPattern }}{{ else }}{{ toJson .allowRequestPattern }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .allowResourceTypes }}{{ $sep }}"allowResourceTypes": {{ if eq (kindOf .allowResourceTypes) "string" }}{{ .allowResourceTypes }}{{ else }}{{ toJson .allowResourceTypes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .authenticate }}{{ $sep }}"authenticate": {{ if eq (kindOf .authenticate) "string" }}{{ .authenticate }}{{ else }}{{ toJson .authenticate }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .bestAttempt }}{{ $sep }}"bestAttempt": {{ toJson .bestAttempt }}{{- $sep = "," -}}{{ end }} + + {{- if .cookies }}{{ $sep }}"cookies": {{ if eq (kindOf .cookies) "string" }}{{ .cookies }}{{ else }}{{ toJson .cookies }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_ai }}{{ $sep }}"custom_ai": {{ if eq (kindOf .custom_ai) "string" }}{{ .custom_ai }}{{ else }}{{ toJson .custom_ai }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .emulateMediaType }}{{ $sep }}"emulateMediaType": {{ toJson .emulateMediaType }}{{- $sep = "," -}}{{ end }} + + {{- if .gotoOptions }}{{ $sep }}"gotoOptions": {{ if eq (kindOf .gotoOptions) "string" }}{{ .gotoOptions }}{{ else }}{{ toJson .gotoOptions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .html }}{{ $sep }}"html": {{ toJson .html }}{{- $sep = "," -}}{{ end }} + + {{- if .prompt }}{{ $sep }}"prompt": {{ toJson .prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .rejectRequestPattern }}{{ $sep }}"rejectRequestPattern": {{ if eq (kindOf .rejectRequestPattern) "string" }}{{ .rejectRequestPattern }}{{ else }}{{ toJson .rejectRequestPattern }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .rejectResourceTypes }}{{ $sep }}"rejectResourceTypes": {{ if eq (kindOf .rejectResourceTypes) "string" }}{{ .rejectResourceTypes }}{{ else }}{{ toJson .rejectResourceTypes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .response_format }}{{ $sep }}"response_format": {{ if eq (kindOf .response_format) "string" }}{{ .response_format }}{{ else }}{{ toJson .response_format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .setExtraHTTPHeaders }}{{ $sep }}"setExtraHTTPHeaders": {{ if eq (kindOf .setExtraHTTPHeaders) "string" }}{{ .setExtraHTTPHeaders }}{{ else }}{{ toJson .setExtraHTTPHeaders }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .setJavaScriptEnabled }}{{ $sep }}"setJavaScriptEnabled": {{ toJson .setJavaScriptEnabled }}{{- $sep = "," -}}{{ end }} + + {{- if .userAgent }}{{ $sep }}"userAgent": {{ toJson .userAgent }}{{- $sep = "," -}}{{ end }} + + {{- if .viewport }}{{ $sep }}"viewport": {{ if eq (kindOf .viewport) "string" }}{{ .viewport }}{{ else }}{{ toJson .viewport }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .waitForSelector }}{{ $sep }}"waitForSelector": {{ if eq (kindOf .waitForSelector) "string" }}{{ .waitForSelector }}{{ else }}{{ toJson .waitForSelector }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .waitForTimeout }}{{ $sep }}"waitForTimeout": {{ toJson .waitForTimeout }}{{- $sep = "," -}}{{ end }} + + {{- if .url }}{{ $sep }}"url": {{ toJson .url }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/json/methods/list' diff --git a/providers/src/cloudflare/v00.00.00000/services/cache.yaml b/providers/src/cloudflare/v00.00.00000/services/cache.yaml index 265673fe..6919fc95 100644 --- a/providers/src/cloudflare/v00.00.00000/services/cache.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/cache.yaml @@ -2675,6 +2675,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .value }}{{ $sep }}"value": {{ if eq (kindOf .value) "string" }}{{ .value }}{{ else }}{{ toJson .value }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/variants/methods/list' @@ -2698,6 +2711,27 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .tags }}{{ $sep }}"tags": {{ if eq (kindOf .tags) "string" }}{{ .tags }}{{ else }}{{ toJson .tags }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .hosts }}{{ $sep }}"hosts": {{ if eq (kindOf .hosts) "string" }}{{ .hosts }}{{ else }}{{ toJson .hosts }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .prefixes }}{{ $sep }}"prefixes": {{ if eq (kindOf .prefixes) "string" }}{{ .prefixes }}{{ else }}{{ toJson .prefixes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .purge_everything }}{{ $sep }}"purge_everything": {{ toJson .purge_everything }}{{- $sep = "," -}}{{ end }} + + {{- if .files }}{{ $sep }}"files": {{ if eq (kindOf .files) "string" }}{{ .files }}{{ else }}{{ toJson .files }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: [] insert: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/certificate_authorities.yaml b/providers/src/cloudflare/v00.00.00000/services/certificate_authorities.yaml index 82dce011..605f0e24 100644 --- a/providers/src/cloudflare/v00.00.00000/services/certificate_authorities.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/certificate_authorities.yaml @@ -1,303 +1,267 @@ -openapi: 3.0.3 -info: - title: certificate_authorities API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /zones/{zone_id}/certificate_authorities/hostname_associations: - get: - description: List Hostname Associations - operationId: client-certificate-for-a-zone-list-hostname-associations - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: query - name: mtls_certificate_id - schema: - description: >- - The UUID to match against for a certificate that was uploaded to - the mTLS Certificate Management endpoint. If no - mtls_certificate_id is given, the results will be the hostnames - associated to your active Cloudflare Managed CA. - maxLength: 36 - minLength: 36 - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAssociationsResponse - description: List Hostname Associations Response - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesApiResponseCommonFailure - description: List Hostname Associations Response Failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Hostname Associations - tags: - - API Shield Client Certificates for a Zone - x-api-token-group: - - SSL and Certificates Write - - SSL and Certificates Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: certificate_authorities - resource_chain: - - hostname_associations - method: get - put: - description: Replace Hostname Associations - operationId: client-certificate-for-a-zone-put-hostname-associations - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAssociation - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAssociationsResponse - description: Replace Hostname Associations Response - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesApiResponseCommonFailure - description: Replace Hostname Associations Response Failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Replace Hostname Associations - tags: - - API Shield Client Certificates for a Zone - x-api-token-group: - - SSL and Certificates Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: certificate_authorities - resource_chain: - - hostname_associations - method: update -components: - schemas: - tlsCertificatesAndHostnamesApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - example: [] - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - tlsCertificatesAndHostnamesHostnameAssociation: - properties: - hostnames: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasHostnames' - mtls_certificate_id: - description: >- - The UUID for a certificate that was uploaded to the mTLS Certificate - Management endpoint. If no mtls_certificate_id is given, the - hostnames will be associated to your active Cloudflare Managed CA. - maxLength: 36 - minLength: 36 - type: string - x-auditable: true - type: object - tlsCertificatesAndHostnamesHostnameAssociationsResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - properties: - hostnames: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasHostnames' - type: object - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - tlsCertificatesAndHostnamesSchemasHostnames: - items: - example: api.example.com - type: string - x-auditable: true - type: array - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - hostname_associations: - id: cloudflare.certificate_authorities.hostname_associations - name: hostname_associations - title: Hostname Associations - methods: - list: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1certificate_authorities~1hostname_associations/get - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1certificate_authorities~1hostname_associations/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/hostname_associations/methods/list - insert: [] - update: [] - delete: [] - replace: - - $ref: >- - #/components/x-stackQL-resources/hostname_associations/methods/update +openapi: 3.0.3 +info: + title: certificate_authorities API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /zones/{zone_id}/certificate_authorities/hostname_associations: + get: + description: List Hostname Associations + operationId: client-certificate-for-a-zone-list-hostname-associations + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: query + name: mtls_certificate_id + schema: + description: The UUID to match against for a certificate that was uploaded to the mTLS Certificate Management endpoint. If no mtls_certificate_id is given, the results will be the hostnames associated to your active Cloudflare Managed CA. + maxLength: 36 + minLength: 36 + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAssociationsResponse' + description: List Hostname Associations Response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesApiResponseCommonFailure' + description: List Hostname Associations Response Failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Hostname Associations + tags: + - API Shield Client Certificates for a Zone + x-api-token-group: + - SSL and Certificates Write + - SSL and Certificates Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: certificate_authorities + resource_chain: + - hostname_associations + method: get + put: + description: Replace Hostname Associations + operationId: client-certificate-for-a-zone-put-hostname-associations + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAssociation' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAssociationsResponse' + description: Replace Hostname Associations Response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesApiResponseCommonFailure' + description: Replace Hostname Associations Response Failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Replace Hostname Associations + tags: + - API Shield Client Certificates for a Zone + x-api-token-group: + - SSL and Certificates Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: certificate_authorities + resource_chain: + - hostname_associations + method: update +components: + schemas: + tlsCertificatesAndHostnamesApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + example: [] + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + tlsCertificatesAndHostnamesHostnameAssociation: + properties: + hostnames: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasHostnames' + mtls_certificate_id: + description: The UUID for a certificate that was uploaded to the mTLS Certificate Management endpoint. If no mtls_certificate_id is given, the hostnames will be associated to your active Cloudflare Managed CA. + maxLength: 36 + minLength: 36 + type: string + x-auditable: true + type: object + tlsCertificatesAndHostnamesHostnameAssociationsResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + properties: + hostnames: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasHostnames' + type: object + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + tlsCertificatesAndHostnamesSchemasHostnames: + items: + example: api.example.com + type: string + x-auditable: true + type: array + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + hostname_associations: + id: cloudflare.certificate_authorities.hostname_associations + name: hostname_associations + title: Hostname Associations + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1certificate_authorities~1hostname_associations/get' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1certificate_authorities~1hostname_associations/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .hostnames }}{{ $sep }}"hostnames": {{ if eq (kindOf .hostnames) "string" }}{{ .hostnames }}{{ else }}{{ toJson .hostnames }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .mtls_certificate_id }}{{ $sep }}"mtls_certificate_id": {{ toJson .mtls_certificate_id }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/hostname_associations/methods/list' + insert: [] + update: [] + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/hostname_associations/methods/update' diff --git a/providers/src/cloudflare/v00.00.00000/services/cloudforce_one.yaml b/providers/src/cloudflare/v00.00.00000/services/cloudforce_one.yaml index 25ceca3a..33044d59 100644 --- a/providers/src/cloudflare/v00.00.00000/services/cloudforce_one.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/cloudforce_one.yaml @@ -1,15392 +1,15479 @@ -openapi: 3.0.3 -info: - title: cloudforce_one API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/cloudforce-one/binary: - post: - operationId: post_BinDBPost - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - multipart/form-data: - schema: - properties: - file: - description: The binary file content to upload. - format: binary - type: string - required: - - file - type: object - description: Binary file to be uploaded to the database. - responses: - '200': - content: - application/json: - schema: - properties: - content_type: - type: string - md5: - type: string - sha1: - type: string - sha256: - type: string - required: - - md5 - - sha1 - - sha256 - - content_type - type: object - description: Returns file information - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Posts a file to Binary Storage - tags: - - BinDB - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - binary_storage - method: create - /accounts/{account_id}/cloudforce-one/binary/{hash}: - get: - operationId: get_BinDBGetBinary - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: hash of the binary - in: path - name: hash - schema: - description: hash of the binary - type: string - required: true - responses: - '200': - description: Returns file information - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Retrieves a file from Binary Storage - tags: - - BinDB - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - binary_storage - method: get - /accounts/{account_id}/cloudforce-one/events: - get: - description: >- - Use `datasetId=all` or `datasetId=*` to query all event datasets for the - account (limited to 10). When `datasetId` is unspecified, events are - listed from the default Cloudforce One Threat Events dataset. To list - existing datasets, use the [`List - Datasets`](https://developers.cloudflare.com/api/resources/cloudforce_one/subresources/threat_events/subresources/datasets/methods/list/) - endpoint. - operationId: get_EventListGet - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: cursor - schema: - description: >- - Cursor for pagination. When provided, filters are embedded in the - cursor so you only need to pass cursor and pageSize. Returned in - the previous response's result_info.cursor field. Use cursor-based - pagination for deep pagination (beyond 100,000 records) or for - optimal performance. - type: string - - in: query - name: search - schema: - default: [] - items: - properties: - field: - description: >- - Event field to search on. Allowed: attacker, - attackerCountry, category, createdAt, date, event, - indicator, indicatorType, killChain, mitreAttack, tags, - targetCountry, targetIndustry, tlp, uuid. - type: string - op: - description: >- - Search operator. Use 'in' for bulk lookup of up to 100 - values at once, e.g. {field:'tags', op:'in', - value:['malware','apt']}. - enum: - - equals - - not - - gt - - gte - - lt - - lte - - like - - contains - - startsWith - - endsWith - - in - - find - type: string - value: - description: >- - Search value. String or number for most operators. Array for - 'in' operator (max 100 items). - type: string - items: - type: string - type: object - type: array - explode: true - - in: query - name: page - schema: - description: >- - Page number (1-indexed) for offset-based pagination. Limited to - offset of 100,000 records. For deep pagination, use cursor-based - pagination instead. - type: number - - in: query - name: pageSize - schema: - description: Number of results per page. Maximum 25,000. - type: number - - in: query - name: orderBy - schema: - type: string - - in: query - name: order - schema: - enum: - - asc - - desc - type: string - - in: query - name: datasetId - schema: - description: >- - Dataset IDs to query events from (array of UUIDs), or special - value 'all' or '*' to query all event datasets for the account. If - not provided, uses the default dataset. - items: - type: string - type: array - explode: true - - in: query - name: forceRefresh - schema: - type: boolean - - in: query - name: format - schema: - enum: - - json - - stix2 - type: string - responses: - '200': - content: - application/json: - schema: - items: - properties: - attacker: - type: string - attackerCountry: - type: string - category: - type: string - datasetId: - type: string - date: - type: string - event: - type: string - hasChildren: - type: boolean - indicator: - type: string - indicatorType: - type: string - indicatorTypeId: - type: number - insight: - type: string - killChain: - type: number - mitreAttack: - items: - type: string - type: array - mitreCapec: - items: - type: string - type: array - numReferenced: - type: number - numReferences: - type: number - rawId: - type: string - referenced: - items: - type: string - type: array - referencedIds: - items: - type: number - type: array - references: - items: - type: string - type: array - referencesIds: - items: - type: number - type: array - releasabilityId: - type: string - tags: - items: - type: string - type: array - targetCountry: - type: string - targetIndustry: - type: string - tlp: - type: string - uuid: - type: string - required: - - uuid - - date - - targetCountry - - attacker - - attackerCountry - - targetIndustry - - rawId - - indicatorTypeId - - indicator - - event - - numReferenced - - numReferences - - tlp - - category - - indicatorType - - referenced - - references - - tags - - killChain - - mitreAttack - - mitreCapec - - referencedIds - - referencesIds - - hasChildren - - datasetId - type: object - type: array - description: Returns a list of events. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Filter and list events - tags: - - Event - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - threat_events - method: list - /accounts/{account_id}/cloudforce-one/events/aggregate: - get: - description: >- - Aggregate threat events by one or more columns (e.g., attacker, - targetIndustry) with optional date filtering and daily grouping. - Supports multi-dimensional aggregation for cross-analysis. - operationId: get_EventAggregate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: >- - Column(s) to aggregate by - single column or comma-separated list - (e.g., 'attacker', 'targetIndustry', 'attacker,targetIndustry') - in: query - name: aggregateBy - schema: - description: >- - Column(s) to aggregate by - single column or comma-separated list - (e.g., 'attacker', 'targetIndustry', 'attacker,targetIndustry') - type: string - - description: >- - Dataset ID(s) to filter by. Can be a single dataset ID, - comma-separated list, or array. If not provided, uses default - dataset - in: query - name: datasetId - schema: - description: >- - Dataset ID(s) to filter by. Can be a single dataset ID, - comma-separated list, or array. If not provided, uses default - dataset - items: - type: string - type: array - explode: true - - description: Start date for filtering (ISO 8601 format, e.g., '2024-01-01') - in: query - name: startDate - schema: - description: Start date for filtering (ISO 8601 format, e.g., '2024-01-01') - type: string - - description: End date for filtering (ISO 8601 format, e.g., '2024-12-31') - in: query - name: endDate - schema: - description: End date for filtering (ISO 8601 format, e.g., '2024-12-31') - type: string - - description: Whether to group results by date (daily aggregation) - in: query - name: groupByDate - schema: - description: Whether to group results by date (daily aggregation) - type: boolean - - description: Maximum number of results to return - in: query - name: limit - schema: - default: 100 - description: Maximum number of results to return - type: number - responses: - '200': - content: - application/json: - schema: - properties: - aggregateBy: - description: Column(s) that were aggregated by - type: string - aggregations: - description: >- - Array of aggregation results with dynamic fields based on - aggregateBy columns - items: - type: object - properties: - count: - description: Number of events for this aggregation - type: number - date: - description: Date (if groupByDate is true) - type: string - required: - - count - type: array - dateRange: - description: Date range used for filtering - properties: - endDate: - type: string - startDate: - type: string - type: object - total: - description: Total number of events in the aggregation - type: number - required: - - aggregations - - total - - aggregateBy - type: object - description: Returns aggregated event data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: >- - Aggregate events by single or multiple columns with optional date - filtering - tags: - - Event - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/attackers: - get: - operationId: get_AttackerList - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: >- - Array of dataset IDs to query attackers from. If not provided, uses - the default dataset. - in: query - name: datasetIds - schema: - description: >- - Array of dataset IDs to query attackers from. If not provided, - uses the default dataset. - items: - type: string - type: array - explode: true - responses: - '200': - content: - application/json: - schema: - properties: - items: - properties: - type: - type: string - required: - - type - type: object - type: - type: string - required: - - type - - items - type: object - description: Returns a list of attackers. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Lists attackers across multiple datasets - tags: - - Attacker - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - threat_events - - attackers - method: list - /accounts/{account_id}/cloudforce-one/events/categories: - get: - operationId: get_CategoryList - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: >- - Array of dataset IDs to query categories from. If not provided, uses - the default dataset. - in: query - name: datasetIds - schema: - description: >- - Array of dataset IDs to query categories from. If not provided, - uses the default dataset. - items: - type: string - type: array - explode: true - responses: - '200': - content: - application/json: - schema: - items: - properties: - killChain: - type: number - mitreAttack: - items: - type: string - type: array - mitreCapec: - items: - type: string - type: array - name: - type: string - shortname: - type: string - uuid: - type: string - required: - - uuid - - name - - killChain - type: object - type: array - description: Returns a list of categories. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Lists categories across multiple datasets - tags: - - Category - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - threat_events - - categories - method: list - /accounts/{account_id}/cloudforce-one/events/categories/catalog: - get: - operationId: get_CategoryListComplete - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - items: - properties: - killChain: - type: number - mitreAttack: - items: - type: string - type: array - mitreCapec: - items: - type: string - type: array - name: - type: string - shortname: - type: string - uuid: - type: string - required: - - uuid - - name - - killChain - type: object - type: array - description: Returns a list of categories. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Lists categories - tags: - - Category - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/categories/create: - post: - operationId: post_CategoryCreate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - killChain: - type: number - mitreAttack: - items: - type: string - type: array - mitreCapec: - items: - type: string - type: array - name: - type: string - shortname: - type: string - required: - - name - - killChain - type: object - responses: - '200': - content: - application/json: - schema: - properties: - killChain: - type: number - mitreAttack: - items: - type: string - type: array - mitreCapec: - items: - type: string - type: array - name: - type: string - shortname: - type: string - uuid: - type: string - required: - - uuid - - name - - killChain - type: object - description: Returns the created category. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Creates a new category - tags: - - Category - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - threat_events - - categories - method: create - /accounts/{account_id}/cloudforce-one/events/categories/{category_id}: - delete: - operationId: delete_CategoryDelete - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Category UUID. - in: path - name: category_id - schema: - description: Category UUID. - format: uuid - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - uuid: - type: string - required: - - uuid - type: object - description: Returns the uuid of the deleted category. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Deletes a category - tags: - - Category - x-api-token-group: - - Cloudforce One Write - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - threat_events - - categories - method: delete - get: - operationId: get_CategoryRead - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Category UUID. - in: path - name: category_id - schema: - description: Category UUID. - format: uuid - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - killChain: - type: number - mitreAttack: - items: - type: string - type: array - mitreCapec: - items: - type: string - type: array - name: - type: string - shortname: - type: string - uuid: - type: string - required: - - uuid - - name - - killChain - type: object - description: Returns a category. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Reads a category - tags: - - Category - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - threat_events - - categories - method: get - patch: - operationId: patch_CategoryUpdate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Category UUID. - in: path - name: category_id - schema: - description: Category UUID. - format: uuid - type: string - required: true - requestBody: - content: - application/json: - schema: - properties: - killChain: - type: number - mitreAttack: - items: - type: string - type: array - mitreCapec: - items: - type: string - type: array - name: - type: string - shortname: - type: string - type: object - responses: - '200': - content: - application/json: - schema: - properties: - killChain: - type: number - mitreAttack: - items: - type: string - type: array - mitreCapec: - items: - type: string - type: array - name: - type: string - shortname: - type: string - uuid: - type: string - required: - - uuid - - name - - killChain - type: object - description: Returns the updated category. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Updates a category - tags: - - Category - x-api-token-group: - - Cloudforce One Write - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - threat_events - - categories - method: edit - post: - operationId: post_CategoryUpdate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Category UUID. - in: path - name: category_id - schema: - description: Category UUID. - format: uuid - type: string - required: true - requestBody: - content: - application/json: - schema: - properties: - killChain: - type: number - mitreAttack: - items: - type: string - type: array - mitreCapec: - items: - type: string - type: array - name: - type: string - shortname: - type: string - type: object - responses: - '200': - content: - application/json: - schema: - properties: - killChain: - type: number - mitreAttack: - items: - type: string - type: array - mitreCapec: - items: - type: string - type: array - name: - type: string - shortname: - type: string - uuid: - type: string - required: - - uuid - - name - - killChain - type: object - description: Returns the updated category. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Updates a category - tags: - - Category - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/countries: - get: - operationId: get_CountryRead - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - items: - properties: - result: - items: - properties: - alpha3: - type: string - name: - type: string - required: - - name - - alpha3 - type: object - type: array - success: - type: string - required: - - success - - result - type: object - type: array - description: Returns the long and short country code for every country. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Retrieves countries information for all countries - tags: - - Country - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - threat_events - - countries - method: list - /accounts/{account_id}/cloudforce-one/events/create: - post: - description: >- - To create a dataset, see the [`Create - Dataset`](https://developers.cloudflare.com/api/resources/cloudforce_one/subresources/threat_events/subresources/datasets/methods/create/) - endpoint. When `datasetId` parameter is unspecified, it will be created - in a default dataset named `Cloudforce One Threat Events`. - operationId: post_EventCreate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - accountId: - type: number - attacker: - nullable: true - type: string - attackerCountry: - type: string - category: - type: string - datasetId: - type: string - date: - format: date-time - type: string - event: - type: string - indicator: - type: string - indicatorType: - type: string - indicators: - description: >- - Array of indicators for this event. Supports multiple - indicators per event for complex scenarios. - items: - properties: - indicatorType: - description: The type of indicator (e.g., DOMAIN, IP, JA3, HASH) - type: string - value: - description: >- - The indicator value (e.g., domain name, IP address, - hash) - type: string - required: - - value - - indicatorType - type: object - type: array - insight: - type: string - raw: - properties: - data: - nullable: true - type: object - source: - type: string - tlp: - type: string - required: - - data - type: object - tags: - items: - type: string - type: array - targetCountry: - type: string - targetIndustry: - type: string - tlp: - type: string - required: - - date - - category - - event - - tlp - - raw - type: object - responses: - '200': - content: - application/json: - schema: - properties: - attacker: - type: string - attackerCountry: - type: string - category: - type: string - datasetId: - type: string - date: - type: string - event: - type: string - hasChildren: - type: boolean - indicator: - type: string - indicatorType: - type: string - indicatorTypeId: - type: number - insight: - type: string - killChain: - type: number - mitreAttack: - items: - type: string - type: array - mitreCapec: - items: - type: string - type: array - numReferenced: - type: number - numReferences: - type: number - rawId: - type: string - referenced: - items: - type: string - type: array - referencedIds: - items: - type: number - type: array - references: - items: - type: string - type: array - referencesIds: - items: - type: number - type: array - releasabilityId: - type: string - tags: - items: - type: string - type: array - targetCountry: - type: string - targetIndustry: - type: string - tlp: - type: string - uuid: - type: string - required: - - uuid - - date - - targetCountry - - attacker - - attackerCountry - - targetIndustry - - rawId - - indicatorTypeId - - indicator - - event - - numReferenced - - numReferences - - tlp - - category - - indicatorType - - referenced - - references - - tags - - killChain - - mitreAttack - - mitreCapec - - referencedIds - - referencesIds - - hasChildren - - datasetId - type: object - description: Returns the created event. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Creates a new event - tags: - - Event - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/create/bulk: - post: - description: >- - The `datasetId` parameter must be defined. To list existing datasets - (and their IDs) in your account, use the [`List - Datasets`](https://developers.cloudflare.com/api/resources/cloudforce_one/subresources/threat_events/subresources/datasets/methods/list/) - endpoint. - operationId: post_EventCreateBulk - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - data: - items: - properties: - accountId: - type: number - attacker: - nullable: true - type: string - attackerCountry: - type: string - category: - type: string - datasetId: - type: string - date: - format: date-time - type: string - event: - type: string - indicator: - type: string - indicatorType: - type: string - indicators: - description: >- - Array of indicators for this event. Supports multiple - indicators per event for complex scenarios. - items: - properties: - indicatorType: - description: >- - The type of indicator (e.g., DOMAIN, IP, JA3, - HASH) - type: string - value: - description: >- - The indicator value (e.g., domain name, IP - address, hash) - type: string - required: - - value - - indicatorType - type: object - type: array - insight: - type: string - raw: - properties: - data: - nullable: true - type: object - source: - type: string - tlp: - type: string - required: - - data - type: object - tags: - items: - type: string - type: array - targetCountry: - type: string - targetIndustry: - type: string - tlp: - type: string - required: - - date - - category - - event - - tlp - - raw - type: object - type: array - datasetId: - type: string - includeCreatedEvents: - description: >- - When true, response includes array of created event UUIDs - and shard IDs. Useful for tracking which events were created - and where. - type: boolean - required: - - data - - datasetId - type: object - responses: - '202': - content: - application/json: - schema: - description: >- - Detailed result of bulk event creation with auto-tag - management - properties: - createBulkEventsRequestId: - description: Correlation ID for async indicator processing - format: uuid - type: string - createdEvents: - description: >- - Array of created events with UUIDs and shard locations. - Only present when includeCreatedEvents=true - items: - properties: - eventIndex: - description: Original index in the input data array - type: number - shardId: - description: Dataset ID of the shard where the event was created - type: string - uuid: - description: UUID of the created event - format: uuid - type: string - required: - - eventIndex - - uuid - - shardId - type: object - type: array - createdEventsCount: - description: Number of events created - type: number - createdTagsCount: - description: Number of new tags created in SoT - type: number - errorCount: - description: Number of errors encountered - type: number - errors: - description: Array of error details - items: - properties: - error: - description: Error message - type: string - eventIndex: - description: Index of the event that caused the error - type: number - required: - - eventIndex - - error - type: object - type: array - queuedIndicatorsCount: - description: Number of indicators queued for async processing - type: number - required: - - createdEventsCount - - queuedIndicatorsCount - - createdTagsCount - - errorCount - type: object - description: Accepted. Events created; indicators queued for async processing. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Creates bulk events - tags: - - Event - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - threat_events - method: bulk_create - /accounts/{account_id}/cloudforce-one/events/create/bulk/relationships: - post: - deprecated: true - description: This method is deprecated. Please use `event_create_bulk` instead - operationId: post_DOSEventCreateBulkWithRelationships - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - data: - items: - properties: - accountId: - type: number - attacker: - nullable: true - type: string - attackerCountry: - type: string - category: - type: string - datasetId: - type: string - date: - format: date-time - type: string - event: - type: string - indicator: - type: string - indicatorType: - type: string - indicators: - description: >- - Array of indicators for this event. Supports multiple - indicators per event for complex scenarios. - items: - properties: - indicatorType: - description: >- - The type of indicator (e.g., DOMAIN, IP, JA3, - HASH) - type: string - value: - description: >- - The indicator value (e.g., domain name, IP - address, hash) - type: string - required: - - value - - indicatorType - type: object - type: array - insight: - type: string - raw: - properties: - data: - nullable: true - type: object - source: - type: string - tlp: - type: string - required: - - data - type: object - tags: - items: - type: string - type: array - targetCountry: - type: string - targetIndustry: - type: string - tlp: - type: string - required: - - date - - category - - event - - tlp - - raw - type: object - type: array - datasetId: - type: string - required: - - data - - datasetId - type: object - responses: - '200': - content: - application/json: - schema: - description: Result of bulk relationship creation operation - properties: - createdEventsCount: - description: Number of events created - type: number - createdIndicatorsCount: - description: Number of indicators created - type: number - createdRelationshipsCount: - description: Number of relationships created - type: number - errorCount: - description: Number of errors encountered - type: number - errors: - description: Array of error details - items: - properties: - error: - description: Error message - type: string - eventIndex: - description: Index of the event that caused the error - type: number - required: - - eventIndex - - error - type: object - type: array - required: - - createdEventsCount - - createdIndicatorsCount - - createdRelationshipsCount - - errorCount - type: object - description: Returns the number of created bulk events with relationships. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Creates bulk DOS event with relationships and indicators - tags: - - Event - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/dataset: - get: - operationId: get_DatasetList - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - items: - properties: - isPublic: - type: boolean - name: - type: string - uuid: - type: string - required: - - uuid - - name - - isPublic - type: object - type: array - description: Returns a list of dataset in an account. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Lists all datasets in an account - tags: - - Dataset - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - threat_events - - datasets - method: list - /accounts/{account_id}/cloudforce-one/events/dataset/-/groups: - get: - description: List groups for an account - operationId: get_GroupList - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - items: - properties: - createdAt: - format: date-time - type: string - description: - type: string - name: - type: string - updatedAt: - format: date-time - type: string - uuid: - type: string - required: - - uuid - - name - - description - - createdAt - - updatedAt - type: object - type: array - description: Returns the list of groups. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: List groups for an account - tags: - - Groups - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - post: - description: Create a group - operationId: post_GroupCreate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - description: - type: string - name: - type: string - required: - - name - - description - type: object - responses: - '200': - content: - application/json: - schema: - properties: - createdAt: - format: date-time - type: string - description: - type: string - name: - type: string - updatedAt: - format: date-time - type: string - uuid: - type: string - required: - - uuid - - name - - description - - createdAt - - updatedAt - type: object - description: Returns the created group. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Create a group - tags: - - Groups - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/dataset/-/groups/{group_id}: - delete: - description: Delete a group for an account - operationId: delete_GroupDelete - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: group_id - in: path - required: true - description: The Access group ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - message: - type: string - success: - type: boolean - type: object - description: Group deleted successfully. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Delete a group for an account - tags: - - Groups - x-api-token-group: - - Cloudforce One Write - get: - description: Read a group for an account - operationId: get_GroupRead - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: group_id - in: path - required: true - description: The Access group ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - createdAt: - format: date-time - type: string - description: - type: string - members: - items: - properties: - accountId: - type: string - accountTag: - type: string - createdAt: - format: date-time - type: string - updatedAt: - format: date-time - type: string - uuid: - type: string - required: - - uuid - - accountId - type: object - type: array - name: - type: string - updatedAt: - format: date-time - type: string - uuid: - type: string - required: - - uuid - - name - - description - - createdAt - - updatedAt - - members - type: object - description: Return the group. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Read a group for an account - tags: - - Groups - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - put: - description: Update a group - operationId: put_GroupUpdate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: group_id - in: path - required: true - description: The Access group ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - description: - type: string - name: - type: string - required: - - name - - description - type: object - responses: - '200': - content: - application/json: - schema: - properties: - createdAt: - format: date-time - type: string - description: - type: string - name: - type: string - updatedAt: - format: date-time - type: string - uuid: - type: string - required: - - uuid - - name - - description - - createdAt - - updatedAt - type: object - description: Returns the updated group. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Update a group - tags: - - Groups - x-api-token-group: - - Cloudforce One Write - /accounts/{account_id}/cloudforce-one/events/dataset/-/groups/{group_id}/members: - get: - description: List group members - operationId: get_GroupMemberList - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: group_id - in: path - required: true - description: The Access group ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - items: - properties: - accountId: - type: string - accountTag: - type: string - createdAt: - format: date-time - type: string - updatedAt: - format: date-time - type: string - uuid: - type: string - required: - - uuid - - accountId - type: object - type: array - description: Returns the group members. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: List group members - tags: - - Groups - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - post: - description: Create a group member - operationId: post_GroupMemberCreate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: group_id - in: path - required: true - description: The Access group ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - accountId: - type: string - accountTag: - type: string - type: object - responses: - '200': - content: - application/json: - schema: - properties: - accountId: - type: string - accountTag: - type: string - createdAt: - format: date-time - type: string - updatedAt: - format: date-time - type: string - uuid: - type: string - required: - - uuid - - accountId - type: object - description: Returns the created group member. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Create a group member - tags: - - Groups - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/dataset/-/groups/{group_id}/members/{member_id}: - delete: - description: Delete a group member - operationId: delete_GroupMemberDelete - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: group_id - in: path - required: true - description: The Access group ID. - schema: - type: string - - name: member_id - in: path - required: true - description: The account member ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - message: - type: string - success: - type: boolean - type: object - description: Returns the created group member. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Delete a group member - tags: - - Groups - x-api-token-group: - - Cloudforce One Write - /accounts/{account_id}/cloudforce-one/events/dataset/create: - post: - operationId: post_DatasetCreate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - isPublic: - description: >- - If true, then anyone can search the dataset. If false, then - its limited to the account. - type: boolean - name: - description: Used to describe the dataset within the account context. - minLength: 1 - type: string - required: - - name - - isPublic - type: object - responses: - '200': - content: - application/json: - schema: - properties: - isPublic: - type: boolean - name: - type: string - uuid: - type: string - required: - - uuid - - name - - isPublic - type: object - description: Returns dataset information. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Creates a dataset - tags: - - Dataset - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - threat_events - - datasets - method: create - /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}: - delete: - description: Deletes a dataset given a datasetId. - operationId: delete_DatasetDelete - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - name: - type: string - uuid: - type: string - required: - - uuid - - name - type: object - description: Returns the uuid and name of the deleted dataset. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Delete a dataset - tags: - - Dataset - x-api-token-group: - - Cloudforce One Write - get: - operationId: get_DatasetRead - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - isPublic: - type: boolean - name: - type: string - uuid: - type: string - required: - - uuid - - name - - isPublic - type: object - description: Returns a dataset. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Reads a dataset - tags: - - Dataset - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - threat_events - - datasets - method: get - patch: - operationId: patch_DatasetUpdate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - isPublic: - description: >- - If true, then anyone can search the dataset. If false, then - its limited to the account. - type: boolean - name: - description: Used to describe the dataset within the account context. - minLength: 1 - type: string - required: - - name - - isPublic - type: object - responses: - '200': - content: - application/json: - schema: - properties: - isPublic: - type: boolean - name: - type: string - uuid: - type: string - required: - - uuid - - name - - isPublic - type: object - description: Returns dataset information. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Updates an existing dataset - tags: - - Dataset - x-api-token-group: - - Cloudforce One Write - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - threat_events - - datasets - method: edit - post: - operationId: post_DatasetUpdate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - isPublic: - description: >- - If true, then anyone can search the dataset. If false, then - its limited to the account. - type: boolean - name: - description: Used to describe the dataset within the account context. - minLength: 1 - type: string - required: - - name - - isPublic - type: object - responses: - '200': - content: - application/json: - schema: - properties: - isPublic: - type: boolean - name: - type: string - uuid: - type: string - required: - - uuid - - name - - isPublic - type: object - description: Returns dataset information. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Updates an existing dataset - tags: - - Dataset - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}/copy: - post: - operationId: post_EventCopyToNewDS - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - - description: >- - If true, copies raw data to the destination dataset. Default is - false (raw data is stripped/not copied). - in: query - name: keepRawData - schema: - description: >- - If true, copies raw data to the destination dataset. Default is - false (raw data is stripped/not copied). - type: boolean - requestBody: - content: - application/json: - schema: - properties: - destDatasetId: - type: string - eventIds: - items: - type: string - type: array - required: - - destDatasetId - - eventIds - type: object - responses: - '200': - content: - application/json: - schema: - properties: - copied: - description: Number of events successfully copied - type: number - indicatorsCopied: - description: Number of indicators successfully copied - type: number - insertFailures: - description: Array of events that failed to insert into destination - items: - properties: - index: - description: Index of the event that failed to insert - type: number - reason: - description: Reason for the failure - type: string - required: - - index - - reason - type: object - type: array - relationshipsCopied: - description: Number of relationships successfully copied - type: number - required: - - copied - - indicatorsCopied - - relationshipsCopied - type: object - description: Returns the number of copied events - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Copies specified events from one dataset to another dataset - tags: - - Event - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}/events/{event_id}: - get: - description: Retrieves a specific event by its UUID. - operationId: get_EventRead - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - - name: event_id - in: path - required: true - description: The event ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - attacker: - type: string - attackerCountry: - type: string - category: - type: string - datasetId: - type: string - date: - type: string - event: - type: string - hasChildren: - type: boolean - indicator: - type: string - indicatorType: - type: string - indicatorTypeId: - type: number - insight: - type: string - killChain: - type: number - mitreAttack: - items: - type: string - type: array - mitreCapec: - items: - type: string - type: array - numReferenced: - type: number - numReferences: - type: number - rawId: - type: string - referenced: - items: - type: string - type: array - referencedIds: - items: - type: number - type: array - references: - items: - type: string - type: array - referencesIds: - items: - type: number - type: array - releasabilityId: - type: string - tags: - items: - type: string - type: array - targetCountry: - type: string - targetIndustry: - type: string - tlp: - type: string - uuid: - type: string - required: - - uuid - - date - - targetCountry - - attacker - - attackerCountry - - targetIndustry - - rawId - - indicatorTypeId - - indicator - - event - - numReferenced - - numReferences - - tlp - - category - - indicatorType - - referenced - - references - - tags - - killChain - - mitreAttack - - mitreCapec - - referencedIds - - referencesIds - - hasChildren - - datasetId - type: object - description: Returns the event. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Reads an event - tags: - - Event - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}/indicatorTypes/create: - post: - description: >- - Creates a new indicator type and initializes its dedicated Durable - Object - operationId: post_IndicatorTypeCreate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - description: - description: Optional description for the indicator type - type: string - indicatorType: - description: >- - The indicator type to create (e.g., 'DOMAIN', 'IP', 'URL', - 'HASH', 'EMAIL') - maxLength: 50 - minLength: 1 - type: string - required: - - indicatorType - type: object - responses: - '200': - content: - application/json: - schema: - properties: - durableObjectId: - type: string - indicatorType: - type: string - message: - type: string - required: - - indicatorType - - message - - durableObjectId - type: object - description: Indicator type created successfully - '400': - content: - application/json: - schema: - properties: - content: - properties: - application/json: - properties: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - required: - - schema - type: object - required: - - application/json - type: object - description: - type: string - required: - - description - - content - type: object - description: Bad Request - '500': - content: - application/json: - schema: - properties: - content: - properties: - application/json: - properties: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - required: - - schema - type: object - required: - - application/json - type: object - description: - type: string - required: - - description - - content - type: object - description: Internal Server Error - security: - - api_token: [] - summary: Create a new indicator type - tags: - - Indicators - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}/indicators: - get: - deprecated: true - description: >- - This method is deprecated. Please use /events/indicators to retrieve a - paginated list of indicators. - operationId: get_IndicatorListLegacy - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - - in: query - name: page - schema: - type: number - - in: query - name: pageSize - schema: - type: number - - description: Filter by indicator value (substring match) - in: query - name: name - schema: - description: Filter by indicator value (substring match) - type: string - - in: query - name: indicatorType - schema: - type: string - - description: >- - Filter indicators by related event UUID(s). Multiple UUIDs can be - provided by repeating the parameter. - in: query - name: relatedEvent - schema: - description: >- - Filter indicators by related event UUID(s). Multiple UUIDs can be - provided by repeating the parameter. - items: - type: string - type: array - explode: true - responses: - '200': - content: - application/json: - schema: - properties: - indicators: - items: - properties: - createdAt: - format: date-time - type: string - datasetId: - description: >- - The dataset ID this indicator belongs to. Included - in list responses. - type: string - indicatorType: - type: string - relatedEvents: - items: - properties: - datasetId: - type: string - eventId: - type: string - required: - - datasetId - - eventId - type: object - type: array - tags: - items: - properties: - categoryName: - type: string - uuid: - type: string - value: - type: string - type: object - type: array - updatedAt: - format: date-time - type: string - uuid: - type: string - value: - type: string - required: - - uuid - - indicatorType - - value - - createdAt - - updatedAt - type: object - type: array - pagination: - properties: - page: - type: number - pageSize: - type: number - totalCount: - type: number - totalPages: - type: number - required: - - page - - pageSize - - totalCount - - totalPages - type: object - required: - - indicators - - pagination - type: object - description: Returns a list of indicators. - security: - - api_token: [] - summary: Lists indicators - tags: - - Indicator - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}/indicators/bulk: - post: - description: >- - Creates multiple indicators at once with their respective types and - related datasets. - operationId: post_IndicatorCreateBulk - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - autoCreateType: - description: >- - Global flag to automatically create indicator types if they - don't exist. Individual indicators can override this with - their own autoCreateType flag. - type: boolean - indicators: - items: - properties: - autoCreateType: - description: >- - If true, automatically create the indicator type if it - doesn't exist. If false (default), throw an error when - the indicator type doesn't exist. - type: boolean - indicatorType: - type: string - relatedEvents: - items: - properties: - datasetId: - type: string - eventId: - type: string - required: - - datasetId - - eventId - type: object - type: array - tags: - items: - type: string - properties: - categoryName: - type: string - value: - type: string - required: - - value - type: array - value: - type: string - required: - - indicatorType - - value - type: object - type: array - required: - - indicators - type: object - responses: - '200': - content: - application/json: - schema: - description: Number of created indicators - type: number - description: Returns the number of created indicators. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Creates multiple indicators in bulk - tags: - - Indicator - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}/indicators/create: - post: - description: Creates a new indicator with the specified type and related datasets. - operationId: post_IndicatorCreate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - autoCreateType: - description: >- - If true, automatically create the indicator type if it - doesn't exist. If false (default), throw an error when the - indicator type doesn't exist. - type: boolean - indicatorType: - type: string - relatedEvents: - items: - properties: - datasetId: - type: string - eventId: - type: string - required: - - datasetId - - eventId - type: object - type: array - tags: - items: - type: string - properties: - categoryName: - type: string - value: - type: string - required: - - value - type: array - value: - type: string - required: - - indicatorType - - value - type: object - responses: - '200': - content: - application/json: - schema: - properties: - createdAt: - format: date-time - type: string - datasetId: - description: >- - The dataset ID this indicator belongs to. Included in list - responses. - type: string - indicatorType: - type: string - relatedEvents: - items: - properties: - datasetId: - type: string - eventId: - type: string - required: - - datasetId - - eventId - type: object - type: array - tags: - items: - properties: - categoryName: - type: string - uuid: - type: string - value: - type: string - type: object - type: array - updatedAt: - format: date-time - type: string - uuid: - type: string - value: - type: string - required: - - uuid - - indicatorType - - value - - createdAt - - updatedAt - type: object - description: Returns the created indicator. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Creates a new indicator - tags: - - Indicator - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}/indicators/tags: - get: - description: >- - Returns all mirrored tags from the indicator dataset (DO mirror table). - No pagination. - operationId: get_IndicatorTagsList - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - description: Array of mirror tag rows - items: - type: object - type: array - description: Returns an array of mirrored tags. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - '500': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: List mirrored tags for an indicator dataset - tags: - - Indicator - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}/indicators/{indicator_id}: - delete: - description: Deletes a specific indicator by its UUID. - operationId: delete_IndicatorDelete - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - - description: Indicator UUID. - in: path - name: indicator_id - schema: - description: Indicator UUID. - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - message: - type: string - success: - type: boolean - type: object - description: Indicator deleted successfully. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Deletes an indicator - tags: - - Indicator - x-api-token-group: - - Cloudforce One Write - get: - description: Retrieves a specific indicator by its UUID. - operationId: get_IndicatorRead - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - - description: Indicator UUID. - in: path - name: indicator_id - schema: - description: Indicator UUID. - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - createdAt: - format: date-time - type: string - datasetId: - description: >- - The dataset ID this indicator belongs to. Included in list - responses. - type: string - indicatorType: - type: string - relatedEvents: - items: - properties: - datasetId: - type: string - eventId: - type: string - required: - - datasetId - - eventId - type: object - type: array - tags: - items: - properties: - categoryName: - type: string - uuid: - type: string - value: - type: string - type: object - type: array - updatedAt: - format: date-time - type: string - uuid: - type: string - value: - type: string - required: - - uuid - - indicatorType - - value - - createdAt - - updatedAt - type: object - description: Returns the indicator. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Reads an indicator - tags: - - Indicator - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - patch: - description: Updates an existing indicator's properties. - operationId: patch_IndicatorUpdate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - - description: Indicator UUID. - in: path - name: indicator_id - schema: - description: Indicator UUID. - type: string - required: true - requestBody: - content: - application/json: - schema: - properties: - indicatorType: - type: string - relatedEvents: - items: - properties: - datasetId: - type: string - eventId: - type: string - required: - - datasetId - - eventId - type: object - type: array - tags: - items: - type: string - properties: - categoryName: - type: string - value: - type: string - required: - - value - type: array - value: - type: string - type: object - responses: - '200': - content: - application/json: - schema: - properties: - createdAt: - format: date-time - type: string - datasetId: - description: >- - The dataset ID this indicator belongs to. Included in list - responses. - type: string - indicatorType: - type: string - relatedEvents: - items: - properties: - datasetId: - type: string - eventId: - type: string - required: - - datasetId - - eventId - type: object - type: array - tags: - items: - properties: - categoryName: - type: string - uuid: - type: string - value: - type: string - type: object - type: array - updatedAt: - format: date-time - type: string - uuid: - type: string - value: - type: string - required: - - uuid - - indicatorType - - value - - createdAt - - updatedAt - type: object - description: Returns the updated indicator. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Updates an indicator - tags: - - Indicator - x-api-token-group: - - Cloudforce One Write - /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}/move: - post: - operationId: post_EventMoveToNewDS - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - - description: >- - If true, copies raw data to the destination dataset. Default is - false (raw data is stripped/not copied). Raw data is always deleted - from the source. - in: query - name: keepRawData - schema: - description: >- - If true, copies raw data to the destination dataset. Default is - false (raw data is stripped/not copied). Raw data is always - deleted from the source. - type: boolean - requestBody: - content: - application/json: - schema: - properties: - destDatasetId: - type: string - eventIds: - items: - type: string - type: array - required: - - destDatasetId - - eventIds - type: object - responses: - '200': - content: - application/json: - schema: - properties: - deletionFailures: - description: Array of source datasets where deletion failed - items: - properties: - datasetId: - description: Dataset ID where deletion failed - type: string - reason: - description: Reason for the deletion failure - type: string - required: - - datasetId - - reason - type: object - type: array - indicatorsCopied: - description: Number of indicators successfully copied - type: number - insertFailures: - description: Array of events that failed to insert into destination - items: - properties: - index: - description: Index of the event that failed to insert - type: number - reason: - description: Reason for the failure - type: string - required: - - index - - reason - type: object - type: array - moved: - description: Number of events successfully moved - type: number - relationshipsCopied: - description: Number of relationships successfully copied - type: number - required: - - moved - - indicatorsCopied - - relationshipsCopied - type: object - description: Returns the number of moved events - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Moves specified events from one dataset to another dataset - tags: - - Event - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}/permissions: - get: - description: List permissions - operationId: get_PermissionList - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - items: - properties: - createdAt: - format: date-time - type: string - resourceId: - description: >- - The resource ID this permission applies to account_id or - group_id - type: string - resourceType: - enum: - - dataset - type: string - role: - enum: - - read - - write - type: string - subjectId: - type: string - subjectType: - enum: - - account - - group - type: string - updatedAt: - format: date-time - type: string - uuid: - type: string - required: - - uuid - - subjectType - - subjectId - - role - - resourceType - - createdAt - - updatedAt - type: object - type: array - description: Returns the list of permissions. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: List permissions for dataset - tags: - - Permissions - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - post: - description: Create a permission - operationId: post_PermissionCreate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - role: - enum: - - read - - write - type: string - subjectId: - type: string - subjectType: - enum: - - account - - group - type: string - required: - - subjectType - - subjectId - - role - type: object - responses: - '200': - content: - application/json: - schema: - properties: - createdAt: - format: date-time - type: string - resourceId: - description: >- - The resource ID this permission applies to account_id or - group_id - type: string - resourceType: - enum: - - dataset - type: string - role: - enum: - - read - - write - type: string - subjectId: - type: string - subjectType: - enum: - - account - - group - type: string - updatedAt: - format: date-time - type: string - uuid: - type: string - required: - - uuid - - subjectType - - subjectId - - role - - resourceType - - createdAt - - updatedAt - type: object - description: Returns the created permission. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Create a permission for dataset - tags: - - Permissions - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}/permissions/{grant_id}: - delete: - description: Delete a permission - operationId: delete_PermissionDelete - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - - in: path - name: grant_id - schema: - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - message: - type: string - success: - type: boolean - type: object - description: Permission deleted successfully - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Delete a permission for dataset - tags: - - Permissions - x-api-token-group: - - Cloudforce One Write - put: - description: Update a permission - operationId: put_PermissionUpdate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - - in: path - name: grant_id - schema: - type: string - required: true - requestBody: - content: - application/json: - schema: - properties: - role: - enum: - - read - - write - type: string - required: - - role - type: object - responses: - '200': - content: - application/json: - schema: - properties: - message: - type: string - success: - type: boolean - type: object - description: Permission updated successfully - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Update a permission for dataset - tags: - - Permissions - x-api-token-group: - - Cloudforce One Write - /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}/tags/{tag_uuid}/indicators: - get: - description: >- - Returns indicators associated with the provided tag UUID across all - indicator datasets, with pagination. - operationId: get_TagIndicatorsList - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Tag UUID. - in: path - name: tag_uuid - schema: - description: Tag UUID. - type: string - required: true - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - - in: query - name: page - schema: - type: number - - in: query - name: pageSize - schema: - type: number - - in: query - name: indicatorType - schema: - type: string - - description: >- - Filter indicators by related event UUID(s). Multiple UUIDs can be - provided by repeating the parameter. - in: query - name: relatedEvent - schema: - description: >- - Filter indicators by related event UUID(s). Multiple UUIDs can be - provided by repeating the parameter. - items: - type: string - type: array - explode: true - responses: - '200': - content: - application/json: - schema: - properties: - indicators: - items: - properties: - createdAt: - format: date-time - type: string - datasetId: - description: >- - The dataset ID this indicator belongs to. Included - in list responses. - type: string - indicatorType: - type: string - relatedEvents: - items: - properties: - datasetId: - type: string - eventId: - type: string - required: - - datasetId - - eventId - type: object - type: array - tags: - items: - properties: - categoryName: - type: string - uuid: - type: string - value: - type: string - type: object - type: array - updatedAt: - format: date-time - type: string - uuid: - type: string - value: - type: string - required: - - uuid - - indicatorType - - value - - createdAt - - updatedAt - type: object - type: array - pagination: - properties: - page: - type: number - pageSize: - type: number - totalCount: - type: number - totalPages: - type: number - required: - - page - - pageSize - - totalCount - - totalPages - type: object - required: - - indicators - - pagination - type: object - description: Returns a paginated list of indicators. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - '500': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: List indicators related to a tag - tags: - - Tag - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}/targetIndustries: - get: - operationId: get_TargetIndustryListByDataset - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - items: - properties: - type: - type: string - required: - - type - type: object - type: - type: string - required: - - type - - items - type: object - description: Returns a list of target industries for the dataset. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Lists all target industries for a specific dataset - tags: - - Target Industry - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/datasets/populate: - post: - operationId: post_DatasetPopulate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - properties: - properties: - accountId: - properties: - type: - type: string - required: - - type - type: object - datasets: - properties: - items: - properties: - properties: - properties: - attackers: - properties: - properties: - properties: - created: - properties: - type: - type: string - required: - - type - type: object - errors: - properties: - items: - properties: - type: - type: string - required: - - type - type: object - type: - type: string - required: - - type - - items - type: object - found: - properties: - items: - properties: - type: - type: string - required: - - type - type: object - type: - type: string - required: - - type - - items - type: object - required: - - found - - created - - errors - type: object - type: - type: string - required: - - type - - properties - type: object - categories: - properties: - properties: - properties: - created: - properties: - type: - type: string - required: - - type - type: object - errors: - properties: - items: - properties: - type: - type: string - required: - - type - type: object - type: - type: string - required: - - type - - items - type: object - found: - properties: - items: - properties: - type: - type: string - required: - - type - type: object - type: - type: string - required: - - type - - items - type: object - required: - - found - - created - - errors - type: object - type: - type: string - required: - - type - - properties - type: object - datasetId: - properties: - type: - type: string - required: - - type - type: object - indicatorTypes: - properties: - properties: - properties: - created: - properties: - type: - type: string - required: - - type - type: object - errors: - properties: - items: - properties: - type: - type: string - required: - - type - type: object - type: - type: string - required: - - type - - items - type: object - found: - properties: - items: - properties: - type: - type: string - required: - - type - type: object - type: - type: string - required: - - type - - items - type: object - required: - - found - - created - - errors - type: object - type: - type: string - required: - - type - - properties - type: object - processingTimeMs: - properties: - type: - type: string - required: - - type - type: object - targetIndustries: - properties: - properties: - properties: - created: - properties: - type: - type: string - required: - - type - type: object - errors: - properties: - items: - properties: - type: - type: string - required: - - type - type: object - type: - type: string - required: - - type - - items - type: object - found: - properties: - items: - properties: - type: - type: string - required: - - type - type: object - type: - type: string - required: - - type - - items - type: object - required: - - found - - created - - errors - type: object - type: - type: string - required: - - type - - properties - type: object - totalProcessed: - properties: - type: - type: string - required: - - type - type: object - required: - - datasetId - - indicatorTypes - - targetIndustries - - categories - - attackers - - totalProcessed - - processingTimeMs - type: object - type: - type: string - required: - - type - - properties - type: object - type: - type: string - required: - - type - - items - type: object - errors: - properties: - items: - properties: - type: - type: string - required: - - type - type: object - type: - type: string - required: - - type - - items - type: object - summary: - properties: - properties: - properties: - failedDatasets: - properties: - type: - type: string - required: - - type - type: object - successfulDatasets: - properties: - type: - type: string - required: - - type - type: object - totalDatasets: - properties: - type: - type: string - required: - - type - type: object - totalIndicatorTypes: - properties: - type: - type: string - required: - - type - type: object - totalProcessingTimeMs: - properties: - type: - type: string - required: - - type - type: object - required: - - totalDatasets - - successfulDatasets - - failedDatasets - - totalIndicatorTypes - - totalProcessingTimeMs - type: object - type: - type: string - required: - - type - - properties - type: object - required: - - accountId - - datasets - - summary - - errors - type: object - type: - type: string - required: - - type - - properties - type: object - description: Returns population results with counts and any errors - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: >- - Populate dataset-specific lookup tables from existing Events data with - batch processing - tags: - - Datasets - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/event_tag/{event_id}: - delete: - operationId: delete_EventTagDelete - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: event_id - in: path - required: true - description: The event ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - success: - type: boolean - required: - - success - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Returns success if operation succeeded. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Removes a tag from an event - tags: - - Event - x-api-token-group: - - Cloudforce One Write - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - threat_events - - event_tags - method: delete - /accounts/{account_id}/cloudforce-one/events/event_tag/{event_id}/create: - post: - operationId: post_EventTagCreate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: event_id - in: path - required: true - description: The event ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - tags: - items: - type: string - type: array - required: - - tags - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - success: - type: boolean - required: - - success - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Returns success if operation succeeded. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Adds a tag to an event - tags: - - Event - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - threat_events - - event_tags - method: create - /accounts/{account_id}/cloudforce-one/events/graphql: - post: - description: >- - Execute GraphQL aggregations over threat events. Supports - multi-dimensional group-bys, optional date range filtering, and - multi-dataset aggregation. - operationId: post_EventGraphQL - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - data: - nullable: true - type: object - errors: - items: - type: object - nullable: true - type: array - type: object - description: GraphQL response payload (data and errors). - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: GraphQL endpoint for event aggregation - tags: - - Event - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/indicator-types: - get: - operationId: get_IndicatorTypesList - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: >- - Array of dataset IDs to query indicator types from. If not provided, - queries all datasets for the account. - in: query - name: datasetIds - schema: - description: >- - Array of dataset IDs to query indicator types from. If not - provided, queries all datasets for the account. - items: - type: string - type: array - explode: true - responses: - '200': - content: - application/json: - schema: - properties: - items: - properties: - type: - type: string - required: - - type - type: object - type: - type: string - required: - - type - - items - type: object - description: Returns a list of indicator types. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Lists indicator types across multiple datasets - tags: - - Indicator Types - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/indicatorTypes: - get: - deprecated: true - description: >- - This Method is deprecated. Please use - /events/dataset/:dataset_id/indicatorTypes instead. - operationId: get_LegacyIndicatorTypesList - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - items: - properties: - type: - type: string - required: - - type - type: object - type: - type: string - required: - - type - - items - type: object - description: Returns a list of indicator types. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Lists all indicator types - tags: - - Indicator Types - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - threat_events - - indicator_types - method: list - /accounts/{account_id}/cloudforce-one/events/indicators: - get: - description: >- - Retrieves a paginated list of indicators across specified datasets. Use - datasetIds=all or datasetIds=* to query all datasets for the account. If - no datasetIds provided, uses the default dataset. - operationId: get_IndicatorList - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: >- - Dataset IDs to query indicators from (array of UUIDs), or special - value 'all' or '*' to query all datasets. If not provided, uses the - default dataset. - in: query - name: datasetIds - schema: - description: >- - Dataset IDs to query indicators from (array of UUIDs), or special - value 'all' or '*' to query all datasets. If not provided, uses - the default dataset. - items: - type: string - type: array - explode: true - - in: query - name: page - schema: - type: number - - in: query - name: pageSize - schema: - type: number - - description: >- - Structured search as a JSON array of {field, op, value} objects. - Searchable fields: value, indicatorType. Supports operators: equals, - not, contains, startsWith, endsWith, gt, lt, gte, lte, like, in, - find. Use the 'in' operator with an array value to bulk-check up to - 100 indicators in a single request, e.g. - search=[{"field":"value","op":"in","value":["evil.com","bad.org"]}]. - Multiple conditions are AND'd together. Max 10 conditions per - request. - in: query - name: search - schema: - description: >- - Structured search as a JSON array of {field, op, value} objects. - Searchable fields: value, indicatorType. Supports operators: - equals, not, contains, startsWith, endsWith, gt, lt, gte, lte, - like, in, find. Use the 'in' operator with an array value to - bulk-check up to 100 indicators in a single request, e.g. - search=[{"field":"value","op":"in","value":["evil.com","bad.org"]}]. - Multiple conditions are AND'd together. Max 10 conditions per - request. - items: - properties: - field: - description: >- - The indicator field to search on. Allowed: value, - indicatorType. - enum: - - value - - indicatorType - type: string - op: - description: >- - Search operator. Use 'in' for bulk lookup of up to 100 - values at once, e.g. {field:'value', op:'in', - value:['evil.com','bad.org']}. - enum: - - equals - - not - - gt - - gte - - lt - - lte - - like - - contains - - startsWith - - endsWith - - in - - find - type: string - value: - description: >- - Search value. String for most operators. Array of strings - for 'in' operator (max 100 items). - type: string - items: - type: string - required: - - field - - op - - value - type: object - type: array - explode: true - - description: >- - Filter indicators by value using substring match (LIKE). Legacy - alternative to structured search. - in: query - name: name - schema: - description: >- - Filter indicators by value using substring match (LIKE). Legacy - alternative to structured search. - type: string - - in: query - name: indicatorType - schema: - type: string - - description: Filter by related event IDs - in: query - name: relatedEvents - schema: - description: Filter by related event IDs - items: - type: string - type: array - explode: true - - description: >- - Filter by tag values or UUIDs. Indicators must have at least one of - the specified tags (OR logic). Supports both tag UUID and tag value. - in: query - name: tags - schema: - description: >- - Filter by tag values or UUIDs. Indicators must have at least one - of the specified tags (OR logic). Supports both tag UUID and tag - value. - items: - type: string - type: array - explode: true - - description: >- - Filter indicators created on or after this date. Must use ISO 8601 - format (e.g., '2024-01-15T00:00:00Z'). - in: query - name: createdAfter - schema: - description: >- - Filter indicators created on or after this date. Must use ISO 8601 - format (e.g., '2024-01-15T00:00:00Z'). - format: date-time - type: string - - description: >- - Filter indicators created on or before this date. Must use ISO 8601 - format (e.g., '2024-12-31T23:59:59Z'). - in: query - name: createdBefore - schema: - description: >- - Filter indicators created on or before this date. Must use ISO - 8601 format (e.g., '2024-12-31T23:59:59Z'). - format: date-time - type: string - - description: >- - Limit the number of related events returned per indicator. Default: - 2. Set to 0 for none, -1 for all events. - in: query - name: relatedEventsLimit - schema: - description: >- - Limit the number of related events returned per indicator. - Default: 2. Set to 0 for none, -1 for all events. - type: number - - description: >- - Whether to include full tag details for each indicator. Defaults to - true. - in: query - name: includeTags - schema: - description: >- - Whether to include full tag details for each indicator. Defaults - to true. - type: boolean - - description: >- - Whether to compute accurate total count via COUNT(*). Defaults to - false for performance. When false, total_count is an approximation. - in: query - name: includeTotalCount - schema: - description: >- - Whether to compute accurate total count via COUNT(*). Defaults to - false for performance. When false, total_count is an - approximation. - type: boolean - - description: >- - Output format for indicator data. 'json' returns the default format, - 'stix2' returns STIX 2.1 Indicator SDOs. - in: query - name: format - schema: - description: >- - Output format for indicator data. 'json' returns the default - format, 'stix2' returns STIX 2.1 Indicator SDOs. - enum: - - json - - stix2 - type: string - responses: - '200': - content: - application/json: - schema: - properties: - properties: - properties: - indicators: - properties: - items: - properties: - createdAt: - format: date-time - type: string - datasetId: - description: >- - The dataset ID this indicator belongs to. - Included in list responses. - type: string - indicatorType: - type: string - relatedEvents: - items: - properties: - datasetId: - type: string - eventId: - type: string - required: - - datasetId - - eventId - type: object - type: array - tags: - items: - properties: - categoryName: - type: string - uuid: - type: string - value: - type: string - type: object - type: array - updatedAt: - format: date-time - type: string - uuid: - type: string - value: - type: string - required: - - uuid - - indicatorType - - value - - createdAt - - updatedAt - type: object - type: - type: string - required: - - type - - items - type: object - pagination: - properties: - properties: - properties: - count: - properties: - type: - type: string - required: - - type - type: object - page: - properties: - type: - type: string - required: - - type - type: object - per_page: - properties: - type: - type: string - required: - - type - type: object - total_count: - properties: - type: - type: string - required: - - type - type: object - required: - - count - - page - - per_page - - total_count - type: object - type: - type: string - required: - - type - - properties - type: object - required: - - indicators - - pagination - type: object - type: - type: string - required: - - type - - properties - type: object - description: Returns a paginated list of indicators. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Lists indicators across multiple datasets - tags: - - Indicator - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/queries: - get: - description: Retrieve all saved event queries for the account - operationId: get_EventQueryList - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - items: - properties: - account_id: - description: Account ID - type: integer - alert_enabled: - description: Whether alerts are enabled - type: boolean - alert_rollup_enabled: - description: Whether alert rollup is enabled - type: boolean - created_at: - description: Creation timestamp - type: string - readOnly: true - custom_threat_feed_id: - description: Intel Indicator Feed ID (numeric) - nullable: true - type: integer - id: - description: Unique identifier for the saved query - type: integer - name: - description: Name of the saved query - type: string - query_json: - description: JSON string containing the query parameters - type: string - rule_enabled: - description: Whether rule is enabled - type: boolean - rule_list_id: - description: WAF rules list ID for blocking - type: string - rule_scope: - description: Scope for the rule - type: string - updated_at: - description: Last update timestamp - type: string - readOnly: true - user_email: - description: Email of the user who created the query - type: string - required: - - id - - account_id - - name - - user_email - - query_json - - alert_enabled - - alert_rollup_enabled - - rule_enabled - - created_at - - updated_at - type: object - type: array - description: Returns a list of event queries. - '500': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: List all saved event queries - tags: - - Event - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/queries/create: - post: - description: Create a new saved event query for the account - operationId: post_EventQueryCreate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - alert_enabled: - description: Enable alerts for this query - type: boolean - alert_rollup_enabled: - description: Enable alert rollup for this query - type: boolean - name: - description: Unique name for the saved query - type: string - query_json: - description: JSON string containing the query parameters - type: string - rule_enabled: - description: Enable rule for this query - type: boolean - rule_scope: - description: Scope for the rule - type: string - required: - - name - - query_json - - alert_enabled - - alert_rollup_enabled - - rule_enabled - type: object - responses: - '200': - content: - application/json: - schema: - properties: - account_id: - description: Account ID - type: integer - alert_enabled: - description: Whether alerts are enabled - type: boolean - alert_rollup_enabled: - description: Whether alert rollup is enabled - type: boolean - created_at: - description: Creation timestamp - type: string - readOnly: true - custom_threat_feed_id: - description: Intel Indicator Feed ID (numeric) - nullable: true - type: integer - id: - description: Unique identifier for the saved query - type: integer - name: - description: Name of the saved query - type: string - query_json: - description: JSON string containing the query parameters - type: string - rule_enabled: - description: Whether rule is enabled - type: boolean - rule_list_id: - description: WAF rules list ID for blocking - type: string - rule_scope: - description: Scope for the rule - type: string - updated_at: - description: Last update timestamp - type: string - readOnly: true - user_email: - description: Email of the user who created the query - type: string - required: - - id - - account_id - - name - - user_email - - query_json - - alert_enabled - - alert_rollup_enabled - - rule_enabled - - created_at - - updated_at - type: object - description: Returns the created event query. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Create a saved event query - tags: - - Event - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/queries/{query_id}: - delete: - description: Delete a saved event query by its ID - operationId: delete_EventQueryDelete - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Event query ID - in: path - name: query_id - schema: - description: Event query ID - type: integer - required: true - responses: - '200': - description: Event query deleted successfully. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Delete a saved event query - tags: - - Event - x-api-token-group: - - Cloudforce One Write - get: - description: Retrieve a saved event query by its ID - operationId: get_EventQueryRead - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Event query ID - in: path - name: query_id - schema: - description: Event query ID - type: integer - required: true - responses: - '200': - content: - application/json: - schema: - properties: - account_id: - description: Account ID - type: integer - alert_enabled: - description: Whether alerts are enabled - type: boolean - alert_rollup_enabled: - description: Whether alert rollup is enabled - type: boolean - created_at: - description: Creation timestamp - type: string - readOnly: true - custom_threat_feed_id: - description: Intel Indicator Feed ID (numeric) - nullable: true - type: integer - id: - description: Unique identifier for the saved query - type: integer - name: - description: Name of the saved query - type: string - query_json: - description: JSON string containing the query parameters - type: string - rule_enabled: - description: Whether rule is enabled - type: boolean - rule_list_id: - description: WAF rules list ID for blocking - type: string - rule_scope: - description: Scope for the rule - type: string - updated_at: - description: Last update timestamp - type: string - readOnly: true - user_email: - description: Email of the user who created the query - type: string - required: - - id - - account_id - - name - - user_email - - query_json - - alert_enabled - - alert_rollup_enabled - - rule_enabled - - created_at - - updated_at - type: object - description: Returns the event query. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Read a saved event query - tags: - - Event - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - patch: - description: Update an existing saved event query by its ID - operationId: patch_EventQueryUpdate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Event query ID - in: path - name: query_id - schema: - description: Event query ID - type: integer - required: true - requestBody: - content: - application/json: - schema: - properties: - alert_enabled: - description: Enable alerts for this query - type: boolean - alert_rollup_enabled: - description: Enable alert rollup for this query - type: boolean - name: - description: Unique name for the saved query - type: string - query_json: - description: JSON string containing the query parameters - type: string - rule_enabled: - description: Enable rule for this query - type: boolean - rule_scope: - description: Scope for the rule - type: string - type: object - responses: - '200': - content: - application/json: - schema: - properties: - account_id: - description: Account ID - type: integer - alert_enabled: - description: Whether alerts are enabled - type: boolean - alert_rollup_enabled: - description: Whether alert rollup is enabled - type: boolean - created_at: - description: Creation timestamp - type: string - readOnly: true - custom_threat_feed_id: - description: Intel Indicator Feed ID (numeric) - nullable: true - type: integer - id: - description: Unique identifier for the saved query - type: integer - name: - description: Name of the saved query - type: string - query_json: - description: JSON string containing the query parameters - type: string - rule_enabled: - description: Whether rule is enabled - type: boolean - rule_list_id: - description: WAF rules list ID for blocking - type: string - rule_scope: - description: Scope for the rule - type: string - updated_at: - description: Last update timestamp - type: string - readOnly: true - user_email: - description: Email of the user who created the query - type: string - required: - - id - - account_id - - name - - user_email - - query_json - - alert_enabled - - alert_rollup_enabled - - rule_enabled - - created_at - - updated_at - type: object - description: Returns the updated event query. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Update a saved event query - tags: - - Event - x-api-token-group: - - Cloudforce One Write - post: - description: Update an existing saved event query by its ID - operationId: post_EventQueryUpdate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Event query ID - in: path - name: query_id - schema: - description: Event query ID - type: integer - required: true - requestBody: - content: - application/json: - schema: - properties: - alert_enabled: - description: Enable alerts for this query - type: boolean - alert_rollup_enabled: - description: Enable alert rollup for this query - type: boolean - name: - description: Unique name for the saved query - type: string - query_json: - description: JSON string containing the query parameters - type: string - rule_enabled: - description: Enable rule for this query - type: boolean - rule_scope: - description: Scope for the rule - type: string - type: object - responses: - '200': - content: - application/json: - schema: - properties: - account_id: - description: Account ID - type: integer - alert_enabled: - description: Whether alerts are enabled - type: boolean - alert_rollup_enabled: - description: Whether alert rollup is enabled - type: boolean - created_at: - description: Creation timestamp - type: string - readOnly: true - custom_threat_feed_id: - description: Intel Indicator Feed ID (numeric) - nullable: true - type: integer - id: - description: Unique identifier for the saved query - type: integer - name: - description: Name of the saved query - type: string - query_json: - description: JSON string containing the query parameters - type: string - rule_enabled: - description: Whether rule is enabled - type: boolean - rule_list_id: - description: WAF rules list ID for blocking - type: string - rule_scope: - description: Scope for the rule - type: string - updated_at: - description: Last update timestamp - type: string - readOnly: true - user_email: - description: Email of the user who created the query - type: string - required: - - id - - account_id - - name - - user_email - - query_json - - alert_enabled - - alert_rollup_enabled - - rule_enabled - - created_at - - updated_at - type: object - description: Returns the updated event query. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Update a saved event query - tags: - - Event - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/raw/{dataset_id}/{event_id}: - get: - description: >- - Retrieves the raw data associated with an event. Searches across all - shards in the dataset. - operationId: get_EventRawReadDS - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: event_id - in: path - required: true - description: The event ID. - schema: - type: string - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - accountId: - type: number - created: - type: string - data: - type: string - id: - type: number - source: - type: string - tlp: - type: string - required: - - id - - accountId - - created - - data - - source - - tlp - type: object - description: Returns the raw event data. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - '500': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Reads raw data for an event by UUID - tags: - - Event - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - threat_events - - datasets - method: raw - /accounts/{account_id}/cloudforce-one/events/relate/{event_id}: - delete: - operationId: delete_EventReferenceDelete - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: event_id - in: path - required: true - description: The event ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - success: - type: boolean - required: - - success - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Returns success if operation succeeded. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Removes an event reference - tags: - - Event - x-api-token-group: - - Cloudforce One Write - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - threat_events - - relate - method: delete - /accounts/{account_id}/cloudforce-one/events/relate/{event_id}/create: - post: - operationId: post_EventReferenceCreate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: event_id - in: path - required: true - description: The event ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - events: - items: - type: string - type: array - required: - - events - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - success: - type: boolean - required: - - success - type: object - success: - type: boolean - required: - - success - - result - type: object - description: Returns success if operation succeeded. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Creates event references for a event - tags: - - Event - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/relationships/create: - post: - description: >- - Creates a directed relationship between two events. The relationship is - from parent to child with a specified type. - operationId: post_CreateEventRelationship - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - childIds: - description: >- - Array of UUIDs for child events. Single child = 1:1 - relationship, multiple = 1:many relationships - items: - format: uuid - type: string - minItems: 1 - type: array - datasetId: - description: Dataset identifier where the events are stored - type: string - parentId: - description: >- - UUID of the parent event that will be the source of the - relationship - format: uuid - type: string - relationshipType: - description: >- - Type of relationship to create between parent and child - events - enum: - - related_to - - caused_by - - attributed_to - type: string - required: - - parentId - - childIds - - relationshipType - - datasetId - type: object - responses: - '200': - content: - application/json: - schema: - properties: - childIds: - description: Array of child event UUIDs that were processed - items: - format: uuid - type: string - type: array - errors: - description: >- - Array of errors for relationships that failed to be - created (only present if some relationships failed) - items: - properties: - childId: - description: >- - UUID of the child event that failed to create a - relationship - format: uuid - type: string - error: - description: >- - Error message describing why the relationship - creation failed - type: string - errorType: - description: Type/category of the error that occurred - type: string - required: - - childId - - error - type: object - type: array - message: - description: Human-readable message describing the operation result - type: string - relationships: - description: Array of successfully created relationship objects - items: - properties: - childDatasetId: - description: Dataset ID where the child event resides - type: string - childId: - description: UUID of the child event in the relationship - format: uuid - type: string - parentDatasetId: - description: Dataset ID where the parent event resides - type: string - parentId: - description: UUID of the parent event in the relationship - format: uuid - type: string - relationshipType: - description: Type of relationship between the events - enum: - - related_to - - caused_by - - attributed_to - type: string - required: - - parentId - - childId - - relationshipType - - parentDatasetId - - childDatasetId - type: object - type: array - relationshipsCreated: - description: Number of relationships that were successfully created - type: number - success: - description: >- - Whether the relationship creation operation completed - successfully - type: boolean - required: - - success - - message - - relationships - type: object - description: Relationship created successfully - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Create a relationship between two events - tags: - - Event - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/tags: - get: - description: Returns all Source-of-Truth tags for an account. - operationId: get_TagList - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: page - schema: - type: number - - in: query - name: pageSize - schema: - type: number - - in: query - name: search - schema: - type: string - - in: query - name: categoryUuid - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - pagination: - properties: - page: - type: number - pageSize: - type: number - totalCount: - type: number - totalPages: - type: number - required: - - page - - pageSize - - totalCount - - totalPages - type: object - tags: - items: - properties: - activeDuration: - type: string - actorCategory: - type: string - aliasGroupNames: - items: - type: string - type: array - aliasGroupNamesInternal: - items: - type: string - type: array - analyticPriority: - type: number - attributionConfidence: - type: string - attributionOrganization: - type: string - categoryName: - type: string - categoryUuid: - type: string - externalReferenceLinks: - items: - type: string - type: array - internalDescription: - type: string - motive: - type: string - opsecLevel: - type: string - originCountryISO: - type: string - priority: - type: number - sophisticationLevel: - type: string - uuid: - type: string - value: - type: string - required: - - uuid - - value - type: object - type: array - required: - - tags - - pagination - type: object - description: Returns a paginated list of tags. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Lists all tags (SoT) - tags: - - Tag - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/tags/categories: - get: - description: Returns all Source-of-Truth tag categories for an account. - operationId: get_TagCategoryList - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: search - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - categories: - items: - properties: - createdAt: - type: string - description: - type: string - name: - type: string - updatedAt: - type: string - uuid: - type: string - required: - - uuid - - name - type: object - type: array - required: - - categories - type: object - description: Returns a list of tag categories. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Lists all tag categories (SoT) - tags: - - TagCategory - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/tags/categories/create: - post: - description: Creates a new Source-of-Truth tag category for an account. - operationId: post_TagCategoryCreate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - description: - type: string - name: - type: string - required: - - name - type: object - responses: - '200': - content: - application/json: - schema: - properties: - createdAt: - type: string - description: - type: string - name: - type: string - updatedAt: - type: string - uuid: - type: string - required: - - uuid - - name - type: object - description: Returns the created tag category. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - '409': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Creates a new tag category (SoT) - tags: - - TagCategory - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/tags/categories/{category_uuid}: - delete: - description: Deletes a Source-of-Truth tag category by UUID. - operationId: delete_TagCategoryDelete - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Tag Category UUID. - in: path - name: category_uuid - schema: - description: Tag Category UUID. - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - uuid: - type: string - required: - - uuid - type: object - description: Returns the uuid of the deleted tag category. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Deletes a tag category (SoT) - tags: - - TagCategory - x-api-token-group: - - Cloudforce One Write - patch: - description: Updates a Source-of-Truth tag category by UUID. - operationId: patch_TagCategoryUpdate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Tag Category UUID. - in: path - name: category_uuid - schema: - description: Tag Category UUID. - type: string - required: true - requestBody: - content: - application/json: - schema: - properties: - description: - type: string - name: - type: string - type: object - responses: - '200': - content: - application/json: - schema: - properties: - createdAt: - type: string - description: - type: string - name: - type: string - updatedAt: - type: string - uuid: - type: string - required: - - uuid - - name - type: object - description: Returns the updated tag category. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - '409': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Updates a tag category (SoT) - tags: - - TagCategory - x-api-token-group: - - Cloudforce One Write - /accounts/{account_id}/cloudforce-one/events/tags/create: - post: - description: Creates a new tag to be used accross threat events. - operationId: post_TagCreate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - activeDuration: - type: string - actorCategory: - type: string - aliasGroupNames: - items: - type: string - type: array - aliasGroupNamesInternal: - items: - type: string - type: array - analyticPriority: - type: number - attributionConfidence: - type: string - attributionOrganization: - type: string - categoryUuid: - type: string - externalReferenceLinks: - items: - type: string - type: array - internalDescription: - type: string - motive: - type: string - opsecLevel: - type: string - originCountryISO: - type: string - priority: - type: number - sophisticationLevel: - type: string - value: - type: string - required: - - value - type: object - responses: - '200': - content: - application/json: - schema: - properties: - activeDuration: - type: string - actorCategory: - type: string - aliasGroupNames: - items: - type: string - type: array - aliasGroupNamesInternal: - items: - type: string - type: array - analyticPriority: - type: number - attributionConfidence: - type: string - attributionOrganization: - type: string - categoryName: - type: string - categoryUuid: - type: string - externalReferenceLinks: - items: - type: string - type: array - internalDescription: - type: string - motive: - type: string - opsecLevel: - type: string - originCountryISO: - type: string - priority: - type: number - sophisticationLevel: - type: string - uuid: - type: string - value: - type: string - required: - - uuid - - value - type: object - description: Returns the created tag. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Creates a new tag - tags: - - Tag - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - threat_events - - tags - method: create - /accounts/{account_id}/cloudforce-one/events/tags/{tag_uuid}: - delete: - description: Deletes a Source-of-Truth tag by UUID. - operationId: delete_TagDelete - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Tag UUID. - in: path - name: tag_uuid - schema: - description: Tag UUID. - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - uuid: - type: string - required: - - uuid - type: object - description: Returns the uuid of the deleted tag. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Deletes a tag (SoT) - tags: - - Tag - x-api-token-group: - - Cloudforce One Write - patch: - description: Updates a Source-of-Truth tag by UUID. - operationId: patch_TagUpdate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Tag UUID. - in: path - name: tag_uuid - schema: - description: Tag UUID. - type: string - required: true - requestBody: - content: - application/json: - schema: - properties: - activeDuration: - type: string - actorCategory: - type: string - aliasGroupNames: - items: - type: string - type: array - aliasGroupNamesInternal: - items: - type: string - type: array - analyticPriority: - type: number - attributionConfidence: - type: string - attributionOrganization: - type: string - categoryUuid: - type: string - externalReferenceLinks: - items: - type: string - type: array - internalDescription: - type: string - motive: - type: string - opsecLevel: - type: string - originCountryISO: - type: string - priority: - type: number - sophisticationLevel: - type: string - value: - type: string - type: object - responses: - '200': - content: - application/json: - schema: - properties: - activeDuration: - type: string - actorCategory: - type: string - aliasGroupNames: - items: - type: string - type: array - aliasGroupNamesInternal: - items: - type: string - type: array - analyticPriority: - type: number - attributionConfidence: - type: string - attributionOrganization: - type: string - categoryName: - type: string - categoryUuid: - type: string - externalReferenceLinks: - items: - type: string - type: array - internalDescription: - type: string - motive: - type: string - opsecLevel: - type: string - originCountryISO: - type: string - priority: - type: number - sophisticationLevel: - type: string - uuid: - type: string - value: - type: string - required: - - uuid - - value - type: object - description: Returns the updated tag. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Updates a tag (SoT) - tags: - - Tag - x-api-token-group: - - Cloudforce One Write - /accounts/{account_id}/cloudforce-one/events/targetIndustries: - get: - operationId: get_TargetIndustryList - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: >- - Array of dataset IDs to query target industries from. If not - provided, uses the default dataset. - in: query - name: datasetIds - schema: - description: >- - Array of dataset IDs to query target industries from. If not - provided, uses the default dataset. - items: - type: string - type: array - explode: true - responses: - '200': - content: - application/json: - schema: - properties: - items: - properties: - type: - type: string - required: - - type - type: object - type: - type: string - required: - - type - - items - type: object - description: Returns a list of target industries. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Lists target industries across multiple datasets - tags: - - Target Industry - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - threat_events - - target_industries - method: list - /accounts/{account_id}/cloudforce-one/events/targetIndustries/catalog: - get: - operationId: get_TargetIndustryListComplete - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - items: - properties: - type: - type: string - required: - - type - type: object - type: - type: string - required: - - type - - items - type: object - description: Returns all target industries from industry map catalog. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Lists all target industries from industry map catalog - tags: - - Target Industry - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/update/bulk: - patch: - description: >- - Updates multiple events with the same field values. Maximum 100 events - per request. - operationId: patch_EventUpdateBulk - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - datasetId: - description: >- - Dataset ID containing the events to update. Required to - prevent cross-account modifications. - type: string - eventIds: - description: List of event UUIDs to update (1-100) - items: - type: string - maxItems: 100 - minItems: 1 - type: array - updates: - description: >- - Fields to update on all specified events. All fields - including 'insight' are supported, except 'date' which - requires shard migration. - properties: - attacker: - nullable: true - type: string - attackerCountry: - type: string - category: - type: string - createdAt: - format: date-time - type: string - event: - type: string - indicator: - type: string - indicatorType: - type: string - insight: - type: string - raw: - properties: - data: - nullable: true - type: object - source: - type: string - tlp: - type: string - type: object - targetCountry: - type: string - targetIndustry: - type: string - tlp: - type: string - type: object - required: - - eventIds - - datasetId - - updates - type: object - responses: - '200': - content: - application/json: - schema: - properties: - failedCount: - type: number - failures: - description: List of events that failed to update with error messages - items: - properties: - error: - type: string - eventId: - type: string - required: - - eventId - - error - type: object - type: array - updatedCount: - type: number - required: - - updatedCount - - failedCount - type: object - description: Returns the count of updated events and any failures. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Bulk update events - tags: - - Event - x-api-token-group: - - Cloudforce One Write - /accounts/{account_id}/cloudforce-one/events/{dataset_id}/delete: - delete: - operationId: delete_EventDelete - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - - description: Array of Event IDs to delete. - in: query - name: eventIds - schema: - description: Array of Event IDs to delete. - items: - minLength: 1 - type: string - type: array - explode: true - responses: - '200': - content: - application/json: - schema: - description: Number of deleted events - type: number - description: Returns the number of deleted events. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Deletes one or more events - tags: - - Event - x-api-token-group: - - Cloudforce One Write - /accounts/{account_id}/cloudforce-one/events/{event_id}: - get: - deprecated: true - description: >- - This Method is deprecated. Please use - /events/dataset/:dataset_id/events/:event_id instead. - operationId: get_EventReadDeprecated - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: event_id - in: path - required: true - description: The event ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - attacker: - type: string - attackerCountry: - type: string - category: - type: string - datasetId: - type: string - date: - type: string - event: - type: string - hasChildren: - type: boolean - indicator: - type: string - indicatorType: - type: string - indicatorTypeId: - type: number - insight: - type: string - killChain: - type: number - mitreAttack: - items: - type: string - type: array - mitreCapec: - items: - type: string - type: array - numReferenced: - type: number - numReferences: - type: number - rawId: - type: string - referenced: - items: - type: string - type: array - referencedIds: - items: - type: number - type: array - references: - items: - type: string - type: array - referencesIds: - items: - type: number - type: array - releasabilityId: - type: string - tags: - items: - type: string - type: array - targetCountry: - type: string - targetIndustry: - type: string - tlp: - type: string - uuid: - type: string - required: - - uuid - - date - - targetCountry - - attacker - - attackerCountry - - targetIndustry - - rawId - - indicatorTypeId - - indicator - - event - - numReferenced - - numReferences - - tlp - - category - - indicatorType - - referenced - - references - - tags - - killChain - - mitreAttack - - mitreCapec - - referencedIds - - referencesIds - - hasChildren - - datasetId - type: object - description: Returns an event. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Reads an event - tags: - - Event - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - threat_events - method: get - patch: - operationId: patch_EventUpdate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: event_id - in: path - required: true - description: The event ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - attacker: - nullable: true - type: string - attackerCountry: - type: string - category: - type: string - createdAt: - format: date-time - type: string - datasetId: - description: Dataset ID containing the event to update. - type: string - date: - format: date-time - type: string - event: - type: string - indicator: - type: string - indicatorType: - type: string - insight: - type: string - raw: - properties: - data: - nullable: true - type: object - source: - type: string - tlp: - type: string - type: object - targetCountry: - type: string - targetIndustry: - type: string - tlp: - type: string - required: - - datasetId - type: object - responses: - '200': - content: - application/json: - schema: - properties: - attacker: - type: string - attackerCountry: - type: string - category: - type: string - datasetId: - type: string - date: - type: string - event: - type: string - hasChildren: - type: boolean - indicator: - type: string - indicatorType: - type: string - indicatorTypeId: - type: number - insight: - type: string - killChain: - type: number - mitreAttack: - items: - type: string - type: array - mitreCapec: - items: - type: string - type: array - numReferenced: - type: number - numReferences: - type: number - rawId: - type: string - referenced: - items: - type: string - type: array - referencedIds: - items: - type: number - type: array - references: - items: - type: string - type: array - referencesIds: - items: - type: number - type: array - releasabilityId: - type: string - tags: - items: - type: string - type: array - targetCountry: - type: string - targetIndustry: - type: string - tlp: - type: string - uuid: - type: string - required: - - uuid - - date - - targetCountry - - attacker - - attackerCountry - - targetIndustry - - rawId - - indicatorTypeId - - indicator - - event - - numReferenced - - numReferences - - tlp - - category - - indicatorType - - referenced - - references - - tags - - killChain - - mitreAttack - - mitreCapec - - referencedIds - - referencesIds - - hasChildren - - datasetId - type: object - description: Returns the updated event. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Updates an event - tags: - - Event - x-api-token-group: - - Cloudforce One Write - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - threat_events - method: edit - post: - operationId: post_EventUpdate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: event_id - in: path - required: true - description: The event ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - attacker: - nullable: true - type: string - attackerCountry: - type: string - category: - type: string - createdAt: - format: date-time - type: string - datasetId: - description: Dataset ID containing the event to update. - type: string - date: - format: date-time - type: string - event: - type: string - indicator: - type: string - indicatorType: - type: string - insight: - type: string - raw: - properties: - data: - nullable: true - type: object - source: - type: string - tlp: - type: string - type: object - targetCountry: - type: string - targetIndustry: - type: string - tlp: - type: string - required: - - datasetId - type: object - responses: - '200': - content: - application/json: - schema: - properties: - attacker: - type: string - attackerCountry: - type: string - category: - type: string - datasetId: - type: string - date: - type: string - event: - type: string - hasChildren: - type: boolean - indicator: - type: string - indicatorType: - type: string - indicatorTypeId: - type: number - insight: - type: string - killChain: - type: number - mitreAttack: - items: - type: string - type: array - mitreCapec: - items: - type: string - type: array - numReferenced: - type: number - numReferences: - type: number - rawId: - type: string - referenced: - items: - type: string - type: array - referencedIds: - items: - type: number - type: array - references: - items: - type: string - type: array - referencesIds: - items: - type: number - type: array - releasabilityId: - type: string - tags: - items: - type: string - type: array - targetCountry: - type: string - targetIndustry: - type: string - tlp: - type: string - uuid: - type: string - required: - - uuid - - date - - targetCountry - - attacker - - attackerCountry - - targetIndustry - - rawId - - indicatorTypeId - - indicator - - event - - numReferenced - - numReferences - - tlp - - category - - indicatorType - - referenced - - references - - tags - - killChain - - mitreAttack - - mitreCapec - - referencedIds - - referencesIds - - hasChildren - - datasetId - type: object - description: Returns the updated event. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Updates an event - tags: - - Event - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/{event_id}/raw/{raw_id}: - get: - operationId: get_EventRawRead - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: event_id - in: path - required: true - description: The event ID. - schema: - type: string - - description: Raw Event UUID. - in: path - name: raw_id - schema: - description: Raw Event UUID. - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - accountId: - type: number - created: - type: string - data: - type: object - id: - type: string - source: - type: string - tlp: - type: string - required: - - accountId - - created - - data - - id - - source - - tlp - type: object - description: Returns the raw event. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Reads data for a raw event - tags: - - Event - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - threat_events - - raw - method: get - patch: - operationId: patch_EventRawUpdate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: event_id - in: path - required: true - description: The event ID. - schema: - type: string - - description: Raw Event UUID. - in: path - name: raw_id - schema: - description: Raw Event UUID. - type: string - required: true - requestBody: - content: - application/json: - schema: - properties: - data: - type: object - source: - type: string - tlp: - type: string - type: object - responses: - '200': - content: - application/json: - schema: - properties: - data: - type: object - id: - type: string - required: - - id - - data - type: object - description: Returns the uuid of the updated raw event and its data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Updates a raw event - tags: - - Event - x-api-token-group: - - Cloudforce One Write - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - threat_events - - raw - method: edit - post: - operationId: post_EventRawUpdate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: event_id - in: path - required: true - description: The event ID. - schema: - type: string - - description: Raw Event UUID. - in: path - name: raw_id - schema: - description: Raw Event UUID. - type: string - required: true - requestBody: - content: - application/json: - schema: - properties: - data: - type: object - source: - type: string - tlp: - type: string - type: object - responses: - '200': - content: - application/json: - schema: - properties: - data: - type: object - id: - type: string - required: - - id - - data - type: object - description: Returns the uuid of the updated raw event and its data. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Updates a raw event - tags: - - Event - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/events/{event_id}/relationships: - get: - description: >- - The `event_id` must be defined (to list existing events (and their IDs), - use the [`Filter and List - Events`](https://developers.cloudflare.com/api/resources/cloudforce_one/subresources/threat_events/methods/list/) - endpoint). Also, must provide query parameters. - operationId: get_EventRelationships - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: event_id - in: path - required: true - description: The event ID. - schema: - type: string - - description: >- - The direction to traverse the graph. Defaults to 'both' to search - all. - in: query - name: direction - schema: - default: both - description: >- - The direction to traverse the graph. Defaults to 'both' to search - all. - enum: - - ancestors - - descendants - - both - type: string - - description: The maximum depth to traverse. Defaults to 5. - in: query - name: maxDepth - schema: - description: The maximum depth to traverse. Defaults to 5. - type: number - - description: An optional array of relationship types to filter by. - in: query - name: relationshipTypes - schema: - description: An optional array of relationship types to filter by. - type: string - items: - type: string - - description: An optional array of indicator type IDs to filter the results by. - in: query - name: indicatorTypeIds - schema: - description: An optional array of indicator type IDs to filter the results by. - items: - type: string - type: array - explode: true - - description: The dataset ID to search within. - in: query - name: datasetId - schema: - description: The dataset ID to search within. - type: string - - description: >- - Whether to include the starting event in the results. Defaults to - true. - in: query - name: includeParent - schema: - default: true - description: >- - Whether to include the starting event in the results. Defaults to - true. - type: boolean - - in: query - name: page - schema: - type: number - - in: query - name: pageSize - schema: - type: number - responses: - '200': - content: - application/json: - schema: - items: - properties: - attacker: - type: string - attackerCountry: - type: string - category: - type: string - datasetId: - type: string - date: - type: string - event: - type: string - hasChildren: - type: boolean - indicator: - type: string - indicatorType: - type: string - indicatorTypeId: - type: number - insight: - type: string - killChain: - type: number - mitreAttack: - items: - type: string - type: array - mitreCapec: - items: - type: string - type: array - numReferenced: - type: number - numReferences: - type: number - rawId: - type: string - referenced: - items: - type: string - type: array - referencedIds: - items: - type: number - type: array - references: - items: - type: string - type: array - referencesIds: - items: - type: number - type: array - releasabilityId: - type: string - tags: - items: - type: string - type: array - targetCountry: - type: string - targetIndustry: - type: string - tlp: - type: string - uuid: - type: string - required: - - uuid - - date - - targetCountry - - attacker - - attackerCountry - - targetIndustry - - rawId - - indicatorTypeId - - indicator - - event - - numReferenced - - numReferences - - tlp - - category - - indicatorType - - referenced - - references - - tags - - killChain - - mitreAttack - - mitreCapec - - referencedIds - - referencesIds - - hasChildren - - datasetId - type: object - type: array - description: Returns a list of events related to the specified starting event. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: Filter and list events related to specific event - tags: - - Event - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/requests: - post: - description: >- - Lists Cloudforce One intelligence requests with filtering and - pagination. - operationId: cloudforce-one-request-list - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneRequestsRequestList' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - messages: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - items: - $ref: >- - #/components/schemas/cloudforceOneRequestsRequestListItem - type: array - required: - - success - - errors - - messages - type: object - description: List requests response. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOneRequestsApiResponseCommonFailure - description: Create response failure. - security: - - api_email: [] - api_key: [] - summary: List Requests - tags: - - Request for Information (RFI) - x-api-token-group: - - Cloudforce One Write - /accounts/{account_id}/cloudforce-one/requests/constants: - get: - description: >- - Retrieves constant values used in Cloudforce One requests, including - valid statuses and types. - operationId: cloudforce-one-request-constants - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - messages: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/cloudforceOneRequestsRequestConstants' - required: - - success - - errors - - messages - type: object - description: Get request constants response. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOneRequestsApiResponseCommonFailure - description: Get request constants response failure. - security: - - api_email: [] - api_key: [] - summary: Get Request Priority, Status, and TLP constants - tags: - - Request for Information (RFI) - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - requests - method: constants - /accounts/{account_id}/cloudforce-one/requests/new: - post: - description: >- - Creating a request adds the request into the Cloudforce One queue for - analysis. In addition to the content, a short title, type, priority, and - releasability should be provided. If one is not provided, a default will - be assigned. - operationId: cloudforce-one-request-new - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneRequestsRequestEdit' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - messages: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/cloudforceOneRequestsRequestItem' - required: - - success - - errors - - messages - type: object - description: Create request response. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOneRequestsApiResponseCommonFailure - description: Create response failure. - security: - - api_email: [] - api_key: [] - summary: Create a New Request. - tags: - - Request for Information (RFI) - x-api-token-group: - - Cloudforce One Write - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - requests - method: create - /accounts/{account_id}/cloudforce-one/requests/priority: - post: - description: Lists priority intelligence requests in Cloudforce One. - operationId: cloudforce-one-priority-list - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneRequestsPriorityList' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - messages: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - items: - $ref: '#/components/schemas/cloudforceOneRequestsPriorityItem' - type: array - required: - - success - - errors - - messages - type: object - description: List priorities response. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOneRequestsApiResponseCommonFailure - description: List priorities response failure. - security: - - api_email: [] - api_key: [] - summary: List Priority Intelligence Requirements - tags: - - Priority Intelligence Requirements (PIR) - x-api-token-group: - - Cloudforce One Write - /accounts/{account_id}/cloudforce-one/requests/priority/new: - post: - description: Creates a new priority intelligence request in Cloudforce One. - operationId: cloudforce-one-priority-new - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneRequestsPriorityEdit' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - messages: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/cloudforceOneRequestsPriorityItem' - required: - - success - - errors - - messages - type: object - description: Create priority response. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOneRequestsApiResponseCommonFailure - description: Create priority response failure. - security: - - api_email: [] - api_key: [] - summary: Create a New Priority Intelligence Requirement - tags: - - Priority Intelligence Requirements (PIR) - x-api-token-group: - - Cloudforce One Write - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - requests - - priority - method: create - /accounts/{account_id}/cloudforce-one/requests/priority/quota: - get: - description: Retrieves quota usage for Cloudforce One priority requests. - operationId: cloudforce-one-priority-quota - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - messages: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/cloudforceOneRequestsQuota' - required: - - success - - errors - - messages - type: object - description: Get priority quota response. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOneRequestsApiResponseCommonFailure - description: Get priority quota response failure. - security: - - api_email: [] - api_key: [] - summary: Get Priority Intelligence Requirement Quota - tags: - - Priority Intelligence Requirements (PIR) - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - requests - - priority - method: quota - /accounts/{account_id}/cloudforce-one/requests/priority/{priority_id}: - delete: - description: Deletes a priority intelligence request from Cloudforce One. - operationId: cloudforce-one-priority-delete - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: priority_id - schema: - $ref: '#/components/schemas/cloudforceOneRequestsUuid' - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommon' - description: Delete priority response. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOneRequestsApiResponseCommonFailure - description: Delete priority response failure. - security: - - api_email: [] - api_key: [] - summary: Delete a Priority Intelligence Requirement - tags: - - Priority Intelligence Requirements (PIR) - x-api-token-group: - - Cloudforce One Write - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - requests - - priority - method: delete - get: - description: Retrieves a specific priority intelligence request from Cloudforce One. - operationId: cloudforce-one-priority-get - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: priority_id - schema: - $ref: '#/components/schemas/cloudforceOneRequestsUuid' - required: true - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - messages: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/cloudforceOneRequestsRequestItem' - required: - - success - - errors - - messages - type: object - description: Get priority response. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOneRequestsApiResponseCommonFailure - description: Get priority response failure. - security: - - api_email: [] - api_key: [] - summary: Get a Priority Intelligence Requirement - tags: - - Priority Intelligence Requirements (PIR) - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - requests - - priority - method: get - put: - description: Updates a priority intelligence request in Cloudforce One. - operationId: cloudforce-one-priority-update - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: priority_id - schema: - $ref: '#/components/schemas/cloudforceOneRequestsUuid' - required: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneRequestsPriorityEdit' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - messages: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/cloudforceOneRequestsRequestItem' - required: - - success - - errors - - messages - type: object - description: Update priority response. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOneRequestsApiResponseCommonFailure - description: Update priority response failure. - security: - - api_email: [] - api_key: [] - summary: Update a Priority Intelligence Requirement - tags: - - Priority Intelligence Requirements (PIR) - x-api-token-group: - - Cloudforce One Write - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - requests - - priority - method: update - /accounts/{account_id}/cloudforce-one/requests/quota: - get: - description: Retrieves quota usage for Cloudforce One standard requests. - operationId: cloudforce-one-request-quota - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - messages: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/cloudforceOneRequestsQuota' - required: - - success - - errors - - messages - type: object - description: Get request quota response. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOneRequestsApiResponseCommonFailure - description: Get request quota response failure. - security: - - api_email: [] - api_key: [] - summary: Get Request Quota - tags: - - Request for Information (RFI) - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - requests - method: quota - /accounts/{account_id}/cloudforce-one/requests/types: - get: - description: Lists available request types for Cloudforce One intelligence requests. - operationId: cloudforce-one-request-types - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - messages: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/cloudforceOneRequestsRequestTypes' - required: - - success - - errors - - messages - type: object - description: Get request types response. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOneRequestsApiResponseCommonFailure - description: Get request types response failure. - security: - - api_email: [] - api_key: [] - summary: Get Request Types - tags: - - Request for Information (RFI) - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - requests - method: types - /accounts/{account_id}/cloudforce-one/requests/{request_id}: - delete: - description: Deletes a Cloudforce One intelligence request and all associated data. - operationId: cloudforce-one-request-delete - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: request_id - schema: - $ref: '#/components/schemas/cloudforceOneRequestsUuid' - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommon' - description: Delete request response. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOneRequestsApiResponseCommonFailure - description: Delete request response failure. - security: - - api_email: [] - api_key: [] - summary: Delete a Request - tags: - - Request for Information (RFI) - x-api-token-group: - - Cloudforce One Write - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - requests - method: delete - get: - description: Retrieves details for a specific Cloudforce One intelligence request. - operationId: cloudforce-one-request-get - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: request_id - schema: - $ref: '#/components/schemas/cloudforceOneRequestsUuid' - required: true - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - messages: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/cloudforceOneRequestsRequestItem' - required: - - success - - errors - - messages - type: object - description: Get request response. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOneRequestsApiResponseCommonFailure - description: Get request response failure. - security: - - api_email: [] - api_key: [] - summary: Get a Request - tags: - - Request for Information (RFI) - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - requests - method: get - put: - description: >- - Updating a request alters the request in the Cloudforce One queue. This - API may be used to update any attributes of the request after the - initial submission. Only fields that you choose to update need to be add - to the request body. - operationId: cloudforce-one-request-update - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: request_id - schema: - $ref: '#/components/schemas/cloudforceOneRequestsUuid' - required: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneRequestsRequestEdit' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - messages: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/cloudforceOneRequestsRequestItem' - required: - - success - - errors - - messages - type: object - description: Update request response. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOneRequestsApiResponseCommonFailure - description: Update request response failure. - security: - - api_email: [] - api_key: [] - summary: Update a Request - tags: - - Request for Information (RFI) - x-api-token-group: - - Cloudforce One Write - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - requests - method: update - /accounts/{account_id}/cloudforce-one/requests/{request_id}/asset: - post: - description: Lists assets attached to a Cloudforce One intelligence request. - operationId: cloudforce-one-request-asset-list - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: request_id - schema: - $ref: '#/components/schemas/cloudforceOneRequestsUuid' - required: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneRequestsRequestAssetList' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - messages: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - items: - $ref: >- - #/components/schemas/cloudforceOneRequestsRequestAssetItem - type: array - required: - - success - - errors - - messages - type: object - description: List request assets response. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOneRequestsApiResponseCommonFailure - description: List request assets response failure. - security: - - api_email: [] - api_key: [] - summary: List Request Assets - tags: - - Request for Information (RFI) - x-api-token-group: - - Cloudforce One Write - /accounts/{account_id}/cloudforce-one/requests/{request_id}/asset/new: - post: - description: Uploads a new asset to a Cloudforce One intelligence request. - operationId: cloudforce-one-request-asset-new - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: request_id - schema: - $ref: '#/components/schemas/cloudforceOneRequestsUuid' - required: true - requestBody: - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/cloudforceOneRequestsRequestAssetEdit' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - messages: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/cloudforceOneRequestsRequestAssetItem' - required: - - success - - errors - - messages - type: object - description: Create request asset response. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOneRequestsApiResponseCommonFailure - description: Create request asset response failure. - security: - - api_email: [] - api_key: [] - summary: Create a New Request Asset - tags: - - Request for Information (RFI) - x-api-token-group: - - Cloudforce One Write - /accounts/{account_id}/cloudforce-one/requests/{request_id}/asset/{asset_id}: - delete: - description: Removes an asset from a Cloudforce One intelligence request. - operationId: cloudforce-one-request-asset-delete - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: request_id - schema: - $ref: '#/components/schemas/cloudforceOneRequestsUuid' - required: true - - in: path - name: asset_id - schema: - $ref: '#/components/schemas/cloudforceOneRequestsUuid' - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommon' - description: Delete request asset response. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOneRequestsApiResponseCommonFailure - description: Delete request asset response failure. - security: - - api_email: [] - api_key: [] - summary: Delete a Request Asset - tags: - - Request for Information (RFI) - x-api-token-group: - - Cloudforce One Write - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - requests - - assets - method: delete - get: - description: Retrieves an asset attached to a Cloudforce One intelligence request. - operationId: cloudforce-one-request-asset-get - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: request_id - schema: - $ref: '#/components/schemas/cloudforceOneRequestsUuid' - required: true - - in: path - name: asset_id - schema: - $ref: '#/components/schemas/cloudforceOneRequestsUuid' - required: true - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - messages: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - items: - $ref: >- - #/components/schemas/cloudforceOneRequestsRequestAssetItem - type: array - required: - - success - - errors - - messages - type: object - description: Get request asset response. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOneRequestsApiResponseCommonFailure - description: Get request asset response failure. - security: - - api_email: [] - api_key: [] - summary: Get a Request Asset - tags: - - Request for Information (RFI) - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - requests - - assets - method: get - put: - description: Updates an asset in a Cloudforce One intelligence request. - operationId: cloudforce-one-request-asset-update - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: request_id - schema: - $ref: '#/components/schemas/cloudforceOneRequestsUuid' - required: true - - in: path - name: asset_id - schema: - $ref: '#/components/schemas/cloudforceOneRequestsUuid' - required: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneRequestsRequestAssetEdit' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - messages: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/cloudforceOneRequestsRequestAssetItem' - required: - - success - - errors - - messages - type: object - description: Update request asset response. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOneRequestsApiResponseCommonFailure - description: Update request asset response failure. - security: - - api_email: [] - api_key: [] - summary: Update a Request Asset - tags: - - Request for Information (RFI) - x-api-token-group: - - Cloudforce One Write - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - requests - - assets - method: update - /accounts/{account_id}/cloudforce-one/requests/{request_id}/message: - post: - description: Lists messages in a Cloudforce One intelligence request conversation. - operationId: cloudforce-one-request-message-list - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: request_id - schema: - $ref: '#/components/schemas/cloudforceOneRequestsUuid' - required: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneRequestsRequestMessageList' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - messages: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - items: - $ref: >- - #/components/schemas/cloudforceOneRequestsRequestMessageItem - type: array - required: - - success - - errors - - messages - type: object - description: List request messages response. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOneRequestsApiResponseCommonFailure - description: List request messages response failure. - security: - - api_email: [] - api_key: [] - summary: List Request Messages - tags: - - Request for Information (RFI) - x-api-token-group: - - Cloudforce One Write - /accounts/{account_id}/cloudforce-one/requests/{request_id}/message/new: - post: - description: Adds a message to a Cloudforce One intelligence request conversation. - operationId: cloudforce-one-request-message-new - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: request_id - schema: - $ref: '#/components/schemas/cloudforceOneRequestsUuid' - required: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneRequestsRequestMessageEdit' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - messages: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: >- - #/components/schemas/cloudforceOneRequestsRequestMessageItem - required: - - success - - errors - - messages - type: object - description: Create request message response. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOneRequestsApiResponseCommonFailure - description: Create request message response failure. - security: - - api_email: [] - api_key: [] - summary: Create a New Request Message - tags: - - Request for Information (RFI) - x-api-token-group: - - Cloudforce One Write - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - requests - - message - method: create - /accounts/{account_id}/cloudforce-one/requests/{request_id}/message/{message_id}: - delete: - description: Removes a message from a Cloudforce One intelligence request thread. - operationId: cloudforce-one-request-message-delete - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: request_id - schema: - $ref: '#/components/schemas/cloudforceOneRequestsUuid' - required: true - - in: path - name: message_id - schema: - type: integer - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommon' - description: Delete request message response. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOneRequestsApiResponseCommonFailure - description: Delete request message response failure. - security: - - api_email: [] - api_key: [] - summary: Delete a Request Message - tags: - - Request for Information (RFI) - x-api-token-group: - - Cloudforce One Write - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - requests - - message - method: delete - put: - description: Updates a message in a Cloudforce One intelligence request thread. - operationId: cloudforce-one-request-message-update - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: request_id - schema: - $ref: '#/components/schemas/cloudforceOneRequestsUuid' - required: true - - in: path - name: message_id - schema: - type: integer - required: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneRequestsRequestMessageEdit' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - messages: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: >- - #/components/schemas/cloudforceOneRequestsRequestMessageItem - required: - - success - - errors - - messages - type: object - description: Update request message response. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOneRequestsApiResponseCommonFailure - description: Update request message response failure. - security: - - api_email: [] - api_key: [] - summary: Update a Request Message - tags: - - Request for Information (RFI) - x-api-token-group: - - Cloudforce One Write - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - requests - - message - method: update - /accounts/{account_id}/cloudforce-one/rules: - delete: - description: Delete all rules in an account. - operationId: cloudforce-one-delete-all-rules - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneDeleteAllResponse' - description: All rules deleted. - '401': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneErrorResponse' - description: Unauthorized. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete all rules - tags: - - Rules - get: - description: List all rules for an account with optional filtering. - operationId: cloudforce-one-list-rules - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: >- - Filter by namespace. Repeat the parameter to filter by multiple - namespaces (e.g. namespace=foo&namespace=bar). - in: query - name: namespace - schema: - description: >- - Filter by namespace. Repeat the parameter to filter by multiple - namespaces (e.g. namespace=foo&namespace=bar). - type: string - items: - type: string - - in: query - name: recursive - schema: - enum: - - 'true' - - 'false' - type: string - - in: query - name: search - schema: - type: string - - description: Filter by public visibility. - in: query - name: is_public - schema: - description: Filter by public visibility. - enum: - - 'true' - - 'false' - type: string - - in: query - name: limit - schema: - default: 50 - maximum: 100 - minimum: 1 - type: number - - in: query - name: offset - schema: - default: 0 - minimum: 0 - nullable: true - type: number - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneRulesListResponse' - description: List of rules. - '401': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneErrorResponse' - description: Unauthorized. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List rules - tags: - - Rules - post: - description: Create a new detection rule. - operationId: cloudforce-one-create-rule - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneCreateRule' - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneRule' - description: Rule created (customer accounts). - '202': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneApprovalPendingResponse' - description: Rule pending approval (internal accounts). - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneErrorResponse' - description: Validation error. - '401': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneErrorResponse' - description: Unauthorized. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a rule - tags: - - Rules - /accounts/{account_id}/cloudforce-one/rules/managed: - get: - description: Get DFP managed rule metadata (name and description) from YARA rules. - operationId: cloudforce-one-get-managed-rules - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - metadata: - properties: - fetched_at: - type: string - total_rules: - type: number - required: - - total_rules - - fetched_at - type: object - rules: - items: - properties: - description: - type: string - name: - type: string - required: - - name - - description - type: object - type: array - required: - - rules - - metadata - type: object - description: Managed rules metadata. - '401': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneErrorResponse' - description: Unauthorized. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get managed rules - tags: - - Rules - /accounts/{account_id}/cloudforce-one/rules/stats: - get: - description: Get statistics about rules for the dashboard. - operationId: cloudforce-one-get-rule-stats - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneStatsResponse' - description: Dashboard statistics. - '401': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneErrorResponse' - description: Unauthorized. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get dashboard stats - tags: - - Rules - /accounts/{account_id}/cloudforce-one/rules/tree: - get: - description: Get the folder tree structure for rules navigation. - operationId: cloudforce-one-get-rule-tree - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneTreeResponse' - description: Folder tree structure. - '401': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneErrorResponse' - description: Unauthorized. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get folder tree structure - tags: - - Rules - /accounts/{account_id}/cloudforce-one/rules/validate: - post: - description: Validate rule syntax, name uniqueness, namespace, and meta checks. - operationId: cloudforce-one-validate-rule - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - content: - minLength: 1 - type: string - excludeRuleId: - format: uuid - type: string - name: - maxLength: 255 - minLength: 1 - type: string - namespaces: - items: - maxLength: 255 - minLength: 1 - type: string - minItems: 1 - type: array - required: - - name - - namespaces - - content - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneValidationResponse' - description: Validation result. - '401': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneErrorResponse' - description: Unauthorized. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Validate rule with context - tags: - - Rules - /accounts/{account_id}/cloudforce-one/rules/{id}: - delete: - description: Delete an existing rule. - operationId: cloudforce-one-delete-rule - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneSuccessResponse' - description: Rule deleted (customer accounts). - '202': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneApprovalPendingResponse' - description: Deletion pending approval (internal accounts). - '401': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneErrorResponse' - description: Unauthorized. - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneErrorResponse' - description: Rule not found. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete a rule - tags: - - Rules - get: - description: Get a single rule by ID. - operationId: cloudforce-one-get-rule - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneRule' - description: Rule details. - '401': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneErrorResponse' - description: Unauthorized. - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneErrorResponse' - description: Rule not found. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get a rule - tags: - - Rules - put: - description: Update an existing rule. - operationId: cloudforce-one-update-rule - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneUpdateRule' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneRule' - description: Rule updated (customer accounts). - '202': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneApprovalPendingResponse' - description: Update pending approval (internal accounts). - '401': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneErrorResponse' - description: Unauthorized. - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/cloudforceOneErrorResponse' - description: Rule not found. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update a rule - tags: - - Rules - /accounts/{account_id}/cloudforce-one/scans/config: - get: - operationId: get_ConfigFetch - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cloudforceOnePortScanApiMessages' - messages: - $ref: '#/components/schemas/cloudforceOnePortScanApiMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - items: - $ref: '#/components/schemas/cloudforceOnePortScanApiScanConfig' - type: array - required: - - success - - errors - - messages - type: object - description: Returns all Scan Configs. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOnePortScanApiApiResponseCommonFailure - description: List Scan Configs failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Scan Configs - tags: - - Scans - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - scans - - config - method: list - post: - operationId: post_ConfigCreate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - frequency: - $ref: '#/components/schemas/cloudforceOnePortScanApiFrequency' - ips: - $ref: '#/components/schemas/cloudforceOnePortScanApiIps' - ports: - $ref: '#/components/schemas/cloudforceOnePortScanApiPorts' - required: - - ips - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cloudforceOnePortScanApiMessages' - messages: - $ref: '#/components/schemas/cloudforceOnePortScanApiMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/cloudforceOnePortScanApiScanConfig' - required: - - success - - errors - - messages - type: object - description: Returns the created config. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOnePortScanApiApiResponseCommonFailure - description: Create a new Scan Config failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a new Scan Config - tags: - - Scans - x-api-token-group: - - Cloudforce One Write - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - scans - - config - method: create - /accounts/{account_id}/cloudforce-one/scans/config/{config_id}: - delete: - operationId: delete_DeleteScans - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Defines the Config ID. - in: path - name: config_id - schema: - description: Defines the Config ID. - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - type: string - type: array - messages: - items: - type: string - type: array - result: - type: object - success: - type: boolean - required: - - success - - result - - messages - - errors - type: object - description: Delete a Scan Config. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOnePortScanApiApiResponseCommonFailure - description: Delete a Scan Config failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete a Scan Config - tags: - - Scans - x-api-token-group: - - Cloudforce One Write - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - scans - - config - method: delete - patch: - operationId: post_ConfigUpdate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Defines the Config ID. - in: path - name: config_id - schema: - description: Defines the Config ID. - type: string - required: true - requestBody: - content: - application/json: - schema: - properties: - frequency: - $ref: '#/components/schemas/cloudforceOnePortScanApiFrequency' - ips: - $ref: '#/components/schemas/cloudforceOnePortScanApiIps' - ports: - $ref: '#/components/schemas/cloudforceOnePortScanApiPorts' - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cloudforceOnePortScanApiMessages' - messages: - $ref: '#/components/schemas/cloudforceOnePortScanApiMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/cloudforceOnePortScanApiScanConfig' - required: - - success - - errors - - messages - type: object - description: Returns the updated config. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOnePortScanApiApiResponseCommonFailure - description: Update an Existing Scan Config failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update an existing Scan Config - tags: - - Scans - x-api-token-group: - - Cloudforce One Write - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - scans - - config - method: edit - /accounts/{account_id}/cloudforce-one/scans/results/{config_id}: - get: - operationId: get_GetOpenPorts - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Defines the Config ID. - in: path - name: config_id - schema: - description: Defines the Config ID. - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - type: string - type: array - messages: - items: - type: string - type: array - result: - properties: - 1.1.1.1: - items: - $ref: '#/components/schemas/cloudforceOnePortScanApiPort' - type: array - x-stainless-naming: - python: - property_name: one_one_one_one - argument_name: one_one_one_one - method_argument: one_one_one_one - go: - property_name: OneOneOneOne - argument_name: OneOneOneOne - method_argument: OneOneOneOne - required: - - 1.1.1.1 - type: object - success: - type: boolean - required: - - success - - result - - messages - - errors - type: object - description: Returns Current Open Ports. - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/cloudforceOnePortScanApiApiResponseCommonFailure - description: Get the Latest Scan Result failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get the Latest Scan Result - tags: - - Scans - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - x-stackql-sdk: - service: cloudforce_one - resource_chain: - - scans - - results - method: get - /accounts/{account_id}/cloudforce-one/v2/brand-protection/letter/generate: - post: - description: >- - Generate a takedown letter from a template. Returns V4 JSON for text - format or a PDF binary for pdf format. - operationId: post_LetterGenerate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - fields: - properties: - discoveryDate: - type: string - domain: - maxLength: 500 - type: string - generationDate: - type: string - registrantEmail: - maxLength: 500 - type: string - registrar: - maxLength: 500 - type: string - resolutionByDate: - type: string - senderCompany: - maxLength: 500 - type: string - senderEmail: - maxLength: 500 - type: string - senderName: - maxLength: 500 - type: string - senderTitle: - maxLength: 500 - type: string - trademarkName: - maxLength: 500 - type: string - trademarkOwner: - maxLength: 500 - type: string - type: object - format: - default: text - enum: - - text - - pdf - type: string - templateId: - minLength: 1 - type: string - required: - - templateId - - fields - type: object - responses: - '200': - content: - application/json: - schema: - properties: - letter: - type: string - required: - - letter - type: object - application/pdf: - schema: - format: binary - type: string - description: >- - Letter generated successfully. When format=text, returns V4 JSON - with { result: { letter: string } }. When format=pdf, returns binary - with Content-Type: application/pdf. - security: - - api_token: [] - summary: Generate takedown letter - tags: - - Brand Protection - x-api-token-group: - - Cloudforce One Write - /accounts/{account_id}/cloudforce-one/v2/brand-protection/letter/templates: - get: - description: >- - List all available takedown letter templates (system templates and - user-defined templates) - operationId: get_LetterTemplateList - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - templates: - items: - properties: - category: - type: string - createdAt: - nullable: true - type: string - description: - nullable: true - type: string - id: - type: string - name: - type: string - source: - enum: - - system - - user - type: string - updatedAt: - nullable: true - type: string - required: - - id - - source - - name - - category - - description - - createdAt - - updatedAt - type: object - type: array - required: - - templates - type: object - description: Templates listed successfully - security: - - api_token: [] - summary: List letter templates - tags: - - Brand Protection - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - post: - description: Create a new user-defined takedown letter template - operationId: post_LetterTemplateCreate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - body: - minLength: 1 - type: string - category: - maxLength: 100 - minLength: 1 - type: string - description: - maxLength: 1000 - type: string - name: - maxLength: 255 - minLength: 1 - type: string - required: - - name - - category - - body - type: object - responses: - '200': - content: - application/json: - schema: - properties: - body: - type: string - category: - type: string - createdAt: - nullable: true - type: string - description: - nullable: true - type: string - id: - type: string - name: - type: string - source: - enum: - - system - - user - type: string - updatedAt: - nullable: true - type: string - required: - - id - - source - - name - - category - - description - - body - - createdAt - - updatedAt - type: object - description: Template created successfully - security: - - api_token: [] - summary: Create letter template - tags: - - Brand Protection - x-api-token-group: - - Cloudforce One Write - /accounts/{account_id}/cloudforce-one/v2/brand-protection/letter/templates/{template_id}: - delete: - description: >- - Delete a user-defined takedown letter template. System templates cannot - be deleted. - operationId: delete_LetterTemplateDelete - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: template_id - schema: - minLength: 1 - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - message: - type: string - success: - type: boolean - required: - - success - - message - type: object - description: Template deleted successfully - security: - - api_token: [] - summary: Delete letter template - tags: - - Brand Protection - x-api-token-group: - - Cloudforce One Write - get: - description: Get a specific takedown letter template by ID - operationId: get_LetterTemplateGet - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: template_id - schema: - minLength: 1 - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - body: - type: string - category: - type: string - createdAt: - nullable: true - type: string - description: - nullable: true - type: string - id: - type: string - name: - type: string - source: - enum: - - system - - user - type: string - updatedAt: - nullable: true - type: string - required: - - id - - source - - name - - category - - description - - body - - createdAt - - updatedAt - type: object - description: Template retrieved successfully - security: - - api_token: [] - summary: Get letter template - tags: - - Brand Protection - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - put: - description: >- - Update a user-defined takedown letter template. System templates cannot - be modified. - operationId: put_LetterTemplateUpdate - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: template_id - schema: - minLength: 1 - type: string - required: true - requestBody: - content: - application/json: - schema: - properties: - body: - minLength: 1 - type: string - category: - maxLength: 100 - minLength: 1 - type: string - description: - maxLength: 1000 - nullable: true - type: string - name: - maxLength: 255 - minLength: 1 - type: string - type: object - responses: - '200': - content: - application/json: - schema: - properties: - body: - type: string - category: - type: string - createdAt: - nullable: true - type: string - description: - nullable: true - type: string - id: - type: string - name: - type: string - source: - enum: - - system - - user - type: string - updatedAt: - nullable: true - type: string - required: - - id - - source - - name - - category - - description - - body - - createdAt - - updatedAt - type: object - description: Template updated successfully - security: - - api_token: [] - summary: Update letter template - tags: - - Brand Protection - x-api-token-group: - - Cloudforce One Write - /accounts/{account_id}/cloudforce-one/v2/brand-protection/logo/search: - post: - description: >- - Submit an image and find the n closest matches from the scanned images - index without creating any match records. Returns similarity scores and - metadata for each match. - operationId: post_SearchLogoSimilarity - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: >- - Include scanned images without domain metadata (historic data). - Default: false (only show images with domain) - in: query - name: showHistoric - schema: - default: 'false' - description: >- - Include scanned images without domain metadata (historic data). - Default: false (only show images with domain) - type: string - - description: If true, include base64-encoded image data in the response - in: query - name: download - schema: - description: If true, include base64-encoded image data in the response - type: string - requestBody: - content: - application/json: - schema: - properties: - image_data: - description: >- - Base64 encoded image data. Can include data URI prefix - (e.g., 'data:image/png;base64,...') or just the base64 - string. - minLength: 1 - type: string - score_threshold: - default: 0 - description: >- - Minimum similarity score threshold for matches (0-1, - default: 0) - maximum: 1 - minimum: 0 - type: number - top_k: - default: 10 - description: 'Number of closest matches to return (1-100, default: 10)' - maximum: 100 - minimum: 1 - type: integer - required: - - image_data - type: object - responses: - '200': - content: - application/json: - schema: - properties: - matches: - items: - properties: - account_id: - type: string - content_type: - description: >- - MIME type of the image (only present when - download=true) - type: string - domain: - type: string - image_data: - description: >- - Base64-encoded image data (only present when - download=true) - type: string - query_id: - type: integer - r2_path: - type: string - similarity_score: - type: number - similarity_threshold: - type: number - tag: - type: string - timestamp: - type: number - url_scan_id: - type: string - vector_id: - type: string - required: - - similarity_score - type: object - type: array - required: - - matches - type: object - description: Scanned images search completed successfully - security: - - api_token: [] - summary: Search scanned images - tags: - - Brand Protection - x-api-token-group: - - Cloudforce One Write - /accounts/{account_id}/cloudforce-one/v2/brand-protection/total-queries: - get: - description: >- - Get the total number of saved brand protection queries (domain + logo) - for an account - operationId: get_TotalQueries - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - items: - properties: - total_queries: - minimum: 0 - type: integer - required: - - total_queries - type: object - type: array - description: Successfully retrieved total query count - security: - - api_token: [] - summary: Get total queries - tags: - - Brand Protection - x-api-token-group: - - Cloudforce One Write - - Cloudforce One Read - /accounts/{account_id}/cloudforce-one/v2/events/graphql: - post: - description: >- - Execute GraphQL aggregations over threat events. Supports - multi-dimensional group-bys, optional date range filtering, and - multi-dataset aggregation. - operationId: post_EventGraphQLV2 - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - data: - nullable: true - type: object - errors: - items: - type: object - nullable: true - type: array - type: object - description: GraphQL response payload (data and errors). - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - message: - type: string - required: - - message - type: object - type: array - result: - type: object - success: - type: boolean - required: - - result - - success - - errors - type: object - description: Bad Request. - security: - - api_token: [] - summary: GraphQL endpoint for event aggregation - tags: - - Event - x-api-token-group: - - Cloudforce One Write -components: - schemas: - cloudforceOneApprovalPendingResponse: - properties: - approval_id: - example: 1 - type: number - message: - example: Rule creation pending approval - type: string - required: - - approval_id - - message - type: object - cloudforceOneCreateRule: - properties: - actions: - items: - $ref: '#/components/schemas/cloudforceOneRuleAction' - type: array - content: - example: 'rule example { condition: true }' - minLength: 1 - type: string - description: - description: >- - Human-readable description of the rule. Auto-extracted from YARA - meta if present. - example: Detects malicious proxy workers - maxLength: 1000 - type: string - enabled: - default: true - description: Whether this rule is active for dice consumers. - example: true - type: boolean - is_public: - default: false - description: Whether this rule is visible to other internal accounts. - example: false - type: boolean - x-auditable: true - name: - example: block-malicious-workers - maxLength: 255 - minLength: 1 - type: string - x-auditable: true - namespaces: - example: - - yara/workers - items: - maxLength: 255 - minLength: 1 - type: string - minItems: 1 - type: array - x-auditable: true - required: - - name - - namespaces - - content - type: object - cloudforceOneDeleteAllResponse: - properties: - deleted: - example: 10 - type: number - required: - - deleted - type: object - cloudforceOneErrorResponse: - $ref: '#/components/schemas/unnamedSchemaRef73de8b634bb48667e28a6c6c56080c51' - cloudforceOnePortScanApiApiResponseCommonFailure: - properties: - errors: - $ref: '#/components/schemas/cloudforceOnePortScanApiMessages' - type: object - messages: - $ref: '#/components/schemas/cloudforceOnePortScanApiMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - type: object - cloudforceOnePortScanApiFrequency: - description: Defines the number of days between each scan (0 = One-off scan). - example: 7 - title: Frequency - type: number - cloudforceOnePortScanApiIps: - description: >- - Defines a list of IP addresses or CIDR blocks to scan. The maximum - number of total IP addresses allowed is 5000. - example: - - 1.1.1.1 - - 2606:4700:4700::1111 - items: - description: >- - Defines a list of IP addresses or CIDR blocks to scan. The maximum - number of total IP addresses allowed is 5000. - type: string - title: IP List - type: array - cloudforceOnePortScanApiMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - cloudforceOnePortScanApiPort: - properties: - number: - example: 8080 - type: number - proto: - example: tcp - type: string - status: - example: open - type: string - required: - - account_id - - ips - - frequency - title: Port - type: object - cloudforceOnePortScanApiPorts: - description: >- - Defines a list of ports to scan. Valid values are:"default", "all", or a - comma-separated list of ports or range of ports (e.g. ["1-80", "443"]). - "default" scans the 100 most commonly open ports. - example: - - default - items: - description: >- - Defines a list of ports to scan. Valid values are:"default", "all", or - a comma-separated list of ports or range of ports (e.g. ["1-80", - "443"]). "default" scans the 100 most commonly open ports. - type: string - title: Port List - type: array - cloudforceOnePortScanApiScanConfig: - properties: - account_id: - example: abcd1234abcd1234abcd1234abcd1234 - type: string - frequency: - $ref: '#/components/schemas/cloudforceOnePortScanApiFrequency' - id: - description: Defines the Config ID. - example: uuid - type: string - ips: - $ref: '#/components/schemas/cloudforceOnePortScanApiIps' - ports: - $ref: '#/components/schemas/cloudforceOnePortScanApiPorts' - required: - - id - - account_id - - ips - - frequency - - ports - title: Config - type: object - cloudforceOneRequestsApiResponseCommon: - properties: - errors: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - messages: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - type: object - cloudforceOneRequestsApiResponseCommonFailure: - properties: - errors: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - properties: - code: - example: 10433 - type: integer - message: - example: request error - type: string - messages: - $ref: '#/components/schemas/cloudforceOneRequestsMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - type: object - cloudforceOneRequestsAssetContent: - description: Asset file to upload. - example: '@/Users/me/example.docx' - type: string - cloudforceOneRequestsLabels: - description: List of labels. - example: - - DoS - - CVE - items: - type: string - title: Labels - type: array - x-auditable: true - cloudforceOneRequestsMessageContent: - description: Content of message. - example: Can you elaborate on the type of DoS that occurred? - type: string - x-auditable: true - cloudforceOneRequestsMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - cloudforceOneRequestsPriority: - enum: - - routine - - high - - urgent - title: Request Priority - type: string - x-auditable: true - cloudforceOneRequestsPriorityEdit: - properties: - labels: - $ref: '#/components/schemas/cloudforceOneRequestsLabels' - priority: - description: Priority. - example: 1 - type: integer - x-auditable: true - requirement: - description: Requirement. - example: DoS attacks carried out by CVEs - type: string - x-auditable: true - tlp: - $ref: '#/components/schemas/cloudforceOneRequestsTlp' - required: - - labels - - priority - - requirement - - tlp - title: Priority Editable Attributes - type: object - cloudforceOneRequestsPriorityItem: - properties: - created: - description: Priority creation time. - $ref: '#/components/schemas/cloudforceOneRequestsTime' - id: - $ref: '#/components/schemas/cloudforceOneRequestsUuid' - labels: - $ref: '#/components/schemas/cloudforceOneRequestsLabels' - priority: - description: Priority. - example: 1 - type: integer - x-auditable: true - requirement: - description: Requirement. - example: DoS attacks carried out by CVEs - type: string - x-auditable: true - tlp: - $ref: '#/components/schemas/cloudforceOneRequestsTlp' - updated: - description: Priority last updated time. - $ref: '#/components/schemas/cloudforceOneRequestsTime' - required: - - id - - created - - updated - - labels - - priority - - requirement - - tlp - title: Priority Item - type: object - cloudforceOneRequestsPriorityList: - properties: - page: - description: Page number of results. - type: integer - per_page: - description: Number of results per page. - example: 10 - type: integer - required: - - page - - per_page - title: Priority List Parameters - type: object - cloudforceOneRequestsQuota: - properties: - anniversary_date: - description: Anniversary date is when annual quota limit is refreshed. - example: '2022-04-01T00:00:00Z' - $ref: '#/components/schemas/cloudforceOneRequestsTime' - quarter_anniversary_date: - description: >- - Quarter anniversary date is when quota limit is refreshed each - quarter. - example: '2022-04-01T00:00:00Z' - $ref: '#/components/schemas/cloudforceOneRequestsTime' - quota: - description: Tokens for the quarter. - example: 120 - type: integer - x-auditable: true - remaining: - description: Tokens remaining for the quarter. - example: 64 - type: integer - x-auditable: true - title: Quota - type: object - cloudforceOneRequestsRequestAssetEdit: - properties: - source: - $ref: '#/components/schemas/cloudforceOneRequestsAssetContent' - title: Request Asset Editable Attributes - type: object - cloudforceOneRequestsRequestAssetItem: - properties: - created: - description: Defines the asset creation time. - example: '2022-01-01T00:00:00Z' - $ref: '#/components/schemas/cloudforceOneRequestsTime' - description: - description: Asset description. - example: example description - type: string - x-auditable: true - file_type: - description: Asset file type. - example: docx - type: string - x-auditable: true - id: - description: Asset ID. - type: integer - x-auditable: true - name: - description: Asset name. - example: example.docx - type: string - x-auditable: true - required: - - id - - name - title: Request Asset Item - type: object - cloudforceOneRequestsRequestAssetList: - properties: - page: - description: Page number of results. - type: integer - per_page: - description: Number of results per page. - example: 10 - type: integer - required: - - page - - per_page - title: Request Asset List Parameters - type: object - cloudforceOneRequestsRequestConstants: - properties: - priority: - example: - - routine - - high - - urgent - items: - $ref: '#/components/schemas/cloudforceOneRequestsPriority' - type: array - status: - example: - - open - - accepted - - reported - - approved - - completed - - declined - items: - $ref: '#/components/schemas/cloudforceOneRequestsRequestStatus' - type: array - tlp: - example: - - clear - - green - - amber - - amber-strict - - red - items: - $ref: '#/components/schemas/cloudforceOneRequestsTlp' - type: array - title: Request Constants - type: object - cloudforceOneRequestsRequestContent: - description: Request content. - example: What regions were most effected by the recent DoS? - type: string - cloudforceOneRequestsRequestEdit: - properties: - content: - $ref: '#/components/schemas/cloudforceOneRequestsRequestContent' - priority: - description: Priority for analyzing the request. - example: routine - type: string - x-auditable: true - request_type: - $ref: '#/components/schemas/cloudforceOneRequestsRequestType' - summary: - $ref: '#/components/schemas/cloudforceOneRequestsRequestSummary' - tlp: - $ref: '#/components/schemas/cloudforceOneRequestsTlp' - title: Request Editable Parameters - type: object - cloudforceOneRequestsRequestItem: - properties: - completed: - $ref: '#/components/schemas/cloudforceOneRequestsTime' - content: - $ref: '#/components/schemas/cloudforceOneRequestsRequestContent' - created: - $ref: '#/components/schemas/cloudforceOneRequestsTime' - id: - $ref: '#/components/schemas/cloudforceOneRequestsUuid' - message_tokens: - description: Tokens for the request messages. - example: 1 - type: integer - x-auditable: true - priority: - $ref: '#/components/schemas/cloudforceOneRequestsTime' - readable_id: - $ref: '#/components/schemas/cloudforceOneRequestsRequestReadableId' - request: - $ref: '#/components/schemas/cloudforceOneRequestsRequestType' - status: - $ref: '#/components/schemas/cloudforceOneRequestsRequestStatus' - summary: - $ref: '#/components/schemas/cloudforceOneRequestsRequestSummary' - tlp: - $ref: '#/components/schemas/cloudforceOneRequestsTlp' - tokens: - description: Tokens for the request. - example: 16 - type: integer - x-auditable: true - updated: - $ref: '#/components/schemas/cloudforceOneRequestsTime' - required: - - id - - created - - updated - - content - - priority - - request - - summary - - tlp - title: Request Item - type: object - cloudforceOneRequestsRequestList: - properties: - completed_after: - description: Retrieve requests completed after this time. - example: '2022-01-01T00:00:00Z' - $ref: '#/components/schemas/cloudforceOneRequestsTime' - completed_before: - description: Retrieve requests completed before this time. - example: '2024-01-01T00:00:00Z' - $ref: '#/components/schemas/cloudforceOneRequestsTime' - created_after: - description: Retrieve requests created after this time. - example: '2022-01-01T00:00:00Z' - $ref: '#/components/schemas/cloudforceOneRequestsTime' - created_before: - description: Retrieve requests created before this time. - example: '2024-01-01T00:00:00Z' - $ref: '#/components/schemas/cloudforceOneRequestsTime' - page: - description: Page number of results. - type: integer - per_page: - description: Number of results per page. - example: 10 - type: integer - request_type: - $ref: '#/components/schemas/cloudforceOneRequestsRequestType' - sort_by: - description: Field to sort results by. - example: created - type: string - sort_order: - description: Sort order (asc or desc). - enum: - - asc - - desc - type: string - status: - $ref: '#/components/schemas/cloudforceOneRequestsRequestStatus' - required: - - page - - per_page - title: Request List Parameters - type: object - cloudforceOneRequestsRequestListItem: - properties: - completed: - description: Request completion time. - example: '2024-01-01T00:00:00Z' - $ref: '#/components/schemas/cloudforceOneRequestsTime' - created: - description: Request creation time. - example: '2022-04-01T00:00:00Z' - $ref: '#/components/schemas/cloudforceOneRequestsTime' - id: - $ref: '#/components/schemas/cloudforceOneRequestsUuid' - message_tokens: - description: Tokens for the request messages. - example: 16 - type: integer - x-auditable: true - priority: - $ref: '#/components/schemas/cloudforceOneRequestsPriority' - readable_id: - $ref: '#/components/schemas/cloudforceOneRequestsRequestReadableId' - request: - $ref: '#/components/schemas/cloudforceOneRequestsRequestType' - status: - $ref: '#/components/schemas/cloudforceOneRequestsRequestStatus' - summary: - $ref: '#/components/schemas/cloudforceOneRequestsRequestSummary' - tlp: - $ref: '#/components/schemas/cloudforceOneRequestsTlp' - tokens: - description: Tokens for the request. - type: integer - x-auditable: true - updated: - description: Request last updated time. - example: '2022-04-01T00:00:00Z' - $ref: '#/components/schemas/cloudforceOneRequestsTime' - required: - - id - - created - - updated - - priority - - request - - summary - - tlp - title: Request List Item - type: object - cloudforceOneRequestsRequestMessageEdit: - properties: - content: - $ref: '#/components/schemas/cloudforceOneRequestsMessageContent' - title: Request Message Editable Attributes - type: object - cloudforceOneRequestsRequestMessageItem: - properties: - author: - description: Author of message. - example: user@domain.com - type: string - x-auditable: true - content: - $ref: '#/components/schemas/cloudforceOneRequestsMessageContent' - created: - description: Defines the message creation time. - example: '2022-01-01T00:00:00Z' - $ref: '#/components/schemas/cloudforceOneRequestsTime' - id: - description: Message ID. - type: integer - x-auditable: true - is_follow_on_request: - description: Whether the message is a follow-on request. - type: boolean - x-auditable: true - updated: - description: Defines the message last updated time. - example: '2022-01-01T00:00:00Z' - $ref: '#/components/schemas/cloudforceOneRequestsTime' - required: - - id - - updated - - content - - author - - is_follow_on_request - title: Request Message Item - type: object - cloudforceOneRequestsRequestMessageList: - properties: - after: - description: Retrieve mes ges created after this time. - $ref: '#/components/schemas/cloudforceOneRequestsTime' - before: - description: Retrieve messages created before this time. - example: '2024-01-01T00:00:00Z' - $ref: '#/components/schemas/cloudforceOneRequestsTime' - page: - description: Page number of results. - type: integer - per_page: - description: Number of results per page. - example: 10 - type: integer - sort_by: - description: Field to sort results by. - example: created - type: string - sort_order: - description: Sort order (asc or desc). - enum: - - asc - - desc - type: string - required: - - page - - per_page - title: Request Message List Parameters - type: object - cloudforceOneRequestsRequestReadableId: - description: Readable Request ID. - example: RFI-2022-000001 - title: Request Readable ID - type: string - x-auditable: true - cloudforceOneRequestsRequestStatus: - description: Request Status. - enum: - - open - - accepted - - reported - - approved - - completed - - declined - title: Request Status - type: string - x-auditable: true - cloudforceOneRequestsRequestSummary: - description: Brief description of the request. - example: DoS attack - type: string - x-auditable: true - cloudforceOneRequestsRequestType: - description: Requested information from request. - example: Victomology - type: string - x-auditable: true - cloudforceOneRequestsRequestTypes: - example: - - Indicators of Compromise - - Victomology - items: - description: Request Types. - type: string - x-auditable: true - title: Request Types - type: array - cloudforceOneRequestsTime: - example: '2022-04-01T05:20:00Z' - format: date-time - type: string - x-auditable: true - cloudforceOneRequestsTlp: - description: The CISA defined Traffic Light Protocol (TLP). - enum: - - clear - - amber - - amber-strict - - green - - red - title: TLP - type: string - x-auditable: true - cloudforceOneRequestsUuid: - description: UUID. - example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 - maxLength: 36 - type: string - cloudforceOneRule: - properties: - content: - example: 'rule example { condition: true }' - type: string - created_at: - example: 1679529600000 - type: number - x-auditable: true - readOnly: true - created_by: - example: user@example.com - type: string - x-auditable: true - description: - example: Detects malicious proxy workers - type: string - enabled: - description: Whether this rule is active for dice consumers. - example: true - type: boolean - id: - example: 550e8400-e29b-41d4-a716-446655440000 - format: uuid - type: string - x-auditable: true - is_public: - description: Whether this rule is visible to other internal accounts. - example: false - type: boolean - x-auditable: true - name: - example: block-malicious-workers - type: string - x-auditable: true - namespaces: - example: - - yara/workers - items: - type: string - type: array - x-auditable: true - updated_at: - example: 1679529600000 - type: number - x-auditable: true - readOnly: true - updated_by: - example: user@example.com - type: string - x-auditable: true - required: - - id - - name - - description - - namespaces - - content - - is_public - - enabled - - created_at - - updated_at - - created_by - - updated_by - type: object - cloudforceOneRuleAction: - properties: - action_config: - description: Action-specific configuration parameters. - type: object - action_type: - enum: - - alert_gchat - - webhook - - logging - - email - - pipeline - - remediation - - throttle - - delete - example: alert_gchat - type: string - enabled: - default: true - type: boolean - required: - - action_type - - action_config - type: object - cloudforceOneRulesListResponse: - properties: - rules: - items: - $ref: '#/components/schemas/cloudforceOneRule' - type: array - total: - example: 100 - type: number - required: - - rules - - total - type: object - cloudforceOneStatsResponse: - properties: - pending_approvals: - example: 5 - type: number - rules_by_namespace: - example: - yara/dns_record: 12 - yara/workers: 30 - type: object - total_rules: - example: 42 - type: number - required: - - total_rules - - rules_by_namespace - - pending_approvals - type: object - cloudforceOneSuccessResponse: - properties: - success: - example: true - type: boolean - required: - - success - type: object - cloudforceOneTreeNode: - properties: - children: - items: - $ref: '#/components/schemas/cloudforceOneTreeNode' - type: array - count: - example: 15 - type: number - name: - example: workers - type: string - path: - example: yara/workers - type: string - required: - - name - - path - - count - - children - type: object - cloudforceOneTreeResponse: - properties: - tree: - items: - $ref: '#/components/schemas/cloudforceOneTreeNode' - type: array - required: - - tree - type: object - cloudforceOneUpdateRule: - properties: - content: - example: 'rule example { condition: true }' - minLength: 1 - type: string - description: - description: >- - Human-readable description of the rule. Auto-extracted from YARA - meta if present. - example: Detects malicious proxy workers - maxLength: 1000 - type: string - enabled: - description: Whether this rule is active for dice consumers. - example: true - type: boolean - is_public: - description: Whether this rule is visible to other internal accounts. - example: false - type: boolean - x-auditable: true - name: - example: block-malicious-workers - maxLength: 255 - minLength: 1 - type: string - x-auditable: true - namespaces: - example: - - yara/workers - items: - maxLength: 255 - minLength: 1 - type: string - type: array - x-auditable: true - type: object - cloudforceOneValidationResponse: - properties: - error: - example: Invalid YARA syntax - type: string - valid: - example: true - type: boolean - required: - - valid - type: object - unnamedSchemaRef73de8b634bb48667e28a6c6c56080c51: - properties: - error: - example: Not Found. - type: string - required: - - error - type: object - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - binary_storage: - id: cloudflare.cloudforce_one.binary_storage - name: binary_storage - title: Binary Storage - methods: - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1binary/post' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1binary~1{hash}/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: '#/components/x-stackQL-resources/binary_storage/methods/create' - update: [] - delete: [] - replace: [] - threat_events: - id: cloudflare.cloudforce_one.threat_events - name: threat_events - title: Threat Events - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - bulk_create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1create~1bulk/post - response: - mediaType: application/json - openAPIDocKey: '202' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1{event_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1{event_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/threat_events/methods/get' - - $ref: '#/components/x-stackQL-resources/threat_events/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/threat_events/methods/bulk_create' - update: - - $ref: '#/components/x-stackQL-resources/threat_events/methods/edit' - delete: [] - replace: [] - aggregate: - id: cloudflare.cloudforce_one.aggregate - name: aggregate - title: Aggregate - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1aggregate/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.aggregations - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/aggregate/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - attackers: - id: cloudflare.cloudforce_one.attackers - name: attackers - title: Attackers - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1attackers/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/attackers/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - events_categories: - id: cloudflare.cloudforce_one.events_categories - name: events_categories - title: Events Categories - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1categories/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/events_categories/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - categories_catalog: - id: cloudflare.cloudforce_one.categories_catalog - name: categories_catalog - title: Categories Catalog - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1categories~1catalog/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/categories_catalog/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - events_categories_create: - id: cloudflare.cloudforce_one.events_categories_create - name: events_categories_create - title: Events Categories Create - methods: - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1categories~1create/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/events_categories_create/methods/create - update: [] - delete: [] - replace: [] - categories: - id: cloudflare.cloudforce_one.categories - name: categories - title: Categories - methods: - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1categories~1{category_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1categories~1{category_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1categories~1{category_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - post_category_update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1categories~1{category_id}/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete_tag_category_delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1tags~1categories~1{category_uuid}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - patch_tag_category_update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1tags~1categories~1{category_uuid}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/categories/methods/get' - insert: - - $ref: >- - #/components/x-stackQL-resources/categories/methods/post_category_update - update: - - $ref: '#/components/x-stackQL-resources/categories/methods/edit' - - $ref: >- - #/components/x-stackQL-resources/categories/methods/patch_tag_category_update - delete: - - $ref: '#/components/x-stackQL-resources/categories/methods/delete' - - $ref: >- - #/components/x-stackQL-resources/categories/methods/delete_tag_category_delete - replace: [] - countries: - id: cloudflare.cloudforce_one.countries - name: countries - title: Countries - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1countries/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/countries/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - events_create: - id: cloudflare.cloudforce_one.events_create - name: events_create - title: Events Create - methods: - create_by_account: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1create/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] - relationships: - id: cloudflare.cloudforce_one.relationships - name: relationships - title: Relationships - methods: - post_dosevent_create_bulk_with_relationships: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1create~1bulk~1relationships/post - response: - mediaType: application/json - openAPIDocKey: '200' - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1relationships~1create/post - response: - mediaType: application/json - openAPIDocKey: '200' - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1{event_id}~1relationships/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/relationships/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/relationships/methods/post_dosevent_create_bulk_with_relationships - update: [] - delete: [] - replace: [] - datasets: - id: cloudflare.cloudforce_one.datasets - name: datasets - title: Datasets - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1create/post - response: - mediaType: application/json - openAPIDocKey: '200' - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - copy: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1copy/post - response: - mediaType: application/json - openAPIDocKey: '200' - move: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1move/post - response: - mediaType: application/json - openAPIDocKey: '200' - populate: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1datasets~1populate/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/datasets/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/datasets/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/datasets/methods/edit' - delete: [] - replace: [] - groups: - id: cloudflare.cloudforce_one.groups - name: groups - title: Groups - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1-~1groups/get - response: - mediaType: application/json - openAPIDocKey: '200' - post_group_create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1-~1groups/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete_group_delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1-~1groups~1{group_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1-~1groups~1{group_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - put_group_update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1-~1groups~1{group_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/groups/methods/get' - - $ref: '#/components/x-stackQL-resources/groups/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/groups/methods/post_group_create' - update: [] - delete: - - $ref: >- - #/components/x-stackQL-resources/groups/methods/delete_group_delete - replace: - - $ref: '#/components/x-stackQL-resources/groups/methods/put_group_update' - members: - id: cloudflare.cloudforce_one.members - name: members - title: Members - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1-~1groups~1{group_id}~1members/get - response: - mediaType: application/json - openAPIDocKey: '200' - post_group_member_create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1-~1groups~1{group_id}~1members/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete_group_member_delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1-~1groups~1{group_id}~1members~1{member_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/members/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/members/methods/post_group_member_create - update: [] - delete: - - $ref: >- - #/components/x-stackQL-resources/members/methods/delete_group_member_delete - replace: [] - dataset: - id: cloudflare.cloudforce_one.dataset - name: dataset - title: Dataset - methods: - delete_dataset_delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - post_dataset_update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/dataset/methods/post_dataset_update - update: [] - delete: - - $ref: >- - #/components/x-stackQL-resources/dataset/methods/delete_dataset_delete - replace: [] - events_dataset: - id: cloudflare.cloudforce_one.events_dataset - name: events_dataset - title: Events Dataset - methods: - get_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/events_dataset/methods/get_by_account - insert: [] - update: [] - delete: [] - replace: [] - events: - id: cloudflare.cloudforce_one.events - name: events - title: Events - methods: - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1events~1{event_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - create_graphql: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1graphql/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete_relate: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1relate~1{event_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - delete_delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1{dataset_id}~1delete/delete - response: - mediaType: application/json - openAPIDocKey: '200' - post_event_update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1{event_id}/post - response: - mediaType: application/json - openAPIDocKey: '200' - create_graphql_v2: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1events~1graphql/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/events/methods/get' - insert: - - $ref: '#/components/x-stackQL-resources/events/methods/post_event_update' - update: [] - delete: [] - replace: [] - indicator_types: - id: cloudflare.cloudforce_one.indicator_types - name: indicator_types - title: Indicator Types - methods: - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1indicatorTypes~1create/post - response: - mediaType: application/json - openAPIDocKey: '200' - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1indicator-types/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/indicator_types/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - dataset_indicators: - id: cloudflare.cloudforce_one.dataset_indicators - name: dataset_indicators - title: Dataset Indicators - methods: - list_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1indicators/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.indicators - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/dataset_indicators/methods/list_by_account - insert: [] - update: [] - delete: [] - replace: [] - bulk: - id: cloudflare.cloudforce_one.bulk - name: bulk - title: Bulk - methods: - post_indicator_create_bulk: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1indicators~1bulk/post - response: - mediaType: application/json - openAPIDocKey: '200' - patch_event_update_bulk: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1update~1bulk/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/bulk/methods/post_indicator_create_bulk - update: - - $ref: >- - #/components/x-stackQL-resources/bulk/methods/patch_event_update_bulk - delete: [] - replace: [] - indicators: - id: cloudflare.cloudforce_one.indicators - name: indicators - title: Indicators - methods: - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1indicators~1create/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete_indicator_delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1indicators~1{indicator_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1indicators~1{indicator_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - patch_indicator_update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1indicators~1{indicator_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/indicators/methods/get' - insert: [] - update: - - $ref: >- - #/components/x-stackQL-resources/indicators/methods/patch_indicator_update - delete: - - $ref: >- - #/components/x-stackQL-resources/indicators/methods/delete_indicator_delete - replace: [] - indicators_tags: - id: cloudflare.cloudforce_one.indicators_tags - name: indicators_tags - title: Indicators Tags - methods: - list_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1indicators~1tags/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/indicators_tags/methods/list_by_account - insert: [] - update: [] - delete: [] - replace: [] - permissions: - id: cloudflare.cloudforce_one.permissions - name: permissions - title: Permissions - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1permissions/get - response: - mediaType: application/json - openAPIDocKey: '200' - post_permission_create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1permissions/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete_permission_delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1permissions~1{grant_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - put_permission_update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1permissions~1{grant_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/permissions/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/permissions/methods/post_permission_create - update: [] - delete: - - $ref: >- - #/components/x-stackQL-resources/permissions/methods/delete_permission_delete - replace: - - $ref: >- - #/components/x-stackQL-resources/permissions/methods/put_permission_update - tags_indicators: - id: cloudflare.cloudforce_one.tags_indicators - name: tags_indicators - title: Tags Indicators - methods: - list_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1tags~1{tag_uuid}~1indicators/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.indicators - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/tags_indicators/methods/list_by_account - insert: [] - update: [] - delete: [] - replace: [] - dataset_target_industries: - id: cloudflare.cloudforce_one.dataset_target_industries - name: dataset_target_industries - title: Dataset Target Industries - methods: - list_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1targetIndustries/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/dataset_target_industries/methods/list_by_account - insert: [] - update: [] - delete: [] - replace: [] - event_tags: - id: cloudflare.cloudforce_one.event_tags - name: event_tags - title: Event Tags - methods: - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1event_tag~1{event_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1event_tag~1{event_id}~1create/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: '#/components/x-stackQL-resources/event_tags/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/event_tags/methods/delete' - replace: [] - indicator_types_indicator_types: - id: cloudflare.cloudforce_one.indicator_types_indicator_types - name: indicator_types_indicator_types - title: Indicator Types Indicator Types - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1indicatorTypes/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/indicator_types_indicator_types/methods/list - insert: [] - update: [] - delete: [] - replace: [] - events_indicators: - id: cloudflare.cloudforce_one.events_indicators - name: events_indicators - title: Events Indicators - methods: - list_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1indicators/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/events_indicators/methods/list_by_account - insert: [] - update: [] - delete: [] - replace: [] - queries: - id: cloudflare.cloudforce_one.queries - name: queries - title: Queries - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1queries/get - response: - mediaType: application/json - openAPIDocKey: '200' - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1queries~1create/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete_event_query_delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1queries~1{query_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1queries~1{query_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - patch_event_query_update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1queries~1{query_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - post_event_query_update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1queries~1{query_id}/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/queries/methods/get' - - $ref: '#/components/x-stackQL-resources/queries/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/queries/methods/post_event_query_update - update: - - $ref: >- - #/components/x-stackQL-resources/queries/methods/patch_event_query_update - delete: - - $ref: >- - #/components/x-stackQL-resources/queries/methods/delete_event_query_delete - replace: [] - events_raw: - id: cloudflare.cloudforce_one.events_raw - name: events_raw - title: Events Raw - methods: - get_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1raw~1{dataset_id}~1{event_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/events_raw/methods/get_by_account' - insert: [] - update: [] - delete: [] - replace: [] - relate_create: - id: cloudflare.cloudforce_one.relate_create - name: relate_create - title: Relate Create - methods: - create_by_account: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1relate~1{event_id}~1create/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] - events_tags: - id: cloudflare.cloudforce_one.events_tags - name: events_tags - title: Events Tags - methods: - list_by_account: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1tags/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.tags - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/events_tags/methods/list_by_account - insert: [] - update: [] - delete: [] - replace: [] - tags_categories: - id: cloudflare.cloudforce_one.tags_categories - name: tags_categories - title: Tags Categories - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1tags~1categories/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.categories - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/tags_categories/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - tags_categories_create: - id: cloudflare.cloudforce_one.tags_categories_create - name: tags_categories_create - title: Tags Categories Create - methods: - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1tags~1categories~1create/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] - tags: - id: cloudflare.cloudforce_one.tags - name: tags - title: Tags - methods: - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1tags~1create/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete_tag_delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1tags~1{tag_uuid}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - patch_tag_update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1tags~1{tag_uuid}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: '#/components/x-stackQL-resources/tags/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/tags/methods/patch_tag_update' - delete: - - $ref: '#/components/x-stackQL-resources/tags/methods/delete_tag_delete' - replace: [] - events_target_industries: - id: cloudflare.cloudforce_one.events_target_industries - name: events_target_industries - title: Events Target Industries - methods: - list_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1targetIndustries/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/events_target_industries/methods/list_by_account - insert: [] - update: [] - delete: [] - replace: [] - target_industries_catalog: - id: cloudflare.cloudforce_one.target_industries_catalog - name: target_industries_catalog - title: Target Industries Catalog - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1targetIndustries~1catalog/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/target_industries_catalog/methods/list - insert: [] - update: [] - delete: [] - replace: [] - raw: - id: cloudflare.cloudforce_one.raw - name: raw - title: Raw - methods: - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1{event_id}~1raw~1{raw_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1{event_id}~1raw~1{raw_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - post_event_raw_update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1{event_id}~1raw~1{raw_id}/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/raw/methods/get' - insert: - - $ref: '#/components/x-stackQL-resources/raw/methods/post_event_raw_update' - update: - - $ref: '#/components/x-stackQL-resources/raw/methods/edit' - delete: [] - replace: [] - cloudforce_one: - id: cloudflare.cloudforce_one.cloudforce_one - name: cloudforce_one - title: Cloudforce One - methods: - create_requests: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1requests/post' - response: - mediaType: application/json - openAPIDocKey: '200' - generate_v2: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1letter~1generate/post - response: - mediaType: application/json - openAPIDocKey: '200' - search_v2: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1logo~1search/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] - requests_constants: - id: cloudflare.cloudforce_one.requests_constants - name: requests_constants - title: Requests Constants - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1constants/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/requests_constants/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - requests_new: - id: cloudflare.cloudforce_one.requests_new - name: requests_new - title: Requests New - methods: - new_by_account: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1new/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] - requests: - id: cloudflare.cloudforce_one.requests - name: requests - title: Requests - methods: - create_priority: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1priority/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1{request_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1{request_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1{request_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - create_asset: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1{request_id}~1asset/post - response: - mediaType: application/json - openAPIDocKey: '200' - create_message: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1{request_id}~1message/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/requests/methods/get' - insert: [] - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/requests/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/requests/methods/update' - priority: - id: cloudflare.cloudforce_one.priority - name: priority - title: Priority - methods: - new: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1priority~1new/post - response: - mediaType: application/json - openAPIDocKey: '200' - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1priority~1quota/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1priority~1{priority_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1priority~1{priority_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1priority~1{priority_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/priority/methods/get' - - $ref: '#/components/x-stackQL-resources/priority/methods/list' - insert: [] - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/priority/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/priority/methods/update' - requests_quota: - id: cloudflare.cloudforce_one.requests_quota - name: requests_quota - title: Requests Quota - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1quota/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/requests_quota/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - requests_types: - id: cloudflare.cloudforce_one.requests_types - name: requests_types - title: Requests Types - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1types/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/requests_types/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - assets: - id: cloudflare.cloudforce_one.assets - name: assets - title: Assets - methods: - new: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1{request_id}~1asset~1new/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1{request_id}~1asset~1{asset_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1{request_id}~1asset~1{asset_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1{request_id}~1asset~1{asset_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/assets/methods/get' - insert: [] - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/assets/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/assets/methods/update' - message_new: - id: cloudflare.cloudforce_one.message_new - name: message_new - title: Message New - methods: - new_by_account: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1{request_id}~1message~1new/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] - message: - id: cloudflare.cloudforce_one.message - name: message - title: Message - methods: - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1{request_id}~1message~1{message_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1{request_id}~1message~1{message_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/message/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/message/methods/update' - rules: - id: cloudflare.cloudforce_one.rules - name: rules - title: Rules - methods: - cloudforce_one_delete_all_rules: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1rules/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1rules/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.rules - cloudforce_one_create_rule: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1rules/post' - response: - mediaType: application/json - openAPIDocKey: '201' - validate: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1rules~1validate/post - response: - mediaType: application/json - openAPIDocKey: '200' - cloudforce_one_delete_rule: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1rules~1{id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1rules~1{id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - cloudforce_one_update_rule: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1rules~1{id}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/rules/methods/get' - - $ref: '#/components/x-stackQL-resources/rules/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/rules/methods/cloudforce_one_create_rule - update: [] - delete: - - $ref: >- - #/components/x-stackQL-resources/rules/methods/cloudforce_one_delete_rule - - $ref: >- - #/components/x-stackQL-resources/rules/methods/cloudforce_one_delete_all_rules - replace: - - $ref: >- - #/components/x-stackQL-resources/rules/methods/cloudforce_one_update_rule - managed: - id: cloudflare.cloudforce_one.managed - name: managed - title: Managed - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1rules~1managed/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.rules - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/managed/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - stats: - id: cloudflare.cloudforce_one.stats - name: stats - title: Stats - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1rules~1stats/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/stats/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - trees: - id: cloudflare.cloudforce_one.trees - name: trees - title: Trees - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1rules~1tree/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.tree - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/trees/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - config: - id: cloudflare.cloudforce_one.config - name: config - title: Config - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1scans~1config/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1scans~1config/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1scans~1config~1{config_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1scans~1config~1{config_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/config/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/config/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/config/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/config/methods/delete' - replace: [] - results: - id: cloudflare.cloudforce_one.results - name: results - title: Results - methods: - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1scans~1results~1{config_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/results/methods/get' - insert: [] - update: [] - delete: [] - replace: [] - templates: - id: cloudflare.cloudforce_one.templates - name: templates - title: Templates - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1letter~1templates/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.templates - post_letter_template_create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1letter~1templates/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete_letter_template_delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1letter~1templates~1{template_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1letter~1templates~1{template_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - put_letter_template_update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1letter~1templates~1{template_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/templates/methods/get' - - $ref: '#/components/x-stackQL-resources/templates/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/templates/methods/post_letter_template_create - update: [] - delete: - - $ref: >- - #/components/x-stackQL-resources/templates/methods/delete_letter_template_delete - replace: - - $ref: >- - #/components/x-stackQL-resources/templates/methods/put_letter_template_update - total_queries: - id: cloudflare.cloudforce_one.total_queries - name: total_queries - title: Total Queries - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1total-queries/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/total_queries/methods/list' - insert: [] - update: [] - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: cloudforce_one API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/cloudforce-one/binary: + post: + operationId: post_BinDBPost + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + multipart/form-data: + schema: + properties: + file: + description: The binary file content to upload. + format: binary + type: string + required: + - file + type: object + description: Binary file to be uploaded to the database. + responses: + '200': + content: + application/json: + schema: + properties: + content_type: + type: string + md5: + type: string + sha1: + type: string + sha256: + type: string + required: + - md5 + - sha1 + - sha256 + - content_type + type: object + description: Returns file information + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Posts a file to Binary Storage + tags: + - BinDB + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - binary_storage + method: create + /accounts/{account_id}/cloudforce-one/binary/{hash}: + get: + operationId: get_BinDBGetBinary + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: hash of the binary + in: path + name: hash + schema: + description: hash of the binary + type: string + required: true + responses: + '200': + description: Returns file information + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Retrieves a file from Binary Storage + tags: + - BinDB + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - binary_storage + method: get + /accounts/{account_id}/cloudforce-one/events: + get: + description: Use `datasetId=all` or `datasetId=*` to query all event datasets for the account (limited to 10). When `datasetId` is unspecified, events are listed from the default Cloudforce One Threat Events dataset. To list existing datasets, use the [`List Datasets`](https://developers.cloudflare.com/api/resources/cloudforce_one/subresources/threat_events/subresources/datasets/methods/list/) endpoint. + operationId: get_EventListGet + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: cursor + schema: + description: Cursor for pagination. When provided, filters are embedded in the cursor so you only need to pass cursor and pageSize. Returned in the previous response's result_info.cursor field. Use cursor-based pagination for deep pagination (beyond 100,000 records) or for optimal performance. + type: string + - in: query + name: search + schema: + default: [] + items: + properties: + field: + description: 'Event field to search on. Allowed: attacker, attackerCountry, category, createdAt, date, event, indicator, indicatorType, killChain, mitreAttack, tags, targetCountry, targetIndustry, tlp, uuid.' + type: string + op: + description: Search operator. Use 'in' for bulk lookup of up to 100 values at once, e.g. {field:'tags', op:'in', value:['malware','apt']}. + enum: + - equals + - not + - gt + - gte + - lt + - lte + - like + - contains + - startsWith + - endsWith + - in + - find + type: string + value: + description: Search value. String or number for most operators. Array for 'in' operator (max 100 items). + type: string + items: + type: string + type: object + type: array + explode: true + - in: query + name: page + schema: + description: Page number (1-indexed) for offset-based pagination. Limited to offset of 100,000 records. For deep pagination, use cursor-based pagination instead. + type: number + - in: query + name: pageSize + schema: + description: Number of results per page. Maximum 25,000. + type: number + - in: query + name: orderBy + schema: + type: string + - in: query + name: order + schema: + enum: + - asc + - desc + type: string + - in: query + name: datasetId + schema: + description: Dataset IDs to query events from (array of UUIDs), or special value 'all' or '*' to query all event datasets for the account. If not provided, uses the default dataset. + items: + type: string + type: array + explode: true + - in: query + name: forceRefresh + schema: + type: boolean + - in: query + name: format + schema: + enum: + - json + - stix2 + type: string + responses: + '200': + content: + application/json: + schema: + items: + properties: + attacker: + type: string + attackerCountry: + type: string + category: + type: string + datasetId: + type: string + date: + type: string + event: + type: string + hasChildren: + type: boolean + indicator: + type: string + indicatorType: + type: string + indicatorTypeId: + type: number + insight: + type: string + killChain: + type: number + mitreAttack: + items: + type: string + type: array + mitreCapec: + items: + type: string + type: array + numReferenced: + type: number + numReferences: + type: number + rawId: + type: string + referenced: + items: + type: string + type: array + referencedIds: + items: + type: number + type: array + references: + items: + type: string + type: array + referencesIds: + items: + type: number + type: array + releasabilityId: + type: string + tags: + items: + type: string + type: array + targetCountry: + type: string + targetIndustry: + type: string + tlp: + type: string + uuid: + type: string + required: + - uuid + - date + - targetCountry + - attacker + - attackerCountry + - targetIndustry + - rawId + - indicatorTypeId + - indicator + - event + - numReferenced + - numReferences + - tlp + - category + - indicatorType + - referenced + - references + - tags + - killChain + - mitreAttack + - mitreCapec + - referencedIds + - referencesIds + - hasChildren + - datasetId + type: object + type: array + description: Returns a list of events. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Filter and list events + tags: + - Event + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - threat_events + method: list + /accounts/{account_id}/cloudforce-one/events/aggregate: + get: + description: Aggregate threat events by one or more columns (e.g., attacker, targetIndustry) with optional date filtering and daily grouping. Supports multi-dimensional aggregation for cross-analysis. + operationId: get_EventAggregate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Column(s) to aggregate by - single column or comma-separated list (e.g., 'attacker', 'targetIndustry', 'attacker,targetIndustry') + in: query + name: aggregateBy + schema: + description: Column(s) to aggregate by - single column or comma-separated list (e.g., 'attacker', 'targetIndustry', 'attacker,targetIndustry') + type: string + - description: Dataset ID(s) to filter by. Can be a single dataset ID, comma-separated list, or array. If not provided, uses default dataset + in: query + name: datasetId + schema: + description: Dataset ID(s) to filter by. Can be a single dataset ID, comma-separated list, or array. If not provided, uses default dataset + items: + type: string + type: array + explode: true + - description: Start date for filtering (ISO 8601 format, e.g., '2024-01-01') + in: query + name: startDate + schema: + description: Start date for filtering (ISO 8601 format, e.g., '2024-01-01') + type: string + - description: End date for filtering (ISO 8601 format, e.g., '2024-12-31') + in: query + name: endDate + schema: + description: End date for filtering (ISO 8601 format, e.g., '2024-12-31') + type: string + - description: Whether to group results by date (daily aggregation) + in: query + name: groupByDate + schema: + description: Whether to group results by date (daily aggregation) + type: boolean + - description: Maximum number of results to return + in: query + name: limit + schema: + default: 100 + description: Maximum number of results to return + type: number + responses: + '200': + content: + application/json: + schema: + properties: + aggregateBy: + description: Column(s) that were aggregated by + type: string + aggregations: + description: Array of aggregation results with dynamic fields based on aggregateBy columns + items: + type: object + properties: + count: + description: Number of events for this aggregation + type: number + date: + description: Date (if groupByDate is true) + type: string + required: + - count + type: array + dateRange: + description: Date range used for filtering + properties: + endDate: + type: string + startDate: + type: string + type: object + total: + description: Total number of events in the aggregation + type: number + required: + - aggregations + - total + - aggregateBy + type: object + description: Returns aggregated event data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Aggregate events by single or multiple columns with optional date filtering + tags: + - Event + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/attackers: + get: + operationId: get_AttackerList + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Array of dataset IDs to query attackers from. If not provided, uses the default dataset. + in: query + name: datasetIds + schema: + description: Array of dataset IDs to query attackers from. If not provided, uses the default dataset. + items: + type: string + type: array + explode: true + responses: + '200': + content: + application/json: + schema: + properties: + items: + properties: + type: + type: string + required: + - type + type: object + type: + type: string + required: + - type + - items + type: object + description: Returns a list of attackers. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Lists attackers across multiple datasets + tags: + - Attacker + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - threat_events + - attackers + method: list + /accounts/{account_id}/cloudforce-one/events/categories: + get: + operationId: get_CategoryList + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Array of dataset IDs to query categories from. If not provided, uses the default dataset. + in: query + name: datasetIds + schema: + description: Array of dataset IDs to query categories from. If not provided, uses the default dataset. + items: + type: string + type: array + explode: true + responses: + '200': + content: + application/json: + schema: + items: + properties: + killChain: + type: number + mitreAttack: + items: + type: string + type: array + mitreCapec: + items: + type: string + type: array + name: + type: string + shortname: + type: string + uuid: + type: string + required: + - uuid + - name + - killChain + type: object + type: array + description: Returns a list of categories. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Lists categories across multiple datasets + tags: + - Category + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - threat_events + - categories + method: list + /accounts/{account_id}/cloudforce-one/events/categories/catalog: + get: + operationId: get_CategoryListComplete + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + items: + properties: + killChain: + type: number + mitreAttack: + items: + type: string + type: array + mitreCapec: + items: + type: string + type: array + name: + type: string + shortname: + type: string + uuid: + type: string + required: + - uuid + - name + - killChain + type: object + type: array + description: Returns a list of categories. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Lists categories + tags: + - Category + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/categories/create: + post: + operationId: post_CategoryCreate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + killChain: + type: number + mitreAttack: + items: + type: string + type: array + mitreCapec: + items: + type: string + type: array + name: + type: string + shortname: + type: string + required: + - name + - killChain + type: object + responses: + '200': + content: + application/json: + schema: + properties: + killChain: + type: number + mitreAttack: + items: + type: string + type: array + mitreCapec: + items: + type: string + type: array + name: + type: string + shortname: + type: string + uuid: + type: string + required: + - uuid + - name + - killChain + type: object + description: Returns the created category. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Creates a new category + tags: + - Category + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - threat_events + - categories + method: create + /accounts/{account_id}/cloudforce-one/events/categories/{category_id}: + delete: + operationId: delete_CategoryDelete + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Category UUID. + in: path + name: category_id + schema: + description: Category UUID. + format: uuid + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + uuid: + type: string + required: + - uuid + type: object + description: Returns the uuid of the deleted category. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Deletes a category + tags: + - Category + x-api-token-group: + - Cloudforce One Write + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - threat_events + - categories + method: delete + get: + operationId: get_CategoryRead + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Category UUID. + in: path + name: category_id + schema: + description: Category UUID. + format: uuid + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + killChain: + type: number + mitreAttack: + items: + type: string + type: array + mitreCapec: + items: + type: string + type: array + name: + type: string + shortname: + type: string + uuid: + type: string + required: + - uuid + - name + - killChain + type: object + description: Returns a category. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Reads a category + tags: + - Category + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - threat_events + - categories + method: get + patch: + operationId: patch_CategoryUpdate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Category UUID. + in: path + name: category_id + schema: + description: Category UUID. + format: uuid + type: string + required: true + requestBody: + content: + application/json: + schema: + properties: + killChain: + type: number + mitreAttack: + items: + type: string + type: array + mitreCapec: + items: + type: string + type: array + name: + type: string + shortname: + type: string + type: object + responses: + '200': + content: + application/json: + schema: + properties: + killChain: + type: number + mitreAttack: + items: + type: string + type: array + mitreCapec: + items: + type: string + type: array + name: + type: string + shortname: + type: string + uuid: + type: string + required: + - uuid + - name + - killChain + type: object + description: Returns the updated category. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Updates a category + tags: + - Category + x-api-token-group: + - Cloudforce One Write + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - threat_events + - categories + method: edit + post: + operationId: post_CategoryUpdate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Category UUID. + in: path + name: category_id + schema: + description: Category UUID. + format: uuid + type: string + required: true + requestBody: + content: + application/json: + schema: + properties: + killChain: + type: number + mitreAttack: + items: + type: string + type: array + mitreCapec: + items: + type: string + type: array + name: + type: string + shortname: + type: string + type: object + responses: + '200': + content: + application/json: + schema: + properties: + killChain: + type: number + mitreAttack: + items: + type: string + type: array + mitreCapec: + items: + type: string + type: array + name: + type: string + shortname: + type: string + uuid: + type: string + required: + - uuid + - name + - killChain + type: object + description: Returns the updated category. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Updates a category + tags: + - Category + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/countries: + get: + operationId: get_CountryRead + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + items: + properties: + result: + items: + properties: + alpha3: + type: string + name: + type: string + required: + - name + - alpha3 + type: object + type: array + success: + type: string + required: + - success + - result + type: object + type: array + description: Returns the long and short country code for every country. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Retrieves countries information for all countries + tags: + - Country + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - threat_events + - countries + method: list + /accounts/{account_id}/cloudforce-one/events/create: + post: + description: To create a dataset, see the [`Create Dataset`](https://developers.cloudflare.com/api/resources/cloudforce_one/subresources/threat_events/subresources/datasets/methods/create/) endpoint. When `datasetId` parameter is unspecified, it will be created in a default dataset named `Cloudforce One Threat Events`. + operationId: post_EventCreate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + accountId: + type: number + attacker: + nullable: true + type: string + attackerCountry: + type: string + category: + type: string + datasetId: + type: string + date: + format: date-time + type: string + event: + type: string + indicator: + type: string + indicatorType: + type: string + indicators: + description: Array of indicators for this event. Supports multiple indicators per event for complex scenarios. + items: + properties: + indicatorType: + description: The type of indicator (e.g., DOMAIN, IP, JA3, HASH) + type: string + value: + description: The indicator value (e.g., domain name, IP address, hash) + type: string + required: + - value + - indicatorType + type: object + type: array + insight: + type: string + raw: + properties: + data: + nullable: true + type: object + source: + type: string + tlp: + type: string + required: + - data + type: object + tags: + items: + type: string + type: array + targetCountry: + type: string + targetIndustry: + type: string + tlp: + type: string + required: + - date + - category + - event + - tlp + - raw + type: object + responses: + '200': + content: + application/json: + schema: + properties: + attacker: + type: string + attackerCountry: + type: string + category: + type: string + datasetId: + type: string + date: + type: string + event: + type: string + hasChildren: + type: boolean + indicator: + type: string + indicatorType: + type: string + indicatorTypeId: + type: number + insight: + type: string + killChain: + type: number + mitreAttack: + items: + type: string + type: array + mitreCapec: + items: + type: string + type: array + numReferenced: + type: number + numReferences: + type: number + rawId: + type: string + referenced: + items: + type: string + type: array + referencedIds: + items: + type: number + type: array + references: + items: + type: string + type: array + referencesIds: + items: + type: number + type: array + releasabilityId: + type: string + tags: + items: + type: string + type: array + targetCountry: + type: string + targetIndustry: + type: string + tlp: + type: string + uuid: + type: string + required: + - uuid + - date + - targetCountry + - attacker + - attackerCountry + - targetIndustry + - rawId + - indicatorTypeId + - indicator + - event + - numReferenced + - numReferences + - tlp + - category + - indicatorType + - referenced + - references + - tags + - killChain + - mitreAttack + - mitreCapec + - referencedIds + - referencesIds + - hasChildren + - datasetId + type: object + description: Returns the created event. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Creates a new event + tags: + - Event + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/create/bulk: + post: + description: The `datasetId` parameter must be defined. To list existing datasets (and their IDs) in your account, use the [`List Datasets`](https://developers.cloudflare.com/api/resources/cloudforce_one/subresources/threat_events/subresources/datasets/methods/list/) endpoint. + operationId: post_EventCreateBulk + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + data: + items: + properties: + accountId: + type: number + attacker: + nullable: true + type: string + attackerCountry: + type: string + category: + type: string + datasetId: + type: string + date: + format: date-time + type: string + event: + type: string + indicator: + type: string + indicatorType: + type: string + indicators: + description: Array of indicators for this event. Supports multiple indicators per event for complex scenarios. + items: + properties: + indicatorType: + description: The type of indicator (e.g., DOMAIN, IP, JA3, HASH) + type: string + value: + description: The indicator value (e.g., domain name, IP address, hash) + type: string + required: + - value + - indicatorType + type: object + type: array + insight: + type: string + raw: + properties: + data: + nullable: true + type: object + source: + type: string + tlp: + type: string + required: + - data + type: object + tags: + items: + type: string + type: array + targetCountry: + type: string + targetIndustry: + type: string + tlp: + type: string + required: + - date + - category + - event + - tlp + - raw + type: object + type: array + datasetId: + type: string + includeCreatedEvents: + description: When true, response includes array of created event UUIDs and shard IDs. Useful for tracking which events were created and where. + type: boolean + required: + - data + - datasetId + type: object + responses: + '202': + content: + application/json: + schema: + description: Detailed result of bulk event creation with auto-tag management + properties: + createBulkEventsRequestId: + description: Correlation ID for async indicator processing + format: uuid + type: string + createdEvents: + description: Array of created events with UUIDs and shard locations. Only present when includeCreatedEvents=true + items: + properties: + eventIndex: + description: Original index in the input data array + type: number + shardId: + description: Dataset ID of the shard where the event was created + type: string + uuid: + description: UUID of the created event + format: uuid + type: string + required: + - eventIndex + - uuid + - shardId + type: object + type: array + createdEventsCount: + description: Number of events created + type: number + createdTagsCount: + description: Number of new tags created in SoT + type: number + errorCount: + description: Number of errors encountered + type: number + errors: + description: Array of error details + items: + properties: + error: + description: Error message + type: string + eventIndex: + description: Index of the event that caused the error + type: number + required: + - eventIndex + - error + type: object + type: array + queuedIndicatorsCount: + description: Number of indicators queued for async processing + type: number + required: + - createdEventsCount + - queuedIndicatorsCount + - createdTagsCount + - errorCount + type: object + description: Accepted. Events created; indicators queued for async processing. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Creates bulk events + tags: + - Event + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - threat_events + method: bulk_create + /accounts/{account_id}/cloudforce-one/events/create/bulk/relationships: + post: + deprecated: true + description: This method is deprecated. Please use `event_create_bulk` instead + operationId: post_DOSEventCreateBulkWithRelationships + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + data: + items: + properties: + accountId: + type: number + attacker: + nullable: true + type: string + attackerCountry: + type: string + category: + type: string + datasetId: + type: string + date: + format: date-time + type: string + event: + type: string + indicator: + type: string + indicatorType: + type: string + indicators: + description: Array of indicators for this event. Supports multiple indicators per event for complex scenarios. + items: + properties: + indicatorType: + description: The type of indicator (e.g., DOMAIN, IP, JA3, HASH) + type: string + value: + description: The indicator value (e.g., domain name, IP address, hash) + type: string + required: + - value + - indicatorType + type: object + type: array + insight: + type: string + raw: + properties: + data: + nullable: true + type: object + source: + type: string + tlp: + type: string + required: + - data + type: object + tags: + items: + type: string + type: array + targetCountry: + type: string + targetIndustry: + type: string + tlp: + type: string + required: + - date + - category + - event + - tlp + - raw + type: object + type: array + datasetId: + type: string + required: + - data + - datasetId + type: object + responses: + '200': + content: + application/json: + schema: + description: Result of bulk relationship creation operation + properties: + createdEventsCount: + description: Number of events created + type: number + createdIndicatorsCount: + description: Number of indicators created + type: number + createdRelationshipsCount: + description: Number of relationships created + type: number + errorCount: + description: Number of errors encountered + type: number + errors: + description: Array of error details + items: + properties: + error: + description: Error message + type: string + eventIndex: + description: Index of the event that caused the error + type: number + required: + - eventIndex + - error + type: object + type: array + required: + - createdEventsCount + - createdIndicatorsCount + - createdRelationshipsCount + - errorCount + type: object + description: Returns the number of created bulk events with relationships. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Creates bulk DOS event with relationships and indicators + tags: + - Event + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/dataset: + get: + operationId: get_DatasetList + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + items: + properties: + isPublic: + type: boolean + name: + type: string + uuid: + type: string + required: + - uuid + - name + - isPublic + type: object + type: array + description: Returns a list of dataset in an account. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Lists all datasets in an account + tags: + - Dataset + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - threat_events + - datasets + method: list + /accounts/{account_id}/cloudforce-one/events/dataset/-/groups: + get: + description: List groups for an account + operationId: get_GroupList + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + items: + properties: + createdAt: + format: date-time + type: string + description: + type: string + name: + type: string + updatedAt: + format: date-time + type: string + uuid: + type: string + required: + - uuid + - name + - description + - createdAt + - updatedAt + type: object + type: array + description: Returns the list of groups. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: List groups for an account + tags: + - Groups + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + post: + description: Create a group + operationId: post_GroupCreate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + description: + type: string + name: + type: string + required: + - name + - description + type: object + responses: + '200': + content: + application/json: + schema: + properties: + createdAt: + format: date-time + type: string + description: + type: string + name: + type: string + updatedAt: + format: date-time + type: string + uuid: + type: string + required: + - uuid + - name + - description + - createdAt + - updatedAt + type: object + description: Returns the created group. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Create a group + tags: + - Groups + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/dataset/-/groups/{group_id}: + delete: + description: Delete a group for an account + operationId: delete_GroupDelete + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: group_id + in: path + required: true + description: The Access group ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + message: + type: string + success: + type: boolean + type: object + description: Group deleted successfully. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Delete a group for an account + tags: + - Groups + x-api-token-group: + - Cloudforce One Write + get: + description: Read a group for an account + operationId: get_GroupRead + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: group_id + in: path + required: true + description: The Access group ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + createdAt: + format: date-time + type: string + description: + type: string + members: + items: + properties: + accountId: + type: string + accountTag: + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + uuid: + type: string + required: + - uuid + - accountId + type: object + type: array + name: + type: string + updatedAt: + format: date-time + type: string + uuid: + type: string + required: + - uuid + - name + - description + - createdAt + - updatedAt + - members + type: object + description: Return the group. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Read a group for an account + tags: + - Groups + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + put: + description: Update a group + operationId: put_GroupUpdate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: group_id + in: path + required: true + description: The Access group ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + description: + type: string + name: + type: string + required: + - name + - description + type: object + responses: + '200': + content: + application/json: + schema: + properties: + createdAt: + format: date-time + type: string + description: + type: string + name: + type: string + updatedAt: + format: date-time + type: string + uuid: + type: string + required: + - uuid + - name + - description + - createdAt + - updatedAt + type: object + description: Returns the updated group. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Update a group + tags: + - Groups + x-api-token-group: + - Cloudforce One Write + /accounts/{account_id}/cloudforce-one/events/dataset/-/groups/{group_id}/members: + get: + description: List group members + operationId: get_GroupMemberList + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: group_id + in: path + required: true + description: The Access group ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + items: + properties: + accountId: + type: string + accountTag: + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + uuid: + type: string + required: + - uuid + - accountId + type: object + type: array + description: Returns the group members. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: List group members + tags: + - Groups + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + post: + description: Create a group member + operationId: post_GroupMemberCreate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: group_id + in: path + required: true + description: The Access group ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + accountId: + type: string + accountTag: + type: string + type: object + responses: + '200': + content: + application/json: + schema: + properties: + accountId: + type: string + accountTag: + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + uuid: + type: string + required: + - uuid + - accountId + type: object + description: Returns the created group member. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Create a group member + tags: + - Groups + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/dataset/-/groups/{group_id}/members/{member_id}: + delete: + description: Delete a group member + operationId: delete_GroupMemberDelete + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: group_id + in: path + required: true + description: The Access group ID. + schema: + type: string + - name: member_id + in: path + required: true + description: The account member ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + message: + type: string + success: + type: boolean + type: object + description: Returns the created group member. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Delete a group member + tags: + - Groups + x-api-token-group: + - Cloudforce One Write + /accounts/{account_id}/cloudforce-one/events/dataset/create: + post: + operationId: post_DatasetCreate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + isPublic: + description: If true, then anyone can search the dataset. If false, then its limited to the account. + type: boolean + name: + description: Used to describe the dataset within the account context. + minLength: 1 + type: string + required: + - name + - isPublic + type: object + responses: + '200': + content: + application/json: + schema: + properties: + isPublic: + type: boolean + name: + type: string + uuid: + type: string + required: + - uuid + - name + - isPublic + type: object + description: Returns dataset information. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Creates a dataset + tags: + - Dataset + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - threat_events + - datasets + method: create + /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}: + delete: + description: Deletes a dataset given a datasetId. + operationId: delete_DatasetDelete + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + name: + type: string + uuid: + type: string + required: + - uuid + - name + type: object + description: Returns the uuid and name of the deleted dataset. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Delete a dataset + tags: + - Dataset + x-api-token-group: + - Cloudforce One Write + get: + operationId: get_DatasetRead + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + isPublic: + type: boolean + name: + type: string + uuid: + type: string + required: + - uuid + - name + - isPublic + type: object + description: Returns a dataset. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Reads a dataset + tags: + - Dataset + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - threat_events + - datasets + method: get + patch: + operationId: patch_DatasetUpdate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + isPublic: + description: If true, then anyone can search the dataset. If false, then its limited to the account. + type: boolean + name: + description: Used to describe the dataset within the account context. + minLength: 1 + type: string + required: + - name + - isPublic + type: object + responses: + '200': + content: + application/json: + schema: + properties: + isPublic: + type: boolean + name: + type: string + uuid: + type: string + required: + - uuid + - name + - isPublic + type: object + description: Returns dataset information. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Updates an existing dataset + tags: + - Dataset + x-api-token-group: + - Cloudforce One Write + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - threat_events + - datasets + method: edit + post: + operationId: post_DatasetUpdate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + isPublic: + description: If true, then anyone can search the dataset. If false, then its limited to the account. + type: boolean + name: + description: Used to describe the dataset within the account context. + minLength: 1 + type: string + required: + - name + - isPublic + type: object + responses: + '200': + content: + application/json: + schema: + properties: + isPublic: + type: boolean + name: + type: string + uuid: + type: string + required: + - uuid + - name + - isPublic + type: object + description: Returns dataset information. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Updates an existing dataset + tags: + - Dataset + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}/copy: + post: + operationId: post_EventCopyToNewDS + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + - description: If true, copies raw data to the destination dataset. Default is false (raw data is stripped/not copied). + in: query + name: keepRawData + schema: + description: If true, copies raw data to the destination dataset. Default is false (raw data is stripped/not copied). + type: boolean + requestBody: + content: + application/json: + schema: + properties: + destDatasetId: + type: string + eventIds: + items: + type: string + type: array + required: + - destDatasetId + - eventIds + type: object + responses: + '200': + content: + application/json: + schema: + properties: + copied: + description: Number of events successfully copied + type: number + indicatorsCopied: + description: Number of indicators successfully copied + type: number + insertFailures: + description: Array of events that failed to insert into destination + items: + properties: + index: + description: Index of the event that failed to insert + type: number + reason: + description: Reason for the failure + type: string + required: + - index + - reason + type: object + type: array + relationshipsCopied: + description: Number of relationships successfully copied + type: number + required: + - copied + - indicatorsCopied + - relationshipsCopied + type: object + description: Returns the number of copied events + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Copies specified events from one dataset to another dataset + tags: + - Event + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}/events/{event_id}: + get: + description: Retrieves a specific event by its UUID. + operationId: get_EventRead + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + - name: event_id + in: path + required: true + description: The event ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + attacker: + type: string + attackerCountry: + type: string + category: + type: string + datasetId: + type: string + date: + type: string + event: + type: string + hasChildren: + type: boolean + indicator: + type: string + indicatorType: + type: string + indicatorTypeId: + type: number + insight: + type: string + killChain: + type: number + mitreAttack: + items: + type: string + type: array + mitreCapec: + items: + type: string + type: array + numReferenced: + type: number + numReferences: + type: number + rawId: + type: string + referenced: + items: + type: string + type: array + referencedIds: + items: + type: number + type: array + references: + items: + type: string + type: array + referencesIds: + items: + type: number + type: array + releasabilityId: + type: string + tags: + items: + type: string + type: array + targetCountry: + type: string + targetIndustry: + type: string + tlp: + type: string + uuid: + type: string + required: + - uuid + - date + - targetCountry + - attacker + - attackerCountry + - targetIndustry + - rawId + - indicatorTypeId + - indicator + - event + - numReferenced + - numReferences + - tlp + - category + - indicatorType + - referenced + - references + - tags + - killChain + - mitreAttack + - mitreCapec + - referencedIds + - referencesIds + - hasChildren + - datasetId + type: object + description: Returns the event. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Reads an event + tags: + - Event + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}/indicatorTypes/create: + post: + description: Creates a new indicator type and initializes its dedicated Durable Object + operationId: post_IndicatorTypeCreate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + description: + description: Optional description for the indicator type + type: string + indicatorType: + description: The indicator type to create (e.g., 'DOMAIN', 'IP', 'URL', 'HASH', 'EMAIL') + maxLength: 50 + minLength: 1 + type: string + required: + - indicatorType + type: object + responses: + '200': + content: + application/json: + schema: + properties: + durableObjectId: + type: string + indicatorType: + type: string + message: + type: string + required: + - indicatorType + - message + - durableObjectId + type: object + description: Indicator type created successfully + '400': + content: + application/json: + schema: + properties: + content: + properties: + application/json: + properties: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + required: + - schema + type: object + required: + - application/json + type: object + description: + type: string + required: + - description + - content + type: object + description: Bad Request + '500': + content: + application/json: + schema: + properties: + content: + properties: + application/json: + properties: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + required: + - schema + type: object + required: + - application/json + type: object + description: + type: string + required: + - description + - content + type: object + description: Internal Server Error + security: + - api_token: [] + summary: Create a new indicator type + tags: + - Indicators + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}/indicators: + get: + deprecated: true + description: This method is deprecated. Please use /events/indicators to retrieve a paginated list of indicators. + operationId: get_IndicatorListLegacy + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + - in: query + name: page + schema: + type: number + - in: query + name: pageSize + schema: + type: number + - description: Filter by indicator value (substring match) + in: query + name: name + schema: + description: Filter by indicator value (substring match) + type: string + - in: query + name: indicatorType + schema: + type: string + - description: Filter indicators by related event UUID(s). Multiple UUIDs can be provided by repeating the parameter. + in: query + name: relatedEvent + schema: + description: Filter indicators by related event UUID(s). Multiple UUIDs can be provided by repeating the parameter. + items: + type: string + type: array + explode: true + responses: + '200': + content: + application/json: + schema: + properties: + indicators: + items: + properties: + createdAt: + format: date-time + type: string + datasetId: + description: The dataset ID this indicator belongs to. Included in list responses. + type: string + indicatorType: + type: string + relatedEvents: + items: + properties: + datasetId: + type: string + eventId: + type: string + required: + - datasetId + - eventId + type: object + type: array + tags: + items: + properties: + categoryName: + type: string + uuid: + type: string + value: + type: string + type: object + type: array + updatedAt: + format: date-time + type: string + uuid: + type: string + value: + type: string + required: + - uuid + - indicatorType + - value + - createdAt + - updatedAt + type: object + type: array + pagination: + properties: + page: + type: number + pageSize: + type: number + totalCount: + type: number + totalPages: + type: number + required: + - page + - pageSize + - totalCount + - totalPages + type: object + required: + - indicators + - pagination + type: object + description: Returns a list of indicators. + security: + - api_token: [] + summary: Lists indicators + tags: + - Indicator + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}/indicators/bulk: + post: + description: Creates multiple indicators at once with their respective types and related datasets. + operationId: post_IndicatorCreateBulk + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + autoCreateType: + description: Global flag to automatically create indicator types if they don't exist. Individual indicators can override this with their own autoCreateType flag. + type: boolean + indicators: + items: + properties: + autoCreateType: + description: If true, automatically create the indicator type if it doesn't exist. If false (default), throw an error when the indicator type doesn't exist. + type: boolean + indicatorType: + type: string + relatedEvents: + items: + properties: + datasetId: + type: string + eventId: + type: string + required: + - datasetId + - eventId + type: object + type: array + tags: + items: + type: string + properties: + categoryName: + type: string + value: + type: string + required: + - value + type: array + value: + type: string + required: + - indicatorType + - value + type: object + type: array + required: + - indicators + type: object + responses: + '200': + content: + application/json: + schema: + description: Number of created indicators + type: number + description: Returns the number of created indicators. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Creates multiple indicators in bulk + tags: + - Indicator + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}/indicators/create: + post: + description: Creates a new indicator with the specified type and related datasets. + operationId: post_IndicatorCreate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + autoCreateType: + description: If true, automatically create the indicator type if it doesn't exist. If false (default), throw an error when the indicator type doesn't exist. + type: boolean + indicatorType: + type: string + relatedEvents: + items: + properties: + datasetId: + type: string + eventId: + type: string + required: + - datasetId + - eventId + type: object + type: array + tags: + items: + type: string + properties: + categoryName: + type: string + value: + type: string + required: + - value + type: array + value: + type: string + required: + - indicatorType + - value + type: object + responses: + '200': + content: + application/json: + schema: + properties: + createdAt: + format: date-time + type: string + datasetId: + description: The dataset ID this indicator belongs to. Included in list responses. + type: string + indicatorType: + type: string + relatedEvents: + items: + properties: + datasetId: + type: string + eventId: + type: string + required: + - datasetId + - eventId + type: object + type: array + tags: + items: + properties: + categoryName: + type: string + uuid: + type: string + value: + type: string + type: object + type: array + updatedAt: + format: date-time + type: string + uuid: + type: string + value: + type: string + required: + - uuid + - indicatorType + - value + - createdAt + - updatedAt + type: object + description: Returns the created indicator. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Creates a new indicator + tags: + - Indicator + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}/indicators/tags: + get: + description: Returns all mirrored tags from the indicator dataset (DO mirror table). No pagination. + operationId: get_IndicatorTagsList + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + description: Array of mirror tag rows + items: + type: object + type: array + description: Returns an array of mirrored tags. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + '500': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: List mirrored tags for an indicator dataset + tags: + - Indicator + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}/indicators/{indicator_id}: + delete: + description: Deletes a specific indicator by its UUID. + operationId: delete_IndicatorDelete + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + - description: Indicator UUID. + in: path + name: indicator_id + schema: + description: Indicator UUID. + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + message: + type: string + success: + type: boolean + type: object + description: Indicator deleted successfully. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Deletes an indicator + tags: + - Indicator + x-api-token-group: + - Cloudforce One Write + get: + description: Retrieves a specific indicator by its UUID. + operationId: get_IndicatorRead + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + - description: Indicator UUID. + in: path + name: indicator_id + schema: + description: Indicator UUID. + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + createdAt: + format: date-time + type: string + datasetId: + description: The dataset ID this indicator belongs to. Included in list responses. + type: string + indicatorType: + type: string + relatedEvents: + items: + properties: + datasetId: + type: string + eventId: + type: string + required: + - datasetId + - eventId + type: object + type: array + tags: + items: + properties: + categoryName: + type: string + uuid: + type: string + value: + type: string + type: object + type: array + updatedAt: + format: date-time + type: string + uuid: + type: string + value: + type: string + required: + - uuid + - indicatorType + - value + - createdAt + - updatedAt + type: object + description: Returns the indicator. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Reads an indicator + tags: + - Indicator + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + patch: + description: Updates an existing indicator's properties. + operationId: patch_IndicatorUpdate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + - description: Indicator UUID. + in: path + name: indicator_id + schema: + description: Indicator UUID. + type: string + required: true + requestBody: + content: + application/json: + schema: + properties: + indicatorType: + type: string + relatedEvents: + items: + properties: + datasetId: + type: string + eventId: + type: string + required: + - datasetId + - eventId + type: object + type: array + tags: + items: + type: string + properties: + categoryName: + type: string + value: + type: string + required: + - value + type: array + value: + type: string + type: object + responses: + '200': + content: + application/json: + schema: + properties: + createdAt: + format: date-time + type: string + datasetId: + description: The dataset ID this indicator belongs to. Included in list responses. + type: string + indicatorType: + type: string + relatedEvents: + items: + properties: + datasetId: + type: string + eventId: + type: string + required: + - datasetId + - eventId + type: object + type: array + tags: + items: + properties: + categoryName: + type: string + uuid: + type: string + value: + type: string + type: object + type: array + updatedAt: + format: date-time + type: string + uuid: + type: string + value: + type: string + required: + - uuid + - indicatorType + - value + - createdAt + - updatedAt + type: object + description: Returns the updated indicator. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Updates an indicator + tags: + - Indicator + x-api-token-group: + - Cloudforce One Write + /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}/move: + post: + operationId: post_EventMoveToNewDS + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + - description: If true, copies raw data to the destination dataset. Default is false (raw data is stripped/not copied). Raw data is always deleted from the source. + in: query + name: keepRawData + schema: + description: If true, copies raw data to the destination dataset. Default is false (raw data is stripped/not copied). Raw data is always deleted from the source. + type: boolean + requestBody: + content: + application/json: + schema: + properties: + destDatasetId: + type: string + eventIds: + items: + type: string + type: array + required: + - destDatasetId + - eventIds + type: object + responses: + '200': + content: + application/json: + schema: + properties: + deletionFailures: + description: Array of source datasets where deletion failed + items: + properties: + datasetId: + description: Dataset ID where deletion failed + type: string + reason: + description: Reason for the deletion failure + type: string + required: + - datasetId + - reason + type: object + type: array + indicatorsCopied: + description: Number of indicators successfully copied + type: number + insertFailures: + description: Array of events that failed to insert into destination + items: + properties: + index: + description: Index of the event that failed to insert + type: number + reason: + description: Reason for the failure + type: string + required: + - index + - reason + type: object + type: array + moved: + description: Number of events successfully moved + type: number + relationshipsCopied: + description: Number of relationships successfully copied + type: number + required: + - moved + - indicatorsCopied + - relationshipsCopied + type: object + description: Returns the number of moved events + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Moves specified events from one dataset to another dataset + tags: + - Event + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}/permissions: + get: + description: List permissions + operationId: get_PermissionList + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + items: + properties: + createdAt: + format: date-time + type: string + resourceId: + description: The resource ID this permission applies to account_id or group_id + type: string + resourceType: + enum: + - dataset + type: string + role: + enum: + - read + - write + type: string + subjectId: + type: string + subjectType: + enum: + - account + - group + type: string + updatedAt: + format: date-time + type: string + uuid: + type: string + required: + - uuid + - subjectType + - subjectId + - role + - resourceType + - createdAt + - updatedAt + type: object + type: array + description: Returns the list of permissions. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: List permissions for dataset + tags: + - Permissions + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + post: + description: Create a permission + operationId: post_PermissionCreate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + role: + enum: + - read + - write + type: string + subjectId: + type: string + subjectType: + enum: + - account + - group + type: string + required: + - subjectType + - subjectId + - role + type: object + responses: + '200': + content: + application/json: + schema: + properties: + createdAt: + format: date-time + type: string + resourceId: + description: The resource ID this permission applies to account_id or group_id + type: string + resourceType: + enum: + - dataset + type: string + role: + enum: + - read + - write + type: string + subjectId: + type: string + subjectType: + enum: + - account + - group + type: string + updatedAt: + format: date-time + type: string + uuid: + type: string + required: + - uuid + - subjectType + - subjectId + - role + - resourceType + - createdAt + - updatedAt + type: object + description: Returns the created permission. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Create a permission for dataset + tags: + - Permissions + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}/permissions/{grant_id}: + delete: + description: Delete a permission + operationId: delete_PermissionDelete + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + - in: path + name: grant_id + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + message: + type: string + success: + type: boolean + type: object + description: Permission deleted successfully + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Delete a permission for dataset + tags: + - Permissions + x-api-token-group: + - Cloudforce One Write + put: + description: Update a permission + operationId: put_PermissionUpdate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + - in: path + name: grant_id + schema: + type: string + required: true + requestBody: + content: + application/json: + schema: + properties: + role: + enum: + - read + - write + type: string + required: + - role + type: object + responses: + '200': + content: + application/json: + schema: + properties: + message: + type: string + success: + type: boolean + type: object + description: Permission updated successfully + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Update a permission for dataset + tags: + - Permissions + x-api-token-group: + - Cloudforce One Write + /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}/tags/{tag_uuid}/indicators: + get: + description: Returns indicators associated with the provided tag UUID across all indicator datasets, with pagination. + operationId: get_TagIndicatorsList + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Tag UUID. + in: path + name: tag_uuid + schema: + description: Tag UUID. + type: string + required: true + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + - in: query + name: page + schema: + type: number + - in: query + name: pageSize + schema: + type: number + - in: query + name: indicatorType + schema: + type: string + - description: Filter indicators by related event UUID(s). Multiple UUIDs can be provided by repeating the parameter. + in: query + name: relatedEvent + schema: + description: Filter indicators by related event UUID(s). Multiple UUIDs can be provided by repeating the parameter. + items: + type: string + type: array + explode: true + responses: + '200': + content: + application/json: + schema: + properties: + indicators: + items: + properties: + createdAt: + format: date-time + type: string + datasetId: + description: The dataset ID this indicator belongs to. Included in list responses. + type: string + indicatorType: + type: string + relatedEvents: + items: + properties: + datasetId: + type: string + eventId: + type: string + required: + - datasetId + - eventId + type: object + type: array + tags: + items: + properties: + categoryName: + type: string + uuid: + type: string + value: + type: string + type: object + type: array + updatedAt: + format: date-time + type: string + uuid: + type: string + value: + type: string + required: + - uuid + - indicatorType + - value + - createdAt + - updatedAt + type: object + type: array + pagination: + properties: + page: + type: number + pageSize: + type: number + totalCount: + type: number + totalPages: + type: number + required: + - page + - pageSize + - totalCount + - totalPages + type: object + required: + - indicators + - pagination + type: object + description: Returns a paginated list of indicators. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + '500': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: List indicators related to a tag + tags: + - Tag + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/dataset/{dataset_id}/targetIndustries: + get: + operationId: get_TargetIndustryListByDataset + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + items: + properties: + type: + type: string + required: + - type + type: object + type: + type: string + required: + - type + - items + type: object + description: Returns a list of target industries for the dataset. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Lists all target industries for a specific dataset + tags: + - Target Industry + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/datasets/populate: + post: + operationId: post_DatasetPopulate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + properties: + properties: + accountId: + properties: + type: + type: string + required: + - type + type: object + datasets: + properties: + items: + properties: + properties: + properties: + attackers: + properties: + properties: + properties: + created: + properties: + type: + type: string + required: + - type + type: object + errors: + properties: + items: + properties: + type: + type: string + required: + - type + type: object + type: + type: string + required: + - type + - items + type: object + found: + properties: + items: + properties: + type: + type: string + required: + - type + type: object + type: + type: string + required: + - type + - items + type: object + required: + - found + - created + - errors + type: object + type: + type: string + required: + - type + - properties + type: object + categories: + properties: + properties: + properties: + created: + properties: + type: + type: string + required: + - type + type: object + errors: + properties: + items: + properties: + type: + type: string + required: + - type + type: object + type: + type: string + required: + - type + - items + type: object + found: + properties: + items: + properties: + type: + type: string + required: + - type + type: object + type: + type: string + required: + - type + - items + type: object + required: + - found + - created + - errors + type: object + type: + type: string + required: + - type + - properties + type: object + datasetId: + properties: + type: + type: string + required: + - type + type: object + indicatorTypes: + properties: + properties: + properties: + created: + properties: + type: + type: string + required: + - type + type: object + errors: + properties: + items: + properties: + type: + type: string + required: + - type + type: object + type: + type: string + required: + - type + - items + type: object + found: + properties: + items: + properties: + type: + type: string + required: + - type + type: object + type: + type: string + required: + - type + - items + type: object + required: + - found + - created + - errors + type: object + type: + type: string + required: + - type + - properties + type: object + processingTimeMs: + properties: + type: + type: string + required: + - type + type: object + targetIndustries: + properties: + properties: + properties: + created: + properties: + type: + type: string + required: + - type + type: object + errors: + properties: + items: + properties: + type: + type: string + required: + - type + type: object + type: + type: string + required: + - type + - items + type: object + found: + properties: + items: + properties: + type: + type: string + required: + - type + type: object + type: + type: string + required: + - type + - items + type: object + required: + - found + - created + - errors + type: object + type: + type: string + required: + - type + - properties + type: object + totalProcessed: + properties: + type: + type: string + required: + - type + type: object + required: + - datasetId + - indicatorTypes + - targetIndustries + - categories + - attackers + - totalProcessed + - processingTimeMs + type: object + type: + type: string + required: + - type + - properties + type: object + type: + type: string + required: + - type + - items + type: object + errors: + properties: + items: + properties: + type: + type: string + required: + - type + type: object + type: + type: string + required: + - type + - items + type: object + summary: + properties: + properties: + properties: + failedDatasets: + properties: + type: + type: string + required: + - type + type: object + successfulDatasets: + properties: + type: + type: string + required: + - type + type: object + totalDatasets: + properties: + type: + type: string + required: + - type + type: object + totalIndicatorTypes: + properties: + type: + type: string + required: + - type + type: object + totalProcessingTimeMs: + properties: + type: + type: string + required: + - type + type: object + required: + - totalDatasets + - successfulDatasets + - failedDatasets + - totalIndicatorTypes + - totalProcessingTimeMs + type: object + type: + type: string + required: + - type + - properties + type: object + required: + - accountId + - datasets + - summary + - errors + type: object + type: + type: string + required: + - type + - properties + type: object + description: Returns population results with counts and any errors + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Populate dataset-specific lookup tables from existing Events data with batch processing + tags: + - Datasets + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/event_tag/{event_id}: + delete: + operationId: delete_EventTagDelete + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: event_id + in: path + required: true + description: The event ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + success: + type: boolean + required: + - success + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Returns success if operation succeeded. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Removes a tag from an event + tags: + - Event + x-api-token-group: + - Cloudforce One Write + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - threat_events + - event_tags + method: delete + /accounts/{account_id}/cloudforce-one/events/event_tag/{event_id}/create: + post: + operationId: post_EventTagCreate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: event_id + in: path + required: true + description: The event ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + tags: + items: + type: string + type: array + required: + - tags + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + success: + type: boolean + required: + - success + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Returns success if operation succeeded. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Adds a tag to an event + tags: + - Event + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - threat_events + - event_tags + method: create + /accounts/{account_id}/cloudforce-one/events/graphql: + post: + description: Execute GraphQL aggregations over threat events. Supports multi-dimensional group-bys, optional date range filtering, and multi-dataset aggregation. + operationId: post_EventGraphQL + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + data: + nullable: true + type: object + errors: + items: + type: object + nullable: true + type: array + type: object + description: GraphQL response payload (data and errors). + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: GraphQL endpoint for event aggregation + tags: + - Event + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/indicator-types: + get: + operationId: get_IndicatorTypesList + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Array of dataset IDs to query indicator types from. If not provided, queries all datasets for the account. + in: query + name: datasetIds + schema: + description: Array of dataset IDs to query indicator types from. If not provided, queries all datasets for the account. + items: + type: string + type: array + explode: true + responses: + '200': + content: + application/json: + schema: + properties: + items: + properties: + type: + type: string + required: + - type + type: object + type: + type: string + required: + - type + - items + type: object + description: Returns a list of indicator types. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Lists indicator types across multiple datasets + tags: + - Indicator Types + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/indicatorTypes: + get: + deprecated: true + description: This Method is deprecated. Please use /events/dataset/:dataset_id/indicatorTypes instead. + operationId: get_LegacyIndicatorTypesList + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + items: + properties: + type: + type: string + required: + - type + type: object + type: + type: string + required: + - type + - items + type: object + description: Returns a list of indicator types. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Lists all indicator types + tags: + - Indicator Types + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - threat_events + - indicator_types + method: list + /accounts/{account_id}/cloudforce-one/events/indicators: + get: + description: Retrieves a paginated list of indicators across specified datasets. Use datasetIds=all or datasetIds=* to query all datasets for the account. If no datasetIds provided, uses the default dataset. + operationId: get_IndicatorList + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Dataset IDs to query indicators from (array of UUIDs), or special value 'all' or '*' to query all datasets. If not provided, uses the default dataset. + in: query + name: datasetIds + schema: + description: Dataset IDs to query indicators from (array of UUIDs), or special value 'all' or '*' to query all datasets. If not provided, uses the default dataset. + items: + type: string + type: array + explode: true + - in: query + name: page + schema: + type: number + - in: query + name: pageSize + schema: + type: number + - description: 'Structured search as a JSON array of {field, op, value} objects. Searchable fields: value, indicatorType. Supports operators: equals, not, contains, startsWith, endsWith, gt, lt, gte, lte, like, in, find. Use the ''in'' operator with an array value to bulk-check up to 100 indicators in a single request, e.g. search=[{"field":"value","op":"in","value":["evil.com","bad.org"]}]. Multiple conditions are AND''d together. Max 10 conditions per request.' + in: query + name: search + schema: + description: 'Structured search as a JSON array of {field, op, value} objects. Searchable fields: value, indicatorType. Supports operators: equals, not, contains, startsWith, endsWith, gt, lt, gte, lte, like, in, find. Use the ''in'' operator with an array value to bulk-check up to 100 indicators in a single request, e.g. search=[{"field":"value","op":"in","value":["evil.com","bad.org"]}]. Multiple conditions are AND''d together. Max 10 conditions per request.' + items: + properties: + field: + description: 'The indicator field to search on. Allowed: value, indicatorType.' + enum: + - value + - indicatorType + type: string + op: + description: Search operator. Use 'in' for bulk lookup of up to 100 values at once, e.g. {field:'value', op:'in', value:['evil.com','bad.org']}. + enum: + - equals + - not + - gt + - gte + - lt + - lte + - like + - contains + - startsWith + - endsWith + - in + - find + type: string + value: + description: Search value. String for most operators. Array of strings for 'in' operator (max 100 items). + type: string + items: + type: string + required: + - field + - op + - value + type: object + type: array + explode: true + - description: Filter indicators by value using substring match (LIKE). Legacy alternative to structured search. + in: query + name: name + schema: + description: Filter indicators by value using substring match (LIKE). Legacy alternative to structured search. + type: string + - in: query + name: indicatorType + schema: + type: string + - description: Filter by related event IDs + in: query + name: relatedEvents + schema: + description: Filter by related event IDs + items: + type: string + type: array + explode: true + - description: Filter by tag values or UUIDs. Indicators must have at least one of the specified tags (OR logic). Supports both tag UUID and tag value. + in: query + name: tags + schema: + description: Filter by tag values or UUIDs. Indicators must have at least one of the specified tags (OR logic). Supports both tag UUID and tag value. + items: + type: string + type: array + explode: true + - description: Filter indicators created on or after this date. Must use ISO 8601 format (e.g., '2024-01-15T00:00:00Z'). + in: query + name: createdAfter + schema: + description: Filter indicators created on or after this date. Must use ISO 8601 format (e.g., '2024-01-15T00:00:00Z'). + format: date-time + type: string + - description: Filter indicators created on or before this date. Must use ISO 8601 format (e.g., '2024-12-31T23:59:59Z'). + in: query + name: createdBefore + schema: + description: Filter indicators created on or before this date. Must use ISO 8601 format (e.g., '2024-12-31T23:59:59Z'). + format: date-time + type: string + - description: 'Limit the number of related events returned per indicator. Default: 2. Set to 0 for none, -1 for all events.' + in: query + name: relatedEventsLimit + schema: + description: 'Limit the number of related events returned per indicator. Default: 2. Set to 0 for none, -1 for all events.' + type: number + - description: Whether to include full tag details for each indicator. Defaults to true. + in: query + name: includeTags + schema: + description: Whether to include full tag details for each indicator. Defaults to true. + type: boolean + - description: Whether to compute accurate total count via COUNT(*). Defaults to false for performance. When false, total_count is an approximation. + in: query + name: includeTotalCount + schema: + description: Whether to compute accurate total count via COUNT(*). Defaults to false for performance. When false, total_count is an approximation. + type: boolean + - description: Output format for indicator data. 'json' returns the default format, 'stix2' returns STIX 2.1 Indicator SDOs. + in: query + name: format + schema: + description: Output format for indicator data. 'json' returns the default format, 'stix2' returns STIX 2.1 Indicator SDOs. + enum: + - json + - stix2 + type: string + responses: + '200': + content: + application/json: + schema: + properties: + properties: + properties: + indicators: + properties: + items: + properties: + createdAt: + format: date-time + type: string + datasetId: + description: The dataset ID this indicator belongs to. Included in list responses. + type: string + indicatorType: + type: string + relatedEvents: + items: + properties: + datasetId: + type: string + eventId: + type: string + required: + - datasetId + - eventId + type: object + type: array + tags: + items: + properties: + categoryName: + type: string + uuid: + type: string + value: + type: string + type: object + type: array + updatedAt: + format: date-time + type: string + uuid: + type: string + value: + type: string + required: + - uuid + - indicatorType + - value + - createdAt + - updatedAt + type: object + type: + type: string + required: + - type + - items + type: object + pagination: + properties: + properties: + properties: + count: + properties: + type: + type: string + required: + - type + type: object + page: + properties: + type: + type: string + required: + - type + type: object + per_page: + properties: + type: + type: string + required: + - type + type: object + total_count: + properties: + type: + type: string + required: + - type + type: object + required: + - count + - page + - per_page + - total_count + type: object + type: + type: string + required: + - type + - properties + type: object + required: + - indicators + - pagination + type: object + type: + type: string + required: + - type + - properties + type: object + description: Returns a paginated list of indicators. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Lists indicators across multiple datasets + tags: + - Indicator + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/queries: + get: + description: Retrieve all saved event queries for the account + operationId: get_EventQueryList + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + items: + properties: + account_id: + description: Account ID + type: integer + alert_enabled: + description: Whether alerts are enabled + type: boolean + alert_rollup_enabled: + description: Whether alert rollup is enabled + type: boolean + created_at: + description: Creation timestamp + type: string + readOnly: true + custom_threat_feed_id: + description: Intel Indicator Feed ID (numeric) + nullable: true + type: integer + id: + description: Unique identifier for the saved query + type: integer + name: + description: Name of the saved query + type: string + query_json: + description: JSON string containing the query parameters + type: string + rule_enabled: + description: Whether rule is enabled + type: boolean + rule_list_id: + description: WAF rules list ID for blocking + type: string + rule_scope: + description: Scope for the rule + type: string + updated_at: + description: Last update timestamp + type: string + readOnly: true + user_email: + description: Email of the user who created the query + type: string + required: + - id + - account_id + - name + - user_email + - query_json + - alert_enabled + - alert_rollup_enabled + - rule_enabled + - created_at + - updated_at + type: object + type: array + description: Returns a list of event queries. + '500': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: List all saved event queries + tags: + - Event + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/queries/create: + post: + description: Create a new saved event query for the account + operationId: post_EventQueryCreate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + alert_enabled: + description: Enable alerts for this query + type: boolean + alert_rollup_enabled: + description: Enable alert rollup for this query + type: boolean + name: + description: Unique name for the saved query + type: string + query_json: + description: JSON string containing the query parameters + type: string + rule_enabled: + description: Enable rule for this query + type: boolean + rule_scope: + description: Scope for the rule + type: string + required: + - name + - query_json + - alert_enabled + - alert_rollup_enabled + - rule_enabled + type: object + responses: + '200': + content: + application/json: + schema: + properties: + account_id: + description: Account ID + type: integer + alert_enabled: + description: Whether alerts are enabled + type: boolean + alert_rollup_enabled: + description: Whether alert rollup is enabled + type: boolean + created_at: + description: Creation timestamp + type: string + readOnly: true + custom_threat_feed_id: + description: Intel Indicator Feed ID (numeric) + nullable: true + type: integer + id: + description: Unique identifier for the saved query + type: integer + name: + description: Name of the saved query + type: string + query_json: + description: JSON string containing the query parameters + type: string + rule_enabled: + description: Whether rule is enabled + type: boolean + rule_list_id: + description: WAF rules list ID for blocking + type: string + rule_scope: + description: Scope for the rule + type: string + updated_at: + description: Last update timestamp + type: string + readOnly: true + user_email: + description: Email of the user who created the query + type: string + required: + - id + - account_id + - name + - user_email + - query_json + - alert_enabled + - alert_rollup_enabled + - rule_enabled + - created_at + - updated_at + type: object + description: Returns the created event query. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Create a saved event query + tags: + - Event + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/queries/{query_id}: + delete: + description: Delete a saved event query by its ID + operationId: delete_EventQueryDelete + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Event query ID + in: path + name: query_id + schema: + description: Event query ID + type: integer + required: true + responses: + '200': + description: Event query deleted successfully. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Delete a saved event query + tags: + - Event + x-api-token-group: + - Cloudforce One Write + get: + description: Retrieve a saved event query by its ID + operationId: get_EventQueryRead + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Event query ID + in: path + name: query_id + schema: + description: Event query ID + type: integer + required: true + responses: + '200': + content: + application/json: + schema: + properties: + account_id: + description: Account ID + type: integer + alert_enabled: + description: Whether alerts are enabled + type: boolean + alert_rollup_enabled: + description: Whether alert rollup is enabled + type: boolean + created_at: + description: Creation timestamp + type: string + readOnly: true + custom_threat_feed_id: + description: Intel Indicator Feed ID (numeric) + nullable: true + type: integer + id: + description: Unique identifier for the saved query + type: integer + name: + description: Name of the saved query + type: string + query_json: + description: JSON string containing the query parameters + type: string + rule_enabled: + description: Whether rule is enabled + type: boolean + rule_list_id: + description: WAF rules list ID for blocking + type: string + rule_scope: + description: Scope for the rule + type: string + updated_at: + description: Last update timestamp + type: string + readOnly: true + user_email: + description: Email of the user who created the query + type: string + required: + - id + - account_id + - name + - user_email + - query_json + - alert_enabled + - alert_rollup_enabled + - rule_enabled + - created_at + - updated_at + type: object + description: Returns the event query. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Read a saved event query + tags: + - Event + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + patch: + description: Update an existing saved event query by its ID + operationId: patch_EventQueryUpdate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Event query ID + in: path + name: query_id + schema: + description: Event query ID + type: integer + required: true + requestBody: + content: + application/json: + schema: + properties: + alert_enabled: + description: Enable alerts for this query + type: boolean + alert_rollup_enabled: + description: Enable alert rollup for this query + type: boolean + name: + description: Unique name for the saved query + type: string + query_json: + description: JSON string containing the query parameters + type: string + rule_enabled: + description: Enable rule for this query + type: boolean + rule_scope: + description: Scope for the rule + type: string + type: object + responses: + '200': + content: + application/json: + schema: + properties: + account_id: + description: Account ID + type: integer + alert_enabled: + description: Whether alerts are enabled + type: boolean + alert_rollup_enabled: + description: Whether alert rollup is enabled + type: boolean + created_at: + description: Creation timestamp + type: string + readOnly: true + custom_threat_feed_id: + description: Intel Indicator Feed ID (numeric) + nullable: true + type: integer + id: + description: Unique identifier for the saved query + type: integer + name: + description: Name of the saved query + type: string + query_json: + description: JSON string containing the query parameters + type: string + rule_enabled: + description: Whether rule is enabled + type: boolean + rule_list_id: + description: WAF rules list ID for blocking + type: string + rule_scope: + description: Scope for the rule + type: string + updated_at: + description: Last update timestamp + type: string + readOnly: true + user_email: + description: Email of the user who created the query + type: string + required: + - id + - account_id + - name + - user_email + - query_json + - alert_enabled + - alert_rollup_enabled + - rule_enabled + - created_at + - updated_at + type: object + description: Returns the updated event query. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Update a saved event query + tags: + - Event + x-api-token-group: + - Cloudforce One Write + post: + description: Update an existing saved event query by its ID + operationId: post_EventQueryUpdate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Event query ID + in: path + name: query_id + schema: + description: Event query ID + type: integer + required: true + requestBody: + content: + application/json: + schema: + properties: + alert_enabled: + description: Enable alerts for this query + type: boolean + alert_rollup_enabled: + description: Enable alert rollup for this query + type: boolean + name: + description: Unique name for the saved query + type: string + query_json: + description: JSON string containing the query parameters + type: string + rule_enabled: + description: Enable rule for this query + type: boolean + rule_scope: + description: Scope for the rule + type: string + type: object + responses: + '200': + content: + application/json: + schema: + properties: + account_id: + description: Account ID + type: integer + alert_enabled: + description: Whether alerts are enabled + type: boolean + alert_rollup_enabled: + description: Whether alert rollup is enabled + type: boolean + created_at: + description: Creation timestamp + type: string + readOnly: true + custom_threat_feed_id: + description: Intel Indicator Feed ID (numeric) + nullable: true + type: integer + id: + description: Unique identifier for the saved query + type: integer + name: + description: Name of the saved query + type: string + query_json: + description: JSON string containing the query parameters + type: string + rule_enabled: + description: Whether rule is enabled + type: boolean + rule_list_id: + description: WAF rules list ID for blocking + type: string + rule_scope: + description: Scope for the rule + type: string + updated_at: + description: Last update timestamp + type: string + readOnly: true + user_email: + description: Email of the user who created the query + type: string + required: + - id + - account_id + - name + - user_email + - query_json + - alert_enabled + - alert_rollup_enabled + - rule_enabled + - created_at + - updated_at + type: object + description: Returns the updated event query. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Update a saved event query + tags: + - Event + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/raw/{dataset_id}/{event_id}: + get: + description: Retrieves the raw data associated with an event. Searches across all shards in the dataset. + operationId: get_EventRawReadDS + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: event_id + in: path + required: true + description: The event ID. + schema: + type: string + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + accountId: + type: number + created: + type: string + data: + type: string + id: + type: number + source: + type: string + tlp: + type: string + required: + - id + - accountId + - created + - data + - source + - tlp + type: object + description: Returns the raw event data. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + '500': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Reads raw data for an event by UUID + tags: + - Event + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - threat_events + - datasets + method: raw + /accounts/{account_id}/cloudforce-one/events/relate/{event_id}: + delete: + operationId: delete_EventReferenceDelete + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: event_id + in: path + required: true + description: The event ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + success: + type: boolean + required: + - success + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Returns success if operation succeeded. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Removes an event reference + tags: + - Event + x-api-token-group: + - Cloudforce One Write + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - threat_events + - relate + method: delete + /accounts/{account_id}/cloudforce-one/events/relate/{event_id}/create: + post: + operationId: post_EventReferenceCreate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: event_id + in: path + required: true + description: The event ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + events: + items: + type: string + type: array + required: + - events + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + success: + type: boolean + required: + - success + type: object + success: + type: boolean + required: + - success + - result + type: object + description: Returns success if operation succeeded. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Creates event references for a event + tags: + - Event + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/relationships/create: + post: + description: Creates a directed relationship between two events. The relationship is from parent to child with a specified type. + operationId: post_CreateEventRelationship + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + childIds: + description: Array of UUIDs for child events. Single child = 1:1 relationship, multiple = 1:many relationships + items: + format: uuid + type: string + minItems: 1 + type: array + datasetId: + description: Dataset identifier where the events are stored + type: string + parentId: + description: UUID of the parent event that will be the source of the relationship + format: uuid + type: string + relationshipType: + description: Type of relationship to create between parent and child events + enum: + - related_to + - caused_by + - attributed_to + type: string + required: + - parentId + - childIds + - relationshipType + - datasetId + type: object + responses: + '200': + content: + application/json: + schema: + properties: + childIds: + description: Array of child event UUIDs that were processed + items: + format: uuid + type: string + type: array + errors: + description: Array of errors for relationships that failed to be created (only present if some relationships failed) + items: + properties: + childId: + description: UUID of the child event that failed to create a relationship + format: uuid + type: string + error: + description: Error message describing why the relationship creation failed + type: string + errorType: + description: Type/category of the error that occurred + type: string + required: + - childId + - error + type: object + type: array + message: + description: Human-readable message describing the operation result + type: string + relationships: + description: Array of successfully created relationship objects + items: + properties: + childDatasetId: + description: Dataset ID where the child event resides + type: string + childId: + description: UUID of the child event in the relationship + format: uuid + type: string + parentDatasetId: + description: Dataset ID where the parent event resides + type: string + parentId: + description: UUID of the parent event in the relationship + format: uuid + type: string + relationshipType: + description: Type of relationship between the events + enum: + - related_to + - caused_by + - attributed_to + type: string + required: + - parentId + - childId + - relationshipType + - parentDatasetId + - childDatasetId + type: object + type: array + relationshipsCreated: + description: Number of relationships that were successfully created + type: number + success: + description: Whether the relationship creation operation completed successfully + type: boolean + required: + - success + - message + - relationships + type: object + description: Relationship created successfully + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Create a relationship between two events + tags: + - Event + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/tags: + get: + description: Returns all Source-of-Truth tags for an account. + operationId: get_TagList + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: page + schema: + type: number + - in: query + name: pageSize + schema: + type: number + - in: query + name: search + schema: + type: string + - in: query + name: categoryUuid + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + pagination: + properties: + page: + type: number + pageSize: + type: number + totalCount: + type: number + totalPages: + type: number + required: + - page + - pageSize + - totalCount + - totalPages + type: object + tags: + items: + properties: + activeDuration: + type: string + actorCategory: + type: string + aliasGroupNames: + items: + type: string + type: array + aliasGroupNamesInternal: + items: + type: string + type: array + analyticPriority: + type: number + attributionConfidence: + type: string + attributionOrganization: + type: string + categoryName: + type: string + categoryUuid: + type: string + externalReferenceLinks: + items: + type: string + type: array + internalDescription: + type: string + motive: + type: string + opsecLevel: + type: string + originCountryISO: + type: string + priority: + type: number + sophisticationLevel: + type: string + uuid: + type: string + value: + type: string + required: + - uuid + - value + type: object + type: array + required: + - tags + - pagination + type: object + description: Returns a paginated list of tags. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Lists all tags (SoT) + tags: + - Tag + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/tags/categories: + get: + description: Returns all Source-of-Truth tag categories for an account. + operationId: get_TagCategoryList + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: search + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + categories: + items: + properties: + createdAt: + type: string + description: + type: string + name: + type: string + updatedAt: + type: string + uuid: + type: string + required: + - uuid + - name + type: object + type: array + required: + - categories + type: object + description: Returns a list of tag categories. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Lists all tag categories (SoT) + tags: + - TagCategory + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/tags/categories/create: + post: + description: Creates a new Source-of-Truth tag category for an account. + operationId: post_TagCategoryCreate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + description: + type: string + name: + type: string + required: + - name + type: object + responses: + '200': + content: + application/json: + schema: + properties: + createdAt: + type: string + description: + type: string + name: + type: string + updatedAt: + type: string + uuid: + type: string + required: + - uuid + - name + type: object + description: Returns the created tag category. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + '409': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Creates a new tag category (SoT) + tags: + - TagCategory + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/tags/categories/{category_uuid}: + delete: + description: Deletes a Source-of-Truth tag category by UUID. + operationId: delete_TagCategoryDelete + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Tag Category UUID. + in: path + name: category_uuid + schema: + description: Tag Category UUID. + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + uuid: + type: string + required: + - uuid + type: object + description: Returns the uuid of the deleted tag category. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Deletes a tag category (SoT) + tags: + - TagCategory + x-api-token-group: + - Cloudforce One Write + patch: + description: Updates a Source-of-Truth tag category by UUID. + operationId: patch_TagCategoryUpdate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Tag Category UUID. + in: path + name: category_uuid + schema: + description: Tag Category UUID. + type: string + required: true + requestBody: + content: + application/json: + schema: + properties: + description: + type: string + name: + type: string + type: object + responses: + '200': + content: + application/json: + schema: + properties: + createdAt: + type: string + description: + type: string + name: + type: string + updatedAt: + type: string + uuid: + type: string + required: + - uuid + - name + type: object + description: Returns the updated tag category. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + '409': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Updates a tag category (SoT) + tags: + - TagCategory + x-api-token-group: + - Cloudforce One Write + /accounts/{account_id}/cloudforce-one/events/tags/create: + post: + description: Creates a new tag to be used accross threat events. + operationId: post_TagCreate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + activeDuration: + type: string + actorCategory: + type: string + aliasGroupNames: + items: + type: string + type: array + aliasGroupNamesInternal: + items: + type: string + type: array + analyticPriority: + type: number + attributionConfidence: + type: string + attributionOrganization: + type: string + categoryUuid: + type: string + externalReferenceLinks: + items: + type: string + type: array + internalDescription: + type: string + motive: + type: string + opsecLevel: + type: string + originCountryISO: + type: string + priority: + type: number + sophisticationLevel: + type: string + value: + type: string + required: + - value + type: object + responses: + '200': + content: + application/json: + schema: + properties: + activeDuration: + type: string + actorCategory: + type: string + aliasGroupNames: + items: + type: string + type: array + aliasGroupNamesInternal: + items: + type: string + type: array + analyticPriority: + type: number + attributionConfidence: + type: string + attributionOrganization: + type: string + categoryName: + type: string + categoryUuid: + type: string + externalReferenceLinks: + items: + type: string + type: array + internalDescription: + type: string + motive: + type: string + opsecLevel: + type: string + originCountryISO: + type: string + priority: + type: number + sophisticationLevel: + type: string + uuid: + type: string + value: + type: string + required: + - uuid + - value + type: object + description: Returns the created tag. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Creates a new tag + tags: + - Tag + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - threat_events + - tags + method: create + /accounts/{account_id}/cloudforce-one/events/tags/{tag_uuid}: + delete: + description: Deletes a Source-of-Truth tag by UUID. + operationId: delete_TagDelete + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Tag UUID. + in: path + name: tag_uuid + schema: + description: Tag UUID. + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + uuid: + type: string + required: + - uuid + type: object + description: Returns the uuid of the deleted tag. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Deletes a tag (SoT) + tags: + - Tag + x-api-token-group: + - Cloudforce One Write + patch: + description: Updates a Source-of-Truth tag by UUID. + operationId: patch_TagUpdate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Tag UUID. + in: path + name: tag_uuid + schema: + description: Tag UUID. + type: string + required: true + requestBody: + content: + application/json: + schema: + properties: + activeDuration: + type: string + actorCategory: + type: string + aliasGroupNames: + items: + type: string + type: array + aliasGroupNamesInternal: + items: + type: string + type: array + analyticPriority: + type: number + attributionConfidence: + type: string + attributionOrganization: + type: string + categoryUuid: + type: string + externalReferenceLinks: + items: + type: string + type: array + internalDescription: + type: string + motive: + type: string + opsecLevel: + type: string + originCountryISO: + type: string + priority: + type: number + sophisticationLevel: + type: string + value: + type: string + type: object + responses: + '200': + content: + application/json: + schema: + properties: + activeDuration: + type: string + actorCategory: + type: string + aliasGroupNames: + items: + type: string + type: array + aliasGroupNamesInternal: + items: + type: string + type: array + analyticPriority: + type: number + attributionConfidence: + type: string + attributionOrganization: + type: string + categoryName: + type: string + categoryUuid: + type: string + externalReferenceLinks: + items: + type: string + type: array + internalDescription: + type: string + motive: + type: string + opsecLevel: + type: string + originCountryISO: + type: string + priority: + type: number + sophisticationLevel: + type: string + uuid: + type: string + value: + type: string + required: + - uuid + - value + type: object + description: Returns the updated tag. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Updates a tag (SoT) + tags: + - Tag + x-api-token-group: + - Cloudforce One Write + /accounts/{account_id}/cloudforce-one/events/targetIndustries: + get: + operationId: get_TargetIndustryList + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Array of dataset IDs to query target industries from. If not provided, uses the default dataset. + in: query + name: datasetIds + schema: + description: Array of dataset IDs to query target industries from. If not provided, uses the default dataset. + items: + type: string + type: array + explode: true + responses: + '200': + content: + application/json: + schema: + properties: + items: + properties: + type: + type: string + required: + - type + type: object + type: + type: string + required: + - type + - items + type: object + description: Returns a list of target industries. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Lists target industries across multiple datasets + tags: + - Target Industry + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - threat_events + - target_industries + method: list + /accounts/{account_id}/cloudforce-one/events/targetIndustries/catalog: + get: + operationId: get_TargetIndustryListComplete + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + items: + properties: + type: + type: string + required: + - type + type: object + type: + type: string + required: + - type + - items + type: object + description: Returns all target industries from industry map catalog. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Lists all target industries from industry map catalog + tags: + - Target Industry + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/update/bulk: + patch: + description: Updates multiple events with the same field values. Maximum 100 events per request. + operationId: patch_EventUpdateBulk + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + datasetId: + description: Dataset ID containing the events to update. Required to prevent cross-account modifications. + type: string + eventIds: + description: List of event UUIDs to update (1-100) + items: + type: string + maxItems: 100 + minItems: 1 + type: array + updates: + description: Fields to update on all specified events. All fields including 'insight' are supported, except 'date' which requires shard migration. + properties: + attacker: + nullable: true + type: string + attackerCountry: + type: string + category: + type: string + createdAt: + format: date-time + type: string + event: + type: string + indicator: + type: string + indicatorType: + type: string + insight: + type: string + raw: + properties: + data: + nullable: true + type: object + source: + type: string + tlp: + type: string + type: object + targetCountry: + type: string + targetIndustry: + type: string + tlp: + type: string + type: object + required: + - eventIds + - datasetId + - updates + type: object + responses: + '200': + content: + application/json: + schema: + properties: + failedCount: + type: number + failures: + description: List of events that failed to update with error messages + items: + properties: + error: + type: string + eventId: + type: string + required: + - eventId + - error + type: object + type: array + updatedCount: + type: number + required: + - updatedCount + - failedCount + type: object + description: Returns the count of updated events and any failures. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Bulk update events + tags: + - Event + x-api-token-group: + - Cloudforce One Write + /accounts/{account_id}/cloudforce-one/events/{dataset_id}/delete: + delete: + operationId: delete_EventDelete + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + - description: Array of Event IDs to delete. + in: query + name: eventIds + schema: + description: Array of Event IDs to delete. + items: + minLength: 1 + type: string + type: array + explode: true + responses: + '200': + content: + application/json: + schema: + description: Number of deleted events + type: number + description: Returns the number of deleted events. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Deletes one or more events + tags: + - Event + x-api-token-group: + - Cloudforce One Write + /accounts/{account_id}/cloudforce-one/events/{event_id}: + get: + deprecated: true + description: This Method is deprecated. Please use /events/dataset/:dataset_id/events/:event_id instead. + operationId: get_EventReadDeprecated + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: event_id + in: path + required: true + description: The event ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + attacker: + type: string + attackerCountry: + type: string + category: + type: string + datasetId: + type: string + date: + type: string + event: + type: string + hasChildren: + type: boolean + indicator: + type: string + indicatorType: + type: string + indicatorTypeId: + type: number + insight: + type: string + killChain: + type: number + mitreAttack: + items: + type: string + type: array + mitreCapec: + items: + type: string + type: array + numReferenced: + type: number + numReferences: + type: number + rawId: + type: string + referenced: + items: + type: string + type: array + referencedIds: + items: + type: number + type: array + references: + items: + type: string + type: array + referencesIds: + items: + type: number + type: array + releasabilityId: + type: string + tags: + items: + type: string + type: array + targetCountry: + type: string + targetIndustry: + type: string + tlp: + type: string + uuid: + type: string + required: + - uuid + - date + - targetCountry + - attacker + - attackerCountry + - targetIndustry + - rawId + - indicatorTypeId + - indicator + - event + - numReferenced + - numReferences + - tlp + - category + - indicatorType + - referenced + - references + - tags + - killChain + - mitreAttack + - mitreCapec + - referencedIds + - referencesIds + - hasChildren + - datasetId + type: object + description: Returns an event. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Reads an event + tags: + - Event + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - threat_events + method: get + patch: + operationId: patch_EventUpdate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: event_id + in: path + required: true + description: The event ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + attacker: + nullable: true + type: string + attackerCountry: + type: string + category: + type: string + createdAt: + format: date-time + type: string + datasetId: + description: Dataset ID containing the event to update. + type: string + date: + format: date-time + type: string + event: + type: string + indicator: + type: string + indicatorType: + type: string + insight: + type: string + raw: + properties: + data: + nullable: true + type: object + source: + type: string + tlp: + type: string + type: object + targetCountry: + type: string + targetIndustry: + type: string + tlp: + type: string + required: + - datasetId + type: object + responses: + '200': + content: + application/json: + schema: + properties: + attacker: + type: string + attackerCountry: + type: string + category: + type: string + datasetId: + type: string + date: + type: string + event: + type: string + hasChildren: + type: boolean + indicator: + type: string + indicatorType: + type: string + indicatorTypeId: + type: number + insight: + type: string + killChain: + type: number + mitreAttack: + items: + type: string + type: array + mitreCapec: + items: + type: string + type: array + numReferenced: + type: number + numReferences: + type: number + rawId: + type: string + referenced: + items: + type: string + type: array + referencedIds: + items: + type: number + type: array + references: + items: + type: string + type: array + referencesIds: + items: + type: number + type: array + releasabilityId: + type: string + tags: + items: + type: string + type: array + targetCountry: + type: string + targetIndustry: + type: string + tlp: + type: string + uuid: + type: string + required: + - uuid + - date + - targetCountry + - attacker + - attackerCountry + - targetIndustry + - rawId + - indicatorTypeId + - indicator + - event + - numReferenced + - numReferences + - tlp + - category + - indicatorType + - referenced + - references + - tags + - killChain + - mitreAttack + - mitreCapec + - referencedIds + - referencesIds + - hasChildren + - datasetId + type: object + description: Returns the updated event. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Updates an event + tags: + - Event + x-api-token-group: + - Cloudforce One Write + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - threat_events + method: edit + post: + operationId: post_EventUpdate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: event_id + in: path + required: true + description: The event ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + attacker: + nullable: true + type: string + attackerCountry: + type: string + category: + type: string + createdAt: + format: date-time + type: string + datasetId: + description: Dataset ID containing the event to update. + type: string + date: + format: date-time + type: string + event: + type: string + indicator: + type: string + indicatorType: + type: string + insight: + type: string + raw: + properties: + data: + nullable: true + type: object + source: + type: string + tlp: + type: string + type: object + targetCountry: + type: string + targetIndustry: + type: string + tlp: + type: string + required: + - datasetId + type: object + responses: + '200': + content: + application/json: + schema: + properties: + attacker: + type: string + attackerCountry: + type: string + category: + type: string + datasetId: + type: string + date: + type: string + event: + type: string + hasChildren: + type: boolean + indicator: + type: string + indicatorType: + type: string + indicatorTypeId: + type: number + insight: + type: string + killChain: + type: number + mitreAttack: + items: + type: string + type: array + mitreCapec: + items: + type: string + type: array + numReferenced: + type: number + numReferences: + type: number + rawId: + type: string + referenced: + items: + type: string + type: array + referencedIds: + items: + type: number + type: array + references: + items: + type: string + type: array + referencesIds: + items: + type: number + type: array + releasabilityId: + type: string + tags: + items: + type: string + type: array + targetCountry: + type: string + targetIndustry: + type: string + tlp: + type: string + uuid: + type: string + required: + - uuid + - date + - targetCountry + - attacker + - attackerCountry + - targetIndustry + - rawId + - indicatorTypeId + - indicator + - event + - numReferenced + - numReferences + - tlp + - category + - indicatorType + - referenced + - references + - tags + - killChain + - mitreAttack + - mitreCapec + - referencedIds + - referencesIds + - hasChildren + - datasetId + type: object + description: Returns the updated event. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Updates an event + tags: + - Event + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/{event_id}/raw/{raw_id}: + get: + operationId: get_EventRawRead + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: event_id + in: path + required: true + description: The event ID. + schema: + type: string + - description: Raw Event UUID. + in: path + name: raw_id + schema: + description: Raw Event UUID. + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + accountId: + type: number + created: + type: string + data: + type: object + id: + type: string + source: + type: string + tlp: + type: string + required: + - accountId + - created + - data + - id + - source + - tlp + type: object + description: Returns the raw event. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Reads data for a raw event + tags: + - Event + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - threat_events + - raw + method: get + patch: + operationId: patch_EventRawUpdate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: event_id + in: path + required: true + description: The event ID. + schema: + type: string + - description: Raw Event UUID. + in: path + name: raw_id + schema: + description: Raw Event UUID. + type: string + required: true + requestBody: + content: + application/json: + schema: + properties: + data: + type: object + source: + type: string + tlp: + type: string + type: object + responses: + '200': + content: + application/json: + schema: + properties: + data: + type: object + id: + type: string + required: + - id + - data + type: object + description: Returns the uuid of the updated raw event and its data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Updates a raw event + tags: + - Event + x-api-token-group: + - Cloudforce One Write + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - threat_events + - raw + method: edit + post: + operationId: post_EventRawUpdate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: event_id + in: path + required: true + description: The event ID. + schema: + type: string + - description: Raw Event UUID. + in: path + name: raw_id + schema: + description: Raw Event UUID. + type: string + required: true + requestBody: + content: + application/json: + schema: + properties: + data: + type: object + source: + type: string + tlp: + type: string + type: object + responses: + '200': + content: + application/json: + schema: + properties: + data: + type: object + id: + type: string + required: + - id + - data + type: object + description: Returns the uuid of the updated raw event and its data. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Updates a raw event + tags: + - Event + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/events/{event_id}/relationships: + get: + description: The `event_id` must be defined (to list existing events (and their IDs), use the [`Filter and List Events`](https://developers.cloudflare.com/api/resources/cloudforce_one/subresources/threat_events/methods/list/) endpoint). Also, must provide query parameters. + operationId: get_EventRelationships + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: event_id + in: path + required: true + description: The event ID. + schema: + type: string + - description: The direction to traverse the graph. Defaults to 'both' to search all. + in: query + name: direction + schema: + default: both + description: The direction to traverse the graph. Defaults to 'both' to search all. + enum: + - ancestors + - descendants + - both + type: string + - description: The maximum depth to traverse. Defaults to 5. + in: query + name: maxDepth + schema: + description: The maximum depth to traverse. Defaults to 5. + type: number + - description: An optional array of relationship types to filter by. + in: query + name: relationshipTypes + schema: + description: An optional array of relationship types to filter by. + type: string + items: + type: string + - description: An optional array of indicator type IDs to filter the results by. + in: query + name: indicatorTypeIds + schema: + description: An optional array of indicator type IDs to filter the results by. + items: + type: string + type: array + explode: true + - description: The dataset ID to search within. + in: query + name: datasetId + schema: + description: The dataset ID to search within. + type: string + - description: Whether to include the starting event in the results. Defaults to true. + in: query + name: includeParent + schema: + default: true + description: Whether to include the starting event in the results. Defaults to true. + type: boolean + - in: query + name: page + schema: + type: number + - in: query + name: pageSize + schema: + type: number + responses: + '200': + content: + application/json: + schema: + items: + properties: + attacker: + type: string + attackerCountry: + type: string + category: + type: string + datasetId: + type: string + date: + type: string + event: + type: string + hasChildren: + type: boolean + indicator: + type: string + indicatorType: + type: string + indicatorTypeId: + type: number + insight: + type: string + killChain: + type: number + mitreAttack: + items: + type: string + type: array + mitreCapec: + items: + type: string + type: array + numReferenced: + type: number + numReferences: + type: number + rawId: + type: string + referenced: + items: + type: string + type: array + referencedIds: + items: + type: number + type: array + references: + items: + type: string + type: array + referencesIds: + items: + type: number + type: array + releasabilityId: + type: string + tags: + items: + type: string + type: array + targetCountry: + type: string + targetIndustry: + type: string + tlp: + type: string + uuid: + type: string + required: + - uuid + - date + - targetCountry + - attacker + - attackerCountry + - targetIndustry + - rawId + - indicatorTypeId + - indicator + - event + - numReferenced + - numReferences + - tlp + - category + - indicatorType + - referenced + - references + - tags + - killChain + - mitreAttack + - mitreCapec + - referencedIds + - referencesIds + - hasChildren + - datasetId + type: object + type: array + description: Returns a list of events related to the specified starting event. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: Filter and list events related to specific event + tags: + - Event + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/requests: + post: + description: Lists Cloudforce One intelligence requests with filtering and pagination. + operationId: cloudforce-one-request-list + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsRequestList' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + messages: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + items: + $ref: '#/components/schemas/cloudforceOneRequestsRequestListItem' + type: array + required: + - success + - errors + - messages + type: object + description: List requests response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommonFailure' + description: Create response failure. + security: + - api_email: [] + api_key: [] + summary: List Requests + tags: + - Request for Information (RFI) + x-api-token-group: + - Cloudforce One Write + /accounts/{account_id}/cloudforce-one/requests/constants: + get: + description: Retrieves constant values used in Cloudforce One requests, including valid statuses and types. + operationId: cloudforce-one-request-constants + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + messages: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/cloudforceOneRequestsRequestConstants' + required: + - success + - errors + - messages + type: object + description: Get request constants response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommonFailure' + description: Get request constants response failure. + security: + - api_email: [] + api_key: [] + summary: Get Request Priority, Status, and TLP constants + tags: + - Request for Information (RFI) + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - requests + method: constants + /accounts/{account_id}/cloudforce-one/requests/new: + post: + description: Creating a request adds the request into the Cloudforce One queue for analysis. In addition to the content, a short title, type, priority, and releasability should be provided. If one is not provided, a default will be assigned. + operationId: cloudforce-one-request-new + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsRequestEdit' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + messages: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/cloudforceOneRequestsRequestItem' + required: + - success + - errors + - messages + type: object + description: Create request response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommonFailure' + description: Create response failure. + security: + - api_email: [] + api_key: [] + summary: Create a New Request. + tags: + - Request for Information (RFI) + x-api-token-group: + - Cloudforce One Write + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - requests + method: create + /accounts/{account_id}/cloudforce-one/requests/priority: + post: + description: Lists priority intelligence requests in Cloudforce One. + operationId: cloudforce-one-priority-list + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsPriorityList' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + messages: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + items: + $ref: '#/components/schemas/cloudforceOneRequestsPriorityItem' + type: array + required: + - success + - errors + - messages + type: object + description: List priorities response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommonFailure' + description: List priorities response failure. + security: + - api_email: [] + api_key: [] + summary: List Priority Intelligence Requirements + tags: + - Priority Intelligence Requirements (PIR) + x-api-token-group: + - Cloudforce One Write + /accounts/{account_id}/cloudforce-one/requests/priority/new: + post: + description: Creates a new priority intelligence request in Cloudforce One. + operationId: cloudforce-one-priority-new + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsPriorityEdit' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + messages: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/cloudforceOneRequestsPriorityItem' + required: + - success + - errors + - messages + type: object + description: Create priority response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommonFailure' + description: Create priority response failure. + security: + - api_email: [] + api_key: [] + summary: Create a New Priority Intelligence Requirement + tags: + - Priority Intelligence Requirements (PIR) + x-api-token-group: + - Cloudforce One Write + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - requests + - priority + method: create + /accounts/{account_id}/cloudforce-one/requests/priority/quota: + get: + description: Retrieves quota usage for Cloudforce One priority requests. + operationId: cloudforce-one-priority-quota + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + messages: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/cloudforceOneRequestsQuota' + required: + - success + - errors + - messages + type: object + description: Get priority quota response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommonFailure' + description: Get priority quota response failure. + security: + - api_email: [] + api_key: [] + summary: Get Priority Intelligence Requirement Quota + tags: + - Priority Intelligence Requirements (PIR) + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - requests + - priority + method: quota + /accounts/{account_id}/cloudforce-one/requests/priority/{priority_id}: + delete: + description: Deletes a priority intelligence request from Cloudforce One. + operationId: cloudforce-one-priority-delete + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: priority_id + schema: + $ref: '#/components/schemas/cloudforceOneRequestsUuid' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommon' + description: Delete priority response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommonFailure' + description: Delete priority response failure. + security: + - api_email: [] + api_key: [] + summary: Delete a Priority Intelligence Requirement + tags: + - Priority Intelligence Requirements (PIR) + x-api-token-group: + - Cloudforce One Write + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - requests + - priority + method: delete + get: + description: Retrieves a specific priority intelligence request from Cloudforce One. + operationId: cloudforce-one-priority-get + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: priority_id + schema: + $ref: '#/components/schemas/cloudforceOneRequestsUuid' + required: true + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + messages: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/cloudforceOneRequestsRequestItem' + required: + - success + - errors + - messages + type: object + description: Get priority response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommonFailure' + description: Get priority response failure. + security: + - api_email: [] + api_key: [] + summary: Get a Priority Intelligence Requirement + tags: + - Priority Intelligence Requirements (PIR) + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - requests + - priority + method: get + put: + description: Updates a priority intelligence request in Cloudforce One. + operationId: cloudforce-one-priority-update + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: priority_id + schema: + $ref: '#/components/schemas/cloudforceOneRequestsUuid' + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsPriorityEdit' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + messages: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/cloudforceOneRequestsRequestItem' + required: + - success + - errors + - messages + type: object + description: Update priority response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommonFailure' + description: Update priority response failure. + security: + - api_email: [] + api_key: [] + summary: Update a Priority Intelligence Requirement + tags: + - Priority Intelligence Requirements (PIR) + x-api-token-group: + - Cloudforce One Write + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - requests + - priority + method: update + /accounts/{account_id}/cloudforce-one/requests/quota: + get: + description: Retrieves quota usage for Cloudforce One standard requests. + operationId: cloudforce-one-request-quota + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + messages: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/cloudforceOneRequestsQuota' + required: + - success + - errors + - messages + type: object + description: Get request quota response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommonFailure' + description: Get request quota response failure. + security: + - api_email: [] + api_key: [] + summary: Get Request Quota + tags: + - Request for Information (RFI) + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - requests + method: quota + /accounts/{account_id}/cloudforce-one/requests/types: + get: + description: Lists available request types for Cloudforce One intelligence requests. + operationId: cloudforce-one-request-types + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + messages: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/cloudforceOneRequestsRequestTypes' + required: + - success + - errors + - messages + type: object + description: Get request types response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommonFailure' + description: Get request types response failure. + security: + - api_email: [] + api_key: [] + summary: Get Request Types + tags: + - Request for Information (RFI) + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - requests + method: types + /accounts/{account_id}/cloudforce-one/requests/{request_id}: + delete: + description: Deletes a Cloudforce One intelligence request and all associated data. + operationId: cloudforce-one-request-delete + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: request_id + schema: + $ref: '#/components/schemas/cloudforceOneRequestsUuid' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommon' + description: Delete request response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommonFailure' + description: Delete request response failure. + security: + - api_email: [] + api_key: [] + summary: Delete a Request + tags: + - Request for Information (RFI) + x-api-token-group: + - Cloudforce One Write + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - requests + method: delete + get: + description: Retrieves details for a specific Cloudforce One intelligence request. + operationId: cloudforce-one-request-get + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: request_id + schema: + $ref: '#/components/schemas/cloudforceOneRequestsUuid' + required: true + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + messages: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/cloudforceOneRequestsRequestItem' + required: + - success + - errors + - messages + type: object + description: Get request response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommonFailure' + description: Get request response failure. + security: + - api_email: [] + api_key: [] + summary: Get a Request + tags: + - Request for Information (RFI) + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - requests + method: get + put: + description: Updating a request alters the request in the Cloudforce One queue. This API may be used to update any attributes of the request after the initial submission. Only fields that you choose to update need to be add to the request body. + operationId: cloudforce-one-request-update + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: request_id + schema: + $ref: '#/components/schemas/cloudforceOneRequestsUuid' + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsRequestEdit' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + messages: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/cloudforceOneRequestsRequestItem' + required: + - success + - errors + - messages + type: object + description: Update request response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommonFailure' + description: Update request response failure. + security: + - api_email: [] + api_key: [] + summary: Update a Request + tags: + - Request for Information (RFI) + x-api-token-group: + - Cloudforce One Write + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - requests + method: update + /accounts/{account_id}/cloudforce-one/requests/{request_id}/asset: + post: + description: Lists assets attached to a Cloudforce One intelligence request. + operationId: cloudforce-one-request-asset-list + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: request_id + schema: + $ref: '#/components/schemas/cloudforceOneRequestsUuid' + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsRequestAssetList' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + messages: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + items: + $ref: '#/components/schemas/cloudforceOneRequestsRequestAssetItem' + type: array + required: + - success + - errors + - messages + type: object + description: List request assets response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommonFailure' + description: List request assets response failure. + security: + - api_email: [] + api_key: [] + summary: List Request Assets + tags: + - Request for Information (RFI) + x-api-token-group: + - Cloudforce One Write + /accounts/{account_id}/cloudforce-one/requests/{request_id}/asset/new: + post: + description: Uploads a new asset to a Cloudforce One intelligence request. + operationId: cloudforce-one-request-asset-new + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: request_id + schema: + $ref: '#/components/schemas/cloudforceOneRequestsUuid' + required: true + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsRequestAssetEdit' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + messages: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/cloudforceOneRequestsRequestAssetItem' + required: + - success + - errors + - messages + type: object + description: Create request asset response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommonFailure' + description: Create request asset response failure. + security: + - api_email: [] + api_key: [] + summary: Create a New Request Asset + tags: + - Request for Information (RFI) + x-api-token-group: + - Cloudforce One Write + /accounts/{account_id}/cloudforce-one/requests/{request_id}/asset/{asset_id}: + delete: + description: Removes an asset from a Cloudforce One intelligence request. + operationId: cloudforce-one-request-asset-delete + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: request_id + schema: + $ref: '#/components/schemas/cloudforceOneRequestsUuid' + required: true + - in: path + name: asset_id + schema: + $ref: '#/components/schemas/cloudforceOneRequestsUuid' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommon' + description: Delete request asset response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommonFailure' + description: Delete request asset response failure. + security: + - api_email: [] + api_key: [] + summary: Delete a Request Asset + tags: + - Request for Information (RFI) + x-api-token-group: + - Cloudforce One Write + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - requests + - assets + method: delete + get: + description: Retrieves an asset attached to a Cloudforce One intelligence request. + operationId: cloudforce-one-request-asset-get + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: request_id + schema: + $ref: '#/components/schemas/cloudforceOneRequestsUuid' + required: true + - in: path + name: asset_id + schema: + $ref: '#/components/schemas/cloudforceOneRequestsUuid' + required: true + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + messages: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + items: + $ref: '#/components/schemas/cloudforceOneRequestsRequestAssetItem' + type: array + required: + - success + - errors + - messages + type: object + description: Get request asset response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommonFailure' + description: Get request asset response failure. + security: + - api_email: [] + api_key: [] + summary: Get a Request Asset + tags: + - Request for Information (RFI) + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - requests + - assets + method: get + put: + description: Updates an asset in a Cloudforce One intelligence request. + operationId: cloudforce-one-request-asset-update + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: request_id + schema: + $ref: '#/components/schemas/cloudforceOneRequestsUuid' + required: true + - in: path + name: asset_id + schema: + $ref: '#/components/schemas/cloudforceOneRequestsUuid' + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsRequestAssetEdit' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + messages: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/cloudforceOneRequestsRequestAssetItem' + required: + - success + - errors + - messages + type: object + description: Update request asset response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommonFailure' + description: Update request asset response failure. + security: + - api_email: [] + api_key: [] + summary: Update a Request Asset + tags: + - Request for Information (RFI) + x-api-token-group: + - Cloudforce One Write + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - requests + - assets + method: update + /accounts/{account_id}/cloudforce-one/requests/{request_id}/message: + post: + description: Lists messages in a Cloudforce One intelligence request conversation. + operationId: cloudforce-one-request-message-list + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: request_id + schema: + $ref: '#/components/schemas/cloudforceOneRequestsUuid' + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsRequestMessageList' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + messages: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + items: + $ref: '#/components/schemas/cloudforceOneRequestsRequestMessageItem' + type: array + required: + - success + - errors + - messages + type: object + description: List request messages response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommonFailure' + description: List request messages response failure. + security: + - api_email: [] + api_key: [] + summary: List Request Messages + tags: + - Request for Information (RFI) + x-api-token-group: + - Cloudforce One Write + /accounts/{account_id}/cloudforce-one/requests/{request_id}/message/new: + post: + description: Adds a message to a Cloudforce One intelligence request conversation. + operationId: cloudforce-one-request-message-new + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: request_id + schema: + $ref: '#/components/schemas/cloudforceOneRequestsUuid' + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsRequestMessageEdit' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + messages: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/cloudforceOneRequestsRequestMessageItem' + required: + - success + - errors + - messages + type: object + description: Create request message response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommonFailure' + description: Create request message response failure. + security: + - api_email: [] + api_key: [] + summary: Create a New Request Message + tags: + - Request for Information (RFI) + x-api-token-group: + - Cloudforce One Write + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - requests + - message + method: create + /accounts/{account_id}/cloudforce-one/requests/{request_id}/message/{message_id}: + delete: + description: Removes a message from a Cloudforce One intelligence request thread. + operationId: cloudforce-one-request-message-delete + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: request_id + schema: + $ref: '#/components/schemas/cloudforceOneRequestsUuid' + required: true + - in: path + name: message_id + schema: + type: integer + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommon' + description: Delete request message response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommonFailure' + description: Delete request message response failure. + security: + - api_email: [] + api_key: [] + summary: Delete a Request Message + tags: + - Request for Information (RFI) + x-api-token-group: + - Cloudforce One Write + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - requests + - message + method: delete + put: + description: Updates a message in a Cloudforce One intelligence request thread. + operationId: cloudforce-one-request-message-update + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: request_id + schema: + $ref: '#/components/schemas/cloudforceOneRequestsUuid' + required: true + - in: path + name: message_id + schema: + type: integer + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsRequestMessageEdit' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + messages: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/cloudforceOneRequestsRequestMessageItem' + required: + - success + - errors + - messages + type: object + description: Update request message response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRequestsApiResponseCommonFailure' + description: Update request message response failure. + security: + - api_email: [] + api_key: [] + summary: Update a Request Message + tags: + - Request for Information (RFI) + x-api-token-group: + - Cloudforce One Write + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - requests + - message + method: update + /accounts/{account_id}/cloudforce-one/rules: + delete: + description: Delete all rules in an account. + operationId: cloudforce-one-delete-all-rules + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneDeleteAllResponse' + description: All rules deleted. + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneErrorResponse' + description: Unauthorized. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete all rules + tags: + - Rules + get: + description: List all rules for an account with optional filtering. + operationId: cloudforce-one-list-rules + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Filter by namespace. Repeat the parameter to filter by multiple namespaces (e.g. namespace=foo&namespace=bar). + in: query + name: namespace + schema: + description: Filter by namespace. Repeat the parameter to filter by multiple namespaces (e.g. namespace=foo&namespace=bar). + type: string + items: + type: string + - in: query + name: recursive + schema: + enum: + - 'true' + - 'false' + type: string + - in: query + name: search + schema: + type: string + - description: Filter by public visibility. + in: query + name: is_public + schema: + description: Filter by public visibility. + enum: + - 'true' + - 'false' + type: string + - in: query + name: limit + schema: + default: 50 + maximum: 100 + minimum: 1 + type: number + - in: query + name: offset + schema: + default: 0 + minimum: 0 + nullable: true + type: number + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRulesListResponse' + description: List of rules. + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneErrorResponse' + description: Unauthorized. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List rules + tags: + - Rules + post: + description: Create a new detection rule. + operationId: cloudforce-one-create-rule + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneCreateRule' + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRule' + description: Rule created (customer accounts). + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneApprovalPendingResponse' + description: Rule pending approval (internal accounts). + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneErrorResponse' + description: Validation error. + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneErrorResponse' + description: Unauthorized. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a rule + tags: + - Rules + /accounts/{account_id}/cloudforce-one/rules/managed: + get: + description: Get DFP managed rule metadata (name and description) from YARA rules. + operationId: cloudforce-one-get-managed-rules + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + metadata: + properties: + fetched_at: + type: string + total_rules: + type: number + required: + - total_rules + - fetched_at + type: object + rules: + items: + properties: + description: + type: string + name: + type: string + required: + - name + - description + type: object + type: array + required: + - rules + - metadata + type: object + description: Managed rules metadata. + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneErrorResponse' + description: Unauthorized. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get managed rules + tags: + - Rules + /accounts/{account_id}/cloudforce-one/rules/stats: + get: + description: Get statistics about rules for the dashboard. + operationId: cloudforce-one-get-rule-stats + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneStatsResponse' + description: Dashboard statistics. + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneErrorResponse' + description: Unauthorized. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get dashboard stats + tags: + - Rules + /accounts/{account_id}/cloudforce-one/rules/tree: + get: + description: Get the folder tree structure for rules navigation. + operationId: cloudforce-one-get-rule-tree + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneTreeResponse' + description: Folder tree structure. + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneErrorResponse' + description: Unauthorized. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get folder tree structure + tags: + - Rules + /accounts/{account_id}/cloudforce-one/rules/validate: + post: + description: Validate rule syntax, name uniqueness, namespace, and meta checks. + operationId: cloudforce-one-validate-rule + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + content: + minLength: 1 + type: string + excludeRuleId: + format: uuid + type: string + name: + maxLength: 255 + minLength: 1 + type: string + namespaces: + items: + maxLength: 255 + minLength: 1 + type: string + minItems: 1 + type: array + required: + - name + - namespaces + - content + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneValidationResponse' + description: Validation result. + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneErrorResponse' + description: Unauthorized. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Validate rule with context + tags: + - Rules + /accounts/{account_id}/cloudforce-one/rules/{id}: + delete: + description: Delete an existing rule. + operationId: cloudforce-one-delete-rule + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneSuccessResponse' + description: Rule deleted (customer accounts). + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneApprovalPendingResponse' + description: Deletion pending approval (internal accounts). + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneErrorResponse' + description: Unauthorized. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneErrorResponse' + description: Rule not found. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete a rule + tags: + - Rules + get: + description: Get a single rule by ID. + operationId: cloudforce-one-get-rule + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRule' + description: Rule details. + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneErrorResponse' + description: Unauthorized. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneErrorResponse' + description: Rule not found. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get a rule + tags: + - Rules + put: + description: Update an existing rule. + operationId: cloudforce-one-update-rule + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneUpdateRule' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneRule' + description: Rule updated (customer accounts). + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneApprovalPendingResponse' + description: Update pending approval (internal accounts). + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneErrorResponse' + description: Unauthorized. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOneErrorResponse' + description: Rule not found. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update a rule + tags: + - Rules + /accounts/{account_id}/cloudforce-one/scans/config: + get: + operationId: get_ConfigFetch + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cloudforceOnePortScanApiMessages' + messages: + $ref: '#/components/schemas/cloudforceOnePortScanApiMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + items: + $ref: '#/components/schemas/cloudforceOnePortScanApiScanConfig' + type: array + required: + - success + - errors + - messages + type: object + description: Returns all Scan Configs. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOnePortScanApiApiResponseCommonFailure' + description: List Scan Configs failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Scan Configs + tags: + - Scans + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - scans + - config + method: list + post: + operationId: post_ConfigCreate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + frequency: + $ref: '#/components/schemas/cloudforceOnePortScanApiFrequency' + ips: + $ref: '#/components/schemas/cloudforceOnePortScanApiIps' + ports: + $ref: '#/components/schemas/cloudforceOnePortScanApiPorts' + required: + - ips + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cloudforceOnePortScanApiMessages' + messages: + $ref: '#/components/schemas/cloudforceOnePortScanApiMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/cloudforceOnePortScanApiScanConfig' + required: + - success + - errors + - messages + type: object + description: Returns the created config. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOnePortScanApiApiResponseCommonFailure' + description: Create a new Scan Config failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a new Scan Config + tags: + - Scans + x-api-token-group: + - Cloudforce One Write + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - scans + - config + method: create + /accounts/{account_id}/cloudforce-one/scans/config/{config_id}: + delete: + operationId: delete_DeleteScans + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Defines the Config ID. + in: path + name: config_id + schema: + description: Defines the Config ID. + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + type: string + type: array + messages: + items: + type: string + type: array + result: + type: object + success: + type: boolean + required: + - success + - result + - messages + - errors + type: object + description: Delete a Scan Config. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOnePortScanApiApiResponseCommonFailure' + description: Delete a Scan Config failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete a Scan Config + tags: + - Scans + x-api-token-group: + - Cloudforce One Write + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - scans + - config + method: delete + patch: + operationId: post_ConfigUpdate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Defines the Config ID. + in: path + name: config_id + schema: + description: Defines the Config ID. + type: string + required: true + requestBody: + content: + application/json: + schema: + properties: + frequency: + $ref: '#/components/schemas/cloudforceOnePortScanApiFrequency' + ips: + $ref: '#/components/schemas/cloudforceOnePortScanApiIps' + ports: + $ref: '#/components/schemas/cloudforceOnePortScanApiPorts' + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cloudforceOnePortScanApiMessages' + messages: + $ref: '#/components/schemas/cloudforceOnePortScanApiMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/cloudforceOnePortScanApiScanConfig' + required: + - success + - errors + - messages + type: object + description: Returns the updated config. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOnePortScanApiApiResponseCommonFailure' + description: Update an Existing Scan Config failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update an existing Scan Config + tags: + - Scans + x-api-token-group: + - Cloudforce One Write + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - scans + - config + method: edit + /accounts/{account_id}/cloudforce-one/scans/results/{config_id}: + get: + operationId: get_GetOpenPorts + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Defines the Config ID. + in: path + name: config_id + schema: + description: Defines the Config ID. + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + type: string + type: array + messages: + items: + type: string + type: array + result: + properties: + 1.1.1.1: + items: + $ref: '#/components/schemas/cloudforceOnePortScanApiPort' + type: array + x-stainless-naming: + python: + property_name: one_one_one_one + argument_name: one_one_one_one + method_argument: one_one_one_one + go: + property_name: OneOneOneOne + argument_name: OneOneOneOne + method_argument: OneOneOneOne + required: + - 1.1.1.1 + type: object + success: + type: boolean + required: + - success + - result + - messages + - errors + type: object + description: Returns Current Open Ports. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cloudforceOnePortScanApiApiResponseCommonFailure' + description: Get the Latest Scan Result failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get the Latest Scan Result + tags: + - Scans + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + x-stackql-sdk: + service: cloudforce_one + resource_chain: + - scans + - results + method: get + /accounts/{account_id}/cloudforce-one/v2/brand-protection/letter/generate: + post: + description: Generate a takedown letter from a template. Returns V4 JSON for text format or a PDF binary for pdf format. + operationId: post_LetterGenerate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + fields: + properties: + discoveryDate: + type: string + domain: + maxLength: 500 + type: string + generationDate: + type: string + registrantEmail: + maxLength: 500 + type: string + registrar: + maxLength: 500 + type: string + resolutionByDate: + type: string + senderCompany: + maxLength: 500 + type: string + senderEmail: + maxLength: 500 + type: string + senderName: + maxLength: 500 + type: string + senderTitle: + maxLength: 500 + type: string + trademarkName: + maxLength: 500 + type: string + trademarkOwner: + maxLength: 500 + type: string + type: object + format: + default: text + enum: + - text + - pdf + type: string + templateId: + minLength: 1 + type: string + required: + - templateId + - fields + type: object + responses: + '200': + content: + application/json: + schema: + properties: + letter: + type: string + required: + - letter + type: object + application/pdf: + schema: + format: binary + type: string + description: 'Letter generated successfully. When format=text, returns V4 JSON with { result: { letter: string } }. When format=pdf, returns binary with Content-Type: application/pdf.' + security: + - api_token: [] + summary: Generate takedown letter + tags: + - Brand Protection + x-api-token-group: + - Cloudforce One Write + /accounts/{account_id}/cloudforce-one/v2/brand-protection/letter/templates: + get: + description: List all available takedown letter templates (system templates and user-defined templates) + operationId: get_LetterTemplateList + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + templates: + items: + properties: + category: + type: string + createdAt: + nullable: true + type: string + description: + nullable: true + type: string + id: + type: string + name: + type: string + source: + enum: + - system + - user + type: string + updatedAt: + nullable: true + type: string + required: + - id + - source + - name + - category + - description + - createdAt + - updatedAt + type: object + type: array + required: + - templates + type: object + description: Templates listed successfully + security: + - api_token: [] + summary: List letter templates + tags: + - Brand Protection + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + post: + description: Create a new user-defined takedown letter template + operationId: post_LetterTemplateCreate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + body: + minLength: 1 + type: string + category: + maxLength: 100 + minLength: 1 + type: string + description: + maxLength: 1000 + type: string + name: + maxLength: 255 + minLength: 1 + type: string + required: + - name + - category + - body + type: object + responses: + '200': + content: + application/json: + schema: + properties: + body: + type: string + category: + type: string + createdAt: + nullable: true + type: string + description: + nullable: true + type: string + id: + type: string + name: + type: string + source: + enum: + - system + - user + type: string + updatedAt: + nullable: true + type: string + required: + - id + - source + - name + - category + - description + - body + - createdAt + - updatedAt + type: object + description: Template created successfully + security: + - api_token: [] + summary: Create letter template + tags: + - Brand Protection + x-api-token-group: + - Cloudforce One Write + /accounts/{account_id}/cloudforce-one/v2/brand-protection/letter/templates/{template_id}: + delete: + description: Delete a user-defined takedown letter template. System templates cannot be deleted. + operationId: delete_LetterTemplateDelete + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: template_id + schema: + minLength: 1 + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + message: + type: string + success: + type: boolean + required: + - success + - message + type: object + description: Template deleted successfully + security: + - api_token: [] + summary: Delete letter template + tags: + - Brand Protection + x-api-token-group: + - Cloudforce One Write + get: + description: Get a specific takedown letter template by ID + operationId: get_LetterTemplateGet + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: template_id + schema: + minLength: 1 + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + body: + type: string + category: + type: string + createdAt: + nullable: true + type: string + description: + nullable: true + type: string + id: + type: string + name: + type: string + source: + enum: + - system + - user + type: string + updatedAt: + nullable: true + type: string + required: + - id + - source + - name + - category + - description + - body + - createdAt + - updatedAt + type: object + description: Template retrieved successfully + security: + - api_token: [] + summary: Get letter template + tags: + - Brand Protection + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + put: + description: Update a user-defined takedown letter template. System templates cannot be modified. + operationId: put_LetterTemplateUpdate + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: template_id + schema: + minLength: 1 + type: string + required: true + requestBody: + content: + application/json: + schema: + properties: + body: + minLength: 1 + type: string + category: + maxLength: 100 + minLength: 1 + type: string + description: + maxLength: 1000 + nullable: true + type: string + name: + maxLength: 255 + minLength: 1 + type: string + type: object + responses: + '200': + content: + application/json: + schema: + properties: + body: + type: string + category: + type: string + createdAt: + nullable: true + type: string + description: + nullable: true + type: string + id: + type: string + name: + type: string + source: + enum: + - system + - user + type: string + updatedAt: + nullable: true + type: string + required: + - id + - source + - name + - category + - description + - body + - createdAt + - updatedAt + type: object + description: Template updated successfully + security: + - api_token: [] + summary: Update letter template + tags: + - Brand Protection + x-api-token-group: + - Cloudforce One Write + /accounts/{account_id}/cloudforce-one/v2/brand-protection/logo/search: + post: + description: Submit an image and find the n closest matches from the scanned images index without creating any match records. Returns similarity scores and metadata for each match. + operationId: post_SearchLogoSimilarity + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: 'Include scanned images without domain metadata (historic data). Default: false (only show images with domain)' + in: query + name: showHistoric + schema: + default: 'false' + description: 'Include scanned images without domain metadata (historic data). Default: false (only show images with domain)' + type: string + - description: If true, include base64-encoded image data in the response + in: query + name: download + schema: + description: If true, include base64-encoded image data in the response + type: string + requestBody: + content: + application/json: + schema: + properties: + image_data: + description: Base64 encoded image data. Can include data URI prefix (e.g., 'data:image/png;base64,...') or just the base64 string. + minLength: 1 + type: string + score_threshold: + default: 0 + description: 'Minimum similarity score threshold for matches (0-1, default: 0)' + maximum: 1 + minimum: 0 + type: number + top_k: + default: 10 + description: 'Number of closest matches to return (1-100, default: 10)' + maximum: 100 + minimum: 1 + type: integer + required: + - image_data + type: object + responses: + '200': + content: + application/json: + schema: + properties: + matches: + items: + properties: + account_id: + type: string + content_type: + description: MIME type of the image (only present when download=true) + type: string + domain: + type: string + image_data: + description: Base64-encoded image data (only present when download=true) + type: string + query_id: + type: integer + r2_path: + type: string + similarity_score: + type: number + similarity_threshold: + type: number + tag: + type: string + timestamp: + type: number + url_scan_id: + type: string + vector_id: + type: string + required: + - similarity_score + type: object + type: array + required: + - matches + type: object + description: Scanned images search completed successfully + security: + - api_token: [] + summary: Search scanned images + tags: + - Brand Protection + x-api-token-group: + - Cloudforce One Write + /accounts/{account_id}/cloudforce-one/v2/brand-protection/total-queries: + get: + description: Get the total number of saved brand protection queries (domain + logo) for an account + operationId: get_TotalQueries + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + items: + properties: + total_queries: + minimum: 0 + type: integer + required: + - total_queries + type: object + type: array + description: Successfully retrieved total query count + security: + - api_token: [] + summary: Get total queries + tags: + - Brand Protection + x-api-token-group: + - Cloudforce One Write + - Cloudforce One Read + /accounts/{account_id}/cloudforce-one/v2/events/graphql: + post: + description: Execute GraphQL aggregations over threat events. Supports multi-dimensional group-bys, optional date range filtering, and multi-dataset aggregation. + operationId: post_EventGraphQLV2 + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + data: + nullable: true + type: object + errors: + items: + type: object + nullable: true + type: array + type: object + description: GraphQL response payload (data and errors). + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + message: + type: string + required: + - message + type: object + type: array + result: + type: object + success: + type: boolean + required: + - result + - success + - errors + type: object + description: Bad Request. + security: + - api_token: [] + summary: GraphQL endpoint for event aggregation + tags: + - Event + x-api-token-group: + - Cloudforce One Write +components: + schemas: + cloudforceOneApprovalPendingResponse: + properties: + approval_id: + example: 1 + type: number + message: + example: Rule creation pending approval + type: string + required: + - approval_id + - message + type: object + cloudforceOneCreateRule: + properties: + actions: + items: + $ref: '#/components/schemas/cloudforceOneRuleAction' + type: array + content: + example: 'rule example { condition: true }' + minLength: 1 + type: string + description: + description: Human-readable description of the rule. Auto-extracted from YARA meta if present. + example: Detects malicious proxy workers + maxLength: 1000 + type: string + enabled: + default: true + description: Whether this rule is active for dice consumers. + example: true + type: boolean + is_public: + default: false + description: Whether this rule is visible to other internal accounts. + example: false + type: boolean + x-auditable: true + name: + example: block-malicious-workers + maxLength: 255 + minLength: 1 + type: string + x-auditable: true + namespaces: + example: + - yara/workers + items: + maxLength: 255 + minLength: 1 + type: string + minItems: 1 + type: array + x-auditable: true + required: + - name + - namespaces + - content + type: object + cloudforceOneDeleteAllResponse: + properties: + deleted: + example: 10 + type: number + required: + - deleted + type: object + cloudforceOneErrorResponse: + $ref: '#/components/schemas/unnamedSchemaRef73de8b634bb48667e28a6c6c56080c51' + cloudforceOnePortScanApiApiResponseCommonFailure: + properties: + errors: + $ref: '#/components/schemas/cloudforceOnePortScanApiMessages' + type: object + messages: + $ref: '#/components/schemas/cloudforceOnePortScanApiMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + type: object + cloudforceOnePortScanApiFrequency: + description: Defines the number of days between each scan (0 = One-off scan). + example: 7 + title: Frequency + type: number + cloudforceOnePortScanApiIps: + description: Defines a list of IP addresses or CIDR blocks to scan. The maximum number of total IP addresses allowed is 5000. + example: + - 1.1.1.1 + - 2606:4700:4700::1111 + items: + description: Defines a list of IP addresses or CIDR blocks to scan. The maximum number of total IP addresses allowed is 5000. + type: string + title: IP List + type: array + cloudforceOnePortScanApiMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + cloudforceOnePortScanApiPort: + properties: + number: + example: 8080 + type: number + proto: + example: tcp + type: string + status: + example: open + type: string + required: + - account_id + - ips + - frequency + title: Port + type: object + cloudforceOnePortScanApiPorts: + description: Defines a list of ports to scan. Valid values are:"default", "all", or a comma-separated list of ports or range of ports (e.g. ["1-80", "443"]). "default" scans the 100 most commonly open ports. + example: + - default + items: + description: Defines a list of ports to scan. Valid values are:"default", "all", or a comma-separated list of ports or range of ports (e.g. ["1-80", "443"]). "default" scans the 100 most commonly open ports. + type: string + title: Port List + type: array + cloudforceOnePortScanApiScanConfig: + properties: + account_id: + example: abcd1234abcd1234abcd1234abcd1234 + type: string + frequency: + $ref: '#/components/schemas/cloudforceOnePortScanApiFrequency' + id: + description: Defines the Config ID. + example: uuid + type: string + ips: + $ref: '#/components/schemas/cloudforceOnePortScanApiIps' + ports: + $ref: '#/components/schemas/cloudforceOnePortScanApiPorts' + required: + - id + - account_id + - ips + - frequency + - ports + title: Config + type: object + cloudforceOneRequestsApiResponseCommon: + properties: + errors: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + messages: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + type: object + cloudforceOneRequestsApiResponseCommonFailure: + properties: + errors: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + properties: + code: + example: 10433 + type: integer + message: + example: request error + type: string + messages: + $ref: '#/components/schemas/cloudforceOneRequestsMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + type: object + cloudforceOneRequestsAssetContent: + description: Asset file to upload. + example: '@/Users/me/example.docx' + type: string + cloudforceOneRequestsLabels: + description: List of labels. + example: + - DoS + - CVE + items: + type: string + title: Labels + type: array + x-auditable: true + cloudforceOneRequestsMessageContent: + description: Content of message. + example: Can you elaborate on the type of DoS that occurred? + type: string + x-auditable: true + cloudforceOneRequestsMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + cloudforceOneRequestsPriority: + enum: + - routine + - high + - urgent + title: Request Priority + type: string + x-auditable: true + cloudforceOneRequestsPriorityEdit: + properties: + labels: + $ref: '#/components/schemas/cloudforceOneRequestsLabels' + priority: + description: Priority. + example: 1 + type: integer + x-auditable: true + requirement: + description: Requirement. + example: DoS attacks carried out by CVEs + type: string + x-auditable: true + tlp: + $ref: '#/components/schemas/cloudforceOneRequestsTlp' + required: + - labels + - priority + - requirement + - tlp + title: Priority Editable Attributes + type: object + cloudforceOneRequestsPriorityItem: + properties: + created: + description: Priority creation time. + $ref: '#/components/schemas/cloudforceOneRequestsTime' + id: + $ref: '#/components/schemas/cloudforceOneRequestsUuid' + labels: + $ref: '#/components/schemas/cloudforceOneRequestsLabels' + priority: + description: Priority. + example: 1 + type: integer + x-auditable: true + requirement: + description: Requirement. + example: DoS attacks carried out by CVEs + type: string + x-auditable: true + tlp: + $ref: '#/components/schemas/cloudforceOneRequestsTlp' + updated: + description: Priority last updated time. + $ref: '#/components/schemas/cloudforceOneRequestsTime' + required: + - id + - created + - updated + - labels + - priority + - requirement + - tlp + title: Priority Item + type: object + cloudforceOneRequestsPriorityList: + properties: + page: + description: Page number of results. + type: integer + per_page: + description: Number of results per page. + example: 10 + type: integer + required: + - page + - per_page + title: Priority List Parameters + type: object + cloudforceOneRequestsQuota: + properties: + anniversary_date: + description: Anniversary date is when annual quota limit is refreshed. + example: '2022-04-01T00:00:00Z' + $ref: '#/components/schemas/cloudforceOneRequestsTime' + quarter_anniversary_date: + description: Quarter anniversary date is when quota limit is refreshed each quarter. + example: '2022-04-01T00:00:00Z' + $ref: '#/components/schemas/cloudforceOneRequestsTime' + quota: + description: Tokens for the quarter. + example: 120 + type: integer + x-auditable: true + remaining: + description: Tokens remaining for the quarter. + example: 64 + type: integer + x-auditable: true + title: Quota + type: object + cloudforceOneRequestsRequestAssetEdit: + properties: + source: + $ref: '#/components/schemas/cloudforceOneRequestsAssetContent' + title: Request Asset Editable Attributes + type: object + cloudforceOneRequestsRequestAssetItem: + properties: + created: + description: Defines the asset creation time. + example: '2022-01-01T00:00:00Z' + $ref: '#/components/schemas/cloudforceOneRequestsTime' + description: + description: Asset description. + example: example description + type: string + x-auditable: true + file_type: + description: Asset file type. + example: docx + type: string + x-auditable: true + id: + description: Asset ID. + type: integer + x-auditable: true + name: + description: Asset name. + example: example.docx + type: string + x-auditable: true + required: + - id + - name + title: Request Asset Item + type: object + cloudforceOneRequestsRequestAssetList: + properties: + page: + description: Page number of results. + type: integer + per_page: + description: Number of results per page. + example: 10 + type: integer + required: + - page + - per_page + title: Request Asset List Parameters + type: object + cloudforceOneRequestsRequestConstants: + properties: + priority: + example: + - routine + - high + - urgent + items: + $ref: '#/components/schemas/cloudforceOneRequestsPriority' + type: array + status: + example: + - open + - accepted + - reported + - approved + - completed + - declined + items: + $ref: '#/components/schemas/cloudforceOneRequestsRequestStatus' + type: array + tlp: + example: + - clear + - green + - amber + - amber-strict + - red + items: + $ref: '#/components/schemas/cloudforceOneRequestsTlp' + type: array + title: Request Constants + type: object + cloudforceOneRequestsRequestContent: + description: Request content. + example: What regions were most effected by the recent DoS? + type: string + cloudforceOneRequestsRequestEdit: + properties: + content: + $ref: '#/components/schemas/cloudforceOneRequestsRequestContent' + priority: + description: Priority for analyzing the request. + example: routine + type: string + x-auditable: true + request_type: + $ref: '#/components/schemas/cloudforceOneRequestsRequestType' + summary: + $ref: '#/components/schemas/cloudforceOneRequestsRequestSummary' + tlp: + $ref: '#/components/schemas/cloudforceOneRequestsTlp' + title: Request Editable Parameters + type: object + cloudforceOneRequestsRequestItem: + properties: + completed: + $ref: '#/components/schemas/cloudforceOneRequestsTime' + content: + $ref: '#/components/schemas/cloudforceOneRequestsRequestContent' + created: + $ref: '#/components/schemas/cloudforceOneRequestsTime' + id: + $ref: '#/components/schemas/cloudforceOneRequestsUuid' + message_tokens: + description: Tokens for the request messages. + example: 1 + type: integer + x-auditable: true + priority: + $ref: '#/components/schemas/cloudforceOneRequestsTime' + readable_id: + $ref: '#/components/schemas/cloudforceOneRequestsRequestReadableId' + request: + $ref: '#/components/schemas/cloudforceOneRequestsRequestType' + status: + $ref: '#/components/schemas/cloudforceOneRequestsRequestStatus' + summary: + $ref: '#/components/schemas/cloudforceOneRequestsRequestSummary' + tlp: + $ref: '#/components/schemas/cloudforceOneRequestsTlp' + tokens: + description: Tokens for the request. + example: 16 + type: integer + x-auditable: true + updated: + $ref: '#/components/schemas/cloudforceOneRequestsTime' + required: + - id + - created + - updated + - content + - priority + - request + - summary + - tlp + title: Request Item + type: object + cloudforceOneRequestsRequestList: + properties: + completed_after: + description: Retrieve requests completed after this time. + example: '2022-01-01T00:00:00Z' + $ref: '#/components/schemas/cloudforceOneRequestsTime' + completed_before: + description: Retrieve requests completed before this time. + example: '2024-01-01T00:00:00Z' + $ref: '#/components/schemas/cloudforceOneRequestsTime' + created_after: + description: Retrieve requests created after this time. + example: '2022-01-01T00:00:00Z' + $ref: '#/components/schemas/cloudforceOneRequestsTime' + created_before: + description: Retrieve requests created before this time. + example: '2024-01-01T00:00:00Z' + $ref: '#/components/schemas/cloudforceOneRequestsTime' + page: + description: Page number of results. + type: integer + per_page: + description: Number of results per page. + example: 10 + type: integer + request_type: + $ref: '#/components/schemas/cloudforceOneRequestsRequestType' + sort_by: + description: Field to sort results by. + example: created + type: string + sort_order: + description: Sort order (asc or desc). + enum: + - asc + - desc + type: string + status: + $ref: '#/components/schemas/cloudforceOneRequestsRequestStatus' + required: + - page + - per_page + title: Request List Parameters + type: object + cloudforceOneRequestsRequestListItem: + properties: + completed: + description: Request completion time. + example: '2024-01-01T00:00:00Z' + $ref: '#/components/schemas/cloudforceOneRequestsTime' + created: + description: Request creation time. + example: '2022-04-01T00:00:00Z' + $ref: '#/components/schemas/cloudforceOneRequestsTime' + id: + $ref: '#/components/schemas/cloudforceOneRequestsUuid' + message_tokens: + description: Tokens for the request messages. + example: 16 + type: integer + x-auditable: true + priority: + $ref: '#/components/schemas/cloudforceOneRequestsPriority' + readable_id: + $ref: '#/components/schemas/cloudforceOneRequestsRequestReadableId' + request: + $ref: '#/components/schemas/cloudforceOneRequestsRequestType' + status: + $ref: '#/components/schemas/cloudforceOneRequestsRequestStatus' + summary: + $ref: '#/components/schemas/cloudforceOneRequestsRequestSummary' + tlp: + $ref: '#/components/schemas/cloudforceOneRequestsTlp' + tokens: + description: Tokens for the request. + type: integer + x-auditable: true + updated: + description: Request last updated time. + example: '2022-04-01T00:00:00Z' + $ref: '#/components/schemas/cloudforceOneRequestsTime' + required: + - id + - created + - updated + - priority + - request + - summary + - tlp + title: Request List Item + type: object + cloudforceOneRequestsRequestMessageEdit: + properties: + content: + $ref: '#/components/schemas/cloudforceOneRequestsMessageContent' + title: Request Message Editable Attributes + type: object + cloudforceOneRequestsRequestMessageItem: + properties: + author: + description: Author of message. + example: user@domain.com + type: string + x-auditable: true + content: + $ref: '#/components/schemas/cloudforceOneRequestsMessageContent' + created: + description: Defines the message creation time. + example: '2022-01-01T00:00:00Z' + $ref: '#/components/schemas/cloudforceOneRequestsTime' + id: + description: Message ID. + type: integer + x-auditable: true + is_follow_on_request: + description: Whether the message is a follow-on request. + type: boolean + x-auditable: true + updated: + description: Defines the message last updated time. + example: '2022-01-01T00:00:00Z' + $ref: '#/components/schemas/cloudforceOneRequestsTime' + required: + - id + - updated + - content + - author + - is_follow_on_request + title: Request Message Item + type: object + cloudforceOneRequestsRequestMessageList: + properties: + after: + description: Retrieve mes ges created after this time. + $ref: '#/components/schemas/cloudforceOneRequestsTime' + before: + description: Retrieve messages created before this time. + example: '2024-01-01T00:00:00Z' + $ref: '#/components/schemas/cloudforceOneRequestsTime' + page: + description: Page number of results. + type: integer + per_page: + description: Number of results per page. + example: 10 + type: integer + sort_by: + description: Field to sort results by. + example: created + type: string + sort_order: + description: Sort order (asc or desc). + enum: + - asc + - desc + type: string + required: + - page + - per_page + title: Request Message List Parameters + type: object + cloudforceOneRequestsRequestReadableId: + description: Readable Request ID. + example: RFI-2022-000001 + title: Request Readable ID + type: string + x-auditable: true + cloudforceOneRequestsRequestStatus: + description: Request Status. + enum: + - open + - accepted + - reported + - approved + - completed + - declined + title: Request Status + type: string + x-auditable: true + cloudforceOneRequestsRequestSummary: + description: Brief description of the request. + example: DoS attack + type: string + x-auditable: true + cloudforceOneRequestsRequestType: + description: Requested information from request. + example: Victomology + type: string + x-auditable: true + cloudforceOneRequestsRequestTypes: + example: + - Indicators of Compromise + - Victomology + items: + description: Request Types. + type: string + x-auditable: true + title: Request Types + type: array + cloudforceOneRequestsTime: + example: '2022-04-01T05:20:00Z' + format: date-time + type: string + x-auditable: true + cloudforceOneRequestsTlp: + description: The CISA defined Traffic Light Protocol (TLP). + enum: + - clear + - amber + - amber-strict + - green + - red + title: TLP + type: string + x-auditable: true + cloudforceOneRequestsUuid: + description: UUID. + example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 + maxLength: 36 + type: string + cloudforceOneRule: + properties: + content: + example: 'rule example { condition: true }' + type: string + created_at: + example: 1679529600000 + type: number + x-auditable: true + readOnly: true + created_by: + example: user@example.com + type: string + x-auditable: true + description: + example: Detects malicious proxy workers + type: string + enabled: + description: Whether this rule is active for dice consumers. + example: true + type: boolean + id: + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid + type: string + x-auditable: true + is_public: + description: Whether this rule is visible to other internal accounts. + example: false + type: boolean + x-auditable: true + name: + example: block-malicious-workers + type: string + x-auditable: true + namespaces: + example: + - yara/workers + items: + type: string + type: array + x-auditable: true + updated_at: + example: 1679529600000 + type: number + x-auditable: true + readOnly: true + updated_by: + example: user@example.com + type: string + x-auditable: true + required: + - id + - name + - description + - namespaces + - content + - is_public + - enabled + - created_at + - updated_at + - created_by + - updated_by + type: object + cloudforceOneRuleAction: + properties: + action_config: + description: Action-specific configuration parameters. + type: object + action_type: + enum: + - alert_gchat + - webhook + - logging + - email + - pipeline + - remediation + - throttle + - delete + example: alert_gchat + type: string + enabled: + default: true + type: boolean + required: + - action_type + - action_config + type: object + cloudforceOneRulesListResponse: + properties: + rules: + items: + $ref: '#/components/schemas/cloudforceOneRule' + type: array + total: + example: 100 + type: number + required: + - rules + - total + type: object + cloudforceOneStatsResponse: + properties: + pending_approvals: + example: 5 + type: number + rules_by_namespace: + example: + yara/dns_record: 12 + yara/workers: 30 + type: object + total_rules: + example: 42 + type: number + required: + - total_rules + - rules_by_namespace + - pending_approvals + type: object + cloudforceOneSuccessResponse: + properties: + success: + example: true + type: boolean + required: + - success + type: object + cloudforceOneTreeNode: + properties: + children: + items: + $ref: '#/components/schemas/cloudforceOneTreeNode' + type: array + count: + example: 15 + type: number + name: + example: workers + type: string + path: + example: yara/workers + type: string + required: + - name + - path + - count + - children + type: object + cloudforceOneTreeResponse: + properties: + tree: + items: + $ref: '#/components/schemas/cloudforceOneTreeNode' + type: array + required: + - tree + type: object + cloudforceOneUpdateRule: + properties: + content: + example: 'rule example { condition: true }' + minLength: 1 + type: string + description: + description: Human-readable description of the rule. Auto-extracted from YARA meta if present. + example: Detects malicious proxy workers + maxLength: 1000 + type: string + enabled: + description: Whether this rule is active for dice consumers. + example: true + type: boolean + is_public: + description: Whether this rule is visible to other internal accounts. + example: false + type: boolean + x-auditable: true + name: + example: block-malicious-workers + maxLength: 255 + minLength: 1 + type: string + x-auditable: true + namespaces: + example: + - yara/workers + items: + maxLength: 255 + minLength: 1 + type: string + type: array + x-auditable: true + type: object + cloudforceOneValidationResponse: + properties: + error: + example: Invalid YARA syntax + type: string + valid: + example: true + type: boolean + required: + - valid + type: object + unnamedSchemaRef73de8b634bb48667e28a6c6c56080c51: + properties: + error: + example: Not Found. + type: string + required: + - error + type: object + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + binary_storage: + id: cloudflare.cloudforce_one.binary_storage + name: binary_storage + title: Binary Storage + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1binary/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1binary~1{hash}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/binary_storage/methods/create' + update: [] + delete: [] + replace: [] + threat_events: + id: cloudflare.cloudforce_one.threat_events + name: threat_events + title: Threat Events + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + bulk_create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1create~1bulk/post' + response: + mediaType: application/json + openAPIDocKey: '202' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .data }}{{ $sep }}"data": {{ if eq (kindOf .data) "string" }}{{ .data }}{{ else }}{{ toJson .data }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .datasetId }}{{ $sep }}"datasetId": {{ toJson .datasetId }}{{- $sep = "," -}}{{ end }} + + {{- if .includeCreatedEvents }}{{ $sep }}"includeCreatedEvents": {{ toJson .includeCreatedEvents }}{{- $sep = "," -}}{{ end }} + + } + + ' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1{event_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1{event_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .attacker }}{{ $sep }}"attacker": {{ toJson .attacker }}{{- $sep = "," -}}{{ end }} + + {{- if .attackerCountry }}{{ $sep }}"attackerCountry": {{ toJson .attackerCountry }}{{- $sep = "," -}}{{ end }} + + {{- if .category }}{{ $sep }}"category": {{ toJson .category }}{{- $sep = "," -}}{{ end }} + + {{- if .createdAt }}{{ $sep }}"createdAt": {{ toJson .createdAt }}{{- $sep = "," -}}{{ end }} + + {{- if .datasetId }}{{ $sep }}"datasetId": {{ toJson .datasetId }}{{- $sep = "," -}}{{ end }} + + {{- if .date }}{{ $sep }}"date": {{ toJson .date }}{{- $sep = "," -}}{{ end }} + + {{- if .event }}{{ $sep }}"event": {{ toJson .event }}{{- $sep = "," -}}{{ end }} + + {{- if .indicator }}{{ $sep }}"indicator": {{ toJson .indicator }}{{- $sep = "," -}}{{ end }} + + {{- if .indicatorType }}{{ $sep }}"indicatorType": {{ toJson .indicatorType }}{{- $sep = "," -}}{{ end }} + + {{- if .insight }}{{ $sep }}"insight": {{ toJson .insight }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ if eq (kindOf .raw) "string" }}{{ .raw }}{{ else }}{{ toJson .raw }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .targetCountry }}{{ $sep }}"targetCountry": {{ toJson .targetCountry }}{{- $sep = "," -}}{{ end }} + + {{- if .targetIndustry }}{{ $sep }}"targetIndustry": {{ toJson .targetIndustry }}{{- $sep = "," -}}{{ end }} + + {{- if .tlp }}{{ $sep }}"tlp": {{ toJson .tlp }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/threat_events/methods/get' + - $ref: '#/components/x-stackQL-resources/threat_events/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/threat_events/methods/bulk_create' + update: + - $ref: '#/components/x-stackQL-resources/threat_events/methods/edit' + delete: [] + replace: [] + aggregate: + id: cloudflare.cloudforce_one.aggregate + name: aggregate + title: Aggregate + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1aggregate/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.aggregations + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/aggregate/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + attackers: + id: cloudflare.cloudforce_one.attackers + name: attackers + title: Attackers + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1attackers/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/attackers/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + events_categories: + id: cloudflare.cloudforce_one.events_categories + name: events_categories + title: Events Categories + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1categories/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/events_categories/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + categories_catalog: + id: cloudflare.cloudforce_one.categories_catalog + name: categories_catalog + title: Categories Catalog + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1categories~1catalog/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/categories_catalog/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + events_categories_create: + id: cloudflare.cloudforce_one.events_categories_create + name: events_categories_create + title: Events Categories Create + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1categories~1create/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .killChain }}{{ $sep }}"killChain": {{ toJson .killChain }}{{- $sep = "," -}}{{ end }} + + {{- if .mitreAttack }}{{ $sep }}"mitreAttack": {{ if eq (kindOf .mitreAttack) "string" }}{{ .mitreAttack }}{{ else }}{{ toJson .mitreAttack }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .mitreCapec }}{{ $sep }}"mitreCapec": {{ if eq (kindOf .mitreCapec) "string" }}{{ .mitreCapec }}{{ else }}{{ toJson .mitreCapec }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .shortname }}{{ $sep }}"shortname": {{ toJson .shortname }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/events_categories_create/methods/create' + update: [] + delete: [] + replace: [] + categories: + id: cloudflare.cloudforce_one.categories + name: categories + title: Categories + methods: + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1categories~1{category_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1categories~1{category_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1categories~1{category_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .killChain }}{{ $sep }}"killChain": {{ toJson .killChain }}{{- $sep = "," -}}{{ end }} + + {{- if .mitreAttack }}{{ $sep }}"mitreAttack": {{ if eq (kindOf .mitreAttack) "string" }}{{ .mitreAttack }}{{ else }}{{ toJson .mitreAttack }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .mitreCapec }}{{ $sep }}"mitreCapec": {{ if eq (kindOf .mitreCapec) "string" }}{{ .mitreCapec }}{{ else }}{{ toJson .mitreCapec }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .shortname }}{{ $sep }}"shortname": {{ toJson .shortname }}{{- $sep = "," -}}{{ end }} + + } + + ' + post_category_update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1categories~1{category_id}/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .killChain }}{{ $sep }}"killChain": {{ toJson .killChain }}{{- $sep = "," -}}{{ end }} + + {{- if .mitreAttack }}{{ $sep }}"mitreAttack": {{ if eq (kindOf .mitreAttack) "string" }}{{ .mitreAttack }}{{ else }}{{ toJson .mitreAttack }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .mitreCapec }}{{ $sep }}"mitreCapec": {{ if eq (kindOf .mitreCapec) "string" }}{{ .mitreCapec }}{{ else }}{{ toJson .mitreCapec }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .shortname }}{{ $sep }}"shortname": {{ toJson .shortname }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete_tag_category_delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1tags~1categories~1{category_uuid}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + patch_tag_category_update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1tags~1categories~1{category_uuid}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/categories/methods/get' + insert: + - $ref: '#/components/x-stackQL-resources/categories/methods/post_category_update' + update: + - $ref: '#/components/x-stackQL-resources/categories/methods/edit' + - $ref: '#/components/x-stackQL-resources/categories/methods/patch_tag_category_update' + delete: + - $ref: '#/components/x-stackQL-resources/categories/methods/delete' + - $ref: '#/components/x-stackQL-resources/categories/methods/delete_tag_category_delete' + replace: [] + countries: + id: cloudflare.cloudforce_one.countries + name: countries + title: Countries + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1countries/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/countries/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + events_create: + id: cloudflare.cloudforce_one.events_create + name: events_create + title: Events Create + methods: + create_by_account: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1create/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .accountId }}{{ $sep }}"accountId": {{ toJson .accountId }}{{- $sep = "," -}}{{ end }} + + {{- if .attacker }}{{ $sep }}"attacker": {{ toJson .attacker }}{{- $sep = "," -}}{{ end }} + + {{- if .attackerCountry }}{{ $sep }}"attackerCountry": {{ toJson .attackerCountry }}{{- $sep = "," -}}{{ end }} + + {{- if .category }}{{ $sep }}"category": {{ toJson .category }}{{- $sep = "," -}}{{ end }} + + {{- if .datasetId }}{{ $sep }}"datasetId": {{ toJson .datasetId }}{{- $sep = "," -}}{{ end }} + + {{- if .date }}{{ $sep }}"date": {{ toJson .date }}{{- $sep = "," -}}{{ end }} + + {{- if .event }}{{ $sep }}"event": {{ toJson .event }}{{- $sep = "," -}}{{ end }} + + {{- if .indicator }}{{ $sep }}"indicator": {{ toJson .indicator }}{{- $sep = "," -}}{{ end }} + + {{- if .indicatorType }}{{ $sep }}"indicatorType": {{ toJson .indicatorType }}{{- $sep = "," -}}{{ end }} + + {{- if .indicators }}{{ $sep }}"indicators": {{ if eq (kindOf .indicators) "string" }}{{ .indicators }}{{ else }}{{ toJson .indicators }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .insight }}{{ $sep }}"insight": {{ toJson .insight }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ if eq (kindOf .raw) "string" }}{{ .raw }}{{ else }}{{ toJson .raw }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tags }}{{ $sep }}"tags": {{ if eq (kindOf .tags) "string" }}{{ .tags }}{{ else }}{{ toJson .tags }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .targetCountry }}{{ $sep }}"targetCountry": {{ toJson .targetCountry }}{{- $sep = "," -}}{{ end }} + + {{- if .targetIndustry }}{{ $sep }}"targetIndustry": {{ toJson .targetIndustry }}{{- $sep = "," -}}{{ end }} + + {{- if .tlp }}{{ $sep }}"tlp": {{ toJson .tlp }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + relationships: + id: cloudflare.cloudforce_one.relationships + name: relationships + title: Relationships + methods: + post_dosevent_create_bulk_with_relationships: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1create~1bulk~1relationships/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .data }}{{ $sep }}"data": {{ if eq (kindOf .data) "string" }}{{ .data }}{{ else }}{{ toJson .data }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .datasetId }}{{ $sep }}"datasetId": {{ toJson .datasetId }}{{- $sep = "," -}}{{ end }} + + } + + ' + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1relationships~1create/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .childIds }}{{ $sep }}"childIds": {{ if eq (kindOf .childIds) "string" }}{{ .childIds }}{{ else }}{{ toJson .childIds }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .datasetId }}{{ $sep }}"datasetId": {{ toJson .datasetId }}{{- $sep = "," -}}{{ end }} + + {{- if .parentId }}{{ $sep }}"parentId": {{ toJson .parentId }}{{- $sep = "," -}}{{ end }} + + {{- if .relationshipType }}{{ $sep }}"relationshipType": {{ toJson .relationshipType }}{{- $sep = "," -}}{{ end }} + + } + + ' + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1{event_id}~1relationships/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/relationships/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/relationships/methods/post_dosevent_create_bulk_with_relationships' + update: [] + delete: [] + replace: [] + datasets: + id: cloudflare.cloudforce_one.datasets + name: datasets + title: Datasets + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1create/post' + response: + mediaType: application/json + openAPIDocKey: '200' + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + copy: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1copy/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .destDatasetId }}{{ $sep }}"destDatasetId": {{ toJson .destDatasetId }}{{- $sep = "," -}}{{ end }} + + {{- if .eventIds }}{{ $sep }}"eventIds": {{ if eq (kindOf .eventIds) "string" }}{{ .eventIds }}{{ else }}{{ toJson .eventIds }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + move: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1move/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .destDatasetId }}{{ $sep }}"destDatasetId": {{ toJson .destDatasetId }}{{- $sep = "," -}}{{ end }} + + {{- if .eventIds }}{{ $sep }}"eventIds": {{ if eq (kindOf .eventIds) "string" }}{{ .eventIds }}{{ else }}{{ toJson .eventIds }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + populate: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1datasets~1populate/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/datasets/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/datasets/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/datasets/methods/edit' + delete: [] + replace: [] + groups: + id: cloudflare.cloudforce_one.groups + name: groups + title: Groups + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1-~1groups/get' + response: + mediaType: application/json + openAPIDocKey: '200' + post_group_create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1-~1groups/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete_group_delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1-~1groups~1{group_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1-~1groups~1{group_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + put_group_update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1-~1groups~1{group_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/groups/methods/get' + - $ref: '#/components/x-stackQL-resources/groups/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/groups/methods/post_group_create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/groups/methods/delete_group_delete' + replace: + - $ref: '#/components/x-stackQL-resources/groups/methods/put_group_update' + members: + id: cloudflare.cloudforce_one.members + name: members + title: Members + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1-~1groups~1{group_id}~1members/get' + response: + mediaType: application/json + openAPIDocKey: '200' + post_group_member_create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1-~1groups~1{group_id}~1members/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete_group_member_delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1-~1groups~1{group_id}~1members~1{member_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/members/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/members/methods/post_group_member_create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/members/methods/delete_group_member_delete' + replace: [] + dataset: + id: cloudflare.cloudforce_one.dataset + name: dataset + title: Dataset + methods: + delete_dataset_delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + post_dataset_update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/dataset/methods/post_dataset_update' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/dataset/methods/delete_dataset_delete' + replace: [] + events_dataset: + id: cloudflare.cloudforce_one.events_dataset + name: events_dataset + title: Events Dataset + methods: + get_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/events_dataset/methods/get_by_account' + insert: [] + update: [] + delete: [] + replace: [] + events: + id: cloudflare.cloudforce_one.events + name: events + title: Events + methods: + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1events~1{event_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + create_graphql: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1graphql/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete_relate: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1relate~1{event_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + delete_delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1{dataset_id}~1delete/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + post_event_update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1{event_id}/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .attacker }}{{ $sep }}"attacker": {{ toJson .attacker }}{{- $sep = "," -}}{{ end }} + + {{- if .attackerCountry }}{{ $sep }}"attackerCountry": {{ toJson .attackerCountry }}{{- $sep = "," -}}{{ end }} + + {{- if .category }}{{ $sep }}"category": {{ toJson .category }}{{- $sep = "," -}}{{ end }} + + {{- if .createdAt }}{{ $sep }}"createdAt": {{ toJson .createdAt }}{{- $sep = "," -}}{{ end }} + + {{- if .datasetId }}{{ $sep }}"datasetId": {{ toJson .datasetId }}{{- $sep = "," -}}{{ end }} + + {{- if .date }}{{ $sep }}"date": {{ toJson .date }}{{- $sep = "," -}}{{ end }} + + {{- if .event }}{{ $sep }}"event": {{ toJson .event }}{{- $sep = "," -}}{{ end }} + + {{- if .indicator }}{{ $sep }}"indicator": {{ toJson .indicator }}{{- $sep = "," -}}{{ end }} + + {{- if .indicatorType }}{{ $sep }}"indicatorType": {{ toJson .indicatorType }}{{- $sep = "," -}}{{ end }} + + {{- if .insight }}{{ $sep }}"insight": {{ toJson .insight }}{{- $sep = "," -}}{{ end }} + + {{- if .raw }}{{ $sep }}"raw": {{ if eq (kindOf .raw) "string" }}{{ .raw }}{{ else }}{{ toJson .raw }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .targetCountry }}{{ $sep }}"targetCountry": {{ toJson .targetCountry }}{{- $sep = "," -}}{{ end }} + + {{- if .targetIndustry }}{{ $sep }}"targetIndustry": {{ toJson .targetIndustry }}{{- $sep = "," -}}{{ end }} + + {{- if .tlp }}{{ $sep }}"tlp": {{ toJson .tlp }}{{- $sep = "," -}}{{ end }} + + } + + ' + create_graphql_v2: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1events~1graphql/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/events/methods/get' + insert: + - $ref: '#/components/x-stackQL-resources/events/methods/post_event_update' + update: [] + delete: [] + replace: [] + indicator_types: + id: cloudflare.cloudforce_one.indicator_types + name: indicator_types + title: Indicator Types + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1indicatorTypes~1create/post' + response: + mediaType: application/json + openAPIDocKey: '200' + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1indicator-types/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/indicator_types/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + dataset_indicators: + id: cloudflare.cloudforce_one.dataset_indicators + name: dataset_indicators + title: Dataset Indicators + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1indicators/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.indicators + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/dataset_indicators/methods/list_by_account' + insert: [] + update: [] + delete: [] + replace: [] + bulk: + id: cloudflare.cloudforce_one.bulk + name: bulk + title: Bulk + methods: + post_indicator_create_bulk: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1indicators~1bulk/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .autoCreateType }}{{ $sep }}"autoCreateType": {{ toJson .autoCreateType }}{{- $sep = "," -}}{{ end }} + + {{- if .indicators }}{{ $sep }}"indicators": {{ if eq (kindOf .indicators) "string" }}{{ .indicators }}{{ else }}{{ toJson .indicators }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + patch_event_update_bulk: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1update~1bulk/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .datasetId }}{{ $sep }}"datasetId": {{ toJson .datasetId }}{{- $sep = "," -}}{{ end }} + + {{- if .eventIds }}{{ $sep }}"eventIds": {{ if eq (kindOf .eventIds) "string" }}{{ .eventIds }}{{ else }}{{ toJson .eventIds }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .updates }}{{ $sep }}"updates": {{ if eq (kindOf .updates) "string" }}{{ .updates }}{{ else }}{{ toJson .updates }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/bulk/methods/post_indicator_create_bulk' + update: + - $ref: '#/components/x-stackQL-resources/bulk/methods/patch_event_update_bulk' + delete: [] + replace: [] + indicators: + id: cloudflare.cloudforce_one.indicators + name: indicators + title: Indicators + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1indicators~1create/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .autoCreateType }}{{ $sep }}"autoCreateType": {{ toJson .autoCreateType }}{{- $sep = "," -}}{{ end }} + + {{- if .indicatorType }}{{ $sep }}"indicatorType": {{ toJson .indicatorType }}{{- $sep = "," -}}{{ end }} + + {{- if .relatedEvents }}{{ $sep }}"relatedEvents": {{ if eq (kindOf .relatedEvents) "string" }}{{ .relatedEvents }}{{ else }}{{ toJson .relatedEvents }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tags }}{{ $sep }}"tags": {{ if eq (kindOf .tags) "string" }}{{ .tags }}{{ else }}{{ toJson .tags }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .value }}{{ $sep }}"value": {{ toJson .value }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete_indicator_delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1indicators~1{indicator_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1indicators~1{indicator_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + patch_indicator_update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1indicators~1{indicator_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .indicatorType }}{{ $sep }}"indicatorType": {{ toJson .indicatorType }}{{- $sep = "," -}}{{ end }} + + {{- if .relatedEvents }}{{ $sep }}"relatedEvents": {{ if eq (kindOf .relatedEvents) "string" }}{{ .relatedEvents }}{{ else }}{{ toJson .relatedEvents }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tags }}{{ $sep }}"tags": {{ if eq (kindOf .tags) "string" }}{{ .tags }}{{ else }}{{ toJson .tags }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .value }}{{ $sep }}"value": {{ toJson .value }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/indicators/methods/get' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/indicators/methods/patch_indicator_update' + delete: + - $ref: '#/components/x-stackQL-resources/indicators/methods/delete_indicator_delete' + replace: [] + indicators_tags: + id: cloudflare.cloudforce_one.indicators_tags + name: indicators_tags + title: Indicators Tags + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1indicators~1tags/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/indicators_tags/methods/list_by_account' + insert: [] + update: [] + delete: [] + replace: [] + permissions: + id: cloudflare.cloudforce_one.permissions + name: permissions + title: Permissions + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1permissions/get' + response: + mediaType: application/json + openAPIDocKey: '200' + post_permission_create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1permissions/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete_permission_delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1permissions~1{grant_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + put_permission_update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1permissions~1{grant_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/permissions/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/permissions/methods/post_permission_create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/permissions/methods/delete_permission_delete' + replace: + - $ref: '#/components/x-stackQL-resources/permissions/methods/put_permission_update' + tags_indicators: + id: cloudflare.cloudforce_one.tags_indicators + name: tags_indicators + title: Tags Indicators + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1tags~1{tag_uuid}~1indicators/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.indicators + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/tags_indicators/methods/list_by_account' + insert: [] + update: [] + delete: [] + replace: [] + dataset_target_industries: + id: cloudflare.cloudforce_one.dataset_target_industries + name: dataset_target_industries + title: Dataset Target Industries + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1dataset~1{dataset_id}~1targetIndustries/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/dataset_target_industries/methods/list_by_account' + insert: [] + update: [] + delete: [] + replace: [] + event_tags: + id: cloudflare.cloudforce_one.event_tags + name: event_tags + title: Event Tags + methods: + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1event_tag~1{event_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1event_tag~1{event_id}~1create/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .tags }}{{ $sep }}"tags": {{ if eq (kindOf .tags) "string" }}{{ .tags }}{{ else }}{{ toJson .tags }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/event_tags/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/event_tags/methods/delete' + replace: [] + indicator_types_indicator_types: + id: cloudflare.cloudforce_one.indicator_types_indicator_types + name: indicator_types_indicator_types + title: Indicator Types Indicator Types + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1indicatorTypes/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/indicator_types_indicator_types/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + events_indicators: + id: cloudflare.cloudforce_one.events_indicators + name: events_indicators + title: Events Indicators + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1indicators/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/events_indicators/methods/list_by_account' + insert: [] + update: [] + delete: [] + replace: [] + queries: + id: cloudflare.cloudforce_one.queries + name: queries + title: Queries + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1queries/get' + response: + mediaType: application/json + openAPIDocKey: '200' + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1queries~1create/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete_event_query_delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1queries~1{query_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1queries~1{query_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + patch_event_query_update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1queries~1{query_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + post_event_query_update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1queries~1{query_id}/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/queries/methods/get' + - $ref: '#/components/x-stackQL-resources/queries/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/queries/methods/post_event_query_update' + update: + - $ref: '#/components/x-stackQL-resources/queries/methods/patch_event_query_update' + delete: + - $ref: '#/components/x-stackQL-resources/queries/methods/delete_event_query_delete' + replace: [] + events_raw: + id: cloudflare.cloudforce_one.events_raw + name: events_raw + title: Events Raw + methods: + get_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1raw~1{dataset_id}~1{event_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/events_raw/methods/get_by_account' + insert: [] + update: [] + delete: [] + replace: [] + relate_create: + id: cloudflare.cloudforce_one.relate_create + name: relate_create + title: Relate Create + methods: + create_by_account: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1relate~1{event_id}~1create/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .events }}{{ $sep }}"events": {{ if eq (kindOf .events) "string" }}{{ .events }}{{ else }}{{ toJson .events }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + events_tags: + id: cloudflare.cloudforce_one.events_tags + name: events_tags + title: Events Tags + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1tags/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.tags + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/events_tags/methods/list_by_account' + insert: [] + update: [] + delete: [] + replace: [] + tags_categories: + id: cloudflare.cloudforce_one.tags_categories + name: tags_categories + title: Tags Categories + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1tags~1categories/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.categories + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/tags_categories/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + tags_categories_create: + id: cloudflare.cloudforce_one.tags_categories_create + name: tags_categories_create + title: Tags Categories Create + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1tags~1categories~1create/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + tags: + id: cloudflare.cloudforce_one.tags + name: tags + title: Tags + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1tags~1create/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .activeDuration }}{{ $sep }}"activeDuration": {{ toJson .activeDuration }}{{- $sep = "," -}}{{ end }} + + {{- if .actorCategory }}{{ $sep }}"actorCategory": {{ toJson .actorCategory }}{{- $sep = "," -}}{{ end }} + + {{- if .aliasGroupNames }}{{ $sep }}"aliasGroupNames": {{ if eq (kindOf .aliasGroupNames) "string" }}{{ .aliasGroupNames }}{{ else }}{{ toJson .aliasGroupNames }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .aliasGroupNamesInternal }}{{ $sep }}"aliasGroupNamesInternal": {{ if eq (kindOf .aliasGroupNamesInternal) "string" }}{{ .aliasGroupNamesInternal }}{{ else }}{{ toJson .aliasGroupNamesInternal }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .analyticPriority }}{{ $sep }}"analyticPriority": {{ toJson .analyticPriority }}{{- $sep = "," -}}{{ end }} + + {{- if .attributionConfidence }}{{ $sep }}"attributionConfidence": {{ toJson .attributionConfidence }}{{- $sep = "," -}}{{ end }} + + {{- if .attributionOrganization }}{{ $sep }}"attributionOrganization": {{ toJson .attributionOrganization }}{{- $sep = "," -}}{{ end }} + + {{- if .categoryUuid }}{{ $sep }}"categoryUuid": {{ toJson .categoryUuid }}{{- $sep = "," -}}{{ end }} + + {{- if .externalReferenceLinks }}{{ $sep }}"externalReferenceLinks": {{ if eq (kindOf .externalReferenceLinks) "string" }}{{ .externalReferenceLinks }}{{ else }}{{ toJson .externalReferenceLinks }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .internalDescription }}{{ $sep }}"internalDescription": {{ toJson .internalDescription }}{{- $sep = "," -}}{{ end }} + + {{- if .motive }}{{ $sep }}"motive": {{ toJson .motive }}{{- $sep = "," -}}{{ end }} + + {{- if .opsecLevel }}{{ $sep }}"opsecLevel": {{ toJson .opsecLevel }}{{- $sep = "," -}}{{ end }} + + {{- if .originCountryISO }}{{ $sep }}"originCountryISO": {{ toJson .originCountryISO }}{{- $sep = "," -}}{{ end }} + + {{- if .priority }}{{ $sep }}"priority": {{ toJson .priority }}{{- $sep = "," -}}{{ end }} + + {{- if .sophisticationLevel }}{{ $sep }}"sophisticationLevel": {{ toJson .sophisticationLevel }}{{- $sep = "," -}}{{ end }} + + {{- if .value }}{{ $sep }}"value": {{ toJson .value }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete_tag_delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1tags~1{tag_uuid}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + patch_tag_update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1tags~1{tag_uuid}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .activeDuration }}{{ $sep }}"activeDuration": {{ toJson .activeDuration }}{{- $sep = "," -}}{{ end }} + + {{- if .actorCategory }}{{ $sep }}"actorCategory": {{ toJson .actorCategory }}{{- $sep = "," -}}{{ end }} + + {{- if .aliasGroupNames }}{{ $sep }}"aliasGroupNames": {{ if eq (kindOf .aliasGroupNames) "string" }}{{ .aliasGroupNames }}{{ else }}{{ toJson .aliasGroupNames }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .aliasGroupNamesInternal }}{{ $sep }}"aliasGroupNamesInternal": {{ if eq (kindOf .aliasGroupNamesInternal) "string" }}{{ .aliasGroupNamesInternal }}{{ else }}{{ toJson .aliasGroupNamesInternal }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .analyticPriority }}{{ $sep }}"analyticPriority": {{ toJson .analyticPriority }}{{- $sep = "," -}}{{ end }} + + {{- if .attributionConfidence }}{{ $sep }}"attributionConfidence": {{ toJson .attributionConfidence }}{{- $sep = "," -}}{{ end }} + + {{- if .attributionOrganization }}{{ $sep }}"attributionOrganization": {{ toJson .attributionOrganization }}{{- $sep = "," -}}{{ end }} + + {{- if .categoryUuid }}{{ $sep }}"categoryUuid": {{ toJson .categoryUuid }}{{- $sep = "," -}}{{ end }} + + {{- if .externalReferenceLinks }}{{ $sep }}"externalReferenceLinks": {{ if eq (kindOf .externalReferenceLinks) "string" }}{{ .externalReferenceLinks }}{{ else }}{{ toJson .externalReferenceLinks }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .internalDescription }}{{ $sep }}"internalDescription": {{ toJson .internalDescription }}{{- $sep = "," -}}{{ end }} + + {{- if .motive }}{{ $sep }}"motive": {{ toJson .motive }}{{- $sep = "," -}}{{ end }} + + {{- if .opsecLevel }}{{ $sep }}"opsecLevel": {{ toJson .opsecLevel }}{{- $sep = "," -}}{{ end }} + + {{- if .originCountryISO }}{{ $sep }}"originCountryISO": {{ toJson .originCountryISO }}{{- $sep = "," -}}{{ end }} + + {{- if .priority }}{{ $sep }}"priority": {{ toJson .priority }}{{- $sep = "," -}}{{ end }} + + {{- if .sophisticationLevel }}{{ $sep }}"sophisticationLevel": {{ toJson .sophisticationLevel }}{{- $sep = "," -}}{{ end }} + + {{- if .value }}{{ $sep }}"value": {{ toJson .value }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/tags/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/tags/methods/patch_tag_update' + delete: + - $ref: '#/components/x-stackQL-resources/tags/methods/delete_tag_delete' + replace: [] + events_target_industries: + id: cloudflare.cloudforce_one.events_target_industries + name: events_target_industries + title: Events Target Industries + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1targetIndustries/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/events_target_industries/methods/list_by_account' + insert: [] + update: [] + delete: [] + replace: [] + target_industries_catalog: + id: cloudflare.cloudforce_one.target_industries_catalog + name: target_industries_catalog + title: Target Industries Catalog + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1targetIndustries~1catalog/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/target_industries_catalog/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + raw: + id: cloudflare.cloudforce_one.raw + name: raw + title: Raw + methods: + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1{event_id}~1raw~1{raw_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1{event_id}~1raw~1{raw_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .data }}{{ $sep }}"data": {{ if eq (kindOf .data) "string" }}{{ .data }}{{ else }}{{ toJson .data }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .source }}{{ $sep }}"source": {{ toJson .source }}{{- $sep = "," -}}{{ end }} + + {{- if .tlp }}{{ $sep }}"tlp": {{ toJson .tlp }}{{- $sep = "," -}}{{ end }} + + } + + ' + post_event_raw_update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1events~1{event_id}~1raw~1{raw_id}/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .data }}{{ $sep }}"data": {{ if eq (kindOf .data) "string" }}{{ .data }}{{ else }}{{ toJson .data }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .source }}{{ $sep }}"source": {{ toJson .source }}{{- $sep = "," -}}{{ end }} + + {{- if .tlp }}{{ $sep }}"tlp": {{ toJson .tlp }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/raw/methods/get' + insert: + - $ref: '#/components/x-stackQL-resources/raw/methods/post_event_raw_update' + update: + - $ref: '#/components/x-stackQL-resources/raw/methods/edit' + delete: [] + replace: [] + cloudforce_one: + id: cloudflare.cloudforce_one.cloudforce_one + name: cloudforce_one + title: Cloudforce One + methods: + create_requests: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1requests/post' + response: + mediaType: application/json + openAPIDocKey: '200' + generate_v2: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1letter~1generate/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .fields }}{{ $sep }}"fields": {{ if eq (kindOf .fields) "string" }}{{ .fields }}{{ else }}{{ toJson .fields }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .format }}{{ $sep }}"format": {{ toJson .format }}{{- $sep = "," -}}{{ end }} + + {{- if .templateId }}{{ $sep }}"templateId": {{ toJson .templateId }}{{- $sep = "," -}}{{ end }} + + } + + ' + search_v2: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1logo~1search/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + requests_constants: + id: cloudflare.cloudforce_one.requests_constants + name: requests_constants + title: Requests Constants + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1constants/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/requests_constants/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + requests_new: + id: cloudflare.cloudforce_one.requests_new + name: requests_new + title: Requests New + methods: + new_by_account: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1new/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + requests: + id: cloudflare.cloudforce_one.requests + name: requests + title: Requests + methods: + create_priority: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1priority/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1{request_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1{request_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1{request_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + create_asset: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1{request_id}~1asset/post' + response: + mediaType: application/json + openAPIDocKey: '200' + create_message: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1{request_id}~1message/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/requests/methods/get' + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/requests/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/requests/methods/update' + priority: + id: cloudflare.cloudforce_one.priority + name: priority + title: Priority + methods: + new: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1priority~1new/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .labels }}{{ $sep }}"labels": {{ if eq (kindOf .labels) "string" }}{{ .labels }}{{ else }}{{ toJson .labels }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .priority }}{{ $sep }}"priority": {{ toJson .priority }}{{- $sep = "," -}}{{ end }} + + {{- if .requirement }}{{ $sep }}"requirement": {{ toJson .requirement }}{{- $sep = "," -}}{{ end }} + + {{- if .tlp }}{{ $sep }}"tlp": {{ toJson .tlp }}{{- $sep = "," -}}{{ end }} + + } + + ' + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1priority~1quota/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1priority~1{priority_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1priority~1{priority_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1priority~1{priority_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .labels }}{{ $sep }}"labels": {{ if eq (kindOf .labels) "string" }}{{ .labels }}{{ else }}{{ toJson .labels }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .priority }}{{ $sep }}"priority": {{ toJson .priority }}{{- $sep = "," -}}{{ end }} + + {{- if .requirement }}{{ $sep }}"requirement": {{ toJson .requirement }}{{- $sep = "," -}}{{ end }} + + {{- if .tlp }}{{ $sep }}"tlp": {{ toJson .tlp }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/priority/methods/get' + - $ref: '#/components/x-stackQL-resources/priority/methods/list' + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/priority/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/priority/methods/update' + requests_quota: + id: cloudflare.cloudforce_one.requests_quota + name: requests_quota + title: Requests Quota + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1quota/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/requests_quota/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + requests_types: + id: cloudflare.cloudforce_one.requests_types + name: requests_types + title: Requests Types + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1types/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/requests_types/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + assets: + id: cloudflare.cloudforce_one.assets + name: assets + title: Assets + methods: + new: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1{request_id}~1asset~1new/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1{request_id}~1asset~1{asset_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1{request_id}~1asset~1{asset_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1{request_id}~1asset~1{asset_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/assets/methods/get' + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/assets/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/assets/methods/update' + message_new: + id: cloudflare.cloudforce_one.message_new + name: message_new + title: Message New + methods: + new_by_account: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1{request_id}~1message~1new/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + message: + id: cloudflare.cloudforce_one.message + name: message + title: Message + methods: + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1{request_id}~1message~1{message_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1requests~1{request_id}~1message~1{message_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/message/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/message/methods/update' + rules: + id: cloudflare.cloudforce_one.rules + name: rules + title: Rules + methods: + cloudforce_one_delete_all_rules: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1rules/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1rules/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.rules + cloudforce_one_create_rule: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1rules/post' + response: + mediaType: application/json + openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .actions }}{{ $sep }}"actions": {{ if eq (kindOf .actions) "string" }}{{ .actions }}{{ else }}{{ toJson .actions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .content }}{{ $sep }}"content": {{ toJson .content }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .is_public }}{{ $sep }}"is_public": {{ toJson .is_public }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .namespaces }}{{ $sep }}"namespaces": {{ if eq (kindOf .namespaces) "string" }}{{ .namespaces }}{{ else }}{{ toJson .namespaces }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + validate: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1rules~1validate/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .content }}{{ $sep }}"content": {{ toJson .content }}{{- $sep = "," -}}{{ end }} + + {{- if .excludeRuleId }}{{ $sep }}"excludeRuleId": {{ toJson .excludeRuleId }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .namespaces }}{{ $sep }}"namespaces": {{ if eq (kindOf .namespaces) "string" }}{{ .namespaces }}{{ else }}{{ toJson .namespaces }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + cloudforce_one_delete_rule: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1rules~1{id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1rules~1{id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + cloudforce_one_update_rule: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1rules~1{id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .content }}{{ $sep }}"content": {{ toJson .content }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .is_public }}{{ $sep }}"is_public": {{ toJson .is_public }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .namespaces }}{{ $sep }}"namespaces": {{ if eq (kindOf .namespaces) "string" }}{{ .namespaces }}{{ else }}{{ toJson .namespaces }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/rules/methods/get' + - $ref: '#/components/x-stackQL-resources/rules/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/rules/methods/cloudforce_one_create_rule' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/rules/methods/cloudforce_one_delete_rule' + - $ref: '#/components/x-stackQL-resources/rules/methods/cloudforce_one_delete_all_rules' + replace: + - $ref: '#/components/x-stackQL-resources/rules/methods/cloudforce_one_update_rule' + managed: + id: cloudflare.cloudforce_one.managed + name: managed + title: Managed + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1rules~1managed/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.rules + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/managed/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + stats: + id: cloudflare.cloudforce_one.stats + name: stats + title: Stats + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1rules~1stats/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/stats/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + trees: + id: cloudflare.cloudforce_one.trees + name: trees + title: Trees + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1rules~1tree/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.tree + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/trees/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + config: + id: cloudflare.cloudforce_one.config + name: config + title: Config + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1scans~1config/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1scans~1config/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency }}{{ $sep }}"frequency": {{ toJson .frequency }}{{- $sep = "," -}}{{ end }} + + {{- if .ips }}{{ $sep }}"ips": {{ if eq (kindOf .ips) "string" }}{{ .ips }}{{ else }}{{ toJson .ips }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ports }}{{ $sep }}"ports": {{ if eq (kindOf .ports) "string" }}{{ .ports }}{{ else }}{{ toJson .ports }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1scans~1config~1{config_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1scans~1config~1{config_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency }}{{ $sep }}"frequency": {{ toJson .frequency }}{{- $sep = "," -}}{{ end }} + + {{- if .ips }}{{ $sep }}"ips": {{ if eq (kindOf .ips) "string" }}{{ .ips }}{{ else }}{{ toJson .ips }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ports }}{{ $sep }}"ports": {{ if eq (kindOf .ports) "string" }}{{ .ports }}{{ else }}{{ toJson .ports }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/config/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/config/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/config/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/config/methods/delete' + replace: [] + results: + id: cloudflare.cloudforce_one.results + name: results + title: Results + methods: + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1scans~1results~1{config_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/results/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + templates: + id: cloudflare.cloudforce_one.templates + name: templates + title: Templates + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1letter~1templates/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.templates + post_letter_template_create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1letter~1templates/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete_letter_template_delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1letter~1templates~1{template_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1letter~1templates~1{template_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + put_letter_template_update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1letter~1templates~1{template_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/templates/methods/get' + - $ref: '#/components/x-stackQL-resources/templates/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/templates/methods/post_letter_template_create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/templates/methods/delete_letter_template_delete' + replace: + - $ref: '#/components/x-stackQL-resources/templates/methods/put_letter_template_update' + total_queries: + id: cloudflare.cloudforce_one.total_queries + name: total_queries + title: Total Queries + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cloudforce-one~1v2~1brand-protection~1total-queries/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/total_queries/methods/list' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/connectivity.yaml b/providers/src/cloudflare/v00.00.00000/services/connectivity.yaml index b9ab66bf..cb8e2519 100644 --- a/providers/src/cloudflare/v00.00.00000/services/connectivity.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/connectivity.yaml @@ -1,621 +1,629 @@ -openapi: 3.0.3 -info: - title: connectivity API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/connectivity/directory/services: - get: - operationId: connectivity-services-list - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: type - schema: - nullable: true - type: string - $ref: '#/components/schemas/infraServiceType' - - description: Current page in the response - in: query - name: page - schema: - default: 1 - format: int32 - minimum: 1 - type: integer - - description: Max amount of entries returned per page - in: query - name: per_page - schema: - default: 1000 - format: int32 - maximum: 1000 - minimum: 1 - type: integer - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/infraMessages' - messages: - $ref: '#/components/schemas/infraMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - $ref: '#/components/schemas/infraConnectivityServiceArray' - required: - - success - - errors - - messages - description: Successfully retrieved Workers VPC connectivity services - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/infraApiResponseCommonFailure' - description: Failed to retrieve Workers VPC connectivity services - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Workers VPC connectivity services - tags: - - Connectivity Services - x-stackql-sdk: - service: connectivity - resource_chain: - - directory - - services - method: list - post: - operationId: connectivity-services-post - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/infraServiceConfig' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/infraMessages' - messages: - $ref: '#/components/schemas/infraMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/infraServiceConfig' - required: - - success - - errors - - messages - description: Successfully created Workers VPC connectivity service - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/infraApiResponseCommonFailure' - description: Failed to create Workers VPC connectivity service - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Workers VPC connectivity service - tags: - - Connectivity Services - x-stackql-sdk: - service: connectivity - resource_chain: - - directory - - services - method: create - /accounts/{account_id}/connectivity/directory/services/{service_id}: - delete: - operationId: connectivity-services-delete - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: service_id - schema: - format: uuid - type: string - required: true - responses: - '200': - description: Successfully deleted Workers VPC connectivity service - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/infraApiResponseCommonFailure' - description: Failed to delete Workers VPC connectivity service - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Workers VPC connectivity service - tags: - - Connectivity Services - x-stackql-sdk: - service: connectivity - resource_chain: - - directory - - services - method: delete - get: - operationId: connectivity-services-get - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: service_id - schema: - format: uuid - type: string - required: true - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/infraMessages' - messages: - $ref: '#/components/schemas/infraMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/infraServiceConfig' - required: - - success - - errors - - messages - description: Successfully retrieved Workers VPC connectivity service - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/infraApiResponseCommonFailure' - description: Failed to retrieve Workers VPC connectivity service - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Workers VPC connectivity service - tags: - - Connectivity Services - x-stackql-sdk: - service: connectivity - resource_chain: - - directory - - services - method: get - put: - operationId: connectivity-services-put - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: service_id - schema: - format: uuid - type: string - required: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/infraServiceConfig' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/infraMessages' - messages: - $ref: '#/components/schemas/infraMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/infraServiceConfig' - required: - - success - - errors - - messages - description: Successfully updated Workers VPC connectivity service - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/infraApiResponseCommonFailure' - description: Failed to update Workers VPC connectivity service - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Workers VPC connectivity service - tags: - - Connectivity Services - x-stackql-sdk: - service: connectivity - resource_chain: - - directory - - services - method: update -components: - schemas: - infraApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/infraMessages' - messages: - example: [] - $ref: '#/components/schemas/infraMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - infraApiTlsSettings: - description: >- - TLS settings for a connectivity service. If omitted, the default mode - (`verify_full`) is used. - properties: - cert_verification_mode: - description: >- - TLS certificate verification mode for the connection to the origin. - - `"verify_full"` — verify certificate chain and hostname (default) - - `"verify_ca"` — verify certificate chain only, skip hostname check - - `"disabled"` — do not verify the server certificate at all - example: verify_full - type: string - required: - - cert_verification_mode - type: object - infraConnectivityServiceArray: - items: - $ref: '#/components/schemas/infraServiceConfig' - type: array - infraMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - infraNetwork: - properties: - tunnel_id: - format: uuid - type: string - required: - - tunnel_id - type: object - infraResolverNetwork: - properties: - resolver_ips: - items: - type: string - nullable: true - type: array - tunnel_id: - format: uuid - type: string - required: - - tunnel_id - type: object - infraServiceConfig: - type: object - example: - host: - ipv4: 10.0.0.1 - network: - tunnel_id: 0191dce4-9ab4-7fce-b660-8e5dec5172da - http_port: 8080 - https_port: 8443 - name: web-app - type: http - properties: - created_at: - example: '2024-01-15T09:30:00Z' - format: date-time - readOnly: true - type: string - host: - $ref: '#/components/schemas/infraServiceHost' - name: - example: web-server - type: string - service_id: - example: 550e8400-e29b-41d4-a716-446655440000 - format: uuid - readOnly: true - type: string - tls_settings: - nullable: true - type: object - $ref: '#/components/schemas/infraApiTlsSettings' - type: - $ref: '#/components/schemas/infraServiceType' - updated_at: - example: '2024-01-15T10:45:00Z' - format: date-time - readOnly: true - type: string - http_port: - example: 8080 - format: int32 - minimum: 1 - nullable: true - type: integer - https_port: - example: 8443 - format: int32 - minimum: 1 - nullable: true - type: integer - app_protocol: - enum: - - postgresql - - mysql - example: postgresql - nullable: true - type: string - tcp_port: - example: 5432 - format: int32 - minimum: 1 - nullable: true - type: integer - required: - - host - - name - - type - infraServiceHost: - type: object - example: - ipv4: 10.0.0.1 - network: - tunnel_id: 0191dce4-9ab4-7fce-b660-8e5dec5172da - properties: - ipv4: - example: 10.0.0.1 - type: string - network: - $ref: '#/components/schemas/infraNetwork' - ipv6: - example: fe80::1 - type: string - hostname: - example: example.com - type: string - resolver_network: - $ref: '#/components/schemas/infraResolverNetwork' - required: [] - infraServiceType: - enum: - - tcp - - http - type: string - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - services: - id: cloudflare.connectivity.services - name: services - title: Services - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1connectivity~1directory~1services/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1connectivity~1directory~1services/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1connectivity~1directory~1services~1{service_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1connectivity~1directory~1services~1{service_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1connectivity~1directory~1services~1{service_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/services/methods/get' - - $ref: '#/components/x-stackQL-resources/services/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/services/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/services/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/services/methods/update' +openapi: 3.0.3 +info: + title: connectivity API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/connectivity/directory/services: + get: + operationId: connectivity-services-list + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: type + schema: + nullable: true + type: string + $ref: '#/components/schemas/infraServiceType' + - description: Current page in the response + in: query + name: page + schema: + default: 1 + format: int32 + minimum: 1 + type: integer + - description: Max amount of entries returned per page + in: query + name: per_page + schema: + default: 1000 + format: int32 + maximum: 1000 + minimum: 1 + type: integer + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/infraMessages' + messages: + $ref: '#/components/schemas/infraMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + $ref: '#/components/schemas/infraConnectivityServiceArray' + required: + - success + - errors + - messages + description: Successfully retrieved Workers VPC connectivity services + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/infraApiResponseCommonFailure' + description: Failed to retrieve Workers VPC connectivity services + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Workers VPC connectivity services + tags: + - Connectivity Services + x-stackql-sdk: + service: connectivity + resource_chain: + - directory + - services + method: list + post: + operationId: connectivity-services-post + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/infraServiceConfig' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/infraMessages' + messages: + $ref: '#/components/schemas/infraMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/infraServiceConfig' + required: + - success + - errors + - messages + description: Successfully created Workers VPC connectivity service + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/infraApiResponseCommonFailure' + description: Failed to create Workers VPC connectivity service + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Workers VPC connectivity service + tags: + - Connectivity Services + x-stackql-sdk: + service: connectivity + resource_chain: + - directory + - services + method: create + /accounts/{account_id}/connectivity/directory/services/{service_id}: + delete: + operationId: connectivity-services-delete + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: service_id + schema: + format: uuid + type: string + required: true + responses: + '200': + description: Successfully deleted Workers VPC connectivity service + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/infraApiResponseCommonFailure' + description: Failed to delete Workers VPC connectivity service + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Workers VPC connectivity service + tags: + - Connectivity Services + x-stackql-sdk: + service: connectivity + resource_chain: + - directory + - services + method: delete + get: + operationId: connectivity-services-get + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: service_id + schema: + format: uuid + type: string + required: true + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/infraMessages' + messages: + $ref: '#/components/schemas/infraMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/infraServiceConfig' + required: + - success + - errors + - messages + description: Successfully retrieved Workers VPC connectivity service + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/infraApiResponseCommonFailure' + description: Failed to retrieve Workers VPC connectivity service + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Workers VPC connectivity service + tags: + - Connectivity Services + x-stackql-sdk: + service: connectivity + resource_chain: + - directory + - services + method: get + put: + operationId: connectivity-services-put + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: service_id + schema: + format: uuid + type: string + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/infraServiceConfig' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/infraMessages' + messages: + $ref: '#/components/schemas/infraMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/infraServiceConfig' + required: + - success + - errors + - messages + description: Successfully updated Workers VPC connectivity service + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/infraApiResponseCommonFailure' + description: Failed to update Workers VPC connectivity service + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Workers VPC connectivity service + tags: + - Connectivity Services + x-stackql-sdk: + service: connectivity + resource_chain: + - directory + - services + method: update +components: + schemas: + infraApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/infraMessages' + messages: + example: [] + $ref: '#/components/schemas/infraMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + infraApiTlsSettings: + description: TLS settings for a connectivity service. If omitted, the default mode (`verify_full`) is used. + properties: + cert_verification_mode: + description: "TLS certificate verification mode for the connection to the origin. - `\"verify_full\"` \u2014 verify certificate chain and hostname (default) - `\"verify_ca\"` \u2014 verify certificate chain only, skip hostname check - `\"disabled\"` \u2014 do not verify the server certificate at all" + example: verify_full + type: string + required: + - cert_verification_mode + type: object + infraConnectivityServiceArray: + items: + $ref: '#/components/schemas/infraServiceConfig' + type: array + infraMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + infraNetwork: + properties: + tunnel_id: + format: uuid + type: string + required: + - tunnel_id + type: object + infraResolverNetwork: + properties: + resolver_ips: + items: + type: string + nullable: true + type: array + tunnel_id: + format: uuid + type: string + required: + - tunnel_id + type: object + infraServiceConfig: + type: object + example: + host: + ipv4: 10.0.0.1 + network: + tunnel_id: 0191dce4-9ab4-7fce-b660-8e5dec5172da + http_port: 8080 + https_port: 8443 + name: web-app + type: http + properties: + created_at: + example: '2024-01-15T09:30:00Z' + format: date-time + readOnly: true + type: string + host: + $ref: '#/components/schemas/infraServiceHost' + name: + example: web-server + type: string + service_id: + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid + readOnly: true + type: string + tls_settings: + nullable: true + type: object + $ref: '#/components/schemas/infraApiTlsSettings' + type: + $ref: '#/components/schemas/infraServiceType' + updated_at: + example: '2024-01-15T10:45:00Z' + format: date-time + readOnly: true + type: string + http_port: + example: 8080 + format: int32 + minimum: 1 + nullable: true + type: integer + https_port: + example: 8443 + format: int32 + minimum: 1 + nullable: true + type: integer + app_protocol: + enum: + - postgresql + - mysql + example: postgresql + nullable: true + type: string + tcp_port: + example: 5432 + format: int32 + minimum: 1 + nullable: true + type: integer + required: + - host + - name + - type + infraServiceHost: + type: object + example: + ipv4: 10.0.0.1 + network: + tunnel_id: 0191dce4-9ab4-7fce-b660-8e5dec5172da + properties: + ipv4: + example: 10.0.0.1 + type: string + network: + $ref: '#/components/schemas/infraNetwork' + ipv6: + example: fe80::1 + type: string + hostname: + example: example.com + type: string + resolver_network: + $ref: '#/components/schemas/infraResolverNetwork' + required: [] + infraServiceType: + enum: + - tcp + - http + type: string + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + services: + id: cloudflare.connectivity.services + name: services + title: Services + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1connectivity~1directory~1services/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1connectivity~1directory~1services/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .host }}{{ $sep }}"host": {{ if eq (kindOf .host) "string" }}{{ .host }}{{ else }}{{ toJson .host }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .tls_settings }}{{ $sep }}"tls_settings": {{ if eq (kindOf .tls_settings) "string" }}{{ .tls_settings }}{{ else }}{{ toJson .tls_settings }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + {{- if .http_port }}{{ $sep }}"http_port": {{ toJson .http_port }}{{- $sep = "," -}}{{ end }} + + {{- if .https_port }}{{ $sep }}"https_port": {{ toJson .https_port }}{{- $sep = "," -}}{{ end }} + + {{- if .app_protocol }}{{ $sep }}"app_protocol": {{ toJson .app_protocol }}{{- $sep = "," -}}{{ end }} + + {{- if .tcp_port }}{{ $sep }}"tcp_port": {{ toJson .tcp_port }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1connectivity~1directory~1services~1{service_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1connectivity~1directory~1services~1{service_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1connectivity~1directory~1services~1{service_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .host }}{{ $sep }}"host": {{ if eq (kindOf .host) "string" }}{{ .host }}{{ else }}{{ toJson .host }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .tls_settings }}{{ $sep }}"tls_settings": {{ if eq (kindOf .tls_settings) "string" }}{{ .tls_settings }}{{ else }}{{ toJson .tls_settings }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + {{- if .http_port }}{{ $sep }}"http_port": {{ toJson .http_port }}{{- $sep = "," -}}{{ end }} + + {{- if .https_port }}{{ $sep }}"https_port": {{ toJson .https_port }}{{- $sep = "," -}}{{ end }} + + {{- if .app_protocol }}{{ $sep }}"app_protocol": {{ toJson .app_protocol }}{{- $sep = "," -}}{{ end }} + + {{- if .tcp_port }}{{ $sep }}"tcp_port": {{ toJson .tcp_port }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/services/methods/get' + - $ref: '#/components/x-stackQL-resources/services/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/services/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/services/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/services/methods/update' diff --git a/providers/src/cloudflare/v00.00.00000/services/custom_certificates.yaml b/providers/src/cloudflare/v00.00.00000/services/custom_certificates.yaml index ef57a96f..d9f33304 100644 --- a/providers/src/cloudflare/v00.00.00000/services/custom_certificates.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/custom_certificates.yaml @@ -1,1356 +1,1331 @@ -openapi: 3.0.3 -info: - title: custom_certificates API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /zones/{zone_id}/custom_certificates: - get: - description: >- - List, search, and filter all of your custom SSL certificates. The higher - priority will break ties across overlapping 'legacy_custom' - certificates, but 'legacy_custom' certificates will always supercede - 'sni_custom' certificates. - operationId: custom-ssl-for-a-zone-list-ssl-configurations - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: query - name: page - schema: - default: 1 - description: Page number of paginated results. - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 20 - description: Number of zones per page. - maximum: 50 - minimum: 5 - type: number - - in: query - name: match - schema: - default: all - description: Whether to match all search requirements or at least one (any). - enum: - - any - - all - type: string - - in: query - name: status - schema: - description: Status of the zone's custom SSL. - enum: - - active - - expired - - deleted - - pending - - initializing - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCertificateResponseCollection - description: List SSL Configurations response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCustomCertificate - type: array - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: List SSL Configurations response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List SSL Configurations - tags: - - Custom SSL for a Zone - x-api-token-group: - - 'Access: Mutual TLS Certificates Write' - - 'Access: Mutual TLS Certificates Read' - - SSL and Certificates Write - - SSL and Certificates Read - x-cfPermissionsRequired: - enum: - - '#ssl:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: custom_certificates - resource_chain: [] - method: list - post: - description: Upload a new SSL certificate for a zone. - operationId: custom-ssl-for-a-zone-create-ssl-configuration - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - bundle_method: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesBundleMethod' - certificate: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificate' - custom_csr_id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomCsrId' - deploy: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesDeploy' - geo_restrictions: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesGeoRestrictions - policy: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesPolicy' - private_key: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesPrivateKey' - type: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesType' - required: - - certificate - - private_key - type: object - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCertificateResponseSingle - description: Create SSL Configuration response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - bundle_method: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesBundleMethod - custom_csr_id: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCustomCsrId - expires_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesExpiresOn - geo_restrictions: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesGeoRestrictions - hosts: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesHosts' - id: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesIdentifier - issuer: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIssuer' - keyless_server: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesKeylessCertificate - modified_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesModifiedOn - readOnly: true - policy_restrictions: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesPolicyRestrictions - priority: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesPriority - signature: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSignature - status: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesStatus' - uploaded_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesUploadedOn - zone_id: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesIdentifier - required: - - id - - zone_id - type: object - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Create SSL Configuration response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create SSL Configuration - tags: - - Custom SSL for a Zone - x-api-token-group: - - 'Access: Mutual TLS Certificates Write' - - SSL and Certificates Write - x-cfPermissionsRequired: - enum: - - '#ssl:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: custom_certificates - resource_chain: [] - method: create - /zones/{zone_id}/custom_certificates/prioritize: - put: - description: >- - If a zone has multiple SSL certificates, you can set the order in which - they should be used during a request. The higher priority will break - ties across overlapping 'legacy_custom' certificates. - operationId: custom-ssl-for-a-zone-re-prioritize-ssl-certificates - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - certificates: - description: Array of ordered certificates. - items: - properties: - id: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesIdentifier - priority: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesPriority - type: object - type: array - required: - - certificates - type: object - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCertificateResponseCollection - description: Re-prioritize SSL Certificates response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCustomCertificate - type: array - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Re-prioritize SSL Certificates response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Re-prioritize SSL Certificates - tags: - - Custom SSL for a Zone - x-api-token-group: - - 'Access: Mutual TLS Certificates Write' - - SSL and Certificates Write - x-cfPermissionsRequired: - enum: - - '#ssl:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: false - /zones/{zone_id}/custom_certificates/{custom_certificate_id}: - delete: - description: Remove a SSL certificate from a zone. - operationId: custom-ssl-for-a-zone-delete-ssl-configuration - parameters: - - in: path - name: custom_certificate_id - schema: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCertificateResponseIdOnly - description: Delete SSL Configuration response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - $ref: '#/components/schemas/identifier' - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Delete SSL Configuration response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete SSL Configuration - tags: - - Custom SSL for a Zone - x-api-token-group: - - 'Access: Mutual TLS Certificates Write' - - SSL and Certificates Write - x-cfPermissionsRequired: - enum: - - '#ssl:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: custom_certificates - resource_chain: [] - method: delete - get: - description: >- - Retrieves details for a specific custom SSL certificate, including - certificate metadata, bundle method, geographic restrictions, and - associated keyless server configuration. - operationId: custom-ssl-for-a-zone-ssl-configuration-details - parameters: - - in: path - name: custom_certificate_id - schema: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCertificateResponseSingle - description: SSL Configuration Details response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - bundle_method: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesBundleMethod - custom_csr_id: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCustomCsrId - expires_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesExpiresOn - geo_restrictions: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesGeoRestrictions - hosts: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesHosts' - id: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesIdentifier - issuer: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIssuer' - keyless_server: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesKeylessCertificate - modified_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesModifiedOn - readOnly: true - policy_restrictions: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesPolicyRestrictions - priority: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesPriority - signature: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSignature - status: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesStatus' - uploaded_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesUploadedOn - zone_id: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesIdentifier - required: - - id - - zone_id - type: object - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: SSL Configuration Details response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: SSL Configuration Details - tags: - - Custom SSL for a Zone - x-api-token-group: - - 'Access: Mutual TLS Certificates Write' - - 'Access: Mutual TLS Certificates Read' - - SSL and Certificates Write - - SSL and Certificates Read - x-cfPermissionsRequired: - enum: - - '#ssl:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: custom_certificates - resource_chain: [] - method: get - patch: - description: >- - Upload a new private key and/or PEM/CRT for the SSL certificate. Note: - PATCHing a configuration for sni_custom certificates will result in a - new resource id being returned, and the previous one being deleted. - operationId: custom-ssl-for-a-zone-edit-ssl-configuration - parameters: - - in: path - name: custom_certificate_id - schema: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - bundle_method: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesBundleMethod' - certificate: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificate' - custom_csr_id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomCsrId' - deploy: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesDeploy' - geo_restrictions: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesGeoRestrictions - policy: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesPolicy' - private_key: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesPrivateKey' - type: object - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCertificateResponseSingle - description: Edit SSL Configuration response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - bundle_method: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesBundleMethod - custom_csr_id: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCustomCsrId - expires_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesExpiresOn - geo_restrictions: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesGeoRestrictions - hosts: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesHosts' - id: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesIdentifier - issuer: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIssuer' - keyless_server: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesKeylessCertificate - modified_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesModifiedOn - readOnly: true - policy_restrictions: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesPolicyRestrictions - priority: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesPriority - signature: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSignature - status: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesStatus' - uploaded_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesUploadedOn - zone_id: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesIdentifier - required: - - id - - zone_id - type: object - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Edit SSL Configuration response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Edit SSL Configuration - tags: - - Custom SSL for a Zone - x-api-token-group: - - 'Access: Mutual TLS Certificates Write' - - SSL and Certificates Write - x-cfPermissionsRequired: - enum: - - '#ssl:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: custom_certificates - resource_chain: [] - method: edit -components: - schemas: - identifier: - properties: - id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - type: object - enum: - - null - tlsCertificatesAndHostnamesBase: - properties: - created_on: - description: When the Keyless SSL was created. - example: '2014-01-01T05:20:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - enabled: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesEnabled' - host: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesHost' - id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasIdentifier' - modified_on: - description: When the Keyless SSL was last modified. - example: '2014-01-01T05:20:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - name: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesName' - permissions: - description: >- - Available permissions for the Keyless SSL for the current user - requesting the item. - example: - - '#ssl:read' - - '#ssl:edit' - items: - type: string - x-auditable: true - readOnly: true - type: array - port: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesPort' - status: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasStatus' - tunnel: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessTunnel' - required: - - id - - name - - host - - port - - status - - enabled - - permissions - - created_on - - modified_on - type: object - tlsCertificatesAndHostnamesBundleMethod: - $ref: '#/components/schemas/unnamedSchemaRef16aca57bde2963201c7e6e895436c1c1' - tlsCertificatesAndHostnamesCertificate: - description: The zone's SSL certificate or certificate and the intermediate(s). - example: | - -----BEGIN CERTIFICATE----- - MIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV - BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX - aWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF - MQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50 - ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB - CgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1 - CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB - KwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5 - 0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI - dZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2 - izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4 - 9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI - GKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV - BAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF - MAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2 - 2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP - Mlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG - SvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq - 2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw - YbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY= - -----END CERTIFICATE----- - type: string - tlsCertificatesAndHostnamesCertificateResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 2000 - type: number - total_pages: - description: The number of total pages in the entire result set. - example: 100 - type: number - type: object - result: - items: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomCertificate' - type: array - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesCertificateResponseIdOnly: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - properties: - id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - type: object - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesCertificateResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomCertificate' - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesCustomCertificate: - properties: - bundle_method: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesBundleMethod' - custom_csr_id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomCsrId' - expires_on: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesExpiresOn' - geo_restrictions: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesGeoRestrictions' - hosts: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesHosts' - id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - issuer: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIssuer' - keyless_server: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessCertificate' - modified_on: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesModifiedOn' - readOnly: true - policy_restrictions: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesPolicyRestrictions' - priority: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesPriority' - signature: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSignature' - status: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesStatus' - uploaded_on: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesUploadedOn' - zone_id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - required: - - id - - zone_id - type: object - tlsCertificatesAndHostnamesCustomCsrId: - description: The identifier for the Custom CSR that was used. - example: 7b163417-1d2b-4c84-a38a-2fb7a0cd7752 - type: string - x-auditable: true - tlsCertificatesAndHostnamesDeploy: - default: production - description: The environment to deploy the certificate to, defaults to production - enum: - - staging - - production - example: staging - type: string - x-auditable: true - tlsCertificatesAndHostnamesEnabled: - description: Whether or not the Keyless SSL is on or off. - example: false - readOnly: true - type: boolean - x-auditable: true - tlsCertificatesAndHostnamesExpiresOn: - description: When the certificate from the authority expires. - example: '2016-01-01T05:20:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - tlsCertificatesAndHostnamesGeoRestrictions: - description: >- - Specify the region where your private key can be held locally for - optimal TLS performance. HTTPS connections to any excluded data center - will still be fully encrypted, but will incur some latency while Keyless - SSL is used to complete the handshake with the nearest allowed data - center. Options allow distribution to only to U.S. data centers, only to - E.U. data centers, or only to highest security data centers. Default - distribution is to all Cloudflare datacenters, for optimal performance. - properties: - label: - enum: - - us - - eu - - highest_security - example: us - type: string - x-auditable: true - type: object - tlsCertificatesAndHostnamesHost: - description: The keyless SSL name. - example: example.com - format: hostname - maxLength: 253 - type: string - x-auditable: true - tlsCertificatesAndHostnamesHosts: - items: - description: The valid hosts for the certificates. - example: example.com - maxLength: 253 - readOnly: true - type: string - x-auditable: true - type: array - tlsCertificatesAndHostnamesIdentifier: - description: Identifier. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - type: string - x-auditable: true - tlsCertificatesAndHostnamesIssuer: - description: The certificate authority that issued the certificate. - example: GlobalSign - readOnly: true - type: string - x-auditable: true - tlsCertificatesAndHostnamesKeylessCertificate: - type: object - $ref: '#/components/schemas/tlsCertificatesAndHostnamesBase' - tlsCertificatesAndHostnamesKeylessPrivateIp: - description: Private IP of the Key Server Host - example: 10.0.0.1 - type: string - x-auditable: true - tlsCertificatesAndHostnamesKeylessTunnel: - description: Configuration for using Keyless SSL through a Cloudflare Tunnel - properties: - private_ip: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessPrivateIp' - vnet_id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessVnetId' - required: - - private_ip - - vnet_id - type: object - tlsCertificatesAndHostnamesKeylessVnetId: - description: Cloudflare Tunnel Virtual Network ID - example: 7365377a-85a4-4390-9480-531ef7dc7a3c - type: string - x-auditable: true - tlsCertificatesAndHostnamesMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - tlsCertificatesAndHostnamesModifiedOn: - description: When the certificate was last modified. - example: '2014-01-01T05:20:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - tlsCertificatesAndHostnamesName: - description: The keyless SSL name. - example: example.com Keyless SSL - maxLength: 180 - readOnly: true - type: string - x-auditable: true - tlsCertificatesAndHostnamesPolicy: - description: >- - Specify the policy that determines the region where your private key - will be held locally. HTTPS connections to any excluded data center will - still be fully encrypted, but will incur some latency while Keyless SSL - is used to complete the handshake with the nearest allowed data center. - Any combination of countries, specified by their two letter country code - (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - can be chosen, such as 'country: IN', as well as 'region: EU' which - refers to the EU region. If there are too few data centers satisfying - the policy, it will be rejected. Note: The API accepts this field as - either "policy" or "policy_restrictions" in requests. Responses return - this field as "policy_restrictions". - example: '(country: US) or (region: EU)' - type: string - x-auditable: true - tlsCertificatesAndHostnamesPolicyRestrictions: - description: >- - The policy restrictions returned by the API. This field is returned in - responses when a policy has been set. The API accepts the "policy" field - in requests but returns this field as "policy_restrictions" in - responses. Specifies the region(s) where your private key can be held - locally for optimal TLS performance. Format is a boolean expression, for - example: "(country: US) or (region: EU)" - example: '(country: US) or (region: EU)' - readOnly: true - type: string - tlsCertificatesAndHostnamesPort: - default: 24008 - description: >- - The keyless SSL port used to communicate between Cloudflare and the - client's Keyless SSL server. - example: 24008 - maxLength: 65535 - type: number - x-auditable: true - tlsCertificatesAndHostnamesPriority: - default: 0 - description: >- - The order/priority in which the certificate will be used in a request. - The higher priority will break ties across overlapping 'legacy_custom' - certificates, but 'legacy_custom' certificates will always supercede - 'sni_custom' certificates. - example: 1 - type: number - x-auditable: true - tlsCertificatesAndHostnamesPrivateKey: - description: The zone's private key. - example: | - -----BEGIN RSA PRIVATE KEY----- - MIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG - dtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn - abIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid - tnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py - FxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE - ewooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb - HBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/ - axiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb - +ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g - +j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv - KLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7 - 9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo - /WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu - iacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9 - N2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe - VAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB - vULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U - lySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR - 9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7 - mEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX - dFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe - PG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS - fhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W - qu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T - lv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi - -----END RSA PRIVATE KEY----- - type: string - x-sensitive: true - tlsCertificatesAndHostnamesSchemasIdentifier: - description: Keyless certificate identifier tag. - example: 4d2844d2ce78891c34d0b6c0535a291e - maxLength: 32 - readOnly: true - type: string - x-auditable: true - tlsCertificatesAndHostnamesSchemasStatus: - description: Status of the Keyless SSL. - enum: - - active - - deleted - example: active - readOnly: true - type: string - x-auditable: true - tlsCertificatesAndHostnamesSignature: - description: The type of hash used for the certificate. - example: SHA256WithRSA - readOnly: true - type: string - x-auditable: true - tlsCertificatesAndHostnamesStatus: - description: Status of the zone's custom SSL. - enum: - - active - - expired - - deleted - - pending - - initializing - example: active - readOnly: true - type: string - x-auditable: true - tlsCertificatesAndHostnamesType: - default: legacy_custom - description: >- - The type 'legacy_custom' enables support for legacy clients which do not - include SNI in the TLS handshake. - enum: - - legacy_custom - - sni_custom - example: sni_custom - type: string - x-auditable: true - tlsCertificatesAndHostnamesUploadedOn: - description: When the certificate was uploaded to Cloudflare. - example: '2014-01-01T05:20:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - unnamedSchemaRef16aca57bde2963201c7e6e895436c1c1: - default: ubiquitous - description: >- - A ubiquitous bundle has the highest probability of being verified - everywhere, even by clients using outdated or unusual trust stores. An - optimal bundle uses the shortest chain and newest intermediates. And the - force bundle verifies the chain, but does not otherwise modify it. - enum: - - ubiquitous - - optimal - - force - example: ubiquitous - type: string - x-auditable: true - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - custom_certificates: - id: cloudflare.custom_certificates.custom_certificates - name: custom_certificates - title: Custom Certificates - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1custom_certificates/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1custom_certificates/post' - response: - mediaType: application/json - openAPIDocKey: '200' - update_prioritize: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1custom_certificates~1prioritize/put' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1custom_certificates~1{custom_certificate_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1custom_certificates~1{custom_certificate_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1custom_certificates~1{custom_certificate_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/custom_certificates/methods/get' - - $ref: '#/components/x-stackQL-resources/custom_certificates/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/custom_certificates/methods/create - update: - - $ref: '#/components/x-stackQL-resources/custom_certificates/methods/edit' - delete: - - $ref: >- - #/components/x-stackQL-resources/custom_certificates/methods/delete - replace: [] +openapi: 3.0.3 +info: + title: custom_certificates API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /zones/{zone_id}/custom_certificates: + get: + description: List, search, and filter all of your custom SSL certificates. The higher priority will break ties across overlapping 'legacy_custom' certificates, but 'legacy_custom' certificates will always supercede 'sni_custom' certificates. + operationId: custom-ssl-for-a-zone-list-ssl-configurations + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: query + name: page + schema: + default: 1 + description: Page number of paginated results. + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 20 + description: Number of zones per page. + maximum: 50 + minimum: 5 + type: number + - in: query + name: match + schema: + default: all + description: Whether to match all search requirements or at least one (any). + enum: + - any + - all + type: string + - in: query + name: status + schema: + description: Status of the zone's custom SSL. + enum: + - active + - expired + - deleted + - pending + - initializing + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificateResponseCollection' + description: List SSL Configurations response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomCertificate' + type: array + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: List SSL Configurations response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List SSL Configurations + tags: + - Custom SSL for a Zone + x-api-token-group: + - 'Access: Mutual TLS Certificates Write' + - 'Access: Mutual TLS Certificates Read' + - SSL and Certificates Write + - SSL and Certificates Read + x-cfPermissionsRequired: + enum: + - '#ssl:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: custom_certificates + resource_chain: [] + method: list + post: + description: Upload a new SSL certificate for a zone. + operationId: custom-ssl-for-a-zone-create-ssl-configuration + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + bundle_method: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesBundleMethod' + certificate: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificate' + custom_csr_id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomCsrId' + deploy: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesDeploy' + geo_restrictions: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesGeoRestrictions' + policy: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPolicy' + private_key: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPrivateKey' + type: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesType' + required: + - certificate + - private_key + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificateResponseSingle' + description: Create SSL Configuration response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + bundle_method: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesBundleMethod' + custom_csr_id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomCsrId' + expires_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesExpiresOn' + geo_restrictions: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesGeoRestrictions' + hosts: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHosts' + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + issuer: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIssuer' + keyless_server: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessCertificate' + modified_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesModifiedOn' + readOnly: true + policy_restrictions: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPolicyRestrictions' + priority: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPriority' + signature: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSignature' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesStatus' + uploaded_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesUploadedOn' + zone_id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + required: + - id + - zone_id + type: object + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Create SSL Configuration response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create SSL Configuration + tags: + - Custom SSL for a Zone + x-api-token-group: + - 'Access: Mutual TLS Certificates Write' + - SSL and Certificates Write + x-cfPermissionsRequired: + enum: + - '#ssl:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: custom_certificates + resource_chain: [] + method: create + /zones/{zone_id}/custom_certificates/prioritize: + put: + description: If a zone has multiple SSL certificates, you can set the order in which they should be used during a request. The higher priority will break ties across overlapping 'legacy_custom' certificates. + operationId: custom-ssl-for-a-zone-re-prioritize-ssl-certificates + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + certificates: + description: Array of ordered certificates. + items: + properties: + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + priority: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPriority' + type: object + type: array + required: + - certificates + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificateResponseCollection' + description: Re-prioritize SSL Certificates response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomCertificate' + type: array + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Re-prioritize SSL Certificates response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Re-prioritize SSL Certificates + tags: + - Custom SSL for a Zone + x-api-token-group: + - 'Access: Mutual TLS Certificates Write' + - SSL and Certificates Write + x-cfPermissionsRequired: + enum: + - '#ssl:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: false + /zones/{zone_id}/custom_certificates/{custom_certificate_id}: + delete: + description: Remove a SSL certificate from a zone. + operationId: custom-ssl-for-a-zone-delete-ssl-configuration + parameters: + - in: path + name: custom_certificate_id + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificateResponseIdOnly' + description: Delete SSL Configuration response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/identifier' + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Delete SSL Configuration response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete SSL Configuration + tags: + - Custom SSL for a Zone + x-api-token-group: + - 'Access: Mutual TLS Certificates Write' + - SSL and Certificates Write + x-cfPermissionsRequired: + enum: + - '#ssl:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: custom_certificates + resource_chain: [] + method: delete + get: + description: Retrieves details for a specific custom SSL certificate, including certificate metadata, bundle method, geographic restrictions, and associated keyless server configuration. + operationId: custom-ssl-for-a-zone-ssl-configuration-details + parameters: + - in: path + name: custom_certificate_id + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificateResponseSingle' + description: SSL Configuration Details response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + bundle_method: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesBundleMethod' + custom_csr_id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomCsrId' + expires_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesExpiresOn' + geo_restrictions: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesGeoRestrictions' + hosts: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHosts' + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + issuer: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIssuer' + keyless_server: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessCertificate' + modified_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesModifiedOn' + readOnly: true + policy_restrictions: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPolicyRestrictions' + priority: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPriority' + signature: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSignature' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesStatus' + uploaded_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesUploadedOn' + zone_id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + required: + - id + - zone_id + type: object + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: SSL Configuration Details response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: SSL Configuration Details + tags: + - Custom SSL for a Zone + x-api-token-group: + - 'Access: Mutual TLS Certificates Write' + - 'Access: Mutual TLS Certificates Read' + - SSL and Certificates Write + - SSL and Certificates Read + x-cfPermissionsRequired: + enum: + - '#ssl:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: custom_certificates + resource_chain: [] + method: get + patch: + description: 'Upload a new private key and/or PEM/CRT for the SSL certificate. Note: PATCHing a configuration for sni_custom certificates will result in a new resource id being returned, and the previous one being deleted.' + operationId: custom-ssl-for-a-zone-edit-ssl-configuration + parameters: + - in: path + name: custom_certificate_id + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + bundle_method: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesBundleMethod' + certificate: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificate' + custom_csr_id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomCsrId' + deploy: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesDeploy' + geo_restrictions: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesGeoRestrictions' + policy: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPolicy' + private_key: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPrivateKey' + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificateResponseSingle' + description: Edit SSL Configuration response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + bundle_method: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesBundleMethod' + custom_csr_id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomCsrId' + expires_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesExpiresOn' + geo_restrictions: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesGeoRestrictions' + hosts: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHosts' + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + issuer: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIssuer' + keyless_server: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessCertificate' + modified_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesModifiedOn' + readOnly: true + policy_restrictions: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPolicyRestrictions' + priority: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPriority' + signature: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSignature' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesStatus' + uploaded_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesUploadedOn' + zone_id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + required: + - id + - zone_id + type: object + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Edit SSL Configuration response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Edit SSL Configuration + tags: + - Custom SSL for a Zone + x-api-token-group: + - 'Access: Mutual TLS Certificates Write' + - SSL and Certificates Write + x-cfPermissionsRequired: + enum: + - '#ssl:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: custom_certificates + resource_chain: [] + method: edit +components: + schemas: + identifier: + properties: + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + type: object + enum: + - null + tlsCertificatesAndHostnamesBase: + properties: + created_on: + description: When the Keyless SSL was created. + example: '2014-01-01T05:20:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + enabled: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesEnabled' + host: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHost' + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasIdentifier' + modified_on: + description: When the Keyless SSL was last modified. + example: '2014-01-01T05:20:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + name: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesName' + permissions: + description: Available permissions for the Keyless SSL for the current user requesting the item. + example: + - '#ssl:read' + - '#ssl:edit' + items: + type: string + x-auditable: true + readOnly: true + type: array + port: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPort' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasStatus' + tunnel: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessTunnel' + required: + - id + - name + - host + - port + - status + - enabled + - permissions + - created_on + - modified_on + type: object + tlsCertificatesAndHostnamesBundleMethod: + $ref: '#/components/schemas/unnamedSchemaRef16aca57bde2963201c7e6e895436c1c1' + tlsCertificatesAndHostnamesCertificate: + description: The zone's SSL certificate or certificate and the intermediate(s). + example: '-----BEGIN CERTIFICATE----- + + MIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV + + BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX + + aWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF + + MQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50 + + ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB + + CgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1 + + CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB + + KwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5 + + 0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI + + dZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2 + + izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4 + + 9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI + + GKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV + + BAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF + + MAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2 + + 2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP + + Mlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG + + SvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq + + 2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw + + YbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY= + + -----END CERTIFICATE----- + + ' + type: string + tlsCertificatesAndHostnamesCertificateResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 2000 + type: number + total_pages: + description: The number of total pages in the entire result set. + example: 100 + type: number + type: object + result: + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomCertificate' + type: array + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesCertificateResponseIdOnly: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + properties: + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + type: object + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesCertificateResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomCertificate' + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesCustomCertificate: + properties: + bundle_method: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesBundleMethod' + custom_csr_id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomCsrId' + expires_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesExpiresOn' + geo_restrictions: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesGeoRestrictions' + hosts: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHosts' + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + issuer: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIssuer' + keyless_server: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessCertificate' + modified_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesModifiedOn' + readOnly: true + policy_restrictions: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPolicyRestrictions' + priority: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPriority' + signature: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSignature' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesStatus' + uploaded_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesUploadedOn' + zone_id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + required: + - id + - zone_id + type: object + tlsCertificatesAndHostnamesCustomCsrId: + description: The identifier for the Custom CSR that was used. + example: 7b163417-1d2b-4c84-a38a-2fb7a0cd7752 + type: string + x-auditable: true + tlsCertificatesAndHostnamesDeploy: + default: production + description: The environment to deploy the certificate to, defaults to production + enum: + - staging + - production + example: staging + type: string + x-auditable: true + tlsCertificatesAndHostnamesEnabled: + description: Whether or not the Keyless SSL is on or off. + example: false + readOnly: true + type: boolean + x-auditable: true + tlsCertificatesAndHostnamesExpiresOn: + description: When the certificate from the authority expires. + example: '2016-01-01T05:20:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + tlsCertificatesAndHostnamesGeoRestrictions: + description: Specify the region where your private key can be held locally for optimal TLS performance. HTTPS connections to any excluded data center will still be fully encrypted, but will incur some latency while Keyless SSL is used to complete the handshake with the nearest allowed data center. Options allow distribution to only to U.S. data centers, only to E.U. data centers, or only to highest security data centers. Default distribution is to all Cloudflare datacenters, for optimal performance. + properties: + label: + enum: + - us + - eu + - highest_security + example: us + type: string + x-auditable: true + type: object + tlsCertificatesAndHostnamesHost: + description: The keyless SSL name. + example: example.com + format: hostname + maxLength: 253 + type: string + x-auditable: true + tlsCertificatesAndHostnamesHosts: + items: + description: The valid hosts for the certificates. + example: example.com + maxLength: 253 + readOnly: true + type: string + x-auditable: true + type: array + tlsCertificatesAndHostnamesIdentifier: + description: Identifier. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + type: string + x-auditable: true + tlsCertificatesAndHostnamesIssuer: + description: The certificate authority that issued the certificate. + example: GlobalSign + readOnly: true + type: string + x-auditable: true + tlsCertificatesAndHostnamesKeylessCertificate: + type: object + $ref: '#/components/schemas/tlsCertificatesAndHostnamesBase' + tlsCertificatesAndHostnamesKeylessPrivateIp: + description: Private IP of the Key Server Host + example: 10.0.0.1 + type: string + x-auditable: true + tlsCertificatesAndHostnamesKeylessTunnel: + description: Configuration for using Keyless SSL through a Cloudflare Tunnel + properties: + private_ip: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessPrivateIp' + vnet_id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessVnetId' + required: + - private_ip + - vnet_id + type: object + tlsCertificatesAndHostnamesKeylessVnetId: + description: Cloudflare Tunnel Virtual Network ID + example: 7365377a-85a4-4390-9480-531ef7dc7a3c + type: string + x-auditable: true + tlsCertificatesAndHostnamesMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + tlsCertificatesAndHostnamesModifiedOn: + description: When the certificate was last modified. + example: '2014-01-01T05:20:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + tlsCertificatesAndHostnamesName: + description: The keyless SSL name. + example: example.com Keyless SSL + maxLength: 180 + readOnly: true + type: string + x-auditable: true + tlsCertificatesAndHostnamesPolicy: + description: 'Specify the policy that determines the region where your private key will be held locally. HTTPS connections to any excluded data center will still be fully encrypted, but will incur some latency while Keyless SSL is used to complete the handshake with the nearest allowed data center. Any combination of countries, specified by their two letter country code (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) can be chosen, such as ''country: IN'', as well as ''region: EU'' which refers to the EU region. If there are too few data centers satisfying the policy, it will be rejected. Note: The API accepts this field as either "policy" or "policy_restrictions" in requests. Responses return this field as "policy_restrictions".' + example: '(country: US) or (region: EU)' + type: string + x-auditable: true + tlsCertificatesAndHostnamesPolicyRestrictions: + description: 'The policy restrictions returned by the API. This field is returned in responses when a policy has been set. The API accepts the "policy" field in requests but returns this field as "policy_restrictions" in responses. Specifies the region(s) where your private key can be held locally for optimal TLS performance. Format is a boolean expression, for example: "(country: US) or (region: EU)"' + example: '(country: US) or (region: EU)' + readOnly: true + type: string + tlsCertificatesAndHostnamesPort: + default: 24008 + description: The keyless SSL port used to communicate between Cloudflare and the client's Keyless SSL server. + example: 24008 + maxLength: 65535 + type: number + x-auditable: true + tlsCertificatesAndHostnamesPriority: + default: 0 + description: The order/priority in which the certificate will be used in a request. The higher priority will break ties across overlapping 'legacy_custom' certificates, but 'legacy_custom' certificates will always supercede 'sni_custom' certificates. + example: 1 + type: number + x-auditable: true + tlsCertificatesAndHostnamesPrivateKey: + description: The zone's private key. + example: '-----BEGIN RSA PRIVATE KEY----- + + MIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG + + dtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn + + abIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid + + tnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py + + FxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE + + ewooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb + + HBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/ + + axiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb + + +ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g + + +j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv + + KLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7 + + 9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo + + /WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu + + iacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9 + + N2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe + + VAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB + + vULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U + + lySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR + + 9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7 + + mEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX + + dFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe + + PG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS + + fhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W + + qu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T + + lv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi + + -----END RSA PRIVATE KEY----- + + ' + type: string + x-sensitive: true + tlsCertificatesAndHostnamesSchemasIdentifier: + description: Keyless certificate identifier tag. + example: 4d2844d2ce78891c34d0b6c0535a291e + maxLength: 32 + readOnly: true + type: string + x-auditable: true + tlsCertificatesAndHostnamesSchemasStatus: + description: Status of the Keyless SSL. + enum: + - active + - deleted + example: active + readOnly: true + type: string + x-auditable: true + tlsCertificatesAndHostnamesSignature: + description: The type of hash used for the certificate. + example: SHA256WithRSA + readOnly: true + type: string + x-auditable: true + tlsCertificatesAndHostnamesStatus: + description: Status of the zone's custom SSL. + enum: + - active + - expired + - deleted + - pending + - initializing + example: active + readOnly: true + type: string + x-auditable: true + tlsCertificatesAndHostnamesType: + default: legacy_custom + description: The type 'legacy_custom' enables support for legacy clients which do not include SNI in the TLS handshake. + enum: + - legacy_custom + - sni_custom + example: sni_custom + type: string + x-auditable: true + tlsCertificatesAndHostnamesUploadedOn: + description: When the certificate was uploaded to Cloudflare. + example: '2014-01-01T05:20:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + unnamedSchemaRef16aca57bde2963201c7e6e895436c1c1: + default: ubiquitous + description: A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it. + enum: + - ubiquitous + - optimal + - force + example: ubiquitous + type: string + x-auditable: true + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + custom_certificates: + id: cloudflare.custom_certificates.custom_certificates + name: custom_certificates + title: Custom Certificates + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1custom_certificates/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1custom_certificates/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .bundle_method }}{{ $sep }}"bundle_method": {{ toJson .bundle_method }}{{- $sep = "," -}}{{ end }} + + {{- if .certificate }}{{ $sep }}"certificate": {{ toJson .certificate }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_csr_id }}{{ $sep }}"custom_csr_id": {{ toJson .custom_csr_id }}{{- $sep = "," -}}{{ end }} + + {{- if .deploy }}{{ $sep }}"deploy": {{ toJson .deploy }}{{- $sep = "," -}}{{ end }} + + {{- if .geo_restrictions }}{{ $sep }}"geo_restrictions": {{ if eq (kindOf .geo_restrictions) "string" }}{{ .geo_restrictions }}{{ else }}{{ toJson .geo_restrictions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .policy }}{{ $sep }}"policy": {{ toJson .policy }}{{- $sep = "," -}}{{ end }} + + {{- if .private_key }}{{ $sep }}"private_key": {{ toJson .private_key }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' + update_prioritize: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1custom_certificates~1prioritize/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .certificates }}{{ $sep }}"certificates": {{ if eq (kindOf .certificates) "string" }}{{ .certificates }}{{ else }}{{ toJson .certificates }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1custom_certificates~1{custom_certificate_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1custom_certificates~1{custom_certificate_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1custom_certificates~1{custom_certificate_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .bundle_method }}{{ $sep }}"bundle_method": {{ toJson .bundle_method }}{{- $sep = "," -}}{{ end }} + + {{- if .certificate }}{{ $sep }}"certificate": {{ toJson .certificate }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_csr_id }}{{ $sep }}"custom_csr_id": {{ toJson .custom_csr_id }}{{- $sep = "," -}}{{ end }} + + {{- if .deploy }}{{ $sep }}"deploy": {{ toJson .deploy }}{{- $sep = "," -}}{{ end }} + + {{- if .geo_restrictions }}{{ $sep }}"geo_restrictions": {{ if eq (kindOf .geo_restrictions) "string" }}{{ .geo_restrictions }}{{ else }}{{ toJson .geo_restrictions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .policy }}{{ $sep }}"policy": {{ toJson .policy }}{{- $sep = "," -}}{{ end }} + + {{- if .private_key }}{{ $sep }}"private_key": {{ toJson .private_key }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/custom_certificates/methods/get' + - $ref: '#/components/x-stackQL-resources/custom_certificates/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/custom_certificates/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/custom_certificates/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/custom_certificates/methods/delete' + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/custom_hostnames.yaml b/providers/src/cloudflare/v00.00.00000/services/custom_hostnames.yaml index 04d962f1..e6a8fcc7 100644 --- a/providers/src/cloudflare/v00.00.00000/services/custom_hostnames.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/custom_hostnames.yaml @@ -1,2008 +1,1920 @@ -openapi: 3.0.3 -info: - title: custom_hostnames API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /zones/{zone_id}/custom_hostnames: - get: - description: List, search, sort, and filter all of your custom hostnames. - operationId: custom-hostname-for-a-zone-list-custom-hostnames - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: query - name: hostname - schema: - description: >- - Fully qualified domain name to match against. This parameter - cannot be used with the 'id' parameter. - maxLength: 255 - type: string - - in: query - name: hostname.contain - schema: - description: >- - Filters hostnames by a substring match on the hostname value. This - parameter cannot be used with the 'id' parameter. - maxLength: 255 - type: string - - in: query - name: id - schema: - description: >- - Hostname ID to match against. This ID was generated and returned - during the initial custom_hostname creation. This parameter cannot - be used with the 'hostname' parameter. - maxLength: 36 - minLength: 36 - type: string - - in: query - name: page - schema: - default: 1 - description: Page number of paginated results. - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 20 - description: Number of hostnames per page. - maximum: 1000 - minimum: 5 - type: number - - in: query - name: order - schema: - default: ssl - description: Field to order hostnames by. - enum: - - ssl - - ssl_status - type: string - - in: query - name: direction - schema: - description: Direction to order hostnames. - enum: - - asc - - desc - type: string - - in: query - name: ssl_status - schema: - description: Filter by SSL certificate status. - enum: - - initializing - - pending_validation - - deleted - - pending_issuance - - pending_deployment - - pending_deletion - - pending_expiration - - expired - - active - - initializing_timed_out - - validation_timed_out - - issuance_timed_out - - deployment_timed_out - - deletion_timed_out - - pending_cleanup - - staging_deployment - - staging_active - - deactivating - - inactive - - backup_issued - - holding_deployment - type: string - - in: query - name: hostname_status - schema: - description: Filter by the hostname's activation status. - enum: - - active - - pending - - active_redeploying - - moved - - pending_deletion - - deleted - - pending_blocked - - pending_migration - - pending_provisioned - - test_pending - - test_active - - test_active_apex - - test_blocked - - test_failed - - provisioned - - blocked - type: string - - in: query - name: certificate_authority - schema: - description: >- - Filter by the certificate authority that issued the SSL - certificate. - enum: - - google - - lets_encrypt - - ssl_com - type: string - - in: query - name: wildcard - schema: - description: Filter by whether the custom hostname is a wildcard hostname. - type: boolean - - in: query - name: custom_origin_server - schema: - description: Filter by custom origin server name. - type: string - - in: query - name: ssl - schema: - description: Whether to filter hostnames based on if they have SSL enabled. - enum: - - 0 - - 1 - type: number - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCustomHostnameResponseCollection - description: List Custom Hostnames response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCustomHostname - type: array - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: List Custom Hostnames response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Custom Hostnames - tags: - - Custom Hostname for a Zone - x-api-token-group: - - SSL and Certificates Write - - SSL and Certificates Read - x-cfPermissionsRequired: - enum: - - '#ssl:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: custom_hostnames - resource_chain: [] - method: list - post: - description: >- - Add a new custom hostname and request that an SSL certificate be issued - for it. One of three validation methods—http, txt, email—should be used, - with 'http' recommended if the CNAME is already in place (or will be - soon). Specifying 'email' will send an email to the WHOIS contacts on - file for the base domain plus hostmaster, postmaster, webmaster, admin, - administrator. If http is used and the domain is not already pointing to - the Managed CNAME host, the PATCH method must be used once it is (to - complete validation). Enable bundling of certificates using the - custom_cert_bundle field. The bundling process requires the following - condition One certificate in the bundle must use an RSA, and the other - must use an ECDSA. - operationId: custom-hostname-for-a-zone-create-custom-hostname - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - custom_metadata: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCustomMetadata - hostname: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnamePost' - ssl: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSslpost' - required: - - hostname - type: object - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCustomHostnameResponseSingle - description: Create Custom Hostname response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - $ref: >- - #/components/schemas/unnamedSchemaRefD2a16d7ee1ad3a888dd5821c918d51fd - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Create Custom Hostname response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Custom Hostname - tags: - - Custom Hostname for a Zone - x-api-token-group: - - SSL and Certificates Write - x-cfPermissionsRequired: - enum: - - '#ssl:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: custom_hostnames - resource_chain: [] - method: create - /zones/{zone_id}/custom_hostnames/fallback_origin: - delete: - description: >- - Removes the fallback origin configuration for custom hostnames on a - zone. Custom hostnames without specific origins will no longer have a - fallback. - operationId: >- - custom-hostname-fallback-origin-for-a-zone-delete-fallback-origin-for-custom-hostnames - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesFallbackOriginResponse - description: Delete Fallback Origin for Custom Hostnames response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - created_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasCreatedAt - readOnly: true - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesErrors' - origin: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesOrigin' - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCustomHostnameFallbackOriginComponentsSchemasStatus - updated_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesUpdatedAt - readOnly: true - type: object - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Delete Fallback Origin for Custom Hostnames response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Fallback Origin for Custom Hostnames - tags: - - Custom Hostname Fallback Origin for a Zone - x-api-token-group: - - SSL and Certificates Write - x-cfPermissionsRequired: - enum: - - '#ssl:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: custom_hostnames - resource_chain: - - fallback_origin - method: delete - get: - description: >- - Retrieves the current fallback origin configuration for custom hostnames - on a zone. The fallback origin handles traffic when specific custom - hostname origins are unavailable. - operationId: >- - custom-hostname-fallback-origin-for-a-zone-get-fallback-origin-for-custom-hostnames - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesFallbackOriginResponse - description: Get Fallback Origin for Custom Hostnames response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - created_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasCreatedAt - readOnly: true - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesErrors' - origin: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesOrigin' - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCustomHostnameFallbackOriginComponentsSchemasStatus - updated_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesUpdatedAt - readOnly: true - type: object - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Get Fallback Origin for Custom Hostnames response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Fallback Origin for Custom Hostnames - tags: - - Custom Hostname Fallback Origin for a Zone - x-api-token-group: - - SSL and Certificates Write - - SSL and Certificates Read - x-cfPermissionsRequired: - enum: - - '#ssl:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: custom_hostnames - resource_chain: - - fallback_origin - method: get - put: - description: >- - Updates the fallback origin configuration for custom hostnames on a - zone. Sets the default origin server for custom hostname traffic. - operationId: >- - custom-hostname-fallback-origin-for-a-zone-update-fallback-origin-for-custom-hostnames - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - origin: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesOrigin' - required: - - origin - type: object - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesFallbackOriginResponse - description: Update Fallback Origin for Custom Hostnames response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - created_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasCreatedAt - readOnly: true - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesErrors' - origin: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesOrigin' - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCustomHostnameFallbackOriginComponentsSchemasStatus - updated_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesUpdatedAt - readOnly: true - type: object - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Update Fallback Origin for Custom Hostnames response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Fallback Origin for Custom Hostnames - tags: - - Custom Hostname Fallback Origin for a Zone - x-api-token-group: - - SSL and Certificates Write - x-cfPermissionsRequired: - enum: - - '#ssl:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: custom_hostnames - resource_chain: - - fallback_origin - method: update - /zones/{zone_id}/custom_hostnames/{custom_hostname_id}: - delete: - description: >- - Permanently deletes a custom hostname and revokes any SSL certificates - that were issued for it. This action cannot be undone. - operationId: >- - custom-hostname-for-a-zone-delete-custom-hostname-(-and-any-issued-ssl-certificates) - parameters: - - in: path - name: custom_hostname_id - schema: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - type: object - description: Delete Custom Hostname (and any issued SSL certificates) response - 4XX: - content: - application/json: - schema: - properties: - id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - errors: - minLength: 1 - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - type: boolean - type: object - required: - - success - - errors - - messages - - result - description: >- - Delete Custom Hostname (and any issued SSL certificates) response - failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Custom Hostname (and any issued SSL certificates) - tags: - - Custom Hostname for a Zone - x-api-token-group: - - SSL and Certificates Write - x-cfPermissionsRequired: - enum: - - '#ssl:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: custom_hostnames - resource_chain: [] - method: delete - get: - description: >- - Retrieves detailed information about a specific custom hostname, - including SSL certificate status, ownership verification, and origin - configuration. - operationId: custom-hostname-for-a-zone-custom-hostname-details - parameters: - - in: path - name: custom_hostname_id - schema: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCustomHostnameResponseSingle - description: Custom Hostname Details response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - $ref: >- - #/components/schemas/unnamedSchemaRefD2a16d7ee1ad3a888dd5821c918d51fd - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Custom Hostname Details response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Custom Hostname Details - tags: - - Custom Hostname for a Zone - x-api-token-group: - - SSL and Certificates Write - - SSL and Certificates Read - x-cfPermissionsRequired: - enum: - - '#ssl:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: custom_hostnames - resource_chain: [] - method: get - patch: - description: >- - Modify SSL configuration for a custom hostname. When sent with SSL - config that matches existing config, used to indicate that hostname - should pass domain control validation (DCV). Can also be used to change - validation type, e.g., from 'http' to 'email'. Bundle an existing - certificate with another certificate by using the "custom_cert_bundle" - field. The bundling process supports combining certificates as long as - the following condition is met. One certificate must use the RSA - algorithm, and the other must use the ECDSA algorithm. - operationId: custom-hostname-for-a-zone-edit-custom-hostname - parameters: - - in: path - name: custom_hostname_id - schema: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - custom_metadata: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCustomMetadata - custom_origin_server: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCustomOriginServer - custom_origin_sni: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCustomOriginSni - ssl: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSslpost' - type: object - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCustomHostnameResponseSingle - description: Edit Custom Hostname response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - $ref: >- - #/components/schemas/unnamedSchemaRefD2a16d7ee1ad3a888dd5821c918d51fd - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Edit Custom Hostname response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Edit Custom Hostname - tags: - - Custom Hostname for a Zone - x-api-token-group: - - SSL and Certificates Write - x-cfPermissionsRequired: - enum: - - '#ssl:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: custom_hostnames - resource_chain: [] - method: edit - /zones/{zone_id}/custom_hostnames/{custom_hostname_id}/certificate_pack/{certificate_pack_id}/certificates/{certificate_id}: - delete: - description: >- - Delete a single custom certificate from a certificate pack that contains - two bundled certificates. Deletion is subject to the following - constraints. You cannot delete a certificate if it is the only remaining - certificate in the pack. At least one certificate must remain in the - pack. - operationId: >- - custom-hostname-for-a-zone-delete_single_certificate_and_key_in_a_custom_hostname - parameters: - - in: path - name: custom_hostname_id - schema: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - required: true - - in: path - name: certificate_pack_id - schema: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - required: true - - name: certificate_id - in: path - required: true - description: The certificate ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '202': - content: - application/json: - schema: - properties: - id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - type: object - description: Delete Single Certificate and Key In a Custom Hostname response - 4XX: - content: - application/json: - schema: - properties: - id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - errors: - minLength: 1 - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - type: boolean - type: object - required: - - success - - errors - - messages - - result - description: >- - Delete Single Certificate and Key In a Custom Hostname response - failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Single Certificate And Key For Custom Hostname - tags: - - Custom Hostname for a Zone - x-api-token-group: - - SSL and Certificates Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: custom_hostnames - resource_chain: - - certificate_pack - - certificates - method: delete - put: - description: >- - Replace a single custom certificate within a certificate pack that - contains two bundled certificates. The replacement must adhere to the - following constraints. You can only replace an RSA certificate with - another RSA certificate or an ECDSA certificate with another ECDSA - certificate. - operationId: custom-hostname-for-a-zone-edit-custom-certificate-custom-hostname - parameters: - - in: path - name: custom_hostname_id - schema: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - required: true - - in: path - name: certificate_pack_id - schema: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - required: true - - name: certificate_id - in: path - required: true - description: The certificate ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomCertAndKey' - responses: - '202': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCustomHostnameResponseSingle - description: Edit Custom Certificate In a Custom Hostname response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - $ref: >- - #/components/schemas/unnamedSchemaRefD2a16d7ee1ad3a888dd5821c918d51fd - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Edit Custom Certificate In a Custom Hostname response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Replace Custom Certificate and Custom Key In Custom Hostname - tags: - - Custom Hostname for a Zone - x-api-token-group: - - SSL and Certificates Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: custom_hostnames - resource_chain: - - certificate_pack - - certificates - method: update -components: - schemas: - tlsCertificatesAndHostnamesCertificateAuthority: - description: The Certificate Authority that will issue the certificate - enum: - - digicert - - google - - lets_encrypt - - ssl_com - example: google - type: string - x-auditable: true - tlsCertificatesAndHostnamesComponentsSchemasStatus: - description: Status of the hostname's activation. - enum: - - active - - pending - - active_redeploying - - moved - - pending_deletion - - deleted - - pending_blocked - - pending_migration - - pending_provisioned - - test_pending - - test_active - - test_active_apex - - test_blocked - - test_failed - - provisioned - - blocked - example: pending - type: string - x-auditable: true - tlsCertificatesAndHostnamesCreatedAt: - description: This is the time the hostname was created. - example: '2020-02-06T18:11:23.531995Z' - format: date-time - type: string - x-auditable: true - tlsCertificatesAndHostnamesCustomCertAndKey: - properties: - custom_certificate: - description: If a custom uploaded certificate is used. - example: | - -----BEGIN CERTIFICATE----- - MIIDdjCCAl6gAwIBAgIJAPnMg0Fs+/B0MA0GCSqGSIb3DQEBCwUAMFsx... - -----END CERTIFICATE----- - type: string - custom_key: - description: The key for a custom uploaded certificate. - example: | - -----BEGIN PRIVATE KEY----- - MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC/SCB5... - -----END PRIVATE KEY----- - type: string - x-sensitive: true - required: - - custom_certificate - - custom_key - type: object - tlsCertificatesAndHostnamesCustomCertBundle: - description: Array of custom certificate and key pairs (1 or 2 pairs allowed) - items: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomCertAndKey' - maxItems: 2 - minItems: 1 - type: array - tlsCertificatesAndHostnamesCustomHostname: - properties: - hostname: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostname' - id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - ssl: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSsl' - created_at: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCreatedAt' - readOnly: true - custom_metadata: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomMetadata' - custom_origin_server: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomOriginServer' - custom_origin_sni: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomOriginSni' - ownership_verification: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesOwnershipVerification - ownership_verification_http: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesOwnershipVerificationHttp - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasStatus - verification_errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesVerificationErrors' - required: - - id - - hostname - type: object - tlsCertificatesAndHostnamesCustomHostnameFallbackOriginComponentsSchemasStatus: - description: Status of the fallback origin's activation. - enum: - - initializing - - pending_deployment - - pending_deletion - - active - - deployment_timed_out - - deletion_timed_out - example: pending_deployment - type: string - x-auditable: true - tlsCertificatesAndHostnamesCustomHostnameResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 2000 - type: number - total_pages: - description: The number of total pages in the entire result set. - example: 100 - type: number - type: object - result: - items: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomHostname' - type: array - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesCustomHostnameResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - type: object - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomHostname' - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesCustomMetadata: - description: >- - Unique key/value metadata for this hostname. These are per-hostname - (customer) settings. - type: object - tlsCertificatesAndHostnamesCustomOriginServer: - description: >- - a valid hostname that’s been added to your DNS zone as an A, AAAA, or - CNAME record. - example: origin2.example.com - type: string - x-auditable: true - tlsCertificatesAndHostnamesCustomOriginSni: - description: >- - A hostname that will be sent to your custom origin server as SNI for TLS - handshake. This can be a valid subdomain of the zone or custom origin - server name or the string ':request_host_header:' which will cause the - host header in the request to be used as SNI. Not configurable with - default/fallback origin server. - example: sni.example.com - type: string - x-auditable: true - tlsCertificatesAndHostnamesErrors: - description: >- - These are errors that were encountered while trying to activate a - fallback origin. - example: - - >- - DNS records are not setup correctly. Origin should be a proxied - A/AAAA/CNAME dns record - items: - type: string - x-auditable: true - type: array - tlsCertificatesAndHostnamesFallbackOriginResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesFallbackorigin' - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesFallbackorigin: - properties: - created_at: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasCreatedAt' - readOnly: true - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesErrors' - origin: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesOrigin' - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCustomHostnameFallbackOriginComponentsSchemasStatus - updated_at: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesUpdatedAt' - readOnly: true - type: object - tlsCertificatesAndHostnamesHostname: - description: The custom hostname that will point to your hostname via CNAME. - example: app.example.com - maxLength: 255 - readOnly: true - type: string - x-auditable: true - tlsCertificatesAndHostnamesHostnamePost: - description: The custom hostname that will point to your hostname via CNAME. - example: app.example.com - maxLength: 255 - type: string - x-auditable: true - tlsCertificatesAndHostnamesIdentifier: - description: Identifier. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - type: string - x-auditable: true - tlsCertificatesAndHostnamesMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - tlsCertificatesAndHostnamesOrigin: - description: >- - Your origin hostname that requests to your custom hostnames will be sent - to. - example: fallback.example.com - maxLength: 255 - type: string - x-auditable: true - tlsCertificatesAndHostnamesOwnershipVerification: - description: This is a record which can be placed to activate a hostname. - type: object - properties: - name: - description: DNS Name for record. - example: _cf-custom-hostname.app.example.com - type: string - x-auditable: true - type: - description: DNS Record type. - enum: - - txt - example: txt - type: string - x-auditable: true - value: - description: Content for the record. - example: 5cc07c04-ea62-4a5a-95f0-419334a875a4 - type: string - tlsCertificatesAndHostnamesOwnershipVerificationHttp: - description: >- - This presents the token to be served by the given http url to activate a - hostname. - type: object - properties: - http_body: - description: Token to be served. - example: 5cc07c04-ea62-4a5a-95f0-419334a875a4 - type: string - http_url: - description: >- - The HTTP URL that will be checked during custom hostname - verification and where the customer should host the token. - example: >- - http://custom.test.com/.well-known/cf-custom-hostname-challenge/0d89c70d-ad9f-4843-b99f-6cc0252067e9 - type: string - tlsCertificatesAndHostnamesSchemasCreatedAt: - description: This is the time the fallback origin was created. - example: '2019-10-28T18:11:23.37411Z' - format: date-time - type: string - x-auditable: true - tlsCertificatesAndHostnamesSsl: - description: SSL properties for the custom hostname. - type: object - properties: - bundle_method: - $ref: >- - #/components/schemas/unnamedSchemaRef16aca57bde2963201c7e6e895436c1c1 - certificate_authority: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificateAuthority' - custom_certificate: - description: If a custom uploaded certificate is used. - example: > - -----BEGIN CERTIFICATE----- - - MIIFJDCCBAygAwIBAgIQD0ifmj/Yi5NP/2gdUySbfzANBgkqhkiG9w0BAQsFADBN - - MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMScwJQYDVQQDEx5E...SzSHfXp5lnu/3V08I72q1QNzOCgY1XeL4GKVcj4or6cT6tX6oJH7ePPmfrBfqI/O - - OeH8gMJ+FuwtXYEPa4hBf38M5eU5xWG7 - - -----END CERTIFICATE----- - type: string - custom_csr_id: - description: The identifier for the Custom CSR that was used. - example: 7b163417-1d2b-4c84-a38a-2fb7a0cd7752 - type: string - x-auditable: true - custom_key: - description: The key for a custom uploaded certificate. - example: | - -----BEGIN RSA PRIVATE KEY----- - MIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG - dtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn - abIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid - tnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py - FxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE - ewooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb - HBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/ - axiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb - +ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g - +j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv - KLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7 - 9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo - /WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu - iacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9 - N2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe - VAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB - vULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U - lySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR - 9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7 - mEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX - dFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe - PG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS - fhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W - qu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T - lv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi - -----END RSA PRIVATE KEY----- - type: string - x-sensitive: true - dcv_delegation_records: - description: DCV Delegation records for domain validation. - items: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidationRecord' - readOnly: true - type: array - expires_on: - description: The time the custom certificate expires on. - example: '2021-02-06T18:11:23.531995Z' - format: date-time - type: string - x-auditable: true - hosts: - description: A list of Hostnames on a custom uploaded certificate. - example: - - app.example.com - - '*.app.example.com' - items: - type: string - x-auditable: true - type: array - id: - description: Custom hostname SSL identifier tag. - example: 0d89c70d-ad9f-4843-b99f-6cc0252067e9 - maxLength: 36 - minLength: 36 - type: string - x-auditable: true - issuer: - description: The issuer on a custom uploaded certificate. - example: DigiCertInc - type: string - x-auditable: true - method: - $ref: >- - #/components/schemas/unnamedSchemaRef78adb375f06c6d462dd92b99e2ecf510 - serial_number: - description: The serial number on a custom uploaded certificate. - example: '6743787633689793699141714808227354901' - type: string - x-auditable: true - settings: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSslsettings' - signature: - description: The signature on a custom uploaded certificate. - example: SHA256WithRSA - type: string - x-auditable: true - status: - description: Status of the hostname's SSL certificates. - enum: - - initializing - - pending_validation - - deleted - - pending_issuance - - pending_deployment - - pending_deletion - - pending_expiration - - expired - - active - - initializing_timed_out - - validation_timed_out - - issuance_timed_out - - deployment_timed_out - - deletion_timed_out - - pending_cleanup - - staging_deployment - - staging_active - - deactivating - - inactive - - backup_issued - - holding_deployment - example: pending_validation - readOnly: true - type: string - x-auditable: true - type: - $ref: >- - #/components/schemas/unnamedSchemaRef9a9935a9a770967bb604ae41a81e42e1 - uploaded_on: - description: The time the custom certificate was uploaded. - example: '2020-02-06T18:11:23.531995Z' - format: date-time - type: string - x-auditable: true - validation_errors: - description: >- - Domain validation errors that have been received by the certificate - authority (CA). - items: - properties: - message: - description: A domain validation error. - example: SERVFAIL looking up CAA for app.example.com - type: string - x-auditable: true - type: object - type: array - validation_records: - items: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidationRecord' - type: array - wildcard: - description: Indicates whether the certificate covers a wildcard. - example: false - type: boolean - x-auditable: true - tlsCertificatesAndHostnamesSslpost: - description: SSL properties used when creating the custom hostname. - type: object - properties: - bundle_method: - $ref: >- - #/components/schemas/unnamedSchemaRef16aca57bde2963201c7e6e895436c1c1 - certificate_authority: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificateAuthority' - cloudflare_branding: - description: >- - Whether or not to add Cloudflare Branding for the order. This will - add a subdomain of sni.cloudflaressl.com as the Common Name if set - to true - example: false - type: boolean - x-auditable: true - custom_cert_bundle: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomCertBundle' - custom_certificate: - description: If a custom uploaded certificate is used. - example: > - -----BEGIN CERTIFICATE----- - - MIIFJDCCBAygAwIBAgIQD0ifmj/Yi5NP/2gdUySbfzANBgkqhkiG9w0BAQsFADBN - - MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMScwJQYDVQQDEx5E...SzSHfXp5lnu/3V08I72q1QNzOCgY1XeL4GKVcj4or6cT6tX6oJH7ePPmfrBfqI/O - - OeH8gMJ+FuwtXYEPa4hBf38M5eU5xWG7 - - -----END CERTIFICATE----- - type: string - x-auditable: true - custom_csr_id: - description: The identifier for the Custom CSR that was used. - example: 7b163417-1d2b-4c84-a38a-2fb7a0cd7752 - type: string - x-auditable: true - custom_key: - description: The key for a custom uploaded certificate. - example: | - -----BEGIN RSA PRIVATE KEY----- - MIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG - dtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn - abIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid - tnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py - FxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE - ewooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb - HBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/ - axiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb - +ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g - +j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv - KLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7 - 9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo - /WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu - iacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9 - N2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe - VAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB - vULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U - lySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR - 9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7 - mEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX - dFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe - PG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS - fhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W - qu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T - lv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi - -----END RSA PRIVATE KEY----- - type: string - x-sensitive: true - method: - $ref: >- - #/components/schemas/unnamedSchemaRef78adb375f06c6d462dd92b99e2ecf510 - settings: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSslsettings' - type: - $ref: >- - #/components/schemas/unnamedSchemaRef9a9935a9a770967bb604ae41a81e42e1 - wildcard: - description: Indicates whether the certificate covers a wildcard. - example: false - type: boolean - x-auditable: true - tlsCertificatesAndHostnamesSslsettings: - description: SSL specific settings. - properties: - ciphers: - description: >- - An allowlist of ciphers for TLS termination. These ciphers must be - in the BoringSSL format. - example: - - ECDHE-RSA-AES128-GCM-SHA256 - - AES128-SHA - items: - type: string - x-auditable: true - type: array - uniqueItems: true - early_hints: - description: Whether or not Early Hints is enabled. - enum: - - 'on' - - 'off' - example: 'on' - type: string - x-auditable: true - http2: - description: Whether or not HTTP2 is enabled. - enum: - - 'on' - - 'off' - example: 'on' - type: string - x-auditable: true - min_tls_version: - description: The minimum TLS version supported. - enum: - - '1.0' - - '1.1' - - '1.2' - - '1.3' - example: '1.2' - type: string - x-auditable: true - tls_1_3: - description: Whether or not TLS 1.3 is enabled. - enum: - - 'on' - - 'off' - example: 'on' - type: string - x-auditable: true - type: object - tlsCertificatesAndHostnamesUpdatedAt: - description: This is the time the fallback origin was updated. - example: '2020-03-16T18:11:23.531995Z' - format: date-time - type: string - x-auditable: true - tlsCertificatesAndHostnamesValidationRecord: - description: Certificate's required validation record. - properties: - cname: - description: The CNAME record hostname for DCV delegation. - example: _acme-challenge.example.com - readOnly: true - type: string - x-auditable: true - cname_target: - description: The CNAME record target value for DCV delegation. - example: dcv.cloudflare.com - readOnly: true - type: string - x-auditable: true - emails: - description: >- - The set of email addresses that the certificate authority (CA) will - use to complete domain validation. - example: - - administrator@example.com - - webmaster@example.com - items: - type: string - x-auditable: true - type: array - http_body: - description: >- - The content that the certificate authority (CA) will expect to find - at the http_url during the domain validation. - example: ca3-574923932a82475cb8592200f1a2a23d - type: string - http_url: - description: The url that will be checked during domain validation. - example: >- - http://app.example.com/.well-known/pki-validation/ca3-da12a1c25e7b48cf80408c6c1763b8a2.txt - type: string - status: - description: Status of the validation record. - example: pending - readOnly: true - type: string - txt_name: - description: >- - The hostname that the certificate authority (CA) will check for a - TXT record during domain validation . - example: _acme-challenge.app.example.com - type: string - x-auditable: true - txt_value: - description: >- - The TXT record that the certificate authority (CA) will check during - domain validation. - example: 810b7d5f01154524b961ba0cd578acc2 - type: string - type: object - tlsCertificatesAndHostnamesVerificationErrors: - description: >- - These are errors that were encountered while trying to activate a - hostname. - example: - - >- - None of the A or AAAA records are owned by this account and the - pre-generated ownership verification token was not found. - items: - type: string - x-auditable: true - type: array - unnamedSchemaRef16aca57bde2963201c7e6e895436c1c1: - default: ubiquitous - description: >- - A ubiquitous bundle has the highest probability of being verified - everywhere, even by clients using outdated or unusual trust stores. An - optimal bundle uses the shortest chain and newest intermediates. And the - force bundle verifies the chain, but does not otherwise modify it. - enum: - - ubiquitous - - optimal - - force - example: ubiquitous - type: string - x-auditable: true - unnamedSchemaRef78adb375f06c6d462dd92b99e2ecf510: - description: Domain control validation (DCV) method used for this hostname. - enum: - - http - - txt - - email - example: http - type: string - x-auditable: true - unnamedSchemaRef9a9935a9a770967bb604ae41a81e42e1: - description: >- - Level of validation to be used for this hostname. Domain validation (dv) - must be used. - enum: - - dv - example: dv - type: string - x-auditable: true - unnamedSchemaRefD2a16d7ee1ad3a888dd5821c918d51fd: - type: object - properties: - hostname: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostname' - id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - ssl: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSsl' - created_at: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCreatedAt' - readOnly: true - custom_metadata: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomMetadata' - custom_origin_server: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomOriginServer' - custom_origin_sni: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomOriginSni' - ownership_verification: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesOwnershipVerification - ownership_verification_http: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesOwnershipVerificationHttp - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasStatus - verification_errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesVerificationErrors' - required: - - id - - hostname - enum: - - null - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - custom_hostnames: - id: cloudflare.custom_hostnames.custom_hostnames - name: custom_hostnames - title: Custom Hostnames - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1custom_hostnames/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1custom_hostnames/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1custom_hostnames~1{custom_hostname_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1custom_hostnames~1{custom_hostname_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1custom_hostnames~1{custom_hostname_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/custom_hostnames/methods/get' - - $ref: '#/components/x-stackQL-resources/custom_hostnames/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/custom_hostnames/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/custom_hostnames/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/custom_hostnames/methods/delete' - replace: [] - fallback_origin: - id: cloudflare.custom_hostnames.fallback_origin - name: fallback_origin - title: Fallback Origin - methods: - delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1custom_hostnames~1fallback_origin/delete - response: - mediaType: application/json - openAPIDocKey: '200' - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1custom_hostnames~1fallback_origin/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1custom_hostnames~1fallback_origin/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/fallback_origin/methods/list' - insert: [] - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/fallback_origin/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/fallback_origin/methods/update' - certificates: - id: cloudflare.custom_hostnames.certificates - name: certificates - title: Certificates - methods: - delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1custom_hostnames~1{custom_hostname_id}~1certificate_pack~1{certificate_pack_id}~1certificates~1{certificate_id}/delete - response: - mediaType: application/json - openAPIDocKey: '202' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1custom_hostnames~1{custom_hostname_id}~1certificate_pack~1{certificate_pack_id}~1certificates~1{certificate_id}/put - response: - mediaType: application/json - openAPIDocKey: '202' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/certificates/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/certificates/methods/update' +openapi: 3.0.3 +info: + title: custom_hostnames API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /zones/{zone_id}/custom_hostnames: + get: + description: List, search, sort, and filter all of your custom hostnames. + operationId: custom-hostname-for-a-zone-list-custom-hostnames + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: query + name: hostname + schema: + description: Fully qualified domain name to match against. This parameter cannot be used with the 'id' parameter. + maxLength: 255 + type: string + - in: query + name: hostname.contain + schema: + description: Filters hostnames by a substring match on the hostname value. This parameter cannot be used with the 'id' parameter. + maxLength: 255 + type: string + - in: query + name: id + schema: + description: Hostname ID to match against. This ID was generated and returned during the initial custom_hostname creation. This parameter cannot be used with the 'hostname' parameter. + maxLength: 36 + minLength: 36 + type: string + - in: query + name: page + schema: + default: 1 + description: Page number of paginated results. + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 20 + description: Number of hostnames per page. + maximum: 1000 + minimum: 5 + type: number + - in: query + name: order + schema: + default: ssl + description: Field to order hostnames by. + enum: + - ssl + - ssl_status + type: string + - in: query + name: direction + schema: + description: Direction to order hostnames. + enum: + - asc + - desc + type: string + - in: query + name: ssl_status + schema: + description: Filter by SSL certificate status. + enum: + - initializing + - pending_validation + - deleted + - pending_issuance + - pending_deployment + - pending_deletion + - pending_expiration + - expired + - active + - initializing_timed_out + - validation_timed_out + - issuance_timed_out + - deployment_timed_out + - deletion_timed_out + - pending_cleanup + - staging_deployment + - staging_active + - deactivating + - inactive + - backup_issued + - holding_deployment + type: string + - in: query + name: hostname_status + schema: + description: Filter by the hostname's activation status. + enum: + - active + - pending + - active_redeploying + - moved + - pending_deletion + - deleted + - pending_blocked + - pending_migration + - pending_provisioned + - test_pending + - test_active + - test_active_apex + - test_blocked + - test_failed + - provisioned + - blocked + type: string + - in: query + name: certificate_authority + schema: + description: Filter by the certificate authority that issued the SSL certificate. + enum: + - google + - lets_encrypt + - ssl_com + type: string + - in: query + name: wildcard + schema: + description: Filter by whether the custom hostname is a wildcard hostname. + type: boolean + - in: query + name: custom_origin_server + schema: + description: Filter by custom origin server name. + type: string + - in: query + name: ssl + schema: + description: Whether to filter hostnames based on if they have SSL enabled. + enum: + - 0 + - 1 + type: number + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomHostnameResponseCollection' + description: List Custom Hostnames response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomHostname' + type: array + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: List Custom Hostnames response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Custom Hostnames + tags: + - Custom Hostname for a Zone + x-api-token-group: + - SSL and Certificates Write + - SSL and Certificates Read + x-cfPermissionsRequired: + enum: + - '#ssl:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: custom_hostnames + resource_chain: [] + method: list + post: + description: "Add a new custom hostname and request that an SSL certificate be issued for it. One of three validation methods\u2014http, txt, email\u2014should be used, with 'http' recommended if the CNAME is already in place (or will be soon). Specifying 'email' will send an email to the WHOIS contacts on file for the base domain plus hostmaster, postmaster, webmaster, admin, administrator. If http is used and the domain is not already pointing to the Managed CNAME host, the PATCH method must be used once it is (to complete validation). Enable bundling of certificates using the custom_cert_bundle field. The bundling process requires the following condition One certificate in the bundle must use an RSA, and the other must use an ECDSA." + operationId: custom-hostname-for-a-zone-create-custom-hostname + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + custom_metadata: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomMetadata' + hostname: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnamePost' + ssl: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSslpost' + required: + - hostname + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomHostnameResponseSingle' + description: Create Custom Hostname response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/unnamedSchemaRefD2a16d7ee1ad3a888dd5821c918d51fd' + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Create Custom Hostname response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Custom Hostname + tags: + - Custom Hostname for a Zone + x-api-token-group: + - SSL and Certificates Write + x-cfPermissionsRequired: + enum: + - '#ssl:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: custom_hostnames + resource_chain: [] + method: create + /zones/{zone_id}/custom_hostnames/fallback_origin: + delete: + description: Removes the fallback origin configuration for custom hostnames on a zone. Custom hostnames without specific origins will no longer have a fallback. + operationId: custom-hostname-fallback-origin-for-a-zone-delete-fallback-origin-for-custom-hostnames + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesFallbackOriginResponse' + description: Delete Fallback Origin for Custom Hostnames response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + created_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasCreatedAt' + readOnly: true + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesErrors' + origin: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesOrigin' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomHostnameFallbackOriginComponentsSchemasStatus' + updated_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesUpdatedAt' + readOnly: true + type: object + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Delete Fallback Origin for Custom Hostnames response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Fallback Origin for Custom Hostnames + tags: + - Custom Hostname Fallback Origin for a Zone + x-api-token-group: + - SSL and Certificates Write + x-cfPermissionsRequired: + enum: + - '#ssl:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: custom_hostnames + resource_chain: + - fallback_origin + method: delete + get: + description: Retrieves the current fallback origin configuration for custom hostnames on a zone. The fallback origin handles traffic when specific custom hostname origins are unavailable. + operationId: custom-hostname-fallback-origin-for-a-zone-get-fallback-origin-for-custom-hostnames + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesFallbackOriginResponse' + description: Get Fallback Origin for Custom Hostnames response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + created_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasCreatedAt' + readOnly: true + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesErrors' + origin: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesOrigin' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomHostnameFallbackOriginComponentsSchemasStatus' + updated_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesUpdatedAt' + readOnly: true + type: object + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Get Fallback Origin for Custom Hostnames response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Fallback Origin for Custom Hostnames + tags: + - Custom Hostname Fallback Origin for a Zone + x-api-token-group: + - SSL and Certificates Write + - SSL and Certificates Read + x-cfPermissionsRequired: + enum: + - '#ssl:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: custom_hostnames + resource_chain: + - fallback_origin + method: get + put: + description: Updates the fallback origin configuration for custom hostnames on a zone. Sets the default origin server for custom hostname traffic. + operationId: custom-hostname-fallback-origin-for-a-zone-update-fallback-origin-for-custom-hostnames + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + origin: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesOrigin' + required: + - origin + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesFallbackOriginResponse' + description: Update Fallback Origin for Custom Hostnames response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + created_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasCreatedAt' + readOnly: true + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesErrors' + origin: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesOrigin' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomHostnameFallbackOriginComponentsSchemasStatus' + updated_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesUpdatedAt' + readOnly: true + type: object + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Update Fallback Origin for Custom Hostnames response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Fallback Origin for Custom Hostnames + tags: + - Custom Hostname Fallback Origin for a Zone + x-api-token-group: + - SSL and Certificates Write + x-cfPermissionsRequired: + enum: + - '#ssl:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: custom_hostnames + resource_chain: + - fallback_origin + method: update + /zones/{zone_id}/custom_hostnames/{custom_hostname_id}: + delete: + description: Permanently deletes a custom hostname and revokes any SSL certificates that were issued for it. This action cannot be undone. + operationId: custom-hostname-for-a-zone-delete-custom-hostname-(-and-any-issued-ssl-certificates) + parameters: + - in: path + name: custom_hostname_id + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + type: object + description: Delete Custom Hostname (and any issued SSL certificates) response + 4XX: + content: + application/json: + schema: + properties: + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + errors: + minLength: 1 + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + type: boolean + type: object + required: + - success + - errors + - messages + - result + description: Delete Custom Hostname (and any issued SSL certificates) response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Custom Hostname (and any issued SSL certificates) + tags: + - Custom Hostname for a Zone + x-api-token-group: + - SSL and Certificates Write + x-cfPermissionsRequired: + enum: + - '#ssl:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: custom_hostnames + resource_chain: [] + method: delete + get: + description: Retrieves detailed information about a specific custom hostname, including SSL certificate status, ownership verification, and origin configuration. + operationId: custom-hostname-for-a-zone-custom-hostname-details + parameters: + - in: path + name: custom_hostname_id + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomHostnameResponseSingle' + description: Custom Hostname Details response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/unnamedSchemaRefD2a16d7ee1ad3a888dd5821c918d51fd' + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Custom Hostname Details response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Custom Hostname Details + tags: + - Custom Hostname for a Zone + x-api-token-group: + - SSL and Certificates Write + - SSL and Certificates Read + x-cfPermissionsRequired: + enum: + - '#ssl:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: custom_hostnames + resource_chain: [] + method: get + patch: + description: Modify SSL configuration for a custom hostname. When sent with SSL config that matches existing config, used to indicate that hostname should pass domain control validation (DCV). Can also be used to change validation type, e.g., from 'http' to 'email'. Bundle an existing certificate with another certificate by using the "custom_cert_bundle" field. The bundling process supports combining certificates as long as the following condition is met. One certificate must use the RSA algorithm, and the other must use the ECDSA algorithm. + operationId: custom-hostname-for-a-zone-edit-custom-hostname + parameters: + - in: path + name: custom_hostname_id + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + custom_metadata: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomMetadata' + custom_origin_server: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomOriginServer' + custom_origin_sni: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomOriginSni' + ssl: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSslpost' + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomHostnameResponseSingle' + description: Edit Custom Hostname response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/unnamedSchemaRefD2a16d7ee1ad3a888dd5821c918d51fd' + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Edit Custom Hostname response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Edit Custom Hostname + tags: + - Custom Hostname for a Zone + x-api-token-group: + - SSL and Certificates Write + x-cfPermissionsRequired: + enum: + - '#ssl:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: custom_hostnames + resource_chain: [] + method: edit + ? /zones/{zone_id}/custom_hostnames/{custom_hostname_id}/certificate_pack/{certificate_pack_id}/certificates/{certificate_id} + : delete: + description: Delete a single custom certificate from a certificate pack that contains two bundled certificates. Deletion is subject to the following constraints. You cannot delete a certificate if it is the only remaining certificate in the pack. At least one certificate must remain in the pack. + operationId: custom-hostname-for-a-zone-delete_single_certificate_and_key_in_a_custom_hostname + parameters: + - in: path + name: custom_hostname_id + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + required: true + - in: path + name: certificate_pack_id + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + required: true + - name: certificate_id + in: path + required: true + description: The certificate ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '202': + content: + application/json: + schema: + properties: + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + type: object + description: Delete Single Certificate and Key In a Custom Hostname response + 4XX: + content: + application/json: + schema: + properties: + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + errors: + minLength: 1 + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + type: boolean + type: object + required: + - success + - errors + - messages + - result + description: Delete Single Certificate and Key In a Custom Hostname response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Single Certificate And Key For Custom Hostname + tags: + - Custom Hostname for a Zone + x-api-token-group: + - SSL and Certificates Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: custom_hostnames + resource_chain: + - certificate_pack + - certificates + method: delete + put: + description: Replace a single custom certificate within a certificate pack that contains two bundled certificates. The replacement must adhere to the following constraints. You can only replace an RSA certificate with another RSA certificate or an ECDSA certificate with another ECDSA certificate. + operationId: custom-hostname-for-a-zone-edit-custom-certificate-custom-hostname + parameters: + - in: path + name: custom_hostname_id + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + required: true + - in: path + name: certificate_pack_id + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + required: true + - name: certificate_id + in: path + required: true + description: The certificate ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomCertAndKey' + responses: + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomHostnameResponseSingle' + description: Edit Custom Certificate In a Custom Hostname response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/unnamedSchemaRefD2a16d7ee1ad3a888dd5821c918d51fd' + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Edit Custom Certificate In a Custom Hostname response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Replace Custom Certificate and Custom Key In Custom Hostname + tags: + - Custom Hostname for a Zone + x-api-token-group: + - SSL and Certificates Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: custom_hostnames + resource_chain: + - certificate_pack + - certificates + method: update +components: + schemas: + tlsCertificatesAndHostnamesCertificateAuthority: + description: The Certificate Authority that will issue the certificate + enum: + - digicert + - google + - lets_encrypt + - ssl_com + example: google + type: string + x-auditable: true + tlsCertificatesAndHostnamesComponentsSchemasStatus: + description: Status of the hostname's activation. + enum: + - active + - pending + - active_redeploying + - moved + - pending_deletion + - deleted + - pending_blocked + - pending_migration + - pending_provisioned + - test_pending + - test_active + - test_active_apex + - test_blocked + - test_failed + - provisioned + - blocked + example: pending + type: string + x-auditable: true + tlsCertificatesAndHostnamesCreatedAt: + description: This is the time the hostname was created. + example: '2020-02-06T18:11:23.531995Z' + format: date-time + type: string + x-auditable: true + tlsCertificatesAndHostnamesCustomCertAndKey: + properties: + custom_certificate: + description: If a custom uploaded certificate is used. + example: '-----BEGIN CERTIFICATE----- + + MIIDdjCCAl6gAwIBAgIJAPnMg0Fs+/B0MA0GCSqGSIb3DQEBCwUAMFsx... + + -----END CERTIFICATE----- + + ' + type: string + custom_key: + description: The key for a custom uploaded certificate. + example: '-----BEGIN PRIVATE KEY----- + + MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC/SCB5... + + -----END PRIVATE KEY----- + + ' + type: string + x-sensitive: true + required: + - custom_certificate + - custom_key + type: object + tlsCertificatesAndHostnamesCustomCertBundle: + description: Array of custom certificate and key pairs (1 or 2 pairs allowed) + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomCertAndKey' + maxItems: 2 + minItems: 1 + type: array + tlsCertificatesAndHostnamesCustomHostname: + properties: + hostname: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostname' + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + ssl: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSsl' + created_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCreatedAt' + readOnly: true + custom_metadata: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomMetadata' + custom_origin_server: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomOriginServer' + custom_origin_sni: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomOriginSni' + ownership_verification: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesOwnershipVerification' + ownership_verification_http: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesOwnershipVerificationHttp' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasStatus' + verification_errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesVerificationErrors' + required: + - id + - hostname + type: object + tlsCertificatesAndHostnamesCustomHostnameFallbackOriginComponentsSchemasStatus: + description: Status of the fallback origin's activation. + enum: + - initializing + - pending_deployment + - pending_deletion + - active + - deployment_timed_out + - deletion_timed_out + example: pending_deployment + type: string + x-auditable: true + tlsCertificatesAndHostnamesCustomHostnameResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 2000 + type: number + total_pages: + description: The number of total pages in the entire result set. + example: 100 + type: number + type: object + result: + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomHostname' + type: array + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesCustomHostnameResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + type: object + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomHostname' + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesCustomMetadata: + description: Unique key/value metadata for this hostname. These are per-hostname (customer) settings. + type: object + tlsCertificatesAndHostnamesCustomOriginServer: + description: "a valid hostname that\u2019s been added to your DNS zone as an A, AAAA, or CNAME record." + example: origin2.example.com + type: string + x-auditable: true + tlsCertificatesAndHostnamesCustomOriginSni: + description: A hostname that will be sent to your custom origin server as SNI for TLS handshake. This can be a valid subdomain of the zone or custom origin server name or the string ':request_host_header:' which will cause the host header in the request to be used as SNI. Not configurable with default/fallback origin server. + example: sni.example.com + type: string + x-auditable: true + tlsCertificatesAndHostnamesErrors: + description: These are errors that were encountered while trying to activate a fallback origin. + example: + - DNS records are not setup correctly. Origin should be a proxied A/AAAA/CNAME dns record + items: + type: string + x-auditable: true + type: array + tlsCertificatesAndHostnamesFallbackOriginResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesFallbackorigin' + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesFallbackorigin: + properties: + created_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasCreatedAt' + readOnly: true + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesErrors' + origin: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesOrigin' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomHostnameFallbackOriginComponentsSchemasStatus' + updated_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesUpdatedAt' + readOnly: true + type: object + tlsCertificatesAndHostnamesHostname: + description: The custom hostname that will point to your hostname via CNAME. + example: app.example.com + maxLength: 255 + readOnly: true + type: string + x-auditable: true + tlsCertificatesAndHostnamesHostnamePost: + description: The custom hostname that will point to your hostname via CNAME. + example: app.example.com + maxLength: 255 + type: string + x-auditable: true + tlsCertificatesAndHostnamesIdentifier: + description: Identifier. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + type: string + x-auditable: true + tlsCertificatesAndHostnamesMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + tlsCertificatesAndHostnamesOrigin: + description: Your origin hostname that requests to your custom hostnames will be sent to. + example: fallback.example.com + maxLength: 255 + type: string + x-auditable: true + tlsCertificatesAndHostnamesOwnershipVerification: + description: This is a record which can be placed to activate a hostname. + type: object + properties: + name: + description: DNS Name for record. + example: _cf-custom-hostname.app.example.com + type: string + x-auditable: true + type: + description: DNS Record type. + enum: + - txt + example: txt + type: string + x-auditable: true + value: + description: Content for the record. + example: 5cc07c04-ea62-4a5a-95f0-419334a875a4 + type: string + tlsCertificatesAndHostnamesOwnershipVerificationHttp: + description: This presents the token to be served by the given http url to activate a hostname. + type: object + properties: + http_body: + description: Token to be served. + example: 5cc07c04-ea62-4a5a-95f0-419334a875a4 + type: string + http_url: + description: The HTTP URL that will be checked during custom hostname verification and where the customer should host the token. + example: http://custom.test.com/.well-known/cf-custom-hostname-challenge/0d89c70d-ad9f-4843-b99f-6cc0252067e9 + type: string + tlsCertificatesAndHostnamesSchemasCreatedAt: + description: This is the time the fallback origin was created. + example: '2019-10-28T18:11:23.37411Z' + format: date-time + type: string + x-auditable: true + tlsCertificatesAndHostnamesSsl: + description: SSL properties for the custom hostname. + type: object + properties: + bundle_method: + $ref: '#/components/schemas/unnamedSchemaRef16aca57bde2963201c7e6e895436c1c1' + certificate_authority: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificateAuthority' + custom_certificate: + description: If a custom uploaded certificate is used. + example: '-----BEGIN CERTIFICATE----- + + MIIFJDCCBAygAwIBAgIQD0ifmj/Yi5NP/2gdUySbfzANBgkqhkiG9w0BAQsFADBN + + MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMScwJQYDVQQDEx5E...SzSHfXp5lnu/3V08I72q1QNzOCgY1XeL4GKVcj4or6cT6tX6oJH7ePPmfrBfqI/O + + OeH8gMJ+FuwtXYEPa4hBf38M5eU5xWG7 + + -----END CERTIFICATE----- + + ' + type: string + custom_csr_id: + description: The identifier for the Custom CSR that was used. + example: 7b163417-1d2b-4c84-a38a-2fb7a0cd7752 + type: string + x-auditable: true + custom_key: + description: The key for a custom uploaded certificate. + example: '-----BEGIN RSA PRIVATE KEY----- + + MIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG + + dtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn + + abIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid + + tnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py + + FxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE + + ewooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb + + HBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/ + + axiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb + + +ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g + + +j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv + + KLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7 + + 9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo + + /WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu + + iacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9 + + N2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe + + VAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB + + vULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U + + lySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR + + 9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7 + + mEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX + + dFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe + + PG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS + + fhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W + + qu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T + + lv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi + + -----END RSA PRIVATE KEY----- + + ' + type: string + x-sensitive: true + dcv_delegation_records: + description: DCV Delegation records for domain validation. + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidationRecord' + readOnly: true + type: array + expires_on: + description: The time the custom certificate expires on. + example: '2021-02-06T18:11:23.531995Z' + format: date-time + type: string + x-auditable: true + hosts: + description: A list of Hostnames on a custom uploaded certificate. + example: + - app.example.com + - '*.app.example.com' + items: + type: string + x-auditable: true + type: array + id: + description: Custom hostname SSL identifier tag. + example: 0d89c70d-ad9f-4843-b99f-6cc0252067e9 + maxLength: 36 + minLength: 36 + type: string + x-auditable: true + issuer: + description: The issuer on a custom uploaded certificate. + example: DigiCertInc + type: string + x-auditable: true + method: + $ref: '#/components/schemas/unnamedSchemaRef78adb375f06c6d462dd92b99e2ecf510' + serial_number: + description: The serial number on a custom uploaded certificate. + example: '6743787633689793699141714808227354901' + type: string + x-auditable: true + settings: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSslsettings' + signature: + description: The signature on a custom uploaded certificate. + example: SHA256WithRSA + type: string + x-auditable: true + status: + description: Status of the hostname's SSL certificates. + enum: + - initializing + - pending_validation + - deleted + - pending_issuance + - pending_deployment + - pending_deletion + - pending_expiration + - expired + - active + - initializing_timed_out + - validation_timed_out + - issuance_timed_out + - deployment_timed_out + - deletion_timed_out + - pending_cleanup + - staging_deployment + - staging_active + - deactivating + - inactive + - backup_issued + - holding_deployment + example: pending_validation + readOnly: true + type: string + x-auditable: true + type: + $ref: '#/components/schemas/unnamedSchemaRef9a9935a9a770967bb604ae41a81e42e1' + uploaded_on: + description: The time the custom certificate was uploaded. + example: '2020-02-06T18:11:23.531995Z' + format: date-time + type: string + x-auditable: true + validation_errors: + description: Domain validation errors that have been received by the certificate authority (CA). + items: + properties: + message: + description: A domain validation error. + example: SERVFAIL looking up CAA for app.example.com + type: string + x-auditable: true + type: object + type: array + validation_records: + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidationRecord' + type: array + wildcard: + description: Indicates whether the certificate covers a wildcard. + example: false + type: boolean + x-auditable: true + tlsCertificatesAndHostnamesSslpost: + description: SSL properties used when creating the custom hostname. + type: object + properties: + bundle_method: + $ref: '#/components/schemas/unnamedSchemaRef16aca57bde2963201c7e6e895436c1c1' + certificate_authority: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificateAuthority' + cloudflare_branding: + description: Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true + example: false + type: boolean + x-auditable: true + custom_cert_bundle: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomCertBundle' + custom_certificate: + description: If a custom uploaded certificate is used. + example: '-----BEGIN CERTIFICATE----- + + MIIFJDCCBAygAwIBAgIQD0ifmj/Yi5NP/2gdUySbfzANBgkqhkiG9w0BAQsFADBN + + MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMScwJQYDVQQDEx5E...SzSHfXp5lnu/3V08I72q1QNzOCgY1XeL4GKVcj4or6cT6tX6oJH7ePPmfrBfqI/O + + OeH8gMJ+FuwtXYEPa4hBf38M5eU5xWG7 + + -----END CERTIFICATE----- + + ' + type: string + x-auditable: true + custom_csr_id: + description: The identifier for the Custom CSR that was used. + example: 7b163417-1d2b-4c84-a38a-2fb7a0cd7752 + type: string + x-auditable: true + custom_key: + description: The key for a custom uploaded certificate. + example: '-----BEGIN RSA PRIVATE KEY----- + + MIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG + + dtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn + + abIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid + + tnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py + + FxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE + + ewooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb + + HBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/ + + axiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb + + +ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g + + +j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv + + KLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7 + + 9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo + + /WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu + + iacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9 + + N2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe + + VAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB + + vULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U + + lySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR + + 9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7 + + mEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX + + dFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe + + PG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS + + fhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W + + qu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T + + lv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi + + -----END RSA PRIVATE KEY----- + + ' + type: string + x-sensitive: true + method: + $ref: '#/components/schemas/unnamedSchemaRef78adb375f06c6d462dd92b99e2ecf510' + settings: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSslsettings' + type: + $ref: '#/components/schemas/unnamedSchemaRef9a9935a9a770967bb604ae41a81e42e1' + wildcard: + description: Indicates whether the certificate covers a wildcard. + example: false + type: boolean + x-auditable: true + tlsCertificatesAndHostnamesSslsettings: + description: SSL specific settings. + properties: + ciphers: + description: An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format. + example: + - ECDHE-RSA-AES128-GCM-SHA256 + - AES128-SHA + items: + type: string + x-auditable: true + type: array + uniqueItems: true + early_hints: + description: Whether or not Early Hints is enabled. + enum: + - 'on' + - 'off' + example: 'on' + type: string + x-auditable: true + http2: + description: Whether or not HTTP2 is enabled. + enum: + - 'on' + - 'off' + example: 'on' + type: string + x-auditable: true + min_tls_version: + description: The minimum TLS version supported. + enum: + - '1.0' + - '1.1' + - '1.2' + - '1.3' + example: '1.2' + type: string + x-auditable: true + tls_1_3: + description: Whether or not TLS 1.3 is enabled. + enum: + - 'on' + - 'off' + example: 'on' + type: string + x-auditable: true + type: object + tlsCertificatesAndHostnamesUpdatedAt: + description: This is the time the fallback origin was updated. + example: '2020-03-16T18:11:23.531995Z' + format: date-time + type: string + x-auditable: true + tlsCertificatesAndHostnamesValidationRecord: + description: Certificate's required validation record. + properties: + cname: + description: The CNAME record hostname for DCV delegation. + example: _acme-challenge.example.com + readOnly: true + type: string + x-auditable: true + cname_target: + description: The CNAME record target value for DCV delegation. + example: dcv.cloudflare.com + readOnly: true + type: string + x-auditable: true + emails: + description: The set of email addresses that the certificate authority (CA) will use to complete domain validation. + example: + - administrator@example.com + - webmaster@example.com + items: + type: string + x-auditable: true + type: array + http_body: + description: The content that the certificate authority (CA) will expect to find at the http_url during the domain validation. + example: ca3-574923932a82475cb8592200f1a2a23d + type: string + http_url: + description: The url that will be checked during domain validation. + example: http://app.example.com/.well-known/pki-validation/ca3-da12a1c25e7b48cf80408c6c1763b8a2.txt + type: string + status: + description: Status of the validation record. + example: pending + readOnly: true + type: string + txt_name: + description: The hostname that the certificate authority (CA) will check for a TXT record during domain validation . + example: _acme-challenge.app.example.com + type: string + x-auditable: true + txt_value: + description: The TXT record that the certificate authority (CA) will check during domain validation. + example: 810b7d5f01154524b961ba0cd578acc2 + type: string + type: object + tlsCertificatesAndHostnamesVerificationErrors: + description: These are errors that were encountered while trying to activate a hostname. + example: + - None of the A or AAAA records are owned by this account and the pre-generated ownership verification token was not found. + items: + type: string + x-auditable: true + type: array + unnamedSchemaRef16aca57bde2963201c7e6e895436c1c1: + default: ubiquitous + description: A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it. + enum: + - ubiquitous + - optimal + - force + example: ubiquitous + type: string + x-auditable: true + unnamedSchemaRef78adb375f06c6d462dd92b99e2ecf510: + description: Domain control validation (DCV) method used for this hostname. + enum: + - http + - txt + - email + example: http + type: string + x-auditable: true + unnamedSchemaRef9a9935a9a770967bb604ae41a81e42e1: + description: Level of validation to be used for this hostname. Domain validation (dv) must be used. + enum: + - dv + example: dv + type: string + x-auditable: true + unnamedSchemaRefD2a16d7ee1ad3a888dd5821c918d51fd: + type: object + properties: + hostname: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostname' + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + ssl: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSsl' + created_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCreatedAt' + readOnly: true + custom_metadata: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomMetadata' + custom_origin_server: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomOriginServer' + custom_origin_sni: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCustomOriginSni' + ownership_verification: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesOwnershipVerification' + ownership_verification_http: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesOwnershipVerificationHttp' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasStatus' + verification_errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesVerificationErrors' + required: + - id + - hostname + enum: + - null + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + custom_hostnames: + id: cloudflare.custom_hostnames.custom_hostnames + name: custom_hostnames + title: Custom Hostnames + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1custom_hostnames/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1custom_hostnames/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .custom_metadata }}{{ $sep }}"custom_metadata": {{ if eq (kindOf .custom_metadata) "string" }}{{ .custom_metadata }}{{ else }}{{ toJson .custom_metadata }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .hostname }}{{ $sep }}"hostname": {{ toJson .hostname }}{{- $sep = "," -}}{{ end }} + + {{- if .ssl }}{{ $sep }}"ssl": {{ if eq (kindOf .ssl) "string" }}{{ .ssl }}{{ else }}{{ toJson .ssl }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1custom_hostnames~1{custom_hostname_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1custom_hostnames~1{custom_hostname_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1custom_hostnames~1{custom_hostname_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .custom_metadata }}{{ $sep }}"custom_metadata": {{ if eq (kindOf .custom_metadata) "string" }}{{ .custom_metadata }}{{ else }}{{ toJson .custom_metadata }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_origin_server }}{{ $sep }}"custom_origin_server": {{ toJson .custom_origin_server }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_origin_sni }}{{ $sep }}"custom_origin_sni": {{ toJson .custom_origin_sni }}{{- $sep = "," -}}{{ end }} + + {{- if .ssl }}{{ $sep }}"ssl": {{ if eq (kindOf .ssl) "string" }}{{ .ssl }}{{ else }}{{ toJson .ssl }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/custom_hostnames/methods/get' + - $ref: '#/components/x-stackQL-resources/custom_hostnames/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/custom_hostnames/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/custom_hostnames/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/custom_hostnames/methods/delete' + replace: [] + fallback_origin: + id: cloudflare.custom_hostnames.fallback_origin + name: fallback_origin + title: Fallback Origin + methods: + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1custom_hostnames~1fallback_origin/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1custom_hostnames~1fallback_origin/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1custom_hostnames~1fallback_origin/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/fallback_origin/methods/list' + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/fallback_origin/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/fallback_origin/methods/update' + certificates: + id: cloudflare.custom_hostnames.certificates + name: certificates + title: Certificates + methods: + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1custom_hostnames~1{custom_hostname_id}~1certificate_pack~1{certificate_pack_id}~1certificates~1{certificate_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '202' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1custom_hostnames~1{custom_hostname_id}~1certificate_pack~1{certificate_pack_id}~1certificates~1{certificate_id}/put' + response: + mediaType: application/json + openAPIDocKey: '202' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/certificates/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/certificates/methods/update' diff --git a/providers/src/cloudflare/v00.00.00000/services/d1.yaml b/providers/src/cloudflare/v00.00.00000/services/d1.yaml index 761ad636..e88a5746 100644 --- a/providers/src/cloudflare/v00.00.00000/services/d1.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/d1.yaml @@ -1561,6 +1561,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .read_replication }}{{ $sep }}"read_replication": {{ if eq (kindOf .read_replication) "string" }}{{ .read_replication }}{{ else }}{{ toJson .read_replication }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' update: config: requestBodyTranslate: @@ -1570,6 +1583,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .read_replication }}{{ $sep }}"read_replication": {{ if eq (kindOf .read_replication) "string" }}{{ .read_replication }}{{ else }}{{ toJson .read_replication }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' export: config: requestBodyTranslate: @@ -1579,6 +1605,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .current_bookmark }}{{ $sep }}"current_bookmark": {{ toJson .current_bookmark }}{{- $sep = "," -}}{{ end }} + + {{- if .dump_options }}{{ $sep }}"dump_options": {{ if eq (kindOf .dump_options) "string" }}{{ .dump_options }}{{ else }}{{ toJson .dump_options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .output_format }}{{ $sep }}"output_format": {{ toJson .output_format }}{{- $sep = "," -}}{{ end }} + + } + + ' import: config: requestBodyTranslate: @@ -1597,6 +1640,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .params }}{{ $sep }}"params": {{ if eq (kindOf .params) "string" }}{{ .params }}{{ else }}{{ toJson .params }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .sql }}{{ $sep }}"sql": {{ toJson .sql }}{{- $sep = "," -}}{{ end }} + + {{- if .batch }}{{ $sep }}"batch": {{ if eq (kindOf .batch) "string" }}{{ .batch }}{{ else }}{{ toJson .batch }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/database/methods/get' @@ -1623,6 +1683,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .params }}{{ $sep }}"params": {{ if eq (kindOf .params) "string" }}{{ .params }}{{ else }}{{ toJson .params }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .sql }}{{ $sep }}"sql": {{ toJson .sql }}{{- $sep = "," -}}{{ end }} + + {{- if .batch }}{{ $sep }}"batch": {{ if eq (kindOf .batch) "string" }}{{ .batch }}{{ else }}{{ toJson .batch }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: [] insert: diff --git a/providers/src/cloudflare/v00.00.00000/services/diagnostics.yaml b/providers/src/cloudflare/v00.00.00000/services/diagnostics.yaml index bcce7f4f..b8b7b9fd 100644 --- a/providers/src/cloudflare/v00.00.00000/services/diagnostics.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/diagnostics.yaml @@ -1,878 +1,839 @@ -openapi: 3.0.3 -info: - title: diagnostics API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/diagnostics/endpoint-healthchecks: - get: - description: List Endpoint Health Checks. - operationId: diagnostics-endpoint-healthcheck-list - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/magicTransitEndpointHealthCheckResponseSingle - description: Endpoint Health Checks for account. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/magicTransitApiResponseCommonFailure' - description: Endpoint Health Check response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Endpoint Health Checks - tags: - - Endpoint Health Checks - x-api-token-group: - - Magic Transit Write - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: diagnostics - resource_chain: - - endpoint_healthchecks - method: list - post: - description: Create Endpoint Health Check. - operationId: diagnostics-endpoint-healthcheck-create - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/magicTransitEndpointHealthCheck' - responses: - '201': - content: - application/json: - schema: - $ref: >- - #/components/schemas/magicTransitEndpointHealthCheckResponseSingle - description: Endpoint Health Check response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/magicTransitApiResponseCommonFailure' - description: Endpoint Health Check response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Endpoint Health Check - tags: - - Endpoint Health Checks - x-api-token-group: - - Magic Transit Write - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: diagnostics - resource_chain: - - endpoint_healthchecks - method: create - /accounts/{account_id}/diagnostics/endpoint-healthchecks/{id}: - delete: - description: Delete Endpoint Health Check. - operationId: diagnostics-endpoint-healthcheck-delete - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/magicTransitApiResponseCommon' - description: Endpoint Health Checks response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/magicTransitApiResponseCommonFailure' - description: Endpoint Health Check failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Endpoint Health Check - tags: - - Endpoint Health Checks - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: diagnostics - resource_chain: - - endpoint_healthchecks - method: delete - get: - description: Get a single Endpoint Health Check. - operationId: diagnostics-endpoint-healthcheck-get - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/magicTransitEndpointHealthCheckResponseSingle - description: Endpoint Health Checks response. - 4XX: - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/magicTransitMessages' - messages: - $ref: '#/components/schemas/magicTransitMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - items: - $ref: '#/components/schemas/magicTransitTargetResult' - type: array - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - type: object - description: Endpoint Health Check failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Endpoint Health Check - tags: - - Endpoint Health Checks - x-api-token-group: - - Magic Transit Write - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: diagnostics - resource_chain: - - endpoint_healthchecks - method: get - put: - description: Update a Endpoint Health Check. - operationId: diagnostics-endpoint-healthcheck-update - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: id - in: path - required: true - description: Resource ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/magicTransitEndpointHealthCheck' - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/magicTransitEndpointHealthCheckResponseSingle - description: Endpoint Health Checks response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/magicTransitApiResponseCommonFailure' - description: Endpoint Health Check failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Endpoint Health Check - tags: - - Endpoint Health Checks - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: diagnostics - resource_chain: - - endpoint_healthchecks - method: update - /accounts/{account_id}/diagnostics/traceroute: - post: - description: Run traceroutes from Cloudflare colos. - operationId: diagnostics-traceroute - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - colos: - $ref: '#/components/schemas/magicTransitColos' - options: - $ref: '#/components/schemas/magicTransitOptions' - targets: - $ref: '#/components/schemas/magicTransitTargets' - required: - - targets - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/magicTransitTracerouteResponseCollection' - description: Traceroute response. - 4XX: - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/magicTransitMessages' - messages: - $ref: '#/components/schemas/magicTransitMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - items: - $ref: '#/components/schemas/magicTransitTargetResult' - type: array - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - type: object - description: Traceroute response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Traceroute - tags: - - Diagnostics - x-api-token-group: - - Magic Transit Write - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false -components: - schemas: - magicTransitApiResponseCommon: - properties: - errors: - $ref: '#/components/schemas/magicTransitMessages' - messages: - $ref: '#/components/schemas/magicTransitMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - type: object - magicTransitApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/magicTransitMessages' - messages: - example: [] - $ref: '#/components/schemas/magicTransitMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - magicTransitAsn: - description: AS number associated with the node object. - type: string - magicTransitCheckType: - default: icmp - description: type of check to perform - enum: - - icmp - example: icmp - type: string - magicTransitColo: - properties: - city: - $ref: '#/components/schemas/magicTransitColoCity' - name: - $ref: '#/components/schemas/magicTransitColoName' - type: object - magicTransitColoCity: - description: Source colo city. - example: Denver, CO, US - type: string - magicTransitColoName: - description: Source colo name. - example: den01 - type: string - magicTransitColoResult: - properties: - colo: - $ref: '#/components/schemas/magicTransitColo' - error: - $ref: '#/components/schemas/magicTransitError' - hops: - items: - $ref: '#/components/schemas/magicTransitHopResult' - type: array - target_summary: - $ref: '#/components/schemas/magicTransitTargetSummary' - traceroute_time_ms: - $ref: '#/components/schemas/magicTransitTracerouteTimeMs' - type: object - magicTransitColos: - description: >- - If no source colo names specified, all colos will be used. China colos - are unavailable for traceroutes. - example: - - den - - sin - items: - description: Source colo name. - type: string - type: array - magicTransitEndpointHealthCheck: - properties: - check_type: - $ref: '#/components/schemas/magicTransitCheckType' - endpoint: - description: the IP address of the host to perform checks against - example: 203.0.113.1 - type: string - name: - description: Optional name associated with this check - example: My Endpoint - type: string - required: - - check_type - - endpoint - type: object - magicTransitEndpointHealthCheckResponse: - required: - - check_type - - endpoint - type: object - properties: - check_type: - $ref: '#/components/schemas/magicTransitCheckType' - endpoint: - description: the IP address of the host to perform checks against - example: 203.0.113.1 - type: string - name: - description: Optional name associated with this check - example: My Endpoint - type: string - id: - $ref: '#/components/schemas/magicTransitUuid' - magicTransitEndpointHealthCheckResponseSingle: - properties: - errors: - $ref: '#/components/schemas/magicTransitMessages' - messages: - $ref: '#/components/schemas/magicTransitMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/magicTransitEndpointHealthCheckResponse' - required: - - success - - errors - - messages - type: object - magicTransitError: - description: Errors resulting from collecting traceroute from colo to target. - enum: - - '' - - 'Could not gather traceroute data: Code 1' - - 'Could not gather traceroute data: Code 2' - - 'Could not gather traceroute data: Code 3' - - 'Could not gather traceroute data: Code 4' - example: '' - type: string - magicTransitHopResult: - properties: - nodes: - description: An array of node objects. - items: - $ref: '#/components/schemas/magicTransitNodeResult' - type: array - packets_lost: - $ref: '#/components/schemas/magicTransitPacketsLost' - packets_sent: - $ref: '#/components/schemas/magicTransitPacketsSent' - packets_ttl: - $ref: '#/components/schemas/magicTransitPacketsTtl' - type: object - magicTransitIp: - description: IP address of the node. - type: string - magicTransitLabels: - description: >- - Field appears if there is an additional annotation printed when the - probe returns. Field also appears when running a GRE+ICMP traceroute to - denote which traceroute a node comes from. - items: - type: string - type: array - magicTransitMaxRttMs: - description: Maximum RTT in ms. - type: number - magicTransitMaxTtl: - default: 15 - description: Max TTL. - maximum: 64 - minimum: 0 - type: integer - magicTransitMeanRttMs: - description: Mean RTT in ms. - type: number - magicTransitMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - magicTransitMinRttMs: - description: Minimum RTT in ms. - type: number - magicTransitName: - description: Host name of the address, this may be the same as the IP address. - type: string - magicTransitNodeResult: - example: - asn: AS13335 - ip: 1.1.1.1 - max_latency_ms: 0.034 - mean_latency_ms: 0.021 - min_latency_ms: 0.014 - name: one.one.one.one - packet_count: 3 - std_dev_latency_ms: 0.011269427669584647 - properties: - asn: - $ref: '#/components/schemas/magicTransitAsn' - ip: - $ref: '#/components/schemas/magicTransitIp' - labels: - $ref: '#/components/schemas/magicTransitLabels' - max_rtt_ms: - $ref: '#/components/schemas/magicTransitMaxRttMs' - mean_rtt_ms: - $ref: '#/components/schemas/magicTransitMeanRttMs' - min_rtt_ms: - $ref: '#/components/schemas/magicTransitMinRttMs' - name: - $ref: '#/components/schemas/magicTransitName' - packet_count: - $ref: '#/components/schemas/magicTransitPacketCount' - std_dev_rtt_ms: - $ref: '#/components/schemas/magicTransitStdDevRttMs' - type: object - magicTransitOptions: - example: - max_ttl: 15 - packet_type: icmp - properties: - max_ttl: - $ref: '#/components/schemas/magicTransitMaxTtl' - packet_type: - $ref: '#/components/schemas/magicTransitPacketType' - packets_per_ttl: - $ref: '#/components/schemas/magicTransitPacketsPerTtl' - port: - $ref: '#/components/schemas/magicTransitPort' - wait_time: - $ref: '#/components/schemas/magicTransitWaitTime' - type: object - magicTransitPacketCount: - description: Number of packets with a response from this node. - type: integer - magicTransitPacketType: - default: icmp - description: Type of packet sent. - enum: - - icmp - - tcp - - udp - - gre - - gre+icmp - example: icmp - type: string - magicTransitPacketsLost: - description: Number of packets where no response was received. - type: integer - magicTransitPacketsPerTtl: - default: 3 - description: Number of packets sent at each TTL. - maximum: 10 - minimum: 0 - type: integer - magicTransitPacketsSent: - description: Number of packets sent with specified TTL. - type: integer - magicTransitPacketsTtl: - description: The time to live (TTL). - type: integer - magicTransitPort: - default: 0 - description: >- - For UDP and TCP, specifies the destination port. For ICMP, specifies the - initial ICMP sequence value. Default value 0 will choose the best value - to use for each protocol. - maximum: 65535 - minimum: 0 - type: integer - magicTransitStdDevRttMs: - description: Standard deviation of the RTTs in ms. - type: number - magicTransitTarget: - description: The target hostname, IPv6, or IPv6 address. - example: 1.1.1.1 - type: string - magicTransitTargetResult: - properties: - colos: - items: - $ref: '#/components/schemas/magicTransitColoResult' - type: array - target: - $ref: '#/components/schemas/magicTransitTarget' - type: object - magicTransitTargetSummary: - description: Aggregated statistics from all hops about the target. - example: - asn: '' - ip: 1.1.1.1 - max_latency_ms: 0.034 - mean_latency_ms: 0.021 - min_latency_ms: 0.014 - name: 1.1.1.1 - packet_count: 3 - std_dev_latency_ms: 0.011269427669584647 - type: object - magicTransitTargets: - example: - - 203.0.113.1 - - cloudflare.com - items: - description: Hosts as a hostname or IPv4/IPv6 address represented by strings. - example: 203.0.113.1 - type: string - maxLength: 10 - type: array - magicTransitTracerouteResponseCollection: - properties: - errors: - $ref: '#/components/schemas/magicTransitMessages' - messages: - $ref: '#/components/schemas/magicTransitMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - items: - $ref: '#/components/schemas/magicTransitTargetResult' - type: array - required: - - success - - errors - - messages - type: object - magicTransitTracerouteTimeMs: - description: Total time of traceroute in ms. - type: integer - magicTransitUuid: - description: UUID. - example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 - maxLength: 36 - type: string - magicTransitWaitTime: - default: 1 - description: Set the time (in seconds) to wait for a response to a probe. - maximum: 5 - minimum: 1 - type: integer - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - endpoint_healthchecks: - id: cloudflare.diagnostics.endpoint_healthchecks - name: endpoint_healthchecks - title: Endpoint Healthchecks - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1diagnostics~1endpoint-healthchecks/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1diagnostics~1endpoint-healthchecks/post - response: - mediaType: application/json - openAPIDocKey: '201' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1diagnostics~1endpoint-healthchecks~1{id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1diagnostics~1endpoint-healthchecks~1{id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1diagnostics~1endpoint-healthchecks~1{id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/endpoint_healthchecks/methods/get' - - $ref: >- - #/components/x-stackQL-resources/endpoint_healthchecks/methods/list - insert: - - $ref: >- - #/components/x-stackQL-resources/endpoint_healthchecks/methods/create - update: [] - delete: - - $ref: >- - #/components/x-stackQL-resources/endpoint_healthchecks/methods/delete - replace: - - $ref: >- - #/components/x-stackQL-resources/endpoint_healthchecks/methods/update - diagnostics: - id: cloudflare.diagnostics.diagnostics - name: diagnostics - title: Diagnostics - methods: - create_traceroute: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1diagnostics~1traceroute/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: diagnostics API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/diagnostics/endpoint-healthchecks: + get: + description: List Endpoint Health Checks. + operationId: diagnostics-endpoint-healthcheck-list + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/magicTransitEndpointHealthCheckResponseSingle' + description: Endpoint Health Checks for account. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/magicTransitApiResponseCommonFailure' + description: Endpoint Health Check response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Endpoint Health Checks + tags: + - Endpoint Health Checks + x-api-token-group: + - Magic Transit Write + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: diagnostics + resource_chain: + - endpoint_healthchecks + method: list + post: + description: Create Endpoint Health Check. + operationId: diagnostics-endpoint-healthcheck-create + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/magicTransitEndpointHealthCheck' + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/magicTransitEndpointHealthCheckResponseSingle' + description: Endpoint Health Check response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/magicTransitApiResponseCommonFailure' + description: Endpoint Health Check response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Endpoint Health Check + tags: + - Endpoint Health Checks + x-api-token-group: + - Magic Transit Write + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: diagnostics + resource_chain: + - endpoint_healthchecks + method: create + /accounts/{account_id}/diagnostics/endpoint-healthchecks/{id}: + delete: + description: Delete Endpoint Health Check. + operationId: diagnostics-endpoint-healthcheck-delete + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/magicTransitApiResponseCommon' + description: Endpoint Health Checks response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/magicTransitApiResponseCommonFailure' + description: Endpoint Health Check failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Endpoint Health Check + tags: + - Endpoint Health Checks + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: diagnostics + resource_chain: + - endpoint_healthchecks + method: delete + get: + description: Get a single Endpoint Health Check. + operationId: diagnostics-endpoint-healthcheck-get + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/magicTransitEndpointHealthCheckResponseSingle' + description: Endpoint Health Checks response. + 4XX: + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/magicTransitMessages' + messages: + $ref: '#/components/schemas/magicTransitMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + items: + $ref: '#/components/schemas/magicTransitTargetResult' + type: array + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + type: object + description: Endpoint Health Check failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Endpoint Health Check + tags: + - Endpoint Health Checks + x-api-token-group: + - Magic Transit Write + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: diagnostics + resource_chain: + - endpoint_healthchecks + method: get + put: + description: Update a Endpoint Health Check. + operationId: diagnostics-endpoint-healthcheck-update + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: id + in: path + required: true + description: Resource ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/magicTransitEndpointHealthCheck' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/magicTransitEndpointHealthCheckResponseSingle' + description: Endpoint Health Checks response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/magicTransitApiResponseCommonFailure' + description: Endpoint Health Check failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Endpoint Health Check + tags: + - Endpoint Health Checks + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: diagnostics + resource_chain: + - endpoint_healthchecks + method: update + /accounts/{account_id}/diagnostics/traceroute: + post: + description: Run traceroutes from Cloudflare colos. + operationId: diagnostics-traceroute + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + colos: + $ref: '#/components/schemas/magicTransitColos' + options: + $ref: '#/components/schemas/magicTransitOptions' + targets: + $ref: '#/components/schemas/magicTransitTargets' + required: + - targets + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/magicTransitTracerouteResponseCollection' + description: Traceroute response. + 4XX: + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/magicTransitMessages' + messages: + $ref: '#/components/schemas/magicTransitMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + items: + $ref: '#/components/schemas/magicTransitTargetResult' + type: array + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + type: object + description: Traceroute response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Traceroute + tags: + - Diagnostics + x-api-token-group: + - Magic Transit Write + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false +components: + schemas: + magicTransitApiResponseCommon: + properties: + errors: + $ref: '#/components/schemas/magicTransitMessages' + messages: + $ref: '#/components/schemas/magicTransitMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + type: object + magicTransitApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/magicTransitMessages' + messages: + example: [] + $ref: '#/components/schemas/magicTransitMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + magicTransitAsn: + description: AS number associated with the node object. + type: string + magicTransitCheckType: + default: icmp + description: type of check to perform + enum: + - icmp + example: icmp + type: string + magicTransitColo: + properties: + city: + $ref: '#/components/schemas/magicTransitColoCity' + name: + $ref: '#/components/schemas/magicTransitColoName' + type: object + magicTransitColoCity: + description: Source colo city. + example: Denver, CO, US + type: string + magicTransitColoName: + description: Source colo name. + example: den01 + type: string + magicTransitColoResult: + properties: + colo: + $ref: '#/components/schemas/magicTransitColo' + error: + $ref: '#/components/schemas/magicTransitError' + hops: + items: + $ref: '#/components/schemas/magicTransitHopResult' + type: array + target_summary: + $ref: '#/components/schemas/magicTransitTargetSummary' + traceroute_time_ms: + $ref: '#/components/schemas/magicTransitTracerouteTimeMs' + type: object + magicTransitColos: + description: If no source colo names specified, all colos will be used. China colos are unavailable for traceroutes. + example: + - den + - sin + items: + description: Source colo name. + type: string + type: array + magicTransitEndpointHealthCheck: + properties: + check_type: + $ref: '#/components/schemas/magicTransitCheckType' + endpoint: + description: the IP address of the host to perform checks against + example: 203.0.113.1 + type: string + name: + description: Optional name associated with this check + example: My Endpoint + type: string + required: + - check_type + - endpoint + type: object + magicTransitEndpointHealthCheckResponse: + required: + - check_type + - endpoint + type: object + properties: + check_type: + $ref: '#/components/schemas/magicTransitCheckType' + endpoint: + description: the IP address of the host to perform checks against + example: 203.0.113.1 + type: string + name: + description: Optional name associated with this check + example: My Endpoint + type: string + id: + $ref: '#/components/schemas/magicTransitUuid' + magicTransitEndpointHealthCheckResponseSingle: + properties: + errors: + $ref: '#/components/schemas/magicTransitMessages' + messages: + $ref: '#/components/schemas/magicTransitMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/magicTransitEndpointHealthCheckResponse' + required: + - success + - errors + - messages + type: object + magicTransitError: + description: Errors resulting from collecting traceroute from colo to target. + enum: + - '' + - 'Could not gather traceroute data: Code 1' + - 'Could not gather traceroute data: Code 2' + - 'Could not gather traceroute data: Code 3' + - 'Could not gather traceroute data: Code 4' + example: '' + type: string + magicTransitHopResult: + properties: + nodes: + description: An array of node objects. + items: + $ref: '#/components/schemas/magicTransitNodeResult' + type: array + packets_lost: + $ref: '#/components/schemas/magicTransitPacketsLost' + packets_sent: + $ref: '#/components/schemas/magicTransitPacketsSent' + packets_ttl: + $ref: '#/components/schemas/magicTransitPacketsTtl' + type: object + magicTransitIp: + description: IP address of the node. + type: string + magicTransitLabels: + description: Field appears if there is an additional annotation printed when the probe returns. Field also appears when running a GRE+ICMP traceroute to denote which traceroute a node comes from. + items: + type: string + type: array + magicTransitMaxRttMs: + description: Maximum RTT in ms. + type: number + magicTransitMaxTtl: + default: 15 + description: Max TTL. + maximum: 64 + minimum: 0 + type: integer + magicTransitMeanRttMs: + description: Mean RTT in ms. + type: number + magicTransitMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + magicTransitMinRttMs: + description: Minimum RTT in ms. + type: number + magicTransitName: + description: Host name of the address, this may be the same as the IP address. + type: string + magicTransitNodeResult: + example: + asn: AS13335 + ip: 1.1.1.1 + max_latency_ms: 0.034 + mean_latency_ms: 0.021 + min_latency_ms: 0.014 + name: one.one.one.one + packet_count: 3 + std_dev_latency_ms: 0.011269427669584647 + properties: + asn: + $ref: '#/components/schemas/magicTransitAsn' + ip: + $ref: '#/components/schemas/magicTransitIp' + labels: + $ref: '#/components/schemas/magicTransitLabels' + max_rtt_ms: + $ref: '#/components/schemas/magicTransitMaxRttMs' + mean_rtt_ms: + $ref: '#/components/schemas/magicTransitMeanRttMs' + min_rtt_ms: + $ref: '#/components/schemas/magicTransitMinRttMs' + name: + $ref: '#/components/schemas/magicTransitName' + packet_count: + $ref: '#/components/schemas/magicTransitPacketCount' + std_dev_rtt_ms: + $ref: '#/components/schemas/magicTransitStdDevRttMs' + type: object + magicTransitOptions: + example: + max_ttl: 15 + packet_type: icmp + properties: + max_ttl: + $ref: '#/components/schemas/magicTransitMaxTtl' + packet_type: + $ref: '#/components/schemas/magicTransitPacketType' + packets_per_ttl: + $ref: '#/components/schemas/magicTransitPacketsPerTtl' + port: + $ref: '#/components/schemas/magicTransitPort' + wait_time: + $ref: '#/components/schemas/magicTransitWaitTime' + type: object + magicTransitPacketCount: + description: Number of packets with a response from this node. + type: integer + magicTransitPacketType: + default: icmp + description: Type of packet sent. + enum: + - icmp + - tcp + - udp + - gre + - gre+icmp + example: icmp + type: string + magicTransitPacketsLost: + description: Number of packets where no response was received. + type: integer + magicTransitPacketsPerTtl: + default: 3 + description: Number of packets sent at each TTL. + maximum: 10 + minimum: 0 + type: integer + magicTransitPacketsSent: + description: Number of packets sent with specified TTL. + type: integer + magicTransitPacketsTtl: + description: The time to live (TTL). + type: integer + magicTransitPort: + default: 0 + description: For UDP and TCP, specifies the destination port. For ICMP, specifies the initial ICMP sequence value. Default value 0 will choose the best value to use for each protocol. + maximum: 65535 + minimum: 0 + type: integer + magicTransitStdDevRttMs: + description: Standard deviation of the RTTs in ms. + type: number + magicTransitTarget: + description: The target hostname, IPv6, or IPv6 address. + example: 1.1.1.1 + type: string + magicTransitTargetResult: + properties: + colos: + items: + $ref: '#/components/schemas/magicTransitColoResult' + type: array + target: + $ref: '#/components/schemas/magicTransitTarget' + type: object + magicTransitTargetSummary: + description: Aggregated statistics from all hops about the target. + example: + asn: '' + ip: 1.1.1.1 + max_latency_ms: 0.034 + mean_latency_ms: 0.021 + min_latency_ms: 0.014 + name: 1.1.1.1 + packet_count: 3 + std_dev_latency_ms: 0.011269427669584647 + type: object + magicTransitTargets: + example: + - 203.0.113.1 + - cloudflare.com + items: + description: Hosts as a hostname or IPv4/IPv6 address represented by strings. + example: 203.0.113.1 + type: string + maxLength: 10 + type: array + magicTransitTracerouteResponseCollection: + properties: + errors: + $ref: '#/components/schemas/magicTransitMessages' + messages: + $ref: '#/components/schemas/magicTransitMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + items: + $ref: '#/components/schemas/magicTransitTargetResult' + type: array + required: + - success + - errors + - messages + type: object + magicTransitTracerouteTimeMs: + description: Total time of traceroute in ms. + type: integer + magicTransitUuid: + description: UUID. + example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 + maxLength: 36 + type: string + magicTransitWaitTime: + default: 1 + description: Set the time (in seconds) to wait for a response to a probe. + maximum: 5 + minimum: 1 + type: integer + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + endpoint_healthchecks: + id: cloudflare.diagnostics.endpoint_healthchecks + name: endpoint_healthchecks + title: Endpoint Healthchecks + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1diagnostics~1endpoint-healthchecks/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1diagnostics~1endpoint-healthchecks/post' + response: + mediaType: application/json + openAPIDocKey: '201' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1diagnostics~1endpoint-healthchecks~1{id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1diagnostics~1endpoint-healthchecks~1{id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1diagnostics~1endpoint-healthchecks~1{id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/endpoint_healthchecks/methods/get' + - $ref: '#/components/x-stackQL-resources/endpoint_healthchecks/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/endpoint_healthchecks/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/endpoint_healthchecks/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/endpoint_healthchecks/methods/update' + diagnostics: + id: cloudflare.diagnostics.diagnostics + name: diagnostics + title: Diagnostics + methods: + create_traceroute: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1diagnostics~1traceroute/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .colos }}{{ $sep }}"colos": {{ if eq (kindOf .colos) "string" }}{{ .colos }}{{ else }}{{ toJson .colos }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .options }}{{ $sep }}"options": {{ if eq (kindOf .options) "string" }}{{ .options }}{{ else }}{{ toJson .options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .targets }}{{ $sep }}"targets": {{ if eq (kindOf .targets) "string" }}{{ .targets }}{{ else }}{{ toJson .targets }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/dns.yaml b/providers/src/cloudflare/v00.00.00000/services/dns.yaml index 93d99b0b..08b395d4 100644 --- a/providers/src/cloudflare/v00.00.00000/services/dns.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/dns.yaml @@ -1040,7 +1040,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/secondaryDnsAcl' + properties: + id: + $ref: '#/components/schemas/secondaryDnsComponentsSchemasIdentifier' + ip_range: + $ref: '#/components/schemas/secondaryDnsIpRange' + name: + $ref: '#/components/schemas/secondaryDnsAclComponentsSchemasName' + required: + - name + - ip_range + type: object responses: '200': content: @@ -1470,7 +1480,22 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/secondaryDnsPeer' + properties: + id: + $ref: '#/components/schemas/secondaryDnsComponentsSchemasIdentifier' + ip: + $ref: '#/components/schemas/secondaryDnsIp' + ixfr_enable: + $ref: '#/components/schemas/secondaryDnsIxfrEnable' + name: + $ref: '#/components/schemas/secondaryDnsComponentsSchemasName' + port: + $ref: '#/components/schemas/secondaryDnsPort' + tsig_id: + $ref: '#/components/schemas/secondaryDnsTsigId' + required: + - name + type: object responses: '200': content: @@ -1645,7 +1670,20 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/secondaryDnsTsig' + properties: + algo: + $ref: '#/components/schemas/secondaryDnsAlgo' + id: + $ref: '#/components/schemas/secondaryDnsSchemasIdentifier' + name: + $ref: '#/components/schemas/secondaryDnsSchemasName' + secret: + $ref: '#/components/schemas/secondaryDnsSecret' + required: + - name + - secret + - algo + type: object responses: '200': content: @@ -1896,7 +1934,20 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/secondaryDnsTsig' + properties: + algo: + $ref: '#/components/schemas/secondaryDnsAlgo' + id: + $ref: '#/components/schemas/secondaryDnsSchemasIdentifier' + name: + $ref: '#/components/schemas/secondaryDnsSchemasName' + secret: + $ref: '#/components/schemas/secondaryDnsSecret' + required: + - name + - secret + - algo + type: object responses: '200': content: @@ -4532,7 +4583,20 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/secondaryDnsDnsSecondarySecondaryZone' + properties: + auto_refresh_seconds: + $ref: '#/components/schemas/secondaryDnsAutoRefreshSeconds' + id: + $ref: '#/components/schemas/secondaryDnsIdentifier' + name: + $ref: '#/components/schemas/secondaryDnsName' + peers: + $ref: '#/components/schemas/secondaryDnsPeers' + required: + - name + - peers + - auto_refresh_seconds + type: object responses: '200': content: @@ -4603,7 +4667,20 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/secondaryDnsDnsSecondarySecondaryZone' + properties: + auto_refresh_seconds: + $ref: '#/components/schemas/secondaryDnsAutoRefreshSeconds' + id: + $ref: '#/components/schemas/secondaryDnsIdentifier' + name: + $ref: '#/components/schemas/secondaryDnsName' + peers: + $ref: '#/components/schemas/secondaryDnsPeers' + required: + - name + - peers + - auto_refresh_seconds + type: object responses: '200': content: @@ -4814,7 +4891,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/secondaryDnsSingleRequestOutgoing' + properties: + id: + $ref: '#/components/schemas/secondaryDnsIdentifier' + name: + $ref: '#/components/schemas/secondaryDnsName' + peers: + $ref: '#/components/schemas/secondaryDnsPeers' + required: + - name + - peers + type: object responses: '200': content: @@ -4885,7 +4972,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/secondaryDnsSingleRequestOutgoing' + properties: + id: + $ref: '#/components/schemas/secondaryDnsIdentifier' + name: + $ref: '#/components/schemas/secondaryDnsName' + peers: + $ref: '#/components/schemas/secondaryDnsPeers' + required: + - name + - peers + type: object responses: '200': content: @@ -7705,22 +7802,6 @@ components: example: Disabled type: string x-auditable: true - secondaryDnsDnsSecondarySecondaryZone: - properties: - auto_refresh_seconds: - $ref: '#/components/schemas/secondaryDnsAutoRefreshSeconds' - id: - $ref: '#/components/schemas/secondaryDnsIdentifier' - name: - $ref: '#/components/schemas/secondaryDnsName' - peers: - $ref: '#/components/schemas/secondaryDnsPeers' - required: - - id - - name - - peers - - auto_refresh_seconds - type: object secondaryDnsEnableTransferResponse: type: object properties: @@ -8038,19 +8119,6 @@ components: example: caf79a7804b04337c9c66ccd7bef9190a1e1679b5dd03d8aa10f7ad45e1a9dab92b417896c15d4d007c7c14194538d2a5d0feffdecc5a7f0e1c570cfa700837c type: string x-sensitive: true - secondaryDnsSingleRequestOutgoing: - properties: - id: - $ref: '#/components/schemas/secondaryDnsIdentifier' - name: - $ref: '#/components/schemas/secondaryDnsName' - peers: - $ref: '#/components/schemas/secondaryDnsPeers' - required: - - id - - name - - peers - type: object secondaryDnsSingleResponse: type: object properties: @@ -8253,6 +8321,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .enforce_dns_only }}{{ $sep }}"enforce_dns_only": {{ toJson .enforce_dns_only }}{{- $sep = "," -}}{{ end }} + + {{- if .zone_defaults }}{{ $sep }}"zone_defaults": {{ if eq (kindOf .zone_defaults) "string" }}{{ .zone_defaults }}{{ else }}{{ toJson .zone_defaults }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/account/methods/list' @@ -8536,6 +8619,39 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .comment }}{{ $sep }}"comment": {{ toJson .comment }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .proxied }}{{ $sep }}"proxied": {{ toJson .proxied }}{{- $sep = "," -}}{{ end }} + + {{- if .settings }}{{ $sep }}"settings": {{ if eq (kindOf .settings) "string" }}{{ .settings }}{{ else }}{{ toJson .settings }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tags }}{{ $sep }}"tags": {{ if eq (kindOf .tags) "string" }}{{ .tags }}{{ else }}{{ toJson .tags }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ttl }}{{ $sep }}"ttl": {{ toJson .ttl }}{{- $sep = "," -}}{{ end }} + + {{- if .content }}{{ $sep }}"content": {{ toJson .content }}{{- $sep = "," -}}{{ end }} + + {{- if .private_routing }}{{ $sep }}"private_routing": {{ toJson .private_routing }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + {{- if .priority }}{{ $sep }}"priority": {{ toJson .priority }}{{- $sep = "," -}}{{ end }} + + {{- if .data }}{{ $sep }}"data": {{ if eq (kindOf .data) "string" }}{{ .data }}{{ else }}{{ toJson .data }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/zones_dns_records/methods/list' @@ -8558,6 +8674,25 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .deletes }}{{ $sep }}"deletes": {{ if eq (kindOf .deletes) "string" }}{{ .deletes }}{{ else }}{{ toJson .deletes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .patches }}{{ $sep }}"patches": {{ if eq (kindOf .patches) "string" }}{{ .patches }}{{ else }}{{ toJson .patches }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .posts }}{{ $sep }}"posts": {{ if eq (kindOf .posts) "string" }}{{ .posts }}{{ else }}{{ toJson .posts }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .puts }}{{ $sep }}"puts": {{ if eq (kindOf .puts) "string" }}{{ .puts }}{{ else }}{{ toJson .puts }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' list: operation: $ref: '#/paths/~1zones~1{zone_id}~1dns_records~1export/get' @@ -8614,6 +8749,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .accepts }}{{ $sep }}"accepts": {{ if eq (kindOf .accepts) "string" }}{{ .accepts }}{{ else }}{{ toJson .accepts }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .rejects }}{{ $sep }}"rejects": {{ if eq (kindOf .rejects) "string" }}{{ .rejects }}{{ else }}{{ toJson .rejects }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/scan_review/methods/list' @@ -8658,6 +8808,39 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .comment }}{{ $sep }}"comment": {{ toJson .comment }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .proxied }}{{ $sep }}"proxied": {{ toJson .proxied }}{{- $sep = "," -}}{{ end }} + + {{- if .settings }}{{ $sep }}"settings": {{ if eq (kindOf .settings) "string" }}{{ .settings }}{{ else }}{{ toJson .settings }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tags }}{{ $sep }}"tags": {{ if eq (kindOf .tags) "string" }}{{ .tags }}{{ else }}{{ toJson .tags }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ttl }}{{ $sep }}"ttl": {{ toJson .ttl }}{{- $sep = "," -}}{{ end }} + + {{- if .content }}{{ $sep }}"content": {{ toJson .content }}{{- $sep = "," -}}{{ end }} + + {{- if .private_routing }}{{ $sep }}"private_routing": {{ toJson .private_routing }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + {{- if .priority }}{{ $sep }}"priority": {{ toJson .priority }}{{- $sep = "," -}}{{ end }} + + {{- if .data }}{{ $sep }}"data": {{ if eq (kindOf .data) "string" }}{{ .data }}{{ else }}{{ toJson .data }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' update: config: requestBodyTranslate: @@ -8667,6 +8850,39 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .comment }}{{ $sep }}"comment": {{ toJson .comment }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .proxied }}{{ $sep }}"proxied": {{ toJson .proxied }}{{- $sep = "," -}}{{ end }} + + {{- if .settings }}{{ $sep }}"settings": {{ if eq (kindOf .settings) "string" }}{{ .settings }}{{ else }}{{ toJson .settings }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tags }}{{ $sep }}"tags": {{ if eq (kindOf .tags) "string" }}{{ .tags }}{{ else }}{{ toJson .tags }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ttl }}{{ $sep }}"ttl": {{ toJson .ttl }}{{- $sep = "," -}}{{ end }} + + {{- if .content }}{{ $sep }}"content": {{ toJson .content }}{{- $sep = "," -}}{{ end }} + + {{- if .private_routing }}{{ $sep }}"private_routing": {{ toJson .private_routing }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + {{- if .priority }}{{ $sep }}"priority": {{ toJson .priority }}{{- $sep = "," -}}{{ end }} + + {{- if .data }}{{ $sep }}"data": {{ if eq (kindOf .data) "string" }}{{ .data }}{{ else }}{{ toJson .data }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/records/methods/get' @@ -8698,6 +8914,35 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .flatten_all_cnames }}{{ $sep }}"flatten_all_cnames": {{ toJson .flatten_all_cnames }}{{- $sep = "," -}}{{ end }} + + {{- if .foundation_dns }}{{ $sep }}"foundation_dns": {{ toJson .foundation_dns }}{{- $sep = "," -}}{{ end }} + + {{- if .internal_dns }}{{ $sep }}"internal_dns": {{ if eq (kindOf .internal_dns) "string" }}{{ .internal_dns }}{{ else }}{{ toJson .internal_dns }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .multi_provider }}{{ $sep }}"multi_provider": {{ toJson .multi_provider }}{{- $sep = "," -}}{{ end }} + + {{- if .ns_ttl }}{{ $sep }}"ns_ttl": {{ toJson .ns_ttl }}{{- $sep = "," -}}{{ end }} + + {{- if .secondary_overrides }}{{ $sep }}"secondary_overrides": {{ toJson .secondary_overrides }}{{- $sep = "," -}}{{ end }} + + {{- if .soa }}{{ $sep }}"soa": {{ if eq (kindOf .soa) "string" }}{{ .soa }}{{ else }}{{ toJson .soa }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .zone_mode }}{{ $sep }}"zone_mode": {{ toJson .zone_mode }}{{- $sep = "," -}}{{ end }} + + {{- if .nameservers }}{{ $sep }}"nameservers": {{ if eq (kindOf .nameservers) "string" }}{{ .nameservers }}{{ else }}{{ toJson .nameservers }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/zone/methods/list' @@ -8784,6 +9029,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .peers }}{{ $sep }}"peers": {{ if eq (kindOf .peers) "string" }}{{ .peers }}{{ else }}{{ toJson .peers }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: [] insert: [] @@ -8817,6 +9077,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .auto_refresh_seconds }}{{ $sep }}"auto_refresh_seconds": {{ toJson .auto_refresh_seconds }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .peers }}{{ $sep }}"peers": {{ if eq (kindOf .peers) "string" }}{{ .peers }}{{ else }}{{ toJson .peers }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' update: config: requestBodyTranslate: @@ -8826,6 +9103,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .auto_refresh_seconds }}{{ $sep }}"auto_refresh_seconds": {{ toJson .auto_refresh_seconds }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .peers }}{{ $sep }}"peers": {{ if eq (kindOf .peers) "string" }}{{ .peers }}{{ else }}{{ toJson .peers }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/incoming/methods/list' @@ -8863,6 +9157,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .peers }}{{ $sep }}"peers": {{ if eq (kindOf .peers) "string" }}{{ .peers }}{{ else }}{{ toJson .peers }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' disable: config: requestBodyTranslate: diff --git a/providers/src/cloudflare/v00.00.00000/services/email_routing.yaml b/providers/src/cloudflare/v00.00.00000/services/email_routing.yaml index c38936bb..a8002b77 100644 --- a/providers/src/cloudflare/v00.00.00000/services/email_routing.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/email_routing.yaml @@ -1,2190 +1,2165 @@ -openapi: 3.0.3 -info: - title: email_routing API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/email/routing/addresses: - get: - description: Lists existing destination addresses. - operationId: email-routing-destination-addresses-list-destination-addresses - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: page - schema: - default: 1 - description: Page number of paginated results. - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 20 - description: Maximum number of results per page. - maximum: 50 - minimum: 5 - type: number - - in: query - name: direction - schema: - default: asc - description: Sorts results in an ascending or descending order. - enum: - - asc - - desc - type: string - - in: query - name: verified - schema: - default: true - description: Filter by verified destination addresses. - enum: - - true - - false - type: boolean - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/emailDestinationAddressesResponseCollection - description: List destination addresses response - security: - - api_email: [] - api_key: [] - summary: List destination addresses - tags: - - Email Routing destination addresses - x-api-token-group: - - Email Routing Addresses Write - - Email Routing Addresses Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.email.routing.address.list - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: email_routing - resource_chain: - - addresses - method: list - post: - description: >- - Create a destination address to forward your emails to. Destination - addresses need to be verified before they can be used. - operationId: email-routing-destination-addresses-create-a-destination-address - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/emailCreateDestinationAddressProperties' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/emailDestinationAddressResponseSingle' - description: Create a destination address response - security: - - api_email: [] - api_key: [] - summary: Create a destination address - tags: - - Email Routing destination addresses - x-api-token-group: - - Email Routing Addresses Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.email.routing.address.create - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: email_routing - resource_chain: - - addresses - method: create - /accounts/{account_id}/email/routing/addresses/{destination_address_identifier}: - delete: - description: Deletes a specific destination address. - operationId: email-routing-destination-addresses-delete-destination-address - parameters: - - in: path - name: destination_address_identifier - schema: - $ref: '#/components/schemas/emailDestinationAddressIdentifier' - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/emailDestinationAddressResponseSingle' - description: Delete destination address response - security: - - api_email: [] - api_key: [] - summary: Delete destination address - tags: - - Email Routing destination addresses - x-api-token-group: - - Email Routing Addresses Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.email.routing.address.delete - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: email_routing - resource_chain: - - addresses - method: delete - get: - description: Gets information for a specific destination email already created. - operationId: email-routing-destination-addresses-get-a-destination-address - parameters: - - in: path - name: destination_address_identifier - schema: - $ref: '#/components/schemas/emailDestinationAddressIdentifier' - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/emailDestinationAddressResponseSingle' - description: Get a destination address response - security: - - api_email: [] - api_key: [] - summary: Get a destination address - tags: - - Email Routing destination addresses - x-api-token-group: - - Email Routing Addresses Write - - Email Routing Addresses Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.email.routing.address.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: email_routing - resource_chain: - - addresses - method: get - /zones/{zone_id}/email/routing: - get: - description: Get information about the settings for your Email Routing zone. - operationId: email-routing-settings-get-email-routing-settings - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/emailEmailSettingsResponseSingle' - description: Get Email Routing settings response - security: - - api_email: [] - api_key: [] - summary: Get Email Routing settings - tags: - - Email Routing settings - x-api-token-group: - - Zone Settings Write - - Zone Settings Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.zone.email.routing.config.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: email_routing - resource_chain: [] - method: get - /zones/{zone_id}/email/routing/disable: - post: - deprecated: true - description: >- - Disable your Email Routing zone. Also removes additional MX records - previously required for Email Routing to work. - operationId: email-routing-settings-disable-email-routing - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: {} - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/emailEmailSettingsResponseSingle' - description: Disable Email Routing response - security: - - api_email: [] - api_key: [] - summary: Disable Email Routing - tags: - - Email Routing settings - x-api-token-group: - - Zone Settings Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.zone.email.routing.config.update - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: email_routing - resource_chain: [] - method: disable - /zones/{zone_id}/email/routing/dns: - delete: - description: >- - Disable your Email Routing zone. Also removes additional MX records - previously required for Email Routing to work. - operationId: email-routing-settings-disable-email-routing-dns - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailMessages' - messages: - $ref: '#/components/schemas/emailMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: '#/components/schemas/emailDnsRecord' - type: array - required: - - errors - - success - - messages - description: Disable Email Routing response - security: - - api_email: [] - api_key: [] - summary: Disable Email Routing - tags: - - Email Routing settings - x-api-token-group: - - Zone Settings Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - get: - description: Show the DNS records needed to configure your Email Routing zone. - operationId: email-routing-settings-email-routing-dns-settings - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: query - name: subdomain - schema: - $ref: '#/components/schemas/emailEmailSettingName' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailMessages' - messages: - $ref: '#/components/schemas/emailMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - properties: - errors: - $ref: >- - #/components/schemas/emailEmailRoutingGetResponseDnsErrors - record: - items: - $ref: '#/components/schemas/emailDnsRecord' - type: array - type: object - required: - - errors - - messages - - success - description: Email Routing - DNS settings response - security: - - api_email: [] - api_key: [] - summary: Email Routing - DNS settings - tags: - - Email Routing settings - x-api-token-group: - - Zone Settings Write - - Zone Settings Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.zone.email.routing.config.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: email_routing - resource_chain: - - dns - method: delete - patch: - description: Unlock MX Records previously locked by Email Routing. - operationId: email-routing-settings-unlock-email-routing-dns - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/emailEmailSettingDnsRequestBody' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/emailEmailSettingsResponseSingle' - description: Unlock Email Routing MX records - security: - - api_email: [] - api_key: [] - summary: Unlock Email Routing - tags: - - Email Routing settings - x-api-token-group: - - Zone Settings Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.zone.email.routing.config.update - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: email_routing - resource_chain: - - dns - method: edit - post: - description: >- - Enable you Email Routing zone. Add and lock the necessary MX and SPF - records. - operationId: email-routing-settings-enable-email-routing-dns - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/emailEmailSettingDnsRequestBody' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/emailEmailSettingsResponseSingle' - description: Enable Email Routing response - security: - - api_email: [] - api_key: [] - summary: Enable Email Routing - tags: - - Email Routing settings - x-api-token-group: - - Zone Settings Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.zone.email.routing.config.update - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: email_routing - resource_chain: - - dns - method: create - /zones/{zone_id}/email/routing/enable: - post: - deprecated: true - description: >- - Enable you Email Routing zone. Add and lock the necessary MX and SPF - records. - operationId: email-routing-settings-enable-email-routing - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: {} - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/emailEmailSettingsResponseSingle' - description: Enable Email Routing response - security: - - api_email: [] - api_key: [] - summary: Enable Email Routing - tags: - - Email Routing settings - x-api-token-group: - - Zone Settings Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.zone.email.routing.config.update - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: email_routing - resource_chain: [] - method: enable - /zones/{zone_id}/email/routing/rules: - get: - description: Lists existing routing rules. - operationId: email-routing-routing-rules-list-routing-rules - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: query - name: page - schema: - default: 1 - description: Page number of paginated results. - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 20 - description: Maximum number of results per page. - maximum: 50 - minimum: 5 - type: number - - in: query - name: enabled - schema: - description: Filter by enabled routing rules. - enum: - - true - - false - type: boolean - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/emailRulesResponseCollection' - description: List routing rules response - security: - - api_email: [] - api_key: [] - summary: List routing rules - tags: - - Email Routing routing rules - x-api-token-group: - - Email Routing Rules Write - - Email Routing Rules Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.zone.email.routing.rule.list - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: email_routing - resource_chain: - - rules - method: list - post: - description: >- - Rules consist of a set of criteria for matching emails (such as an email - being sent to a specific custom email address) plus a set of actions to - take on the email (like forwarding it to a specific destination - address). Forward actions require all destination addresses to be - verified. - operationId: email-routing-routing-rules-create-routing-rule - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/emailCreateRuleProperties' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/emailRuleResponseSingle' - description: Create routing rule response - '400': - description: >- - Error 2054: Destination address is not verified. All forward action - destination addresses must be verified before they can be used in - rules. - security: - - api_email: [] - api_key: [] - summary: Create routing rule - tags: - - Email Routing routing rules - x-api-token-group: - - Email Routing Rules Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.zone.email.routing.rule.create - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: email_routing - resource_chain: - - rules - method: create - /zones/{zone_id}/email/routing/rules/catch_all: - get: - description: Get information on the default catch-all routing rule. - operationId: email-routing-routing-rules-get-catch-all-rule - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/emailCatchAllRuleResponseSingle' - description: Get catch-all rule response - security: - - api_email: [] - api_key: [] - summary: Get catch-all rule - tags: - - Email Routing routing rules - x-api-token-group: - - Email Routing Rules Write - - Email Routing Rules Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.zone.email.routing.rule.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: email_routing - resource_chain: - - rules - - catch_alls - method: get - put: - description: >- - Enable or disable catch-all routing rule, or change action to forward to - specific destination address. Forward actions require all destination - addresses to be verified. - operationId: email-routing-routing-rules-update-catch-all-rule - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/emailUpdateCatchAllRuleProperties' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/emailCatchAllRuleResponseSingle' - description: Update catch-all rule response - '400': - description: >- - Error 2054: Destination address is not verified. All forward action - destination addresses must be verified before they can be used in - rules. - security: - - api_email: [] - api_key: [] - summary: Update catch-all rule - tags: - - Email Routing routing rules - x-api-token-group: - - Email Routing Rules Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.zone.email.routing.rule.update - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: email_routing - resource_chain: - - rules - - catch_alls - method: update - /zones/{zone_id}/email/routing/rules/{rule_identifier}: - delete: - description: Delete a specific routing rule. - operationId: email-routing-routing-rules-delete-routing-rule - parameters: - - in: path - name: rule_identifier - schema: - $ref: '#/components/schemas/emailRuleIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/emailRuleResponseSingle' - description: Delete routing rule response - security: - - api_email: [] - api_key: [] - summary: Delete routing rule - tags: - - Email Routing routing rules - x-api-token-group: - - Email Routing Rules Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.zone.email.routing.rule.delete - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: email_routing - resource_chain: - - rules - method: delete - get: - description: Get information for a specific routing rule already created. - operationId: email-routing-routing-rules-get-routing-rule - parameters: - - in: path - name: rule_identifier - schema: - $ref: '#/components/schemas/emailRuleIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/emailRuleResponseSingle' - description: Get routing rule response - security: - - api_email: [] - api_key: [] - summary: Get routing rule - tags: - - Email Routing routing rules - x-api-token-group: - - Email Routing Rules Write - - Email Routing Rules Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.zone.email.routing.rule.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: email_routing - resource_chain: - - rules - method: get - put: - description: >- - Update actions and matches, or enable/disable specific routing rules. - Forward actions require all destination addresses to be verified. - operationId: email-routing-routing-rules-update-routing-rule - parameters: - - in: path - name: rule_identifier - schema: - $ref: '#/components/schemas/emailRuleIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/emailUpdateRuleProperties' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/emailRuleResponseSingle' - description: Update routing rule response - '400': - description: >- - Error 2054: Destination address is not verified. All forward action - destination addresses must be verified before they can be used in - rules. - security: - - api_email: [] - api_key: [] - summary: Update routing rule - tags: - - Email Routing routing rules - x-api-token-group: - - Email Routing Rules Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.zone.email.routing.rule.update - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: email_routing - resource_chain: - - rules - method: update - /zones/{zone_id}/email/routing/suppression: - get: - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: query - name: page - schema: - default: 1 - minimum: 0 - type: integer - - in: query - name: per_page - schema: - default: 100 - maximum: 1000 - minimum: 0 - type: integer - - in: query - name: order - schema: - default: created_at - enum: - - email - - expires_at - - created_at - type: string - - in: query - name: direction - schema: - default: desc - enum: - - asc - - desc - type: string - responses: - '200': - content: - application/json: - schema: - properties: - page: - type: integer - per_page: - type: integer - result: - items: - properties: - created_at: - format: date-time - type: string - readOnly: true - email: - format: email - type: string - expires_at: - format: date-time - nullable: true - type: string - id: - format: uuid - type: string - reason: - type: string - zones: - default: [] - items: - type: string - type: array - required: - - id - - email - - reason - - created_at - - expires_at - type: object - type: array - total: - type: integer - required: - - page - - per_page - - total - - result - type: object - description: Returns suppressed emails. - '400': - content: - application/json: - schema: - properties: - errors: - items: - type: string - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Bad request. - security: - - bearerAuth: [] - summary: List account or zone email suppressions - tags: [] - operationId: get_zones_zone_id_email_routing_suppression - post: - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - email: - format: email - type: string - expires_at: - format: date-time - nullable: true - type: string - required: - - email - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - id: - format: uuid - type: string - required: - - id - type: object - required: - - result - type: object - description: Returns suppression. - '400': - content: - application/json: - schema: - properties: - errors: - items: - type: string - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Bad request. - security: - - bearerAuth: [] - summary: Create account or zone email suppression - tags: [] - operationId: post_zones_zone_id_email_routing_suppression - /zones/{zone_id}/email/routing/suppression/{suppression_id}: - get: - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: path - name: suppression_id - schema: - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - created_at: - format: date-time - type: string - readOnly: true - email: - format: email - type: string - expires_at: - format: date-time - nullable: true - type: string - id: - format: uuid - type: string - reason: - type: string - zones: - default: [] - items: - type: string - type: array - required: - - id - - email - - reason - - created_at - - expires_at - type: object - required: - - result - type: object - description: Returns suppression. - '404': - content: - application/json: - schema: - properties: - error: - type: string - success: - type: boolean - required: - - success - - error - type: object - description: Suppression not found. - security: - - bearerAuth: [] - summary: Get account or zone email suppression - tags: [] - operationId: get_zones_zone_id_email_routing_suppression_suppression_id - delete: - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: path - name: suppression_id - schema: - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - success: - type: boolean - required: - - success - type: object - description: Deletes suppression. - '404': - content: - application/json: - schema: - properties: - error: - type: string - success: - type: boolean - required: - - success - - error - type: object - description: Suppression not found. - security: - - bearerAuth: [] - summary: Delete account or zone email suppression - tags: [] - operationId: delete_zones_zone_id_email_routing_suppression_suppression_id -components: - schemas: - emailAddresses: - type: object - $ref: '#/components/schemas/emailDestinationAddressProperties' - emailCatchAllRule: - properties: - actions: - $ref: '#/components/schemas/emailRuleCatchallActions' - enabled: - $ref: '#/components/schemas/emailRuleEnabled' - id: - $ref: '#/components/schemas/emailRuleIdentifier' - matchers: - $ref: '#/components/schemas/emailRuleCatchallMatchers' - name: - $ref: '#/components/schemas/emailRuleName' - tag: - $ref: '#/components/schemas/emailRuleTag' - type: object - emailCatchAllRuleResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/emailMessages' - messages: - $ref: '#/components/schemas/emailMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/emailCatchAllRule' - required: - - success - - errors - - messages - emailCreateDestinationAddressProperties: - properties: - email: - $ref: '#/components/schemas/emailEmail' - required: - - email - type: object - emailCreateRuleProperties: - properties: - actions: - $ref: '#/components/schemas/emailRuleActions' - enabled: - $ref: '#/components/schemas/emailRuleEnabled' - matchers: - $ref: '#/components/schemas/emailRuleMatchers' - name: - $ref: '#/components/schemas/emailRuleName' - priority: - $ref: '#/components/schemas/emailRulePriority' - required: - - actions - - matchers - type: object - emailCreated: - description: The date and time the destination address has been created. - example: '2014-01-02T02:20:00Z' - format: date-time - readOnly: true - type: string - emailDestinationAddressIdentifier: - description: Destination address identifier. - example: ea95132c15732412d22c1476fa83f27a - maxLength: 32 - readOnly: true - type: string - x-auditable: true - emailDestinationAddressProperties: - properties: - created: - $ref: '#/components/schemas/emailCreated' - email: - $ref: '#/components/schemas/emailEmail' - id: - $ref: '#/components/schemas/emailDestinationAddressIdentifier' - modified: - $ref: '#/components/schemas/emailModified' - tag: - $ref: '#/components/schemas/emailDestinationAddressTag' - verified: - $ref: '#/components/schemas/emailVerified' - type: object - emailDestinationAddressResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/emailMessages' - messages: - $ref: '#/components/schemas/emailMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/emailAddresses' - required: - - success - - errors - - messages - emailDestinationAddressTag: - deprecated: true - description: >- - Destination address tag. (Deprecated, replaced by destination address - identifier) - example: ea95132c15732412d22c1476fa83f27a - maxLength: 32 - readOnly: true - type: string - emailDestinationAddressesResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/emailMessages' - messages: - $ref: '#/components/schemas/emailMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 1 - type: number - total_pages: - description: The number of total pages in the entire result set. - example: 100 - type: number - type: object - result: - items: - $ref: '#/components/schemas/emailAddresses' - type: array - required: - - success - - errors - - messages - emailDnsRecord: - description: List of records needed to enable an Email Routing zone. - properties: - content: - description: DNS record content. - example: route1.mx.cloudflare.net - type: string - name: - description: DNS record name (or @ for the zone apex). - example: example.com - maxLength: 255 - type: string - x-auditable: true - priority: - description: >- - Required for MX, SRV and URI records. Unused by other record types. - Records with lower priorities are preferred. - example: 12 - maximum: 65535 - minimum: 0 - type: number - x-auditable: true - ttl: - description: >- - Time to live, in seconds, of the DNS record. Must be between 60 and - 86400, or 1 for 'automatic'. - example: 1 - type: number - x-auditable: true - enum: - - 1 - type: - description: DNS record type. - enum: - - A - - AAAA - - CNAME - - HTTPS - - TXT - - SRV - - LOC - - MX - - NS - - CERT - - DNSKEY - - DS - - NAPTR - - SMIMEA - - SSHFP - - SVCB - - TLSA - - URI - example: NS - readOnly: true - type: string - x-auditable: true - type: object - emailEmail: - description: The contact email address of the user. - example: user@example.com - maxLength: 90 - type: string - x-auditable: true - emailEmailRoutingGetResponseDnsError: - properties: - code: - type: string - missing: - $ref: '#/components/schemas/emailDnsRecord' - type: object - emailEmailRoutingGetResponseDnsErrors: - items: - $ref: '#/components/schemas/emailEmailRoutingGetResponseDnsError' - type: array - emailEmailSettingCreated: - description: The date and time the settings have been created. - example: '2014-01-02T02:20:00Z' - format: date-time - readOnly: true - type: string - emailEmailSettingDnsRequestBody: - nullable: true - properties: - name: - $ref: '#/components/schemas/emailEmailSettingName' - type: object - emailEmailSettingEnabled: - description: State of the zone settings for Email Routing. - enum: - - true - - false - example: true - readOnly: true - type: boolean - x-auditable: true - emailEmailSettingIdentifier: - description: Email Routing settings identifier. - example: 75610dab9e69410a82cf7e400a09ecec - maxLength: 32 - readOnly: true - type: string - x-auditable: true - emailEmailSettingModified: - description: The date and time the settings have been modified. - example: '2014-01-02T02:20:00Z' - format: date-time - readOnly: true - type: string - emailEmailSettingName: - description: Domain of your zone. - example: example.net - type: string - x-auditable: true - emailEmailSettingSkipWizard: - description: Flag to check if the user skipped the configuration wizard. - enum: - - true - - false - example: true - readOnly: true - type: boolean - emailEmailSettingStatus: - description: Show the state of your account, and the type or configuration error. - enum: - - ready - - unconfigured - - misconfigured - - misconfigured/locked - - unlocked - example: ready - readOnly: true - type: string - emailEmailSettingTag: - deprecated: true - description: >- - Email Routing settings tag. (Deprecated, replaced by Email Routing - settings identifier) - example: 75610dab9e69410a82cf7e400a09ecec - maxLength: 32 - readOnly: true - type: string - emailEmailSettingsProperties: - properties: - created: - $ref: '#/components/schemas/emailEmailSettingCreated' - enabled: - $ref: '#/components/schemas/emailEmailSettingEnabled' - id: - $ref: '#/components/schemas/emailEmailSettingIdentifier' - modified: - $ref: '#/components/schemas/emailEmailSettingModified' - name: - $ref: '#/components/schemas/emailEmailSettingName' - skip_wizard: - $ref: '#/components/schemas/emailEmailSettingSkipWizard' - status: - $ref: '#/components/schemas/emailEmailSettingStatus' - tag: - $ref: '#/components/schemas/emailEmailSettingTag' - required: - - id - - name - - enabled - type: object - emailEmailSettingsResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/emailMessages' - messages: - $ref: '#/components/schemas/emailMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/emailSettings' - required: - - success - - errors - - messages - emailMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - emailModified: - description: The date and time the destination address was last modified. - example: '2014-01-02T02:20:00Z' - format: date-time - readOnly: true - type: string - emailRuleAction: - description: Actions pattern. - properties: - type: - description: Type of supported action. - enum: - - drop - - forward - - worker - example: forward - type: string - x-auditable: true - value: - items: - description: Value for action. - example: destinationaddress@example.net - maxLength: 90 - type: string - x-auditable: true - type: array - required: - - type - type: object - emailRuleActions: - description: List actions patterns. - items: - $ref: '#/components/schemas/emailRuleAction' - maxItems: 1 - minItems: 1 - type: array - emailRuleCatchallAction: - description: Action for the catch-all routing rule. - properties: - type: - description: Type of action for catch-all rule. - enum: - - drop - - forward - - worker - example: forward - type: string - x-auditable: true - value: - items: - description: Input value for action. - example: destinationaddress@example.net - maxLength: 90 - type: string - x-auditable: true - type: array - required: - - type - type: object - emailRuleCatchallActions: - description: List actions for the catch-all routing rule. - items: - $ref: '#/components/schemas/emailRuleCatchallAction' - maxItems: 1 - minItems: 1 - type: array - emailRuleCatchallMatcher: - description: Matcher for catch-all routing rule. - properties: - type: - description: Type of matcher. Default is 'all'. - enum: - - all - example: all - type: string - x-auditable: true - required: - - type - type: object - emailRuleCatchallMatchers: - description: List of matchers for the catch-all routing rule. - items: - $ref: '#/components/schemas/emailRuleCatchallMatcher' - type: array - emailRuleEnabled: - default: true - description: Routing rule status. - enum: - - true - - false - example: true - type: boolean - x-auditable: true - emailRuleIdentifier: - description: Routing rule identifier. - example: a7e6fb77503c41d8a7f3113c6918f10c - maxLength: 32 - readOnly: true - type: string - x-auditable: true - emailRuleMatcher: - description: Matching pattern to forward your actions. - properties: - field: - description: Field for type matcher. - enum: - - to - example: to - type: string - x-auditable: true - type: - description: Type of matcher. - enum: - - all - - literal - example: literal - type: string - x-auditable: true - value: - description: Value for matcher. - example: test@example.com - maxLength: 90 - type: string - x-auditable: true - required: - - type - type: object - emailRuleMatchers: - description: Matching patterns to forward to your actions. - items: - $ref: '#/components/schemas/emailRuleMatcher' - type: array - emailRuleName: - description: Routing rule name. - example: Send to user@example.net rule. - maxLength: 256 - type: string - x-auditable: true - emailRulePriority: - default: 0 - description: Priority of the routing rule. - minimum: 0 - type: number - x-auditable: true - emailRuleProperties: - properties: - actions: - $ref: '#/components/schemas/emailRuleActions' - enabled: - $ref: '#/components/schemas/emailRuleEnabled' - id: - $ref: '#/components/schemas/emailRuleIdentifier' - matchers: - $ref: '#/components/schemas/emailRuleMatchers' - name: - $ref: '#/components/schemas/emailRuleName' - priority: - $ref: '#/components/schemas/emailRulePriority' - tag: - $ref: '#/components/schemas/emailRuleTag' - type: object - emailRuleResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/emailMessages' - messages: - $ref: '#/components/schemas/emailMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/emailRules' - required: - - success - - errors - - messages - emailRuleTag: - deprecated: true - description: Routing rule tag. (Deprecated, replaced by routing rule identifier) - example: a7e6fb77503c41d8a7f3113c6918f10c - maxLength: 32 - readOnly: true - type: string - emailRules: - type: object - $ref: '#/components/schemas/emailRuleProperties' - emailRulesResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/emailMessages' - messages: - $ref: '#/components/schemas/emailMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 1 - type: number - total_pages: - description: The number of total pages in the entire result set. - example: 100 - type: number - type: object - result: - items: - $ref: '#/components/schemas/emailRules' - type: array - required: - - success - - errors - - messages - emailSettings: - type: object - $ref: '#/components/schemas/emailEmailSettingsProperties' - emailUpdateCatchAllRuleProperties: - properties: - actions: - $ref: '#/components/schemas/emailRuleCatchallActions' - enabled: - $ref: '#/components/schemas/emailRuleEnabled' - matchers: - $ref: '#/components/schemas/emailRuleCatchallMatchers' - name: - $ref: '#/components/schemas/emailRuleName' - required: - - actions - - matchers - type: object - emailUpdateRuleProperties: - properties: - actions: - $ref: '#/components/schemas/emailRuleActions' - enabled: - $ref: '#/components/schemas/emailRuleEnabled' - matchers: - $ref: '#/components/schemas/emailRuleMatchers' - name: - $ref: '#/components/schemas/emailRuleName' - priority: - $ref: '#/components/schemas/emailRulePriority' - required: - - actions - - matchers - type: object - emailVerified: - description: >- - The date and time the destination address has been verified. Null means - not verified yet. - example: '2014-01-02T02:20:00Z' - format: date-time - readOnly: true - type: string - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - addresses: - id: cloudflare.email_routing.addresses - name: addresses - title: Addresses - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1email~1routing~1addresses/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1email~1routing~1addresses/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email~1routing~1addresses~1{destination_address_identifier}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email~1routing~1addresses~1{destination_address_identifier}/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/addresses/methods/get' - - $ref: '#/components/x-stackQL-resources/addresses/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/addresses/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/addresses/methods/delete' - replace: [] - routing: - id: cloudflare.email_routing.routing - name: routing - title: Routing - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1email~1routing/get' - response: - mediaType: application/json - openAPIDocKey: '200' - disable: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1disable/post' - response: - mediaType: application/json - openAPIDocKey: '200' - enable: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1enable/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/routing/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - dns: - id: cloudflare.email_routing.dns - name: dns - title: Dns - methods: - email_routing_settings_disable_email_routing_dns: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1dns/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1dns/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result.record - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1dns/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1dns/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/dns/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/dns/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/dns/methods/edit' - delete: - - $ref: >- - #/components/x-stackQL-resources/dns/methods/email_routing_settings_disable_email_routing_dns - replace: [] - rules: - id: cloudflare.email_routing.rules - name: rules - title: Rules - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1rules/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1rules/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1email~1routing~1rules~1{rule_identifier}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1email~1routing~1rules~1{rule_identifier}/get - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1email~1routing~1rules~1{rule_identifier}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/rules/methods/get' - - $ref: '#/components/x-stackQL-resources/rules/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/rules/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/rules/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/rules/methods/update' - catch_alls: - id: cloudflare.email_routing.catch_alls - name: catch_alls - title: Catch Alls - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1rules~1catch_all/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1rules~1catch_all/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/catch_alls/methods/list' - insert: [] - update: [] - delete: [] - replace: - - $ref: '#/components/x-stackQL-resources/catch_alls/methods/update' - suppression: - id: cloudflare.email_routing.suppression - name: suppression - title: Suppression - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1suppression/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - post_zones_zone_id_email_routing_suppression: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1suppression/post' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1email~1routing~1suppression~1{suppression_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - delete_zones_zone_id_email_routing_suppression_suppression_id: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1email~1routing~1suppression~1{suppression_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/suppression/methods/get' - - $ref: '#/components/x-stackQL-resources/suppression/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/suppression/methods/post_zones_zone_id_email_routing_suppression - update: [] - delete: - - $ref: >- - #/components/x-stackQL-resources/suppression/methods/delete_zones_zone_id_email_routing_suppression_suppression_id - replace: [] +openapi: 3.0.3 +info: + title: email_routing API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/email/routing/addresses: + get: + description: Lists existing destination addresses. + operationId: email-routing-destination-addresses-list-destination-addresses + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: page + schema: + default: 1 + description: Page number of paginated results. + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 20 + description: Maximum number of results per page. + maximum: 50 + minimum: 5 + type: number + - in: query + name: direction + schema: + default: asc + description: Sorts results in an ascending or descending order. + enum: + - asc + - desc + type: string + - in: query + name: verified + schema: + default: true + description: Filter by verified destination addresses. + enum: + - true + - false + type: boolean + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/emailDestinationAddressesResponseCollection' + description: List destination addresses response + security: + - api_email: [] + api_key: [] + summary: List destination addresses + tags: + - Email Routing destination addresses + x-api-token-group: + - Email Routing Addresses Write + - Email Routing Addresses Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.email.routing.address.list + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: email_routing + resource_chain: + - addresses + method: list + post: + description: Create a destination address to forward your emails to. Destination addresses need to be verified before they can be used. + operationId: email-routing-destination-addresses-create-a-destination-address + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/emailCreateDestinationAddressProperties' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/emailDestinationAddressResponseSingle' + description: Create a destination address response + security: + - api_email: [] + api_key: [] + summary: Create a destination address + tags: + - Email Routing destination addresses + x-api-token-group: + - Email Routing Addresses Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.email.routing.address.create + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: email_routing + resource_chain: + - addresses + method: create + /accounts/{account_id}/email/routing/addresses/{destination_address_identifier}: + delete: + description: Deletes a specific destination address. + operationId: email-routing-destination-addresses-delete-destination-address + parameters: + - in: path + name: destination_address_identifier + schema: + $ref: '#/components/schemas/emailDestinationAddressIdentifier' + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/emailDestinationAddressResponseSingle' + description: Delete destination address response + security: + - api_email: [] + api_key: [] + summary: Delete destination address + tags: + - Email Routing destination addresses + x-api-token-group: + - Email Routing Addresses Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.email.routing.address.delete + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: email_routing + resource_chain: + - addresses + method: delete + get: + description: Gets information for a specific destination email already created. + operationId: email-routing-destination-addresses-get-a-destination-address + parameters: + - in: path + name: destination_address_identifier + schema: + $ref: '#/components/schemas/emailDestinationAddressIdentifier' + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/emailDestinationAddressResponseSingle' + description: Get a destination address response + security: + - api_email: [] + api_key: [] + summary: Get a destination address + tags: + - Email Routing destination addresses + x-api-token-group: + - Email Routing Addresses Write + - Email Routing Addresses Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.email.routing.address.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: email_routing + resource_chain: + - addresses + method: get + /zones/{zone_id}/email/routing: + get: + description: Get information about the settings for your Email Routing zone. + operationId: email-routing-settings-get-email-routing-settings + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/emailEmailSettingsResponseSingle' + description: Get Email Routing settings response + security: + - api_email: [] + api_key: [] + summary: Get Email Routing settings + tags: + - Email Routing settings + x-api-token-group: + - Zone Settings Write + - Zone Settings Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.zone.email.routing.config.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: email_routing + resource_chain: [] + method: get + /zones/{zone_id}/email/routing/disable: + post: + deprecated: true + description: Disable your Email Routing zone. Also removes additional MX records previously required for Email Routing to work. + operationId: email-routing-settings-disable-email-routing + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: {} + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/emailEmailSettingsResponseSingle' + description: Disable Email Routing response + security: + - api_email: [] + api_key: [] + summary: Disable Email Routing + tags: + - Email Routing settings + x-api-token-group: + - Zone Settings Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.zone.email.routing.config.update + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: email_routing + resource_chain: [] + method: disable + /zones/{zone_id}/email/routing/dns: + delete: + description: Disable your Email Routing zone. Also removes additional MX records previously required for Email Routing to work. + operationId: email-routing-settings-disable-email-routing-dns + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailMessages' + messages: + $ref: '#/components/schemas/emailMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/emailDnsRecord' + type: array + required: + - errors + - messages + - success + description: Disable Email Routing response + security: + - api_email: [] + api_key: [] + summary: Disable Email Routing + tags: + - Email Routing settings + x-api-token-group: + - Zone Settings Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + get: + description: Show the DNS records needed to configure your Email Routing zone. + operationId: email-routing-settings-email-routing-dns-settings + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: query + name: subdomain + schema: + $ref: '#/components/schemas/emailEmailSettingName' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailMessages' + messages: + $ref: '#/components/schemas/emailMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + properties: + errors: + $ref: '#/components/schemas/emailEmailRoutingGetResponseDnsErrors' + record: + items: + $ref: '#/components/schemas/emailDnsRecord' + type: array + type: object + required: + - errors + - messages + - success + description: Email Routing - DNS settings response + security: + - api_email: [] + api_key: [] + summary: Email Routing - DNS settings + tags: + - Email Routing settings + x-api-token-group: + - Zone Settings Write + - Zone Settings Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.zone.email.routing.config.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: email_routing + resource_chain: + - dns + method: delete + patch: + description: Unlock MX Records previously locked by Email Routing. + operationId: email-routing-settings-unlock-email-routing-dns + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/emailEmailSettingDnsRequestBody' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/emailEmailSettingsResponseSingle' + description: Unlock Email Routing MX records + security: + - api_email: [] + api_key: [] + summary: Unlock Email Routing + tags: + - Email Routing settings + x-api-token-group: + - Zone Settings Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.zone.email.routing.config.update + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: email_routing + resource_chain: + - dns + method: edit + post: + description: Enable you Email Routing zone. Add and lock the necessary MX and SPF records. + operationId: email-routing-settings-enable-email-routing-dns + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/emailEmailSettingDnsRequestBody' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/emailEmailSettingsResponseSingle' + description: Enable Email Routing response + security: + - api_email: [] + api_key: [] + summary: Enable Email Routing + tags: + - Email Routing settings + x-api-token-group: + - Zone Settings Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.zone.email.routing.config.update + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: email_routing + resource_chain: + - dns + method: create + /zones/{zone_id}/email/routing/enable: + post: + deprecated: true + description: Enable you Email Routing zone. Add and lock the necessary MX and SPF records. + operationId: email-routing-settings-enable-email-routing + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: {} + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/emailEmailSettingsResponseSingle' + description: Enable Email Routing response + security: + - api_email: [] + api_key: [] + summary: Enable Email Routing + tags: + - Email Routing settings + x-api-token-group: + - Zone Settings Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.zone.email.routing.config.update + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: email_routing + resource_chain: [] + method: enable + /zones/{zone_id}/email/routing/rules: + get: + description: Lists existing routing rules. + operationId: email-routing-routing-rules-list-routing-rules + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: query + name: page + schema: + default: 1 + description: Page number of paginated results. + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 20 + description: Maximum number of results per page. + maximum: 50 + minimum: 5 + type: number + - in: query + name: enabled + schema: + description: Filter by enabled routing rules. + enum: + - true + - false + type: boolean + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/emailRulesResponseCollection' + description: List routing rules response + security: + - api_email: [] + api_key: [] + summary: List routing rules + tags: + - Email Routing routing rules + x-api-token-group: + - Email Routing Rules Write + - Email Routing Rules Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.zone.email.routing.rule.list + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: email_routing + resource_chain: + - rules + method: list + post: + description: Rules consist of a set of criteria for matching emails (such as an email being sent to a specific custom email address) plus a set of actions to take on the email (like forwarding it to a specific destination address). Forward actions require all destination addresses to be verified. + operationId: email-routing-routing-rules-create-routing-rule + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/emailCreateRuleProperties' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/emailRuleResponseSingle' + description: Create routing rule response + '400': + description: 'Error 2054: Destination address is not verified. All forward action destination addresses must be verified before they can be used in rules.' + security: + - api_email: [] + api_key: [] + summary: Create routing rule + tags: + - Email Routing routing rules + x-api-token-group: + - Email Routing Rules Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.zone.email.routing.rule.create + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: email_routing + resource_chain: + - rules + method: create + /zones/{zone_id}/email/routing/rules/catch_all: + get: + description: Get information on the default catch-all routing rule. + operationId: email-routing-routing-rules-get-catch-all-rule + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/emailCatchAllRuleResponseSingle' + description: Get catch-all rule response + security: + - api_email: [] + api_key: [] + summary: Get catch-all rule + tags: + - Email Routing routing rules + x-api-token-group: + - Email Routing Rules Write + - Email Routing Rules Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.zone.email.routing.rule.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: email_routing + resource_chain: + - rules + - catch_alls + method: get + put: + description: Enable or disable catch-all routing rule, or change action to forward to specific destination address. Forward actions require all destination addresses to be verified. + operationId: email-routing-routing-rules-update-catch-all-rule + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/emailUpdateCatchAllRuleProperties' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/emailCatchAllRuleResponseSingle' + description: Update catch-all rule response + '400': + description: 'Error 2054: Destination address is not verified. All forward action destination addresses must be verified before they can be used in rules.' + security: + - api_email: [] + api_key: [] + summary: Update catch-all rule + tags: + - Email Routing routing rules + x-api-token-group: + - Email Routing Rules Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.zone.email.routing.rule.update + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: email_routing + resource_chain: + - rules + - catch_alls + method: update + /zones/{zone_id}/email/routing/rules/{rule_identifier}: + delete: + description: Delete a specific routing rule. + operationId: email-routing-routing-rules-delete-routing-rule + parameters: + - in: path + name: rule_identifier + schema: + $ref: '#/components/schemas/emailRuleIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/emailRuleResponseSingle' + description: Delete routing rule response + security: + - api_email: [] + api_key: [] + summary: Delete routing rule + tags: + - Email Routing routing rules + x-api-token-group: + - Email Routing Rules Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.zone.email.routing.rule.delete + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: email_routing + resource_chain: + - rules + method: delete + get: + description: Get information for a specific routing rule already created. + operationId: email-routing-routing-rules-get-routing-rule + parameters: + - in: path + name: rule_identifier + schema: + $ref: '#/components/schemas/emailRuleIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/emailRuleResponseSingle' + description: Get routing rule response + security: + - api_email: [] + api_key: [] + summary: Get routing rule + tags: + - Email Routing routing rules + x-api-token-group: + - Email Routing Rules Write + - Email Routing Rules Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.zone.email.routing.rule.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: email_routing + resource_chain: + - rules + method: get + put: + description: Update actions and matches, or enable/disable specific routing rules. Forward actions require all destination addresses to be verified. + operationId: email-routing-routing-rules-update-routing-rule + parameters: + - in: path + name: rule_identifier + schema: + $ref: '#/components/schemas/emailRuleIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/emailUpdateRuleProperties' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/emailRuleResponseSingle' + description: Update routing rule response + '400': + description: 'Error 2054: Destination address is not verified. All forward action destination addresses must be verified before they can be used in rules.' + security: + - api_email: [] + api_key: [] + summary: Update routing rule + tags: + - Email Routing routing rules + x-api-token-group: + - Email Routing Rules Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.zone.email.routing.rule.update + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: email_routing + resource_chain: + - rules + method: update + /zones/{zone_id}/email/routing/suppression: + get: + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: query + name: page + schema: + default: 1 + minimum: 0 + type: integer + - in: query + name: per_page + schema: + default: 100 + maximum: 1000 + minimum: 0 + type: integer + - in: query + name: order + schema: + default: created_at + enum: + - email + - expires_at + - created_at + type: string + - in: query + name: direction + schema: + default: desc + enum: + - asc + - desc + type: string + responses: + '200': + content: + application/json: + schema: + properties: + page: + type: integer + per_page: + type: integer + result: + items: + properties: + created_at: + format: date-time + type: string + readOnly: true + email: + format: email + type: string + expires_at: + format: date-time + nullable: true + type: string + id: + format: uuid + type: string + reason: + type: string + zones: + default: [] + items: + type: string + type: array + required: + - id + - email + - reason + - created_at + - expires_at + type: object + type: array + total: + type: integer + required: + - page + - per_page + - total + - result + type: object + description: Returns suppressed emails. + '400': + content: + application/json: + schema: + properties: + errors: + items: + type: string + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Bad request. + security: + - bearerAuth: [] + summary: List account or zone email suppressions + tags: [] + operationId: get_zones_zone_id_email_routing_suppression + post: + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + email: + format: email + type: string + expires_at: + format: date-time + nullable: true + type: string + required: + - email + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + id: + format: uuid + type: string + required: + - id + type: object + required: + - result + type: object + description: Returns suppression. + '400': + content: + application/json: + schema: + properties: + errors: + items: + type: string + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Bad request. + security: + - bearerAuth: [] + summary: Create account or zone email suppression + tags: [] + operationId: post_zones_zone_id_email_routing_suppression + /zones/{zone_id}/email/routing/suppression/{suppression_id}: + get: + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: path + name: suppression_id + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + created_at: + format: date-time + type: string + readOnly: true + email: + format: email + type: string + expires_at: + format: date-time + nullable: true + type: string + id: + format: uuid + type: string + reason: + type: string + zones: + default: [] + items: + type: string + type: array + required: + - id + - email + - reason + - created_at + - expires_at + type: object + required: + - result + type: object + description: Returns suppression. + '404': + content: + application/json: + schema: + properties: + error: + type: string + success: + type: boolean + required: + - success + - error + type: object + description: Suppression not found. + security: + - bearerAuth: [] + summary: Get account or zone email suppression + tags: [] + operationId: get_zones_zone_id_email_routing_suppression_suppression_id + delete: + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: path + name: suppression_id + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + success: + type: boolean + required: + - success + type: object + description: Deletes suppression. + '404': + content: + application/json: + schema: + properties: + error: + type: string + success: + type: boolean + required: + - success + - error + type: object + description: Suppression not found. + security: + - bearerAuth: [] + summary: Delete account or zone email suppression + tags: [] + operationId: delete_zones_zone_id_email_routing_suppression_suppression_id +components: + schemas: + emailAddresses: + type: object + $ref: '#/components/schemas/emailDestinationAddressProperties' + emailCatchAllRule: + properties: + actions: + $ref: '#/components/schemas/emailRuleCatchallActions' + enabled: + $ref: '#/components/schemas/emailRuleEnabled' + id: + $ref: '#/components/schemas/emailRuleIdentifier' + matchers: + $ref: '#/components/schemas/emailRuleCatchallMatchers' + name: + $ref: '#/components/schemas/emailRuleName' + tag: + $ref: '#/components/schemas/emailRuleTag' + type: object + emailCatchAllRuleResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/emailMessages' + messages: + $ref: '#/components/schemas/emailMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/emailCatchAllRule' + required: + - success + - errors + - messages + emailCreateDestinationAddressProperties: + properties: + email: + $ref: '#/components/schemas/emailEmail' + required: + - email + type: object + emailCreateRuleProperties: + properties: + actions: + $ref: '#/components/schemas/emailRuleActions' + enabled: + $ref: '#/components/schemas/emailRuleEnabled' + matchers: + $ref: '#/components/schemas/emailRuleMatchers' + name: + $ref: '#/components/schemas/emailRuleName' + priority: + $ref: '#/components/schemas/emailRulePriority' + required: + - actions + - matchers + type: object + emailCreated: + description: The date and time the destination address has been created. + example: '2014-01-02T02:20:00Z' + format: date-time + readOnly: true + type: string + emailDestinationAddressIdentifier: + description: Destination address identifier. + example: ea95132c15732412d22c1476fa83f27a + maxLength: 32 + readOnly: true + type: string + x-auditable: true + emailDestinationAddressProperties: + properties: + created: + $ref: '#/components/schemas/emailCreated' + email: + $ref: '#/components/schemas/emailEmail' + id: + $ref: '#/components/schemas/emailDestinationAddressIdentifier' + modified: + $ref: '#/components/schemas/emailModified' + tag: + $ref: '#/components/schemas/emailDestinationAddressTag' + verified: + $ref: '#/components/schemas/emailVerified' + type: object + emailDestinationAddressResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/emailMessages' + messages: + $ref: '#/components/schemas/emailMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/emailAddresses' + required: + - success + - errors + - messages + emailDestinationAddressTag: + deprecated: true + description: Destination address tag. (Deprecated, replaced by destination address identifier) + example: ea95132c15732412d22c1476fa83f27a + maxLength: 32 + readOnly: true + type: string + emailDestinationAddressesResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/emailMessages' + messages: + $ref: '#/components/schemas/emailMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 1 + type: number + total_pages: + description: The number of total pages in the entire result set. + example: 100 + type: number + type: object + result: + items: + $ref: '#/components/schemas/emailAddresses' + type: array + required: + - success + - errors + - messages + emailDnsRecord: + description: List of records needed to enable an Email Routing zone. + properties: + content: + description: DNS record content. + example: route1.mx.cloudflare.net + type: string + name: + description: DNS record name (or @ for the zone apex). + example: example.com + maxLength: 255 + type: string + x-auditable: true + priority: + description: Required for MX, SRV and URI records. Unused by other record types. Records with lower priorities are preferred. + example: 12 + maximum: 65535 + minimum: 0 + type: number + x-auditable: true + ttl: + description: Time to live, in seconds, of the DNS record. Must be between 60 and 86400, or 1 for 'automatic'. + example: 1 + type: number + x-auditable: true + enum: + - 1 + type: + description: DNS record type. + enum: + - A + - AAAA + - CNAME + - HTTPS + - TXT + - SRV + - LOC + - MX + - NS + - CERT + - DNSKEY + - DS + - NAPTR + - SMIMEA + - SSHFP + - SVCB + - TLSA + - URI + example: NS + readOnly: true + type: string + x-auditable: true + type: object + emailEmail: + description: The contact email address of the user. + example: user@example.com + maxLength: 90 + type: string + x-auditable: true + emailEmailRoutingGetResponseDnsError: + properties: + code: + type: string + missing: + $ref: '#/components/schemas/emailDnsRecord' + type: object + emailEmailRoutingGetResponseDnsErrors: + items: + $ref: '#/components/schemas/emailEmailRoutingGetResponseDnsError' + type: array + emailEmailSettingCreated: + description: The date and time the settings have been created. + example: '2014-01-02T02:20:00Z' + format: date-time + readOnly: true + type: string + emailEmailSettingDnsRequestBody: + nullable: true + properties: + name: + $ref: '#/components/schemas/emailEmailSettingName' + type: object + emailEmailSettingEnabled: + description: State of the zone settings for Email Routing. + enum: + - true + - false + example: true + readOnly: true + type: boolean + x-auditable: true + emailEmailSettingIdentifier: + description: Email Routing settings identifier. + example: 75610dab9e69410a82cf7e400a09ecec + maxLength: 32 + readOnly: true + type: string + x-auditable: true + emailEmailSettingModified: + description: The date and time the settings have been modified. + example: '2014-01-02T02:20:00Z' + format: date-time + readOnly: true + type: string + emailEmailSettingName: + description: Domain of your zone. + example: example.net + type: string + x-auditable: true + emailEmailSettingSkipWizard: + description: Flag to check if the user skipped the configuration wizard. + enum: + - true + - false + example: true + readOnly: true + type: boolean + emailEmailSettingStatus: + description: Show the state of your account, and the type or configuration error. + enum: + - ready + - unconfigured + - misconfigured + - misconfigured/locked + - unlocked + example: ready + readOnly: true + type: string + emailEmailSettingTag: + deprecated: true + description: Email Routing settings tag. (Deprecated, replaced by Email Routing settings identifier) + example: 75610dab9e69410a82cf7e400a09ecec + maxLength: 32 + readOnly: true + type: string + emailEmailSettingsProperties: + properties: + created: + $ref: '#/components/schemas/emailEmailSettingCreated' + enabled: + $ref: '#/components/schemas/emailEmailSettingEnabled' + id: + $ref: '#/components/schemas/emailEmailSettingIdentifier' + modified: + $ref: '#/components/schemas/emailEmailSettingModified' + name: + $ref: '#/components/schemas/emailEmailSettingName' + skip_wizard: + $ref: '#/components/schemas/emailEmailSettingSkipWizard' + status: + $ref: '#/components/schemas/emailEmailSettingStatus' + tag: + $ref: '#/components/schemas/emailEmailSettingTag' + required: + - id + - name + - enabled + type: object + emailEmailSettingsResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/emailMessages' + messages: + $ref: '#/components/schemas/emailMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/emailSettings' + required: + - success + - errors + - messages + emailMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + emailModified: + description: The date and time the destination address was last modified. + example: '2014-01-02T02:20:00Z' + format: date-time + readOnly: true + type: string + emailRuleAction: + description: Actions pattern. + properties: + type: + description: Type of supported action. + enum: + - drop + - forward + - worker + example: forward + type: string + x-auditable: true + value: + items: + description: Value for action. + example: destinationaddress@example.net + maxLength: 90 + type: string + x-auditable: true + type: array + required: + - type + type: object + emailRuleActions: + description: List actions patterns. + items: + $ref: '#/components/schemas/emailRuleAction' + maxItems: 1 + minItems: 1 + type: array + emailRuleCatchallAction: + description: Action for the catch-all routing rule. + properties: + type: + description: Type of action for catch-all rule. + enum: + - drop + - forward + - worker + example: forward + type: string + x-auditable: true + value: + items: + description: Input value for action. + example: destinationaddress@example.net + maxLength: 90 + type: string + x-auditable: true + type: array + required: + - type + type: object + emailRuleCatchallActions: + description: List actions for the catch-all routing rule. + items: + $ref: '#/components/schemas/emailRuleCatchallAction' + maxItems: 1 + minItems: 1 + type: array + emailRuleCatchallMatcher: + description: Matcher for catch-all routing rule. + properties: + type: + description: Type of matcher. Default is 'all'. + enum: + - all + example: all + type: string + x-auditable: true + required: + - type + type: object + emailRuleCatchallMatchers: + description: List of matchers for the catch-all routing rule. + items: + $ref: '#/components/schemas/emailRuleCatchallMatcher' + type: array + emailRuleEnabled: + default: true + description: Routing rule status. + enum: + - true + - false + example: true + type: boolean + x-auditable: true + emailRuleIdentifier: + description: Routing rule identifier. + example: a7e6fb77503c41d8a7f3113c6918f10c + maxLength: 32 + readOnly: true + type: string + x-auditable: true + emailRuleMatcher: + description: Matching pattern to forward your actions. + properties: + field: + description: Field for type matcher. + enum: + - to + example: to + type: string + x-auditable: true + type: + description: Type of matcher. + enum: + - all + - literal + example: literal + type: string + x-auditable: true + value: + description: Value for matcher. + example: test@example.com + maxLength: 90 + type: string + x-auditable: true + required: + - type + type: object + emailRuleMatchers: + description: Matching patterns to forward to your actions. + items: + $ref: '#/components/schemas/emailRuleMatcher' + type: array + emailRuleName: + description: Routing rule name. + example: Send to user@example.net rule. + maxLength: 256 + type: string + x-auditable: true + emailRulePriority: + default: 0 + description: Priority of the routing rule. + minimum: 0 + type: number + x-auditable: true + emailRuleProperties: + properties: + actions: + $ref: '#/components/schemas/emailRuleActions' + enabled: + $ref: '#/components/schemas/emailRuleEnabled' + id: + $ref: '#/components/schemas/emailRuleIdentifier' + matchers: + $ref: '#/components/schemas/emailRuleMatchers' + name: + $ref: '#/components/schemas/emailRuleName' + priority: + $ref: '#/components/schemas/emailRulePriority' + tag: + $ref: '#/components/schemas/emailRuleTag' + type: object + emailRuleResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/emailMessages' + messages: + $ref: '#/components/schemas/emailMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/emailRules' + required: + - success + - errors + - messages + emailRuleTag: + deprecated: true + description: Routing rule tag. (Deprecated, replaced by routing rule identifier) + example: a7e6fb77503c41d8a7f3113c6918f10c + maxLength: 32 + readOnly: true + type: string + emailRules: + type: object + $ref: '#/components/schemas/emailRuleProperties' + emailRulesResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/emailMessages' + messages: + $ref: '#/components/schemas/emailMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 1 + type: number + total_pages: + description: The number of total pages in the entire result set. + example: 100 + type: number + type: object + result: + items: + $ref: '#/components/schemas/emailRules' + type: array + required: + - success + - errors + - messages + emailSettings: + type: object + $ref: '#/components/schemas/emailEmailSettingsProperties' + emailUpdateCatchAllRuleProperties: + properties: + actions: + $ref: '#/components/schemas/emailRuleCatchallActions' + enabled: + $ref: '#/components/schemas/emailRuleEnabled' + matchers: + $ref: '#/components/schemas/emailRuleCatchallMatchers' + name: + $ref: '#/components/schemas/emailRuleName' + required: + - actions + - matchers + type: object + emailUpdateRuleProperties: + properties: + actions: + $ref: '#/components/schemas/emailRuleActions' + enabled: + $ref: '#/components/schemas/emailRuleEnabled' + matchers: + $ref: '#/components/schemas/emailRuleMatchers' + name: + $ref: '#/components/schemas/emailRuleName' + priority: + $ref: '#/components/schemas/emailRulePriority' + required: + - actions + - matchers + type: object + emailVerified: + description: The date and time the destination address has been verified. Null means not verified yet. + example: '2014-01-02T02:20:00Z' + format: date-time + readOnly: true + type: string + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + addresses: + id: cloudflare.email_routing.addresses + name: addresses + title: Addresses + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email~1routing~1addresses/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email~1routing~1addresses/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email~1routing~1addresses~1{destination_address_identifier}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email~1routing~1addresses~1{destination_address_identifier}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/addresses/methods/get' + - $ref: '#/components/x-stackQL-resources/addresses/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/addresses/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/addresses/methods/delete' + replace: [] + routing: + id: cloudflare.email_routing.routing + name: routing + title: Routing + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1routing/get' + response: + mediaType: application/json + openAPIDocKey: '200' + disable: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1disable/post' + response: + mediaType: application/json + openAPIDocKey: '200' + enable: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1enable/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/routing/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + dns: + id: cloudflare.email_routing.dns + name: dns + title: Dns + methods: + email_routing_settings_disable_email_routing_dns: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1dns/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1dns/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result.record + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1dns/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1dns/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/dns/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/dns/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/dns/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/dns/methods/email_routing_settings_disable_email_routing_dns' + replace: [] + rules: + id: cloudflare.email_routing.rules + name: rules + title: Rules + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1rules/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1rules/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .actions }}{{ $sep }}"actions": {{ if eq (kindOf .actions) "string" }}{{ .actions }}{{ else }}{{ toJson .actions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .matchers }}{{ $sep }}"matchers": {{ if eq (kindOf .matchers) "string" }}{{ .matchers }}{{ else }}{{ toJson .matchers }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .priority }}{{ $sep }}"priority": {{ toJson .priority }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1rules~1{rule_identifier}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1rules~1{rule_identifier}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1rules~1{rule_identifier}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .actions }}{{ $sep }}"actions": {{ if eq (kindOf .actions) "string" }}{{ .actions }}{{ else }}{{ toJson .actions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .matchers }}{{ $sep }}"matchers": {{ if eq (kindOf .matchers) "string" }}{{ .matchers }}{{ else }}{{ toJson .matchers }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .priority }}{{ $sep }}"priority": {{ toJson .priority }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/rules/methods/get' + - $ref: '#/components/x-stackQL-resources/rules/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/rules/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/rules/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/rules/methods/update' + catch_alls: + id: cloudflare.email_routing.catch_alls + name: catch_alls + title: Catch Alls + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1rules~1catch_all/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1rules~1catch_all/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .actions }}{{ $sep }}"actions": {{ if eq (kindOf .actions) "string" }}{{ .actions }}{{ else }}{{ toJson .actions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .matchers }}{{ $sep }}"matchers": {{ if eq (kindOf .matchers) "string" }}{{ .matchers }}{{ else }}{{ toJson .matchers }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/catch_alls/methods/list' + insert: [] + update: [] + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/catch_alls/methods/update' + suppression: + id: cloudflare.email_routing.suppression + name: suppression + title: Suppression + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1suppression/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + post_zones_zone_id_email_routing_suppression: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1suppression/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1suppression~1{suppression_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete_zones_zone_id_email_routing_suppression_suppression_id: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1routing~1suppression~1{suppression_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/suppression/methods/get' + - $ref: '#/components/x-stackQL-resources/suppression/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/suppression/methods/post_zones_zone_id_email_routing_suppression' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/suppression/methods/delete_zones_zone_id_email_routing_suppression_suppression_id' + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/email_security.yaml b/providers/src/cloudflare/v00.00.00000/services/email_security.yaml index 00cfb422..2d6827ab 100644 --- a/providers/src/cloudflare/v00.00.00000/services/email_security.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/email_security.yaml @@ -1,6341 +1,6085 @@ -openapi: 3.0.3 -info: - title: email_security API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/email-security/investigate: - get: - description: Returns information for each email that matches the search parameter(s). - operationId: email_security_investigate - parameters: - - description: The beginning of the search date range. Defaults to `now - 30 days`. - in: query - name: start - schema: - format: date-time - type: string - - description: The end of the search date range. Defaults to `now`. - in: query - name: end - schema: - format: date-time - type: string - - description: Space-delimited search term. Case-insensitive. - in: query - name: query - schema: - type: string - - description: Whether to include only detections in search results. - in: query - name: detections_only - schema: - default: true - type: boolean - - description: Whether to include the message action log in the response. - in: query - name: action_log - schema: - default: true - type: boolean - - description: Dispositions to filter by. - in: query - name: final_disposition - schema: - enum: - - MALICIOUS - - SUSPICIOUS - - SPOOF - - SPAM - - BULK - - NONE - type: string - - in: query - name: metric - schema: - type: string - - description: Message actions to filter by. - in: query - name: message_action - schema: - enum: - - PREVIEW - - QUARANTINE_RELEASED - - MOVED - type: string - - in: query - name: recipient - schema: - type: string - - in: query - name: sender - schema: - type: string - - in: query - name: alert_id - schema: - type: string - - description: Sender domains to filter by. - in: query - name: domain - schema: - type: string - - in: query - name: message_id - schema: - type: string - - in: query - name: subject - schema: - type: string - - in: query - name: cursor - schema: - type: string - - description: The number of results per page. Maximum value is 1000. - in: query - name: per_page - schema: - default: 20 - maximum: 1000 - minimum: 1 - type: integer - - deprecated: true - description: >- - Deprecated: Use cursor pagination instead. End of life: November 1, - 2026. - in: query - name: page - schema: - default: 1 - minimum: 1 - nullable: true - type: integer - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - items: - $ref: '#/components/schemas/emailSecurityMessageDetails' - type: array - result_info: - $ref: '#/components/schemas/emailSecurityCursorResultInfo' - required: - - success - - errors - - messages - - result - - result_info - type: object - description: Search results for the provided query. - '202': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - description: >- - Always empty on 202; follow the Location header to - retrieve results. - items: {} - maxItems: 0 - type: array - result_info: - $ref: '#/components/schemas/emailSecurityCursorResultInfo' - required: - - success - - errors - - messages - - result - - result_info - type: object - description: >- - The search is taking longer than expected. Use the Location header - to poll for results. - headers: - Location: - description: URL to poll for search results - schema: - type: string - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Search email messages - tags: - - Email Security - x-api-token-group: - - 'Cloud Email Security: Write' - - 'Cloud Email Security: Read' - x-stackql-sdk: - service: email_security - resource_chain: - - investigate - method: list - /accounts/{account_id}/email-security/investigate/move: - post: - description: >- - Moves multiple messages to a specified mailbox folder (Inbox, JunkEmail, - DeletedItems, RecoverableItemsDeletions, or RecoverableItemsPurges). - Requires active integration. - operationId: email_security_post_bulk_move - requestBody: - content: - application/json: - schema: - properties: - destination: - $ref: '#/components/schemas/emailSecurityMailboxDestination' - ids: - description: List of message IDs to move - items: - $ref: '#/components/schemas/emailSecurityInvestigateId' - type: array - x-auditable: true - postfix_ids: - deprecated: true - description: >- - Deprecated, use `ids` instead. End of life: November 1, - 2026. List of message IDs to move. - items: - $ref: '#/components/schemas/emailSecurityPostfixId' - type: array - x-auditable: true - required: - - destination - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - items: - $ref: '#/components/schemas/emailSecurityMoveResponseItem' - type: array - required: - - success - - errors - - messages - - result - type: object - description: Bulk move operation results - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Move multiple messages - tags: - - Email Security - x-api-token-group: - - 'Cloud Email Security: Write' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - /accounts/{account_id}/email-security/investigate/preview: - post: - description: >- - Generates a preview image for a message that was not flagged as a - detection. Useful for investigating benign messages. Returns a - base64-encoded PNG screenshot of the email body. - operationId: email_security_post_preview - requestBody: - content: - application/json: - schema: - properties: - postfix_id: - $ref: '#/components/schemas/emailSecurityPostfixId' - required: - - postfix_id - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/emailSecurityMessagePreview' - required: - - success - - errors - - messages - - result - type: object - description: Email preview. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Preview for non-detection messages - tags: - - Email Security - x-api-token-group: - - 'Cloud Email Security: Write' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - x-stackql-sdk: - service: email_security - resource_chain: - - investigate - - preview - method: create - /accounts/{account_id}/email-security/investigate/release: - post: - description: >- - Releases one or more quarantined messages, delivering them to the - intended recipients. Use when a message was incorrectly quarantined. - Returns delivery status for each recipient. - operationId: email_security_post_release - requestBody: - content: - application/json: - schema: - items: - $ref: '#/components/schemas/emailSecurityInvestigateId' - type: array - description: A list of investigate IDs identifying the messages to release. - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - items: - $ref: '#/components/schemas/emailSecurityReleaseResponse' - type: array - required: - - success - - errors - - messages - - result - type: object - description: Release operation results. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Release messages from quarantine - tags: - - Email Security - x-api-token-group: - - 'Cloud Email Security: Write' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - /accounts/{account_id}/email-security/investigate/{investigate_id}: - get: - description: >- - Retrieves comprehensive details for a specific email message including - headers, recipients, sender information, and current quarantine status. - Use the investigate_id from search results to fetch detailed - information. - operationId: email_security_get_message - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/emailSecurityMessageDetails' - required: - - success - - errors - - messages - - result - type: object - description: Email message details. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get message details - tags: - - Email Security - x-api-token-group: - - 'Cloud Email Security: Write' - - 'Cloud Email Security: Read' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: investigate_id - schema: - $ref: '#/components/schemas/emailSecurityInvestigateId' - required: true - - description: >- - When true, search the submissions datastore only. When false or - omitted, search the regular datastore only. - in: query - name: submission - schema: - type: boolean - x-stackql-sdk: - service: email_security - resource_chain: - - investigate - method: get - /accounts/{account_id}/email-security/investigate/{investigate_id}/action_log: - get: - description: >- - Returns the list of post-delivery actions (moves, quarantine releases, - previews, etc.) that have been applied to a specific email message. - operationId: email_security_get_message_action_log - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - items: - $ref: '#/components/schemas/emailSecurityActionEntry' - type: array - required: - - success - - errors - - messages - - result - type: object - description: Action log for the email - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get action log for a message - tags: - - Email Security - x-api-token-group: - - 'Cloud Email Security: Write' - - 'Cloud Email Security: Read' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: investigate_id - schema: - $ref: '#/components/schemas/emailSecurityInvestigateId' - required: true - /accounts/{account_id}/email-security/investigate/{investigate_id}/detections: - get: - description: >- - Returns detection details such as threat categories and sender - information for non-benign messages. - operationId: email_security_get_message_detections - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/emailSecurityMessageDetectionDetails' - required: - - success - - errors - - messages - - result - type: object - description: Email message detection details. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get message detection details - tags: - - Email Security - x-api-token-group: - - 'Cloud Email Security: Write' - - 'Cloud Email Security: Read' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: investigate_id - schema: - $ref: '#/components/schemas/emailSecurityInvestigateId' - required: true - x-stackql-sdk: - service: email_security - resource_chain: - - investigate - - detections - method: get - /accounts/{account_id}/email-security/investigate/{investigate_id}/move: - post: - description: >- - Moves a single message to a specified mailbox folder (Inbox, JunkEmail, - DeletedItems, RecoverableItemsDeletions, or RecoverableItemsPurges). - Requires active integration. - operationId: email_security_post_message_move - requestBody: - content: - application/json: - schema: - properties: - destination: - $ref: '#/components/schemas/emailSecurityMailboxDestination' - required: - - destination - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - items: - $ref: '#/components/schemas/emailSecurityMoveResponseItem' - type: array - required: - - success - - errors - - messages - - result - type: object - description: Move operation results - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Move a message - tags: - - Email Security - x-api-token-group: - - 'Cloud Email Security: Write' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: investigate_id - schema: - $ref: '#/components/schemas/emailSecurityInvestigateId' - required: true - /accounts/{account_id}/email-security/investigate/{investigate_id}/preview: - get: - description: >- - Returns a preview of the message body as a base64 encoded PNG image for - non-benign messages. - operationId: email_security_get_message_preview - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/emailSecurityMessagePreview' - required: - - success - - errors - - messages - - result - type: object - description: Email preview - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get email preview - tags: - - Email Security - x-api-token-group: - - 'Cloud Email Security: Write' - - 'Cloud Email Security: Read' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: investigate_id - schema: - $ref: '#/components/schemas/emailSecurityInvestigateId' - required: true - x-stackql-sdk: - service: email_security - resource_chain: - - investigate - - preview - method: get - /accounts/{account_id}/email-security/investigate/{investigate_id}/raw: - get: - description: Returns the raw eml of any non-benign message. - operationId: email_security_get_message_raw - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/emailSecurityMessageRaw' - required: - - success - - errors - - messages - - result - type: object - description: Raw email content. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get raw email content - tags: - - Email Security - x-api-token-group: - - 'Cloud Email Security: Write' - - 'Cloud Email Security: Read' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: investigate_id - schema: - $ref: '#/components/schemas/emailSecurityInvestigateId' - required: true - x-stackql-sdk: - service: email_security - resource_chain: - - investigate - - raw - method: get - /accounts/{account_id}/email-security/investigate/{investigate_id}/reclassify: - post: - description: >- - Submits a request to reclassify an email's disposition. Use for - reporting false positives or false negatives. Optionally provide the raw - EML content for reanalysis. The reclassification is processed - asynchronously. - operationId: email_security_post_reclassify - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityReclassifyRequest' - responses: - '202': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - type: object - required: - - success - - errors - - messages - - result - type: object - description: Reclassification request accepted. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Change email classification - tags: - - Email Security - x-api-token-group: - - 'Cloud Email Security: Write' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: investigate_id - schema: - $ref: '#/components/schemas/emailSecurityInvestigateId' - required: true - x-stackql-sdk: - service: email_security - resource_chain: - - investigate - - reclassify - method: create - /accounts/{account_id}/email-security/investigate/{investigate_id}/trace: - get: - description: >- - Retrieves delivery and processing trace information for an email - message. Shows the delivery path, retraction history, and move - operations performed on the message. Useful for debugging delivery - issues. - operationId: email_security_get_message_trace - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/emailSecurityMessageTrace' - required: - - success - - errors - - messages - - result - type: object - description: Email trace. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get email trace - tags: - - Email Security - x-api-token-group: - - 'Cloud Email Security: Write' - - 'Cloud Email Security: Read' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: investigate_id - schema: - $ref: '#/components/schemas/emailSecurityInvestigateId' - required: true - x-stackql-sdk: - service: email_security - resource_chain: - - investigate - - trace - method: get - /accounts/{account_id}/email-security/phishguard/reports: - get: - description: >- - Retrieves PhishGuard security alert reports for a specified date range. - Reports include detected threats, dispositions, and contextual - information. Use for security monitoring and threat analysis. - operationId: email_security_get_phishguard_reports - parameters: - - description: Start of the time range (RFC3339). Takes precedence over from_date. - in: query - name: start - schema: - format: date-time - type: string - - description: End of the time range (RFC3339). Takes precedence over to_date. - in: query - name: end - schema: - format: date-time - type: string - - deprecated: true - description: Deprecated, use `start` instead. Start date in YYYY-MM-DD format. - in: query - name: from_date - schema: - format: date - type: string - - deprecated: true - description: Deprecated, use `end` instead. End date in YYYY-MM-DD format. - in: query - name: to_date - schema: - format: date - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - items: - $ref: '#/components/schemas/emailSecurityPhishGuardReport' - type: array - required: - - success - - errors - - messages - - result - type: object - description: List of PhishGuard reports - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get PhishGuard reports - tags: - - Email Security - x-api-token-group: - - 'Cloud Email Security: Write' - - 'Cloud Email Security: Read' - x-stackql-sdk: - service: email_security - resource_chain: - - phishguard - - reports - method: list - /accounts/{account_id}/email-security/settings/allow_policies: - get: - description: >- - Returns a paginated list of email allow policies. These policies exempt - matching emails from security detection, allowing them to bypass - disposition actions. Supports filtering by pattern type and policy - attributes. - operationId: email_security_list_allow_policies - parameters: - - description: Current page within paginated list of results. - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - description: The number of results per page. Maximum value is 1000. - in: query - name: per_page - schema: - default: 20 - maximum: 1000 - minimum: 1 - type: integer - - description: Search term for filtering records. Behavior may change. - in: query - name: search - schema: - type: string - - description: Field to sort by. - in: query - name: order - schema: - enum: - - pattern - - created_at - type: string - - description: The sorting direction. - in: query - name: direction - schema: - enum: - - asc - - desc - type: string - - description: >- - Filter to show only policies where messages to the recipient bypass - all detections. - in: query - name: is_exempt_recipient - schema: - type: boolean - - description: >- - Filter to show only policies where messages from the sender bypass - all detections and link following. - in: query - name: is_trusted_sender - schema: - type: boolean - - description: >- - Filter to show only policies where messages from the sender are - exempted from Spam, Spoof, and Bulk dispositions (not Malicious or - Suspicious). - in: query - name: is_acceptable_sender - schema: - type: boolean - - description: >- - Filter to show only policies that enforce DMARC, SPF, or DKIM - authentication. - in: query - name: verify_sender - schema: - type: boolean - - in: query - name: pattern_type - schema: - $ref: '#/components/schemas/emailSecurityPatternType' - - in: query - name: pattern - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - type: object - result: - $ref: '#/components/schemas/emailSecurityAllowPolicyList' - required: - - success - - errors - - messages - description: List of allow policies - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List email allow policies - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - - 'Cloud Email Security: Read' - x-stackql-sdk: - service: email_security - resource_chain: - - settings - - allow_policies - method: list - post: - description: >- - Creates a new allow policy that exempts matching emails from security - detections. Use with caution as this bypasses email security scanning. - Policies can match on sender patterns and apply to specific detections - or all detections. - operationId: email_security_create_allow_policy - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityCreateAllowPolicy' - responses: - '201': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/emailSecurityAllowPolicy' - required: - - success - - errors - - messages - description: Created allow policy - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create email allow policy - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - x-stackql-sdk: - service: email_security - resource_chain: - - settings - - allow_policies - method: create - /accounts/{account_id}/email-security/settings/allow_policies/batch: - post: - description: >- - Execute multiple operations atomically. All four operation arrays - (deletes, patches, puts, posts) are required and executed in order. Send - empty arrays for unused operations. - operationId: email_security_batch_allow_policies - requestBody: - content: - application/json: - schema: - properties: - deletes: - items: - properties: - id: - $ref: '#/components/schemas/emailSecurityAllowPolicyId' - required: - - id - type: object - maxItems: 1000 - type: array - patches: - items: - description: An email allow policy - minProperties: 1 - properties: - comments: - maxLength: 1024 - nullable: true - type: string - created_at: - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - id: - readOnly: true - $ref: '#/components/schemas/emailSecurityAllowPolicyId' - is_acceptable_sender: - description: >- - Messages from this sender will be exempted from Spam, - Spoof and Bulk dispositions. Note - This will not - exempt messages with Malicious or Suspicious - dispositions. - type: boolean - x-auditable: true - is_exempt_recipient: - description: Messages to this recipient will bypass all detections - type: boolean - x-auditable: true - is_recipient: - deprecated: true - description: >- - Deprecated as of July 1, 2025. Use - `is_exempt_recipient` instead. End of life: July 1, - 2026. - type: boolean - x-auditable: true - is_regex: - type: boolean - x-auditable: true - is_sender: - deprecated: true - description: >- - Deprecated as of July 1, 2025. Use `is_trusted_sender` - instead. End of life: July 1, 2026. - type: boolean - x-auditable: true - is_spoof: - deprecated: true - description: >- - Deprecated as of July 1, 2025. Use - `is_acceptable_sender` instead. End of life: July 1, - 2026. - type: boolean - x-auditable: true - is_trusted_sender: - description: >- - Messages from this sender will bypass all detections - and link following - type: boolean - x-auditable: true - last_modified: - deprecated: true - description: >- - Deprecated, use `modified_at` instead. End of life: - November 1, 2026. - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - modified_at: - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - pattern: - maxLength: 1024 - minLength: 1 - type: string - x-auditable: true - pattern_type: - $ref: '#/components/schemas/emailSecurityPatternType' - verify_sender: - description: >- - Enforce DMARC, SPF or DKIM authentication. When on, - Email Security only honors policies that pass - authentication. - type: boolean - x-auditable: true - required: - - id - - created_at - - last_modified - - id - type: object - maxItems: 1000 - type: array - posts: - items: - $ref: '#/components/schemas/emailSecurityCreateAllowPolicy' - maxItems: 1000 - type: array - puts: - items: - description: An email allow policy - properties: - comments: - maxLength: 1024 - nullable: true - type: string - created_at: - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - id: - readOnly: true - $ref: '#/components/schemas/emailSecurityAllowPolicyId' - is_acceptable_sender: - description: >- - Messages from this sender will be exempted from Spam, - Spoof and Bulk dispositions. Note - This will not - exempt messages with Malicious or Suspicious - dispositions. - type: boolean - x-auditable: true - is_exempt_recipient: - description: Messages to this recipient will bypass all detections - type: boolean - x-auditable: true - is_recipient: - deprecated: true - description: >- - Deprecated as of July 1, 2025. Use - `is_exempt_recipient` instead. End of life: July 1, - 2026. - type: boolean - x-auditable: true - is_regex: - type: boolean - x-auditable: true - is_sender: - deprecated: true - description: >- - Deprecated as of July 1, 2025. Use `is_trusted_sender` - instead. End of life: July 1, 2026. - type: boolean - x-auditable: true - is_spoof: - deprecated: true - description: >- - Deprecated as of July 1, 2025. Use - `is_acceptable_sender` instead. End of life: July 1, - 2026. - type: boolean - x-auditable: true - is_trusted_sender: - description: >- - Messages from this sender will bypass all detections - and link following - type: boolean - x-auditable: true - last_modified: - deprecated: true - description: >- - Deprecated, use `modified_at` instead. End of life: - November 1, 2026. - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - modified_at: - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - pattern: - maxLength: 1024 - minLength: 1 - type: string - x-auditable: true - pattern_type: - $ref: '#/components/schemas/emailSecurityPatternType' - verify_sender: - description: >- - Enforce DMARC, SPF or DKIM authentication. When on, - Email Security only honors policies that pass - authentication. - type: boolean - x-auditable: true - required: - - id - - created_at - - last_modified - - id - type: object - maxItems: 1000 - type: array - required: - - deletes - - patches - - puts - - posts - type: object - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - properties: - deletes: - items: - $ref: '#/components/schemas/emailSecurityDeletedAllowPolicy' - type: array - patches: - $ref: '#/components/schemas/emailSecurityAllowPolicyList' - posts: - $ref: '#/components/schemas/emailSecurityAllowPolicyList' - puts: - $ref: '#/components/schemas/emailSecurityAllowPolicyList' - type: object - required: - - success - - errors - - messages - description: Batch operation results - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Batch allow policies operations - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - /accounts/{account_id}/email-security/settings/allow_policies/{policy_id}: - delete: - description: >- - Removes an allow policy. After deletion, emails matching this pattern - will be subject to normal security scanning and disposition actions. - operationId: email_security_delete_allow_policy - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/emailSecurityDeletedAllowPolicy' - required: - - success - - errors - - messages - description: Deleted allow policy - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete an email allow policy - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: policy_id - in: path - required: true - description: The Access policy ID. - schema: - type: string - x-stackql-sdk: - service: email_security - resource_chain: - - settings - - allow_policies - method: delete - get: - description: >- - Retrieves details for a specific allow policy including its pattern, - dispositions that are exempted, and whether it applies to all - detections. - operationId: email_security_get_allow_policy - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/emailSecurityAllowPolicy' - required: - - success - - errors - - messages - description: Allow policy details - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get an email allow policy - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - - 'Cloud Email Security: Read' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: policy_id - in: path - required: true - description: The Access policy ID. - schema: - type: string - x-stackql-sdk: - service: email_security - resource_chain: - - settings - - allow_policies - method: get - patch: - description: >- - Updates an existing allow policy. Only provided fields will be modified. - Changes take effect for new emails matching the pattern. - operationId: email_security_update_allow_policy - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityUpdateAllowPolicy' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/emailSecurityAllowPolicy' - required: - - success - - errors - - messages - description: Updated allow policy - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update an email allow policy - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: policy_id - in: path - required: true - description: The Access policy ID. - schema: - type: string - x-stackql-sdk: - service: email_security - resource_chain: - - settings - - allow_policies - method: edit - /accounts/{account_id}/email-security/settings/block_senders: - get: - description: >- - Returns a paginated list of blocked email sender patterns. These - patterns prevent emails from matching senders from being delivered. - Supports filtering by pattern type and searching across patterns. - operationId: email_security_list_blocked_senders - parameters: - - description: Current page within paginated list of results. - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - description: The number of results per page. Maximum value is 1000. - in: query - name: per_page - schema: - default: 20 - maximum: 1000 - minimum: 1 - type: integer - - description: Search term for filtering records. Behavior may change. - in: query - name: search - schema: - type: string - - description: Field to sort by. - in: query - name: order - schema: - enum: - - pattern - - created_at - type: string - - description: The sorting direction. - in: query - name: direction - schema: - enum: - - asc - - desc - type: string - - description: Filter by pattern type. - in: query - name: pattern_type - schema: - $ref: '#/components/schemas/emailSecurityPatternType' - - description: Filter by pattern value. - in: query - name: pattern - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - type: object - result: - $ref: '#/components/schemas/emailSecurityBlockedSenderList' - required: - - success - - errors - - messages - description: List of blocked senders - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List blocked email senders - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - - 'Cloud Email Security: Read' - x-stackql-sdk: - service: email_security - resource_chain: - - settings - - block_senders - method: list - post: - description: >- - Creates a new blocked sender pattern. Emails matching this pattern will - be blocked from delivery. Patterns can be email addresses, domains, or - IP addresses, and support regular expressions. - operationId: email_security_create_blocked_sender - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityCreateBlockedSender' - responses: - '201': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/emailSecurityBlockedSender' - required: - - success - - errors - - messages - description: Created blocked sender - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create blocked email sender - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - x-stackql-sdk: - service: email_security - resource_chain: - - settings - - block_senders - method: create - /accounts/{account_id}/email-security/settings/block_senders/batch: - post: - description: >- - Execute multiple operations atomically. All four operation arrays - (deletes, patches, puts, posts) are required and executed in order. Send - empty arrays for unused operations. - operationId: email_security_batch_blocked_senders - requestBody: - content: - application/json: - schema: - properties: - deletes: - items: - properties: - id: - $ref: '#/components/schemas/emailSecurityBlockedSenderId' - required: - - id - type: object - maxItems: 1000 - type: array - patches: - items: - description: A blocked sender pattern - minProperties: 1 - properties: - comments: - maxLength: 1024 - nullable: true - type: string - created_at: - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - id: - readOnly: true - $ref: '#/components/schemas/emailSecurityBlockedSenderId' - is_regex: - type: boolean - x-auditable: true - last_modified: - deprecated: true - description: >- - Deprecated, use `modified_at` instead. End of life: - November 1, 2026. - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - modified_at: - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - pattern: - maxLength: 1024 - minLength: 1 - type: string - x-auditable: true - pattern_type: - $ref: '#/components/schemas/emailSecurityPatternType' - type: object - required: - - id - maxItems: 1000 - type: array - posts: - items: - $ref: '#/components/schemas/emailSecurityCreateBlockedSender' - maxItems: 1000 - type: array - puts: - items: - description: A blocked sender pattern - properties: - comments: - maxLength: 1024 - nullable: true - type: string - created_at: - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - id: - readOnly: true - $ref: '#/components/schemas/emailSecurityBlockedSenderId' - is_regex: - type: boolean - x-auditable: true - last_modified: - deprecated: true - description: >- - Deprecated, use `modified_at` instead. End of life: - November 1, 2026. - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - modified_at: - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - pattern: - maxLength: 1024 - minLength: 1 - type: string - x-auditable: true - pattern_type: - $ref: '#/components/schemas/emailSecurityPatternType' - type: object - required: - - id - maxItems: 1000 - type: array - required: - - deletes - - patches - - puts - - posts - type: object - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - properties: - deletes: - items: - $ref: >- - #/components/schemas/emailSecurityDeletedBlockedSender - type: array - patches: - $ref: '#/components/schemas/emailSecurityBlockedSenderList' - posts: - $ref: '#/components/schemas/emailSecurityBlockedSenderList' - puts: - $ref: '#/components/schemas/emailSecurityBlockedSenderList' - type: object - required: - - success - - errors - - messages - description: Batch operation results - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Batch blocked senders operations - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - /accounts/{account_id}/email-security/settings/block_senders/{pattern_id}: - delete: - description: >- - Removes a blocked sender pattern. After deletion, emails from this - sender will no longer be automatically blocked based on this rule. - operationId: email_security_delete_blocked_sender - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/emailSecurityDeletedBlockedSender' - required: - - success - - errors - - messages - description: Deleted blocked sender - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete a blocked email sender - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: pattern_id - schema: - $ref: '#/components/schemas/emailSecurityBlockedSenderId' - required: true - x-stackql-sdk: - service: email_security - resource_chain: - - settings - - block_senders - method: delete - get: - description: >- - Retrieves details for a specific blocked sender pattern including its - pattern type, value, and metadata. - operationId: email_security_get_blocked_sender - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/emailSecurityBlockedSender' - required: - - success - - errors - - messages - description: Blocked sender details - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get a blocked email sender - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - - 'Cloud Email Security: Read' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: pattern_id - schema: - $ref: '#/components/schemas/emailSecurityBlockedSenderId' - required: true - x-stackql-sdk: - service: email_security - resource_chain: - - settings - - block_senders - method: get - patch: - description: >- - Updates an existing blocked sender pattern. Only provided fields will be - modified. The pattern will continue blocking emails until deleted. - operationId: email_security_update_blocked_sender - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityUpdateBlockedSender' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/emailSecurityBlockedSender' - required: - - success - - errors - - messages - description: Updated blocked sender - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update a blocked email sender - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: pattern_id - schema: - $ref: '#/components/schemas/emailSecurityBlockedSenderId' - required: true - x-stackql-sdk: - service: email_security - resource_chain: - - settings - - block_senders - method: edit - /accounts/{account_id}/email-security/settings/domains: - get: - description: >- - Returns a paginated list of email domains protected by Email Security. - Includes domain configuration, delivery modes, and authorization status. - Supports filtering by delivery mode and integration ID. - operationId: email_security_list_domains - parameters: - - description: Current page within paginated list of results. - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - description: The number of results per page. Maximum value is 1000. - in: query - name: per_page - schema: - default: 20 - maximum: 1000 - minimum: 1 - type: integer - - description: Search term for filtering records. Behavior may change. - in: query - name: search - schema: - type: string - - description: Field to sort by. - in: query - name: order - schema: - enum: - - domain - - created_at - type: string - - description: The sorting direction. - in: query - name: direction - schema: - enum: - - asc - - desc - type: string - - description: Delivery mode to filter by. - in: query - name: allowed_delivery_mode - schema: - $ref: '#/components/schemas/emailSecurityDeliveryMode' - - description: Domain names to filter by. - in: query - name: domain - schema: - items: - type: string - type: array - explode: true - - description: Currently active delivery mode to filter by. - in: query - name: active_delivery_mode - schema: - $ref: '#/components/schemas/emailSecurityDeliveryMode' - - description: Integration ID to filter by. - in: query - name: integration_id - schema: - format: uuid - type: string - - description: Filters response to domains with the provided status. - in: query - name: status - schema: - $ref: '#/components/schemas/emailSecurityDomainStatus' - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - type: object - result: - $ref: '#/components/schemas/emailSecurityDomainList' - required: - - success - - errors - - messages - description: List of domains - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List protected email domains - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - - 'Cloud Email Security: Read' - x-stackql-sdk: - service: email_security - resource_chain: - - settings - - domains - method: list - /accounts/{account_id}/email-security/settings/domains/{domain_id}: - delete: - description: >- - Removes email security protection from a domain. After deletion, emails - for this domain will no longer be processed by Email Security. This - action cannot be undone. - operationId: email_security_delete_domain - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/emailSecurityDeletedDomain' - required: - - success - - errors - - messages - description: Deleted domain - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Unprotect an email domain - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: domain_id - schema: - $ref: '#/components/schemas/emailSecurityDomainId' - required: true - x-stackql-sdk: - service: email_security - resource_chain: - - settings - - domains - method: delete - get: - description: >- - Retrieves detailed information for a specific protected email domain - including its delivery configuration, SPF/DMARC status, and - authorization state. - operationId: email_security_get_domain - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/emailSecurityDomain' - required: - - success - - errors - - messages - description: Domain details - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get an email domain - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - - 'Cloud Email Security: Read' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: domain_id - schema: - $ref: '#/components/schemas/emailSecurityDomainId' - required: true - x-stackql-sdk: - service: email_security - resource_chain: - - settings - - domains - method: get - patch: - description: >- - Updates configuration for a protected email domain. Only provided fields - will be modified. Changes affect delivery mode, security settings, and - regional processing. - operationId: email_security_update_domain - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityUpdateDomain' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/emailSecurityDomain' - required: - - success - - errors - - messages - description: Updated domain - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update an email domain - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: domain_id - schema: - $ref: '#/components/schemas/emailSecurityDomainId' - required: true - x-stackql-sdk: - service: email_security - resource_chain: - - settings - - domains - method: edit - /accounts/{account_id}/email-security/settings/impersonation_registry: - get: - description: >- - Returns a paginated list of protected identities in the impersonation - registry. These entries define identities and email addresses to protect - from impersonation attacks. Can be manually added or automatically - synced from directory integrations. - operationId: email_security_list_impersonation_registry - parameters: - - description: Current page within paginated list of results. - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - description: The number of results per page. Maximum value is 1000. - in: query - name: per_page - schema: - default: 20 - maximum: 1000 - minimum: 1 - type: integer - - description: Search term for filtering records. Behavior may change. - in: query - name: search - schema: - type: string - - description: Field to sort by. - in: query - name: order - schema: - enum: - - name - - email - - created_at - type: string - - description: The sorting direction. - in: query - name: direction - schema: - enum: - - asc - - desc - type: string - - in: query - name: provenance - schema: - $ref: '#/components/schemas/emailSecurityProvenance' - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - type: object - result: - $ref: >- - #/components/schemas/emailSecurityImpersonationRegistryList - required: - - success - - errors - - messages - description: List of impersonation registry entries - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List entries in impersonation registry - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - - 'Cloud Email Security: Read' - x-stackql-sdk: - service: email_security - resource_chain: - - settings - - impersonation_registry - method: list - post: - description: >- - Creates a new entry in the impersonation registry to protect against - impersonation. Emails attempting to impersonate this identity will be - flagged. Supports regex patterns for flexible email matching. - operationId: email_security_create_impersonation_registry - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityCreateImpersonationRegistry' - responses: - '201': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/emailSecurityImpersonationRegistry' - required: - - success - - errors - - messages - description: Created impersonation registry entry - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create impersonation registry entry - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - x-stackql-sdk: - service: email_security - resource_chain: - - settings - - impersonation_registry - method: create - /accounts/{account_id}/email-security/settings/impersonation_registry/{impersonation_registry_id}: - delete: - description: >- - Removes an entry from the impersonation registry. After deletion, this - identity will no longer be protected from impersonation. - operationId: email_security_delete_impersonation_registry - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: >- - #/components/schemas/emailSecurityDeletedImpersonationRegistry - required: - - success - - errors - - messages - description: Deleted impersonation registry entry - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete an impersonation registry entry - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: impersonation_registry_id - schema: - $ref: '#/components/schemas/emailSecurityImpersonationRegistryId' - required: true - x-stackql-sdk: - service: email_security - resource_chain: - - settings - - impersonation_registry - method: delete - get: - description: >- - Retrieves details for a specific impersonation registry entry including - the protected identity, email pattern, and synchronization source if - directory-synced. - operationId: email_security_get_impersonation_registry - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/emailSecurityImpersonationRegistry' - required: - - success - - errors - - messages - description: Impersonation registry entry details - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get an impersonation registry entry - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - - 'Cloud Email Security: Read' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: impersonation_registry_id - schema: - $ref: '#/components/schemas/emailSecurityImpersonationRegistryId' - required: true - x-stackql-sdk: - service: email_security - resource_chain: - - settings - - impersonation_registry - method: get - patch: - description: >- - Updates an existing impersonation registry entry. Only provided fields - will be modified. Directory-synced entries can't be updated. - operationId: email_security_update_impersonation_registry - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityUpdateImpersonationRegistry' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/emailSecurityImpersonationRegistry' - required: - - success - - errors - - messages - description: Updated impersonation registry entry - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update an impersonation registry entry - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: impersonation_registry_id - schema: - $ref: '#/components/schemas/emailSecurityImpersonationRegistryId' - required: true - x-stackql-sdk: - service: email_security - resource_chain: - - settings - - impersonation_registry - method: edit - /accounts/{account_id}/email-security/settings/sending_domain_restrictions: - get: - description: >- - Returns a paginated list of sending domain restrictions. These - restrictions enforce TLS requirements for emails from specific domains. - Mail without TLS from restricted domains will be dropped unless the - subdomain is in the exclude list. Supports sorting and searching. - operationId: email_security_list_sending_domain_restrictions - parameters: - - description: Current page within paginated list of results. - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - description: The number of results per page. Maximum value is 1000. - in: query - name: per_page - schema: - default: 20 - maximum: 1000 - minimum: 1 - type: integer - - description: Search term for filtering records. Behavior may change. - in: query - name: search - schema: - type: string - - description: Field to sort by. - in: query - name: order - schema: - enum: - - domain - - created_at - type: string - - description: The sorting direction. - in: query - name: direction - schema: - enum: - - asc - - desc - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - type: object - result: - $ref: >- - #/components/schemas/emailSecuritySendingDomainRestrictionList - required: - - success - - errors - - messages - description: List of sending domain restrictions - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List sending domain restrictions - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - - 'Cloud Email Security: Read' - post: - description: >- - Creates a new sending domain restriction to enforce TLS requirements for - a domain. Emails without TLS from this domain will be dropped unless the - subdomain is in the exclude list. - operationId: email_security_create_sending_domain_restriction - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityCreateSendingDomainRestriction' - responses: - '201': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/emailSecuritySendingDomainRestriction' - required: - - success - - errors - - messages - description: Created sending domain restriction - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a sending domain restriction - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - /accounts/{account_id}/email-security/settings/sending_domain_restrictions/batch: - post: - description: >- - Executes multiple delete operations on sending domain restrictions - atomically. All operations succeed or fail together as a transaction. - Currently only supports batch deletion. Removes TLS enforcement - requirements for the specified domains. - operationId: email_security_batch_sending_domain_restrictions - requestBody: - content: - application/json: - schema: - properties: - deletes: - items: - properties: - id: - $ref: >- - #/components/schemas/emailSecuritySendingDomainRestrictionId - required: - - id - type: object - maxItems: 1000 - type: array - required: - - deletes - type: object - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - properties: - deletes: - items: - properties: - id: - $ref: >- - #/components/schemas/emailSecuritySendingDomainRestrictionId - required: - - id - type: object - type: array - required: - - deletes - type: object - required: - - success - - errors - - messages - description: Batch operation results - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Batch sending domain restrictions operations - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - /accounts/{account_id}/email-security/settings/sending_domain_restrictions/{sending_domain_restriction_id}: - delete: - description: >- - Removes a sending domain restriction. After deletion, TLS will no longer - be enforced for emails from this domain. - operationId: email_security_delete_sending_domain_restriction - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: >- - #/components/schemas/emailSecurityDeletedSendingDomainRestriction - required: - - success - - errors - - messages - description: Deleted sending domain restriction - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete a sending domain restriction - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: sending_domain_restriction_id - schema: - $ref: '#/components/schemas/emailSecuritySendingDomainRestrictionId' - required: true - get: - description: >- - Retrieves details for a specific sending domain restriction including - the domain requiring TLS and any excluded subdomains exempt from the TLS - requirement. - operationId: email_security_get_sending_domain_restriction - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/emailSecuritySendingDomainRestriction' - required: - - success - - errors - - messages - description: Sending domain restriction details - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get a sending domain restriction - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - - 'Cloud Email Security: Read' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: sending_domain_restriction_id - schema: - $ref: '#/components/schemas/emailSecuritySendingDomainRestrictionId' - required: true - patch: - description: >- - Updates an existing sending domain restriction. Only provided fields - will be modified. Changes affect which domains require TLS and which - subdomains are excluded. - operationId: email_security_update_sending_domain_restriction - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityUpdateSendingDomainRestriction' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/emailSecuritySendingDomainRestriction' - required: - - success - - errors - - messages - description: Updated sending domain restriction - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update a sending domain restriction - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: sending_domain_restriction_id - schema: - $ref: '#/components/schemas/emailSecuritySendingDomainRestrictionId' - required: true - /accounts/{account_id}/email-security/settings/trusted_domains: - get: - description: >- - Returns a paginated list of trusted domain patterns. Trusted domains - prevent false positives for recently registered domains and lookalike - domain detections. Patterns can use regular expressions for flexible - matching. - operationId: email_security_list_trusted_domains - parameters: - - description: Current page within paginated list of results. - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - description: The number of results per page. Maximum value is 1000. - in: query - name: per_page - schema: - default: 20 - maximum: 1000 - minimum: 1 - type: integer - - description: Search term for filtering records. Behavior may change. - in: query - name: search - schema: - type: string - - description: Field to sort by. - in: query - name: order - schema: - enum: - - pattern - - created_at - type: string - - description: The sorting direction. - in: query - name: direction - schema: - enum: - - asc - - desc - type: string - - description: >- - Filter to show only recently registered domains that are trusted to - prevent triggering Suspicious or Malicious dispositions. - in: query - name: is_recent - schema: - type: boolean - - description: >- - Filter to show only proximity domains (partner or approved domains - with similar spelling to connected domains) that prevent Spoof - dispositions. - in: query - name: is_similarity - schema: - type: boolean - - in: query - name: pattern - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - type: object - result: - $ref: '#/components/schemas/emailSecurityTrustedDomainList' - required: - - success - - errors - - messages - description: List of trusted domains - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List trusted email domains - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - - 'Cloud Email Security: Read' - x-stackql-sdk: - service: email_security - resource_chain: - - settings - - trusted_domains - method: list - post: - description: >- - Creates a new trusted domain pattern. Use for partner domains or - approved senders that should bypass recent domain registration and - similarity checks. Configure whether it prevents recent domain or spoof - dispositions. - operationId: email_security_create_trusted_domain - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityCreateTrustedDomain' - responses: - '201': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/emailSecurityTrustedDomain' - required: - - success - - errors - - messages - description: Created trusted domain - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create trusted email domain - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - x-stackql-sdk: - service: email_security - resource_chain: - - settings - - trusted_domains - method: create - /accounts/{account_id}/email-security/settings/trusted_domains/batch: - post: - description: >- - Execute multiple operations atomically. All four operation arrays - (deletes, patches, puts, posts) are required and executed in order. Send - empty arrays for unused operations. - operationId: email_security_batch_trusted_domains - requestBody: - content: - application/json: - schema: - properties: - deletes: - items: - properties: - id: - $ref: '#/components/schemas/emailSecurityTrustedDomainId' - required: - - id - type: object - maxItems: 1000 - type: array - patches: - items: - description: A trusted email domain - minProperties: 1 - properties: - comments: - maxLength: 1024 - nullable: true - type: string - created_at: - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - id: - readOnly: true - $ref: '#/components/schemas/emailSecurityTrustedDomainId' - is_recent: - description: >- - Select to prevent recently registered domains from - triggering a Suspicious or Malicious disposition. - type: boolean - x-auditable: true - is_regex: - type: boolean - x-auditable: true - is_similarity: - description: >- - Select for partner or other approved domains that have - similar spelling to your connected domains. Prevents - listed domains from triggering a Spoof disposition. - type: boolean - x-auditable: true - last_modified: - deprecated: true - description: >- - Deprecated, use `modified_at` instead. End of life: - November 1, 2026. - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - modified_at: - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - pattern: - maxLength: 1024 - minLength: 1 - type: string - x-auditable: true - type: object - required: - - id - maxItems: 1000 - type: array - posts: - items: - $ref: '#/components/schemas/emailSecurityCreateTrustedDomain' - maxItems: 1000 - type: array - puts: - items: - description: A trusted email domain - properties: - comments: - maxLength: 1024 - nullable: true - type: string - created_at: - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - id: - readOnly: true - $ref: '#/components/schemas/emailSecurityTrustedDomainId' - is_recent: - description: >- - Select to prevent recently registered domains from - triggering a Suspicious or Malicious disposition. - type: boolean - x-auditable: true - is_regex: - type: boolean - x-auditable: true - is_similarity: - description: >- - Select for partner or other approved domains that have - similar spelling to your connected domains. Prevents - listed domains from triggering a Spoof disposition. - type: boolean - x-auditable: true - last_modified: - deprecated: true - description: >- - Deprecated, use `modified_at` instead. End of life: - November 1, 2026. - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - modified_at: - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - pattern: - maxLength: 1024 - minLength: 1 - type: string - x-auditable: true - type: object - required: - - id - maxItems: 1000 - type: array - required: - - deletes - - patches - - puts - - posts - type: object - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - properties: - deletes: - items: - $ref: >- - #/components/schemas/emailSecurityDeletedTrustedDomain - type: array - patches: - $ref: '#/components/schemas/emailSecurityTrustedDomainList' - posts: - $ref: '#/components/schemas/emailSecurityTrustedDomainList' - puts: - $ref: '#/components/schemas/emailSecurityTrustedDomainList' - type: object - required: - - success - - errors - - messages - description: Batch operation results - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Batch trusted domains operations - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - /accounts/{account_id}/email-security/settings/trusted_domains/{trusted_domain_id}: - delete: - description: >- - Removes a trusted domain pattern. After deletion, emails from this - domain will be subject to normal recent domain and similarity checks. - operationId: email_security_delete_trusted_domain - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/emailSecurityDeletedTrustedDomain' - required: - - success - - errors - - messages - description: Deleted trusted domain - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete a trusted email domain - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: trusted_domain_id - schema: - $ref: '#/components/schemas/emailSecurityTrustedDomainId' - required: true - x-stackql-sdk: - service: email_security - resource_chain: - - settings - - trusted_domains - method: delete - get: - description: >- - Retrieves details for a specific trusted domain pattern including its - pattern value, whether it uses regex matching, and which detection types - it affects. - operationId: email_security_get_trusted_domain - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/emailSecurityTrustedDomain' - required: - - success - - errors - - messages - description: Trusted domain details - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get a trusted email domain - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - - 'Cloud Email Security: Read' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: trusted_domain_id - schema: - $ref: '#/components/schemas/emailSecurityTrustedDomainId' - required: true - x-stackql-sdk: - service: email_security - resource_chain: - - settings - - trusted_domains - method: get - patch: - description: >- - Updates an existing trusted domain pattern. Only provided fields will be - modified. Changes take effect for new emails matching the pattern. - operationId: email_security_update_trusted_domain - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityUpdateTrustedDomain' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/emailSecurityTrustedDomain' - required: - - success - - errors - - messages - description: Updated trusted domain - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update a trusted email domain - tags: - - Email Security Settings - x-api-token-group: - - 'Cloud Email Security: Write' - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: trusted_domain_id - schema: - $ref: '#/components/schemas/emailSecurityTrustedDomainId' - required: true - x-stackql-sdk: - service: email_security - resource_chain: - - settings - - trusted_domains - method: edit - /accounts/{account_id}/email-security/submissions: - get: - description: >- - Returns information for submissions made to reclassify emails. Shows the - status, outcome, and disposition changes for reclassification requests - made by users or the security team. Useful for tracking false - positive/negative reports. - operationId: email_security_submissions - parameters: - - description: The beginning of the search date range. Defaults to `now - 30 days`. - in: query - name: start - schema: - format: date-time - type: string - - description: The end of the search date range. Defaults to `now`. - in: query - name: end - schema: - format: date-time - type: string - - in: query - name: type - schema: - enum: - - TEAM - - USER - type: string - - in: query - name: submission_id - schema: - type: string - - in: query - name: original_disposition - schema: - $ref: '#/components/schemas/emailSecuritySubmissionDisposition' - - in: query - name: requested_disposition - schema: - $ref: '#/components/schemas/emailSecuritySubmissionDisposition' - - in: query - name: outcome_disposition - schema: - $ref: '#/components/schemas/emailSecuritySubmissionDisposition' - - in: query - name: status - schema: - type: string - - in: query - name: query - schema: - nullable: true - type: string - - description: Current page within paginated list of results. - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - description: The number of results per page. Maximum value is 1000. - in: query - name: per_page - schema: - default: 20 - maximum: 1000 - minimum: 1 - type: integer - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/emailSecurityMessages' - messages: - $ref: '#/components/schemas/emailSecurityMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - type: object - result: - items: - $ref: '#/components/schemas/emailSecuritySubmission' - type: array - required: - - success - - errors - - messages - description: List of submissions - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get reclassify submissions - tags: - - Email Security - x-api-token-group: null - x-stackql-sdk: - service: email_security - resource_chain: - - submissions - method: list -components: - schemas: - emailSecurityActionEntry: - properties: - completed_at: - description: Timestamp when the action completed - format: date-time - nullable: true - type: string - operation: - enum: - - PREVIEW - - QUARANTINE_RELEASE - - SUBMISSION - - MOVE - type: string - properties: - nullable: true - type: object - $ref: '#/components/schemas/emailSecurityActionEntryProperties' - started_at: - description: Timestamp when the action was initiated - format: date-time - nullable: true - type: string - status: - nullable: true - type: string - success: - nullable: true - type: boolean - required: - - operation - type: object - emailSecurityActionEntryProperties: - properties: - folder: - nullable: true - type: string - requested_by: - nullable: true - type: string - requested_disposition: - nullable: true - type: string - service: - nullable: true - type: string - submission_id: - nullable: true - type: string - submission_type: - nullable: true - type: string - type: object - emailSecurityActionLogEntry: - properties: - completed_at: - description: Timestamp when action completed - format: date-time - readOnly: true - type: string - completed_timestamp: - deprecated: true - description: >- - Deprecated, use `completed_at` instead. End of life: November 1, - 2026. - readOnly: true - type: string - operation: - description: Type of action performed - enum: - - MOVE - - RELEASE - - RECLASSIFY - - SUBMISSION - - QUARANTINE_RELEASE - - PREVIEW - type: string - properties: - description: Additional properties for the action - properties: - folder: - description: Target folder for move operations - type: string - requested_by: - description: User who requested the action - type: string - type: object - status: - description: Status of the action - nullable: true - type: string - required: - - completed_at - - operation - type: object - emailSecurityAllowPolicy: - description: An email allow policy - properties: - comments: - example: Trust all messages send from test@example.com - maxLength: 1024 - nullable: true - type: string - created_at: - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - id: - readOnly: true - $ref: '#/components/schemas/emailSecurityAllowPolicyId' - is_acceptable_sender: - description: >- - Messages from this sender will be exempted from Spam, Spoof and Bulk - dispositions. Note - This will not exempt messages with Malicious or - Suspicious dispositions. - example: false - type: boolean - x-auditable: true - is_exempt_recipient: - description: Messages to this recipient will bypass all detections - example: false - type: boolean - x-auditable: true - is_recipient: - deprecated: true - description: >- - Deprecated as of July 1, 2025. Use `is_exempt_recipient` instead. - End of life: July 1, 2026. - example: false - type: boolean - x-auditable: true - is_regex: - example: false - type: boolean - x-auditable: true - is_sender: - deprecated: true - description: >- - Deprecated as of July 1, 2025. Use `is_trusted_sender` instead. End - of life: July 1, 2026. - example: true - type: boolean - x-auditable: true - is_spoof: - deprecated: true - description: >- - Deprecated as of July 1, 2025. Use `is_acceptable_sender` instead. - End of life: July 1, 2026. - example: false - type: boolean - x-auditable: true - is_trusted_sender: - description: >- - Messages from this sender will bypass all detections and link - following - example: true - type: boolean - x-auditable: true - last_modified: - deprecated: true - description: >- - Deprecated, use `modified_at` instead. End of life: November 1, - 2026. - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - modified_at: - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - pattern: - example: test@example.com - maxLength: 1024 - minLength: 1 - type: string - x-auditable: true - pattern_type: - $ref: '#/components/schemas/emailSecurityPatternType' - verify_sender: - description: >- - Enforce DMARC, SPF or DKIM authentication. When on, Email Security - only honors policies that pass authentication. - example: true - type: boolean - x-auditable: true - required: - - id - - created_at - - last_modified - type: object - emailSecurityAllowPolicyId: - description: Allow policy identifier - example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 - format: uuid - type: string - x-auditable: true - emailSecurityAllowPolicyList: - items: - $ref: '#/components/schemas/emailSecurityAllowPolicy' - type: array - emailSecurityApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/emailSecurityMessages' - messages: - example: [] - $ref: '#/components/schemas/emailSecurityMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - emailSecurityAttachment: - properties: - content_type: - description: MIME type of the attachment - nullable: true - type: string - detection: - description: Detection result for this attachment - nullable: true - type: string - $ref: '#/components/schemas/emailSecurityDispositionLabel' - encrypted: - description: Whether the attachment is encrypted - nullable: true - type: boolean - filename: - description: Name of the attached file - nullable: true - type: string - md5: - description: MD5 hash of the attachment - nullable: true - type: string - name: - description: Attachment name (alternative to filename) - nullable: true - type: string - sha1: - description: SHA1 hash of the attachment - nullable: true - type: string - sha256: - description: SHA256 hash of the attachment - nullable: true - type: string - size: - description: Size of the attachment in bytes - minimum: 0 - type: integer - required: - - size - type: object - emailSecurityBlockedSender: - description: A blocked sender pattern - properties: - comments: - example: Block sender with email test@example.com - maxLength: 1024 - nullable: true - type: string - created_at: - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - id: - readOnly: true - $ref: '#/components/schemas/emailSecurityBlockedSenderId' - is_regex: - example: false - type: boolean - x-auditable: true - last_modified: - deprecated: true - description: >- - Deprecated, use `modified_at` instead. End of life: November 1, - 2026. - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - modified_at: - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - pattern: - example: test@example.com - maxLength: 1024 - minLength: 1 - type: string - x-auditable: true - pattern_type: - $ref: '#/components/schemas/emailSecurityPatternType' - type: object - emailSecurityBlockedSenderId: - description: Blocked sender pattern identifier - example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 - format: uuid - type: string - x-auditable: true - emailSecurityBlockedSenderList: - items: - $ref: '#/components/schemas/emailSecurityBlockedSender' - type: array - emailSecurityCreateAllowPolicy: - description: Create an allow policy - $ref: '#/components/schemas/emailSecurityAllowPolicy' - emailSecurityCreateBlockedSender: - description: Create a blocked sender pattern - $ref: '#/components/schemas/emailSecurityBlockedSender' - emailSecurityCreateImpersonationRegistry: - description: Create an impersonation registry entry - $ref: '#/components/schemas/emailSecurityImpersonationRegistry' - emailSecurityCreateSendingDomainRestriction: - description: Create a sending domain restriction. - $ref: '#/components/schemas/emailSecuritySendingDomainRestriction' - emailSecurityCreateTrustedDomain: - description: Create a trusted domain - $ref: '#/components/schemas/emailSecurityTrustedDomain' - emailSecurityCursorResultInfo: - properties: - count: - description: Number of items in current page - minimum: 0 - type: integer - next: - description: Cursor for next page - nullable: true - type: string - page: - deprecated: true - description: 'Deprecated: Always returns 0. End of life: November 1, 2026.' - minimum: 0 - type: integer - per_page: - description: Number of items per page - minimum: 0 - type: integer - previous: - description: Cursor for previous page - nullable: true - type: string - total_count: - deprecated: true - description: 'Deprecated: Always returns 0. End of life: November 1, 2026.' - minimum: 0 - type: integer - required: - - per_page - - count - - total_count - type: object - emailSecurityCustomerStatus: - enum: - - escalated - - reviewed - - unreviewed - nullable: true - type: string - emailSecurityDeletedAllowPolicy: - properties: - id: - $ref: '#/components/schemas/emailSecurityAllowPolicyId' - required: - - id - type: object - emailSecurityDeletedBlockedSender: - properties: - id: - $ref: '#/components/schemas/emailSecurityBlockedSenderId' - required: - - id - type: object - emailSecurityDeletedDomain: - properties: - id: - $ref: '#/components/schemas/emailSecurityDomainId' - required: - - id - type: object - emailSecurityDeletedImpersonationRegistry: - properties: - id: - $ref: '#/components/schemas/emailSecurityImpersonationRegistryId' - required: - - id - type: object - emailSecurityDeletedSendingDomainRestriction: - properties: - id: - $ref: '#/components/schemas/emailSecuritySendingDomainRestrictionId' - required: - - id - type: object - emailSecurityDeletedTrustedDomain: - properties: - id: - $ref: '#/components/schemas/emailSecurityTrustedDomainId' - required: - - id - type: object - emailSecurityDeliveryMode: - enum: - - DIRECT - - BCC - - JOURNAL - - API - - RETRO_SCAN - type: string - emailSecurityDispositionLabel: - enum: - - MALICIOUS - - MALICIOUS-BEC - - SUSPICIOUS - - SPOOF - - SPAM - - BULK - - ENCRYPTED - - EXTERNAL - - UNKNOWN - - NONE - type: string - emailSecurityDmarcStatus: - enum: - - none - - good - - invalid - type: string - emailSecurityDomain: - properties: - allowed_delivery_modes: - items: - $ref: '#/components/schemas/emailSecurityDeliveryMode' - type: array - authorization: - $ref: '#/components/schemas/emailSecurityDomainAuthorization' - created_at: - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - dmarc_status: - $ref: '#/components/schemas/emailSecurityDmarcStatus' - domain: - example: example.com - type: string - x-auditable: true - drop_dispositions: - items: - $ref: '#/components/schemas/emailSecurityDispositionLabel' - type: array - emails_processed: - $ref: '#/components/schemas/emailSecurityEmailsProcessed' - folder: - $ref: '#/components/schemas/emailSecurityScannableFolder' - id: - $ref: '#/components/schemas/emailSecurityDomainId' - inbox_provider: - enum: - - Microsoft - - Google - - null - nullable: true - type: string - integration_id: - format: uuid - nullable: true - type: string - ip_restrictions: - example: - - 192.0.2.0/24 - - 2001:db8::/32 - items: - type: string - type: array - last_modified: - deprecated: true - description: >- - Deprecated, use `modified_at` instead. End of life: November 1, - 2026. - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - lookback_hops: - type: integer - x-auditable: true - modified_at: - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - o365_tenant_id: - nullable: true - type: string - regions: - items: - $ref: '#/components/schemas/emailSecurityRegion' - type: array - require_tls_inbound: - nullable: true - type: boolean - require_tls_outbound: - nullable: true - type: boolean - spf_status: - $ref: '#/components/schemas/emailSecuritySpfStatus' - status: - $ref: '#/components/schemas/emailSecurityDomainStatus' - transport: - type: string - x-auditable: true - type: object - emailSecurityDomainAuthorization: - properties: - authorized: - type: boolean - status_message: - nullable: true - type: string - timestamp: - format: date-time - readOnly: true - type: string - required: - - authorized - - timestamp - type: object - emailSecurityDomainId: - description: Domain identifier - example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 - format: uuid - type: string - x-auditable: true - emailSecurityDomainList: - items: - $ref: '#/components/schemas/emailSecurityDomain' - type: array - emailSecurityDomainStatus: - enum: - - pending - - active - - failed - - timeout - type: string - emailSecurityEmailsProcessed: - properties: - timestamp: - format: date-time - readOnly: true - type: string - total_emails_processed: - minimum: 0 - type: integer - total_emails_processed_previous: - minimum: 0 - type: integer - required: - - total_emails_processed - - total_emails_processed_previous - - timestamp - type: object - emailSecurityImpersonationRegistry: - description: An impersonation registry entry - properties: - comments: - nullable: true - type: string - created_at: - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - directory_id: - nullable: true - type: integer - directory_node_id: - nullable: true - type: integer - email: - example: john.doe@example.com - type: string - x-auditable: true - external_directory_node_id: - deprecated: true - nullable: true - type: string - id: - readOnly: true - $ref: '#/components/schemas/emailSecurityImpersonationRegistryId' - is_email_regex: - example: false - type: boolean - x-auditable: true - last_modified: - deprecated: true - description: >- - Deprecated, use `modified_at` instead. End of life: November 1, - 2026. - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - modified_at: - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - name: - example: John Doe - maxLength: 1024 - type: string - x-auditable: true - provenance: - $ref: '#/components/schemas/emailSecurityProvenance' - type: object - emailSecurityImpersonationRegistryId: - description: Impersonation registry entry identifier - example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 - format: uuid - title: identifier - type: string - x-auditable: true - emailSecurityImpersonationRegistryList: - items: - $ref: '#/components/schemas/emailSecurityImpersonationRegistry' - type: array - emailSecurityInvestigateId: - description: Unique identifier for a message retrieved from investigation - example: 4Njp3P0STMz2c02Q-2024-01-05T10:00:00-12345678 - type: string - emailSecurityLink: - properties: - href: - type: string - text: - nullable: true - type: string - required: - - href - type: object - emailSecurityMailboxDestination: - enum: - - Inbox - - JunkEmail - - DeletedItems - - RecoverableItemsDeletions - - RecoverableItemsPurges - type: string - emailSecurityMessageDeliveryMode: - enum: - - DIRECT - - BCC - - JOURNAL - - REVIEW_SUBMISSION - - DMARC_UNVERIFIED - - DMARC_FAILURE_REPORT - - DMARC_AGGREGATE_REPORT - - THREAT_INTEL_SUBMISSION - - SIMULATION_SUBMISSION - - API - - RETRO_SCAN - type: string - emailSecurityMessageDeliveryStatus: - description: Delivery status of the message. - enum: - - delivered - - moved - - quarantined - - rejected - - deferred - - bounced - - queued - type: string - emailSecurityMessageDetails: - properties: - action_log: - deprecated: true - description: >- - Deprecated, use `GET /investigate/{investigate_id}/action_log` - instead. End of life: November 1, 2026. - items: - $ref: '#/components/schemas/emailSecurityActionLogEntry' - type: array - alert_id: - nullable: true - type: string - client_recipients: - items: - type: string - type: array - delivery_mode: - $ref: '#/components/schemas/emailSecurityMessageDeliveryMode' - delivery_status: - items: - $ref: '#/components/schemas/emailSecurityMessageDeliveryStatus' - nullable: true - type: array - detection_reasons: - items: - type: string - type: array - edf_hash: - nullable: true - type: string - envelope_from: - nullable: true - type: string - envelope_to: - items: - type: string - nullable: true - type: array - final_disposition: - $ref: '#/components/schemas/emailSecurityDispositionLabel' - findings: - deprecated: true - description: >- - Deprecated, use the `findings` field from `GET - /investigate/{investigate_id}/detections` instead. End of life: - November 1, 2026. Detection findings for this message. - items: - properties: - attachment: - nullable: true - type: string - detail: - nullable: true - type: string - detection: - $ref: '#/components/schemas/emailSecurityDispositionLabel' - field: - nullable: true - type: string - name: - nullable: true - type: string - portion: - nullable: true - type: string - reason: - nullable: true - type: string - score: - format: double - nullable: true - type: number - value: - nullable: true - type: string - type: object - nullable: true - type: array - from: - nullable: true - type: string - from_name: - nullable: true - type: string - htmltext_structure_hash: - nullable: true - type: string - id: - x-auditable: true - $ref: '#/components/schemas/emailSecurityInvestigateId' - is_phish_submission: - type: boolean - is_quarantined: - type: boolean - message_id: - nullable: true - type: string - post_delivery_operations: - description: Post-delivery operations performed on this message - items: - enum: - - PREVIEW - - QUARANTINE_RELEASE - - SUBMISSION - - MOVE - type: string - nullable: true - type: array - postfix_id: - $ref: '#/components/schemas/emailSecurityPostfixId' - postfix_id_outbound: - nullable: true - type: string - properties: - description: Message processing properties - properties: - allowlisted_pattern: - description: Pattern that allowlisted this message - nullable: true - type: string - allowlisted_pattern_type: - description: Type of allowlist pattern - enum: - - quarantine_release - - acceptable_sender - - allowed_sender - - allowed_recipient - - domain_similarity - - domain_recency - - managed_acceptable_sender - - outbound_ndr - nullable: true - type: string - blocklisted_message: - description: Whether message was blocklisted - nullable: true - type: boolean - blocklisted_pattern: - description: Pattern that blocklisted this message - nullable: true - type: string - whitelisted_pattern_type: - description: Legacy field for allowlist pattern type - enum: - - quarantine_release - - acceptable_sender - - allowed_sender - - allowed_recipient - - domain_similarity - - domain_recency - - managed_acceptable_sender - - outbound_ndr - nullable: true - type: string - type: object - replyto: - nullable: true - type: string - scanned_at: - description: When the message was scanned (UTC) - format: date-time - nullable: true - type: string - sent_at: - description: When the message was sent (UTC) - format: date-time - nullable: true - type: string - sent_date: - nullable: true - type: string - subject: - nullable: true - type: string - threat_categories: - items: - type: string - nullable: true - type: array - to: - items: - type: string - nullable: true - type: array - to_name: - items: - type: string - nullable: true - type: array - ts: - deprecated: true - description: 'Deprecated, use `scanned_at` instead. End of life: November 1, 2026.' - readOnly: true - type: string - validation: - $ref: '#/components/schemas/emailSecurityValidation' - required: - - id - - ts - - client_recipients - - postfix_id - - detection_reasons - - action_log - - is_quarantined - - is_phish_submission - - properties - type: object - emailSecurityMessageDetectionDetails: - properties: - action: - type: string - attachments: - items: - $ref: '#/components/schemas/emailSecurityAttachment' - type: array - final_disposition: - $ref: '#/components/schemas/emailSecurityDispositionLabel' - findings: - items: - properties: - attachment: - nullable: true - type: string - detail: - nullable: true - type: string - detection: - $ref: '#/components/schemas/emailSecurityDispositionLabel' - field: - nullable: true - type: string - name: - nullable: true - type: string - portion: - nullable: true - type: string - reason: - nullable: true - type: string - score: - format: double - nullable: true - type: number - value: - nullable: true - type: string - type: object - nullable: true - type: array - headers: - items: - $ref: '#/components/schemas/emailSecurityMessageHeader' - type: array - links: - items: - $ref: '#/components/schemas/emailSecurityLink' - type: array - sender_info: - properties: - as_name: - description: The name of the autonomous system. - nullable: true - type: string - as_number: - description: The number of the autonomous system. - nullable: true - type: integer - geo: - nullable: true - type: string - ip: - nullable: true - type: string - pld: - nullable: true - type: string - type: object - threat_categories: - items: - $ref: '#/components/schemas/emailSecurityThreatCategory' - type: array - validation: - $ref: '#/components/schemas/emailSecurityValidation' - required: - - validation - - headers - - threat_categories - - sender_info - - links - - action - - attachments - - findings - type: object - emailSecurityMessageHeader: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - emailSecurityMessagePreview: - properties: - screenshot: - description: A base64 encoded PNG image of the email. - type: string - required: - - screenshot - type: object - emailSecurityMessageRaw: - properties: - raw: - description: A UTF-8 encoded eml file of the email. - type: string - required: - - raw - type: object - emailSecurityMessageTrace: - properties: - inbound: - properties: - lines: - items: - $ref: '#/components/schemas/emailSecurityTraceLine' - nullable: true - type: array - pending: - nullable: true - type: boolean - type: object - outbound: - properties: - lines: - items: - $ref: '#/components/schemas/emailSecurityTraceLine' - nullable: true - type: array - pending: - nullable: true - type: boolean - type: object - required: - - inbound - - outbound - type: object - emailSecurityMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - emailSecurityMoveResponseItem: - properties: - completed_at: - description: When the move operation completed (UTC) - format: date-time - nullable: true - type: string - completed_timestamp: - deprecated: true - description: >- - Deprecated, use `completed_at` instead. End of life: November 1, - 2026. - format: date-time - type: string - destination: - description: Destination folder for the message - nullable: true - type: string - item_count: - deprecated: true - description: 'Number of items moved. End of life: November 1, 2026.' - type: integer - message_id: - description: Message identifier - nullable: true - type: string - operation: - description: Type of operation performed - nullable: true - type: string - recipient: - description: Recipient email address - nullable: true - type: string - status: - description: Operation status - nullable: true - type: string - success: - description: Whether the operation succeeded - type: boolean - required: - - success - type: object - emailSecurityOptionalSubmissionDisposition: - nullable: true - type: string - $ref: '#/components/schemas/emailSecuritySubmissionDisposition' - emailSecurityPatternType: - description: >- - Type of pattern matching. Note: UNKNOWN is deprecated and cannot be used - when creating or updating policies, but may be returned for existing - entries. - enum: - - EMAIL - - DOMAIN - - IP - - UNKNOWN - example: EMAIL - type: string - x-auditable: true - emailSecurityPhishGuardReport: - properties: - content: - type: string - created_at: - format: date-time - nullable: true - readOnly: true - type: string - disposition: - $ref: '#/components/schemas/emailSecurityDispositionLabel' - fields: - properties: - from: - nullable: true - type: string - occurred_at: - format: date-time - readOnly: true - type: string - postfix_id: - nullable: true - type: string - to: - items: - type: string - type: array - ts: - deprecated: true - description: Deprecated, use `occurred_at` instead - format: date-time - readOnly: true - type: string - required: - - to - type: object - id: - type: integer - priority: - type: string - tags: - items: - $ref: '#/components/schemas/emailSecurityPhishGuardReportTag' - nullable: true - type: array - title: - type: string - ts: - deprecated: true - description: Deprecated, use `created_at` instead - format: date-time - readOnly: true - type: string - updated_at: - format: date-time - nullable: true - readOnly: true - type: string - required: - - id - - title - - content - - fields - - priority - - disposition - type: object - emailSecurityPhishGuardReportTag: - properties: - category: - type: string - value: - type: string - required: - - category - - value - type: object - emailSecurityPostfixId: - description: The identifier of the message - example: 4Njp3P0STMz2c02Q - type: string - emailSecurityProvenance: - enum: - - A1S_INTERNAL - - SNOOPY-CASB_OFFICE_365 - - SNOOPY-OFFICE_365 - - SNOOPY-GOOGLE_DIRECTORY - type: string - emailSecurityReclassifyRequest: - properties: - eml_content: - description: Base64 encoded content of the EML file. - type: string - escalated_submission_id: - type: string - x-auditable: true - expected_disposition: - enum: - - NONE - - BULK - - MALICIOUS - - SPAM - - SPOOF - - SUSPICIOUS - type: string - required: - - expected_disposition - type: object - emailSecurityRegion: - enum: - - GLOBAL - - AU - - DE - - IN - - US - type: string - emailSecurityReleaseResponse: - properties: - delivered: - items: - type: string - nullable: true - type: array - failed: - items: - type: string - nullable: true - type: array - id: - x-auditable: true - $ref: '#/components/schemas/emailSecurityInvestigateId' - postfix_id: - deprecated: true - description: 'Deprecated, use `id` instead. End of life: November 1, 2026.' - $ref: '#/components/schemas/emailSecurityPostfixId' - undelivered: - items: - type: string - nullable: true - type: array - required: - - id - type: object - emailSecurityScannableFolder: - enum: - - AllItems - - Inbox - type: string - emailSecuritySendingDomainRestriction: - description: >- - A sending domain restriction that enforces TLS (Transport Layer - Security) requirements for emails from specific domains. If TLS is - required, mail without TLS from the specified domain will be dropped. - properties: - comments: - example: Enforce TLS for all mail from this domain - maxLength: 1024 - nullable: true - type: string - created_at: - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - domain: - description: Domain that requires TLS enforcement. - example: example.com - type: string - x-auditable: true - exclude: - description: Excluded subdomains that are exempt from TLS requirements. - example: - - subdomain.example.com - items: - type: string - type: array - x-auditable: true - id: - readOnly: true - $ref: '#/components/schemas/emailSecuritySendingDomainRestrictionId' - last_modified: - deprecated: true - description: >- - Deprecated, use `modified_at` instead. End of life: November 1, - 2026. - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - modified_at: - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - type: object - emailSecuritySendingDomainRestrictionId: - description: Sending domain restriction identifier. - example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 - format: uuid - title: identifier - type: string - x-auditable: true - emailSecuritySendingDomainRestrictionList: - items: - $ref: '#/components/schemas/emailSecuritySendingDomainRestriction' - type: array - emailSecuritySpfStatus: - enum: - - none - - good - - neutral - - open - - invalid - type: string - emailSecuritySubmission: - properties: - customer_status: - $ref: '#/components/schemas/emailSecurityCustomerStatus' - escalated_as: - $ref: '#/components/schemas/emailSecurityOptionalSubmissionDisposition' - escalated_at: - format: date-time - nullable: true - type: string - escalated_by: - nullable: true - type: string - escalated_submission_id: - nullable: true - type: string - original_disposition: - $ref: '#/components/schemas/emailSecurityOptionalSubmissionDisposition' - original_edf_hash: - nullable: true - type: string - original_postfix_id: - description: The postfix ID of the original message that was submitted - nullable: true - type: string - outcome: - nullable: true - type: string - outcome_disposition: - $ref: '#/components/schemas/emailSecurityOptionalSubmissionDisposition' - requested_at: - description: When the submission was requested (UTC). - format: date-time - type: string - requested_by: - nullable: true - type: string - requested_disposition: - $ref: '#/components/schemas/emailSecurityOptionalSubmissionDisposition' - requested_ts: - deprecated: true - description: Deprecated, use `requested_at` instead - readOnly: true - type: string - status: - nullable: true - type: string - subject: - nullable: true - type: string - submission_id: - type: string - x-auditable: true - type: - description: Whether the submission was created by a team member or an end user. - enum: - - Team - - User - nullable: true - type: string - required: - - submission_id - - requested_at - type: object - emailSecuritySubmissionDisposition: - enum: - - MALICIOUS - - SUSPICIOUS - - SPOOF - - SPAM - - BULK - - NONE - type: string - emailSecurityThreatCategory: - properties: - description: - nullable: true - type: string - id: - type: integer - name: - nullable: true - type: string - type: object - emailSecurityTimestamp: - example: '2014-01-01T05:20:00.12345Z' - format: date-time - type: string - x-auditable: true - emailSecurityTraceLine: - properties: - lineno: - description: Line number in the trace log - type: integer - logged_at: - format: date-time - nullable: true - readOnly: true - type: string - message: - type: string - ts: - deprecated: true - description: 'Deprecated, use `logged_at` instead. End of life: November 1, 2026.' - readOnly: true - type: string - type: object - emailSecurityTrustedDomain: - description: A trusted email domain - properties: - comments: - example: Trusted partner domain - maxLength: 1024 - nullable: true - type: string - created_at: - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - id: - readOnly: true - $ref: '#/components/schemas/emailSecurityTrustedDomainId' - is_recent: - description: >- - Select to prevent recently registered domains from triggering a - Suspicious or Malicious disposition. - example: true - type: boolean - x-auditable: true - is_regex: - example: false - type: boolean - x-auditable: true - is_similarity: - description: >- - Select for partner or other approved domains that have similar - spelling to your connected domains. Prevents listed domains from - triggering a Spoof disposition. - example: false - type: boolean - x-auditable: true - last_modified: - deprecated: true - description: >- - Deprecated, use `modified_at` instead. End of life: November 1, - 2026. - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - modified_at: - readOnly: true - $ref: '#/components/schemas/emailSecurityTimestamp' - pattern: - example: example.com - maxLength: 1024 - minLength: 1 - type: string - x-auditable: true - type: object - emailSecurityTrustedDomainId: - description: Trusted domain identifier - example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 - format: uuid - type: string - x-auditable: true - emailSecurityTrustedDomainList: - items: - $ref: '#/components/schemas/emailSecurityTrustedDomain' - type: array - emailSecurityUpdateAllowPolicy: - description: Update an allow policy - minProperties: 1 - $ref: '#/components/schemas/emailSecurityAllowPolicy' - emailSecurityUpdateBlockedSender: - description: Update a blocked sender pattern - minProperties: 1 - $ref: '#/components/schemas/emailSecurityBlockedSender' - emailSecurityUpdateDomain: - properties: - allowed_delivery_modes: - items: - $ref: '#/components/schemas/emailSecurityDeliveryMode' - type: array - domain: - type: string - x-auditable: true - drop_dispositions: - items: - $ref: '#/components/schemas/emailSecurityDispositionLabel' - type: array - folder: - $ref: '#/components/schemas/emailSecurityScannableFolder' - integration_id: - format: uuid - nullable: true - type: string - x-auditable: true - ip_restrictions: - example: - - 192.0.2.0/24 - - 2001:db8::/32 - items: - type: string - x-auditable: true - type: array - lookback_hops: - maximum: 20 - minimum: 1 - type: integer - x-auditable: true - regions: - items: - $ref: '#/components/schemas/emailSecurityRegion' - type: array - require_tls_inbound: - type: boolean - x-auditable: true - require_tls_outbound: - type: boolean - x-auditable: true - transport: - type: string - x-auditable: true - type: object - emailSecurityUpdateImpersonationRegistry: - description: Update an impersonation registry entry - minProperties: 1 - $ref: '#/components/schemas/emailSecurityImpersonationRegistry' - emailSecurityUpdateSendingDomainRestriction: - description: Update a sending domain restriction. - minProperties: 1 - $ref: '#/components/schemas/emailSecuritySendingDomainRestriction' - emailSecurityUpdateTrustedDomain: - description: Update a trusted domain - minProperties: 1 - $ref: '#/components/schemas/emailSecurityTrustedDomain' - emailSecurityValidation: - properties: - comment: - nullable: true - type: string - dkim: - $ref: '#/components/schemas/emailSecurityValidationStatus' - dmarc: - $ref: '#/components/schemas/emailSecurityValidationStatus' - spf: - $ref: '#/components/schemas/emailSecurityValidationStatus' - type: object - emailSecurityValidationStatus: - enum: - - pass - - neutral - - fail - - error - - none - type: string - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - investigate: - id: cloudflare.email_security.investigate - name: investigate - title: Investigate - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1email-security~1investigate/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - release: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1investigate~1release/post - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1investigate~1{investigate_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - reclassify: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1investigate~1{investigate_id}~1reclassify/post - response: - mediaType: application/json - openAPIDocKey: '202' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/investigate/methods/get' - - $ref: '#/components/x-stackQL-resources/investigate/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - move: - id: cloudflare.email_security.move - name: move - title: Move - methods: - email_security_post_bulk_move: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1investigate~1move/post - response: - mediaType: application/json - openAPIDocKey: '200' - email_security_post_message_move: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1investigate~1{investigate_id}~1move/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/move/methods/email_security_post_message_move - - $ref: >- - #/components/x-stackQL-resources/move/methods/email_security_post_bulk_move - update: [] - delete: [] - replace: [] - preview: - id: cloudflare.email_security.preview - name: preview - title: Preview - methods: - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1investigate~1preview/post - response: - mediaType: application/json - openAPIDocKey: '200' - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1investigate~1{investigate_id}~1preview/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/preview/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/preview/methods/create' - update: [] - delete: [] - replace: [] - action_log: - id: cloudflare.email_security.action_log - name: action_log - title: Action Log - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1investigate~1{investigate_id}~1action_log/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/action_log/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - detections: - id: cloudflare.email_security.detections - name: detections - title: Detections - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1investigate~1{investigate_id}~1detections/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/detections/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - raw: - id: cloudflare.email_security.raw - name: raw - title: Raw - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1investigate~1{investigate_id}~1raw/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/raw/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - trace: - id: cloudflare.email_security.trace - name: trace - title: Trace - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1investigate~1{investigate_id}~1trace/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/trace/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - reports: - id: cloudflare.email_security.reports - name: reports - title: Reports - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1phishguard~1reports/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/reports/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - allow_policies: - id: cloudflare.email_security.allow_policies - name: allow_policies - title: Allow Policies - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1allow_policies/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1allow_policies/post - response: - mediaType: application/json - openAPIDocKey: '201' - batch: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1allow_policies~1batch/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1allow_policies~1{policy_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1allow_policies~1{policy_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1allow_policies~1{policy_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/allow_policies/methods/get' - - $ref: '#/components/x-stackQL-resources/allow_policies/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/allow_policies/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/allow_policies/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/allow_policies/methods/delete' - replace: [] - block_senders: - id: cloudflare.email_security.block_senders - name: block_senders - title: Block Senders - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1block_senders/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1block_senders/post - response: - mediaType: application/json - openAPIDocKey: '201' - batch: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1block_senders~1batch/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1block_senders~1{pattern_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1block_senders~1{pattern_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1block_senders~1{pattern_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/block_senders/methods/get' - - $ref: '#/components/x-stackQL-resources/block_senders/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/block_senders/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/block_senders/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/block_senders/methods/delete' - replace: [] - domains: - id: cloudflare.email_security.domains - name: domains - title: Domains - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1domains/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1domains~1{domain_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1domains~1{domain_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1domains~1{domain_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/domains/methods/get' - - $ref: '#/components/x-stackQL-resources/domains/methods/list' - insert: [] - update: - - $ref: '#/components/x-stackQL-resources/domains/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/domains/methods/delete' - replace: [] - impersonation_registry: - id: cloudflare.email_security.impersonation_registry - name: impersonation_registry - title: Impersonation Registry - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1impersonation_registry/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1impersonation_registry/post - response: - mediaType: application/json - openAPIDocKey: '201' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1impersonation_registry~1{impersonation_registry_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1impersonation_registry~1{impersonation_registry_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1impersonation_registry~1{impersonation_registry_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/impersonation_registry/methods/get - - $ref: >- - #/components/x-stackQL-resources/impersonation_registry/methods/list - insert: - - $ref: >- - #/components/x-stackQL-resources/impersonation_registry/methods/create - update: - - $ref: >- - #/components/x-stackQL-resources/impersonation_registry/methods/edit - delete: - - $ref: >- - #/components/x-stackQL-resources/impersonation_registry/methods/delete - replace: [] - sending_domain_restrictions: - id: cloudflare.email_security.sending_domain_restrictions - name: sending_domain_restrictions - title: Sending Domain Restrictions - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1sending_domain_restrictions/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - email_security_create_sending_domain_restriction: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1sending_domain_restrictions/post - response: - mediaType: application/json - openAPIDocKey: '201' - batch: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1sending_domain_restrictions~1batch/post - response: - mediaType: application/json - openAPIDocKey: '200' - email_security_delete_sending_domain_restriction: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1sending_domain_restrictions~1{sending_domain_restriction_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1sending_domain_restrictions~1{sending_domain_restriction_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - email_security_update_sending_domain_restriction: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1sending_domain_restrictions~1{sending_domain_restriction_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/sending_domain_restrictions/methods/get - - $ref: >- - #/components/x-stackQL-resources/sending_domain_restrictions/methods/list - insert: - - $ref: >- - #/components/x-stackQL-resources/sending_domain_restrictions/methods/email_security_create_sending_domain_restriction - update: - - $ref: >- - #/components/x-stackQL-resources/sending_domain_restrictions/methods/email_security_update_sending_domain_restriction - delete: - - $ref: >- - #/components/x-stackQL-resources/sending_domain_restrictions/methods/email_security_delete_sending_domain_restriction - replace: [] - trusted_domains: - id: cloudflare.email_security.trusted_domains - name: trusted_domains - title: Trusted Domains - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1trusted_domains/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1trusted_domains/post - response: - mediaType: application/json - openAPIDocKey: '201' - batch: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1trusted_domains~1batch/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1trusted_domains~1{trusted_domain_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1trusted_domains~1{trusted_domain_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1email-security~1settings~1trusted_domains~1{trusted_domain_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/trusted_domains/methods/get' - - $ref: '#/components/x-stackQL-resources/trusted_domains/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/trusted_domains/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/trusted_domains/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/trusted_domains/methods/delete' - replace: [] - submissions: - id: cloudflare.email_security.submissions - name: submissions - title: Submissions - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1email-security~1submissions/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/submissions/methods/list' - insert: [] - update: [] - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: email_security API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/email-security/investigate: + get: + description: Returns information for each email that matches the search parameter(s). + operationId: email_security_investigate + parameters: + - description: The beginning of the search date range. Defaults to `now - 30 days`. + in: query + name: start + schema: + format: date-time + type: string + - description: The end of the search date range. Defaults to `now`. + in: query + name: end + schema: + format: date-time + type: string + - description: Space-delimited search term. Case-insensitive. + in: query + name: query + schema: + type: string + - description: Whether to include only detections in search results. + in: query + name: detections_only + schema: + default: true + type: boolean + - description: Whether to include the message action log in the response. + in: query + name: action_log + schema: + default: true + type: boolean + - description: Dispositions to filter by. + in: query + name: final_disposition + schema: + enum: + - MALICIOUS + - SUSPICIOUS + - SPOOF + - SPAM + - BULK + - NONE + type: string + - in: query + name: metric + schema: + type: string + - description: Message actions to filter by. + in: query + name: message_action + schema: + enum: + - PREVIEW + - QUARANTINE_RELEASED + - MOVED + type: string + - in: query + name: recipient + schema: + type: string + - in: query + name: sender + schema: + type: string + - in: query + name: alert_id + schema: + type: string + - description: Sender domains to filter by. + in: query + name: domain + schema: + type: string + - in: query + name: message_id + schema: + type: string + - in: query + name: subject + schema: + type: string + - in: query + name: cursor + schema: + type: string + - description: The number of results per page. Maximum value is 1000. + in: query + name: per_page + schema: + default: 20 + maximum: 1000 + minimum: 1 + type: integer + - deprecated: true + description: 'Deprecated: Use cursor pagination instead. End of life: November 1, 2026.' + in: query + name: page + schema: + default: 1 + minimum: 1 + nullable: true + type: integer + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + items: + $ref: '#/components/schemas/emailSecurityMessageDetails' + type: array + result_info: + $ref: '#/components/schemas/emailSecurityCursorResultInfo' + required: + - success + - errors + - messages + - result + - result_info + type: object + description: Search results for the provided query. + '202': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + description: Always empty on 202; follow the Location header to retrieve results. + items: {} + maxItems: 0 + type: array + result_info: + $ref: '#/components/schemas/emailSecurityCursorResultInfo' + required: + - success + - errors + - messages + - result + - result_info + type: object + description: The search is taking longer than expected. Use the Location header to poll for results. + headers: + Location: + description: URL to poll for search results + schema: + type: string + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Search email messages + tags: + - Email Security + x-api-token-group: + - 'Cloud Email Security: Write' + - 'Cloud Email Security: Read' + x-stackql-sdk: + service: email_security + resource_chain: + - investigate + method: list + /accounts/{account_id}/email-security/investigate/move: + post: + description: Moves multiple messages to a specified mailbox folder (Inbox, JunkEmail, DeletedItems, RecoverableItemsDeletions, or RecoverableItemsPurges). Requires active integration. + operationId: email_security_post_bulk_move + requestBody: + content: + application/json: + schema: + properties: + destination: + $ref: '#/components/schemas/emailSecurityMailboxDestination' + ids: + description: List of message IDs to move + items: + $ref: '#/components/schemas/emailSecurityInvestigateId' + type: array + x-auditable: true + postfix_ids: + deprecated: true + description: 'Deprecated, use `ids` instead. End of life: November 1, 2026. List of message IDs to move.' + items: + $ref: '#/components/schemas/emailSecurityPostfixId' + type: array + x-auditable: true + required: + - destination + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + items: + $ref: '#/components/schemas/emailSecurityMoveResponseItem' + type: array + required: + - success + - errors + - messages + - result + type: object + description: Bulk move operation results + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Move multiple messages + tags: + - Email Security + x-api-token-group: + - 'Cloud Email Security: Write' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + /accounts/{account_id}/email-security/investigate/preview: + post: + description: Generates a preview image for a message that was not flagged as a detection. Useful for investigating benign messages. Returns a base64-encoded PNG screenshot of the email body. + operationId: email_security_post_preview + requestBody: + content: + application/json: + schema: + properties: + postfix_id: + $ref: '#/components/schemas/emailSecurityPostfixId' + required: + - postfix_id + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecurityMessagePreview' + required: + - success + - errors + - messages + - result + type: object + description: Email preview. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Preview for non-detection messages + tags: + - Email Security + x-api-token-group: + - 'Cloud Email Security: Write' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + x-stackql-sdk: + service: email_security + resource_chain: + - investigate + - preview + method: create + /accounts/{account_id}/email-security/investigate/release: + post: + description: Releases one or more quarantined messages, delivering them to the intended recipients. Use when a message was incorrectly quarantined. Returns delivery status for each recipient. + operationId: email_security_post_release + requestBody: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/emailSecurityInvestigateId' + type: array + description: A list of investigate IDs identifying the messages to release. + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + items: + $ref: '#/components/schemas/emailSecurityReleaseResponse' + type: array + required: + - success + - errors + - messages + - result + type: object + description: Release operation results. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Release messages from quarantine + tags: + - Email Security + x-api-token-group: + - 'Cloud Email Security: Write' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + /accounts/{account_id}/email-security/investigate/{investigate_id}: + get: + description: Retrieves comprehensive details for a specific email message including headers, recipients, sender information, and current quarantine status. Use the investigate_id from search results to fetch detailed information. + operationId: email_security_get_message + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecurityMessageDetails' + required: + - success + - errors + - messages + - result + type: object + description: Email message details. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get message details + tags: + - Email Security + x-api-token-group: + - 'Cloud Email Security: Write' + - 'Cloud Email Security: Read' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: investigate_id + schema: + $ref: '#/components/schemas/emailSecurityInvestigateId' + required: true + - description: When true, search the submissions datastore only. When false or omitted, search the regular datastore only. + in: query + name: submission + schema: + type: boolean + x-stackql-sdk: + service: email_security + resource_chain: + - investigate + method: get + /accounts/{account_id}/email-security/investigate/{investigate_id}/action_log: + get: + description: Returns the list of post-delivery actions (moves, quarantine releases, previews, etc.) that have been applied to a specific email message. + operationId: email_security_get_message_action_log + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + items: + $ref: '#/components/schemas/emailSecurityActionEntry' + type: array + required: + - success + - errors + - messages + - result + type: object + description: Action log for the email + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get action log for a message + tags: + - Email Security + x-api-token-group: + - 'Cloud Email Security: Write' + - 'Cloud Email Security: Read' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: investigate_id + schema: + $ref: '#/components/schemas/emailSecurityInvestigateId' + required: true + /accounts/{account_id}/email-security/investigate/{investigate_id}/detections: + get: + description: Returns detection details such as threat categories and sender information for non-benign messages. + operationId: email_security_get_message_detections + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecurityMessageDetectionDetails' + required: + - success + - errors + - messages + - result + type: object + description: Email message detection details. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get message detection details + tags: + - Email Security + x-api-token-group: + - 'Cloud Email Security: Write' + - 'Cloud Email Security: Read' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: investigate_id + schema: + $ref: '#/components/schemas/emailSecurityInvestigateId' + required: true + x-stackql-sdk: + service: email_security + resource_chain: + - investigate + - detections + method: get + /accounts/{account_id}/email-security/investigate/{investigate_id}/move: + post: + description: Moves a single message to a specified mailbox folder (Inbox, JunkEmail, DeletedItems, RecoverableItemsDeletions, or RecoverableItemsPurges). Requires active integration. + operationId: email_security_post_message_move + requestBody: + content: + application/json: + schema: + properties: + destination: + $ref: '#/components/schemas/emailSecurityMailboxDestination' + required: + - destination + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + items: + $ref: '#/components/schemas/emailSecurityMoveResponseItem' + type: array + required: + - success + - errors + - messages + - result + type: object + description: Move operation results + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Move a message + tags: + - Email Security + x-api-token-group: + - 'Cloud Email Security: Write' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: investigate_id + schema: + $ref: '#/components/schemas/emailSecurityInvestigateId' + required: true + /accounts/{account_id}/email-security/investigate/{investigate_id}/preview: + get: + description: Returns a preview of the message body as a base64 encoded PNG image for non-benign messages. + operationId: email_security_get_message_preview + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecurityMessagePreview' + required: + - success + - errors + - messages + - result + type: object + description: Email preview + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get email preview + tags: + - Email Security + x-api-token-group: + - 'Cloud Email Security: Write' + - 'Cloud Email Security: Read' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: investigate_id + schema: + $ref: '#/components/schemas/emailSecurityInvestigateId' + required: true + x-stackql-sdk: + service: email_security + resource_chain: + - investigate + - preview + method: get + /accounts/{account_id}/email-security/investigate/{investigate_id}/raw: + get: + description: Returns the raw eml of any non-benign message. + operationId: email_security_get_message_raw + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecurityMessageRaw' + required: + - success + - errors + - messages + - result + type: object + description: Raw email content. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get raw email content + tags: + - Email Security + x-api-token-group: + - 'Cloud Email Security: Write' + - 'Cloud Email Security: Read' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: investigate_id + schema: + $ref: '#/components/schemas/emailSecurityInvestigateId' + required: true + x-stackql-sdk: + service: email_security + resource_chain: + - investigate + - raw + method: get + /accounts/{account_id}/email-security/investigate/{investigate_id}/reclassify: + post: + description: Submits a request to reclassify an email's disposition. Use for reporting false positives or false negatives. Optionally provide the raw EML content for reanalysis. The reclassification is processed asynchronously. + operationId: email_security_post_reclassify + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityReclassifyRequest' + responses: + '202': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + type: object + required: + - success + - errors + - messages + - result + type: object + description: Reclassification request accepted. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Change email classification + tags: + - Email Security + x-api-token-group: + - 'Cloud Email Security: Write' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: investigate_id + schema: + $ref: '#/components/schemas/emailSecurityInvestigateId' + required: true + x-stackql-sdk: + service: email_security + resource_chain: + - investigate + - reclassify + method: create + /accounts/{account_id}/email-security/investigate/{investigate_id}/trace: + get: + description: Retrieves delivery and processing trace information for an email message. Shows the delivery path, retraction history, and move operations performed on the message. Useful for debugging delivery issues. + operationId: email_security_get_message_trace + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecurityMessageTrace' + required: + - success + - errors + - messages + - result + type: object + description: Email trace. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get email trace + tags: + - Email Security + x-api-token-group: + - 'Cloud Email Security: Write' + - 'Cloud Email Security: Read' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: investigate_id + schema: + $ref: '#/components/schemas/emailSecurityInvestigateId' + required: true + x-stackql-sdk: + service: email_security + resource_chain: + - investigate + - trace + method: get + /accounts/{account_id}/email-security/phishguard/reports: + get: + description: Retrieves PhishGuard security alert reports for a specified date range. Reports include detected threats, dispositions, and contextual information. Use for security monitoring and threat analysis. + operationId: email_security_get_phishguard_reports + parameters: + - description: Start of the time range (RFC3339). Takes precedence over from_date. + in: query + name: start + schema: + format: date-time + type: string + - description: End of the time range (RFC3339). Takes precedence over to_date. + in: query + name: end + schema: + format: date-time + type: string + - deprecated: true + description: Deprecated, use `start` instead. Start date in YYYY-MM-DD format. + in: query + name: from_date + schema: + format: date + type: string + - deprecated: true + description: Deprecated, use `end` instead. End date in YYYY-MM-DD format. + in: query + name: to_date + schema: + format: date + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + items: + $ref: '#/components/schemas/emailSecurityPhishGuardReport' + type: array + required: + - success + - errors + - messages + - result + type: object + description: List of PhishGuard reports + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get PhishGuard reports + tags: + - Email Security + x-api-token-group: + - 'Cloud Email Security: Write' + - 'Cloud Email Security: Read' + x-stackql-sdk: + service: email_security + resource_chain: + - phishguard + - reports + method: list + /accounts/{account_id}/email-security/settings/allow_policies: + get: + description: Returns a paginated list of email allow policies. These policies exempt matching emails from security detection, allowing them to bypass disposition actions. Supports filtering by pattern type and policy attributes. + operationId: email_security_list_allow_policies + parameters: + - description: Current page within paginated list of results. + in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - description: The number of results per page. Maximum value is 1000. + in: query + name: per_page + schema: + default: 20 + maximum: 1000 + minimum: 1 + type: integer + - description: Search term for filtering records. Behavior may change. + in: query + name: search + schema: + type: string + - description: Field to sort by. + in: query + name: order + schema: + enum: + - pattern + - created_at + type: string + - description: The sorting direction. + in: query + name: direction + schema: + enum: + - asc + - desc + type: string + - description: Filter to show only policies where messages to the recipient bypass all detections. + in: query + name: is_exempt_recipient + schema: + type: boolean + - description: Filter to show only policies where messages from the sender bypass all detections and link following. + in: query + name: is_trusted_sender + schema: + type: boolean + - description: Filter to show only policies where messages from the sender are exempted from Spam, Spoof, and Bulk dispositions (not Malicious or Suspicious). + in: query + name: is_acceptable_sender + schema: + type: boolean + - description: Filter to show only policies that enforce DMARC, SPF, or DKIM authentication. + in: query + name: verify_sender + schema: + type: boolean + - in: query + name: pattern_type + schema: + $ref: '#/components/schemas/emailSecurityPatternType' + - in: query + name: pattern + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + type: object + result: + $ref: '#/components/schemas/emailSecurityAllowPolicyList' + required: + - success + - errors + - messages + description: List of allow policies + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List email allow policies + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + - 'Cloud Email Security: Read' + x-stackql-sdk: + service: email_security + resource_chain: + - settings + - allow_policies + method: list + post: + description: Creates a new allow policy that exempts matching emails from security detections. Use with caution as this bypasses email security scanning. Policies can match on sender patterns and apply to specific detections or all detections. + operationId: email_security_create_allow_policy + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityCreateAllowPolicy' + responses: + '201': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecurityAllowPolicy' + required: + - success + - errors + - messages + description: Created allow policy + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create email allow policy + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + x-stackql-sdk: + service: email_security + resource_chain: + - settings + - allow_policies + method: create + /accounts/{account_id}/email-security/settings/allow_policies/batch: + post: + description: Execute multiple operations atomically. All four operation arrays (deletes, patches, puts, posts) are required and executed in order. Send empty arrays for unused operations. + operationId: email_security_batch_allow_policies + requestBody: + content: + application/json: + schema: + properties: + deletes: + items: + properties: + id: + $ref: '#/components/schemas/emailSecurityAllowPolicyId' + required: + - id + type: object + maxItems: 1000 + type: array + patches: + items: + description: An email allow policy + minProperties: 1 + properties: + comments: + maxLength: 1024 + nullable: true + type: string + created_at: + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + id: + readOnly: true + $ref: '#/components/schemas/emailSecurityAllowPolicyId' + is_acceptable_sender: + description: Messages from this sender will be exempted from Spam, Spoof and Bulk dispositions. Note - This will not exempt messages with Malicious or Suspicious dispositions. + type: boolean + x-auditable: true + is_exempt_recipient: + description: Messages to this recipient will bypass all detections + type: boolean + x-auditable: true + is_recipient: + deprecated: true + description: 'Deprecated as of July 1, 2025. Use `is_exempt_recipient` instead. End of life: July 1, 2026.' + type: boolean + x-auditable: true + is_regex: + type: boolean + x-auditable: true + is_sender: + deprecated: true + description: 'Deprecated as of July 1, 2025. Use `is_trusted_sender` instead. End of life: July 1, 2026.' + type: boolean + x-auditable: true + is_spoof: + deprecated: true + description: 'Deprecated as of July 1, 2025. Use `is_acceptable_sender` instead. End of life: July 1, 2026.' + type: boolean + x-auditable: true + is_trusted_sender: + description: Messages from this sender will bypass all detections and link following + type: boolean + x-auditable: true + last_modified: + deprecated: true + description: 'Deprecated, use `modified_at` instead. End of life: November 1, 2026.' + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + modified_at: + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + pattern: + maxLength: 1024 + minLength: 1 + type: string + x-auditable: true + pattern_type: + $ref: '#/components/schemas/emailSecurityPatternType' + verify_sender: + description: Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors policies that pass authentication. + type: boolean + x-auditable: true + type: object + maxItems: 1000 + type: array + posts: + items: + $ref: '#/components/schemas/emailSecurityCreateAllowPolicy' + maxItems: 1000 + type: array + puts: + items: + description: An email allow policy + properties: + comments: + maxLength: 1024 + nullable: true + type: string + created_at: + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + id: + readOnly: true + $ref: '#/components/schemas/emailSecurityAllowPolicyId' + is_acceptable_sender: + description: Messages from this sender will be exempted from Spam, Spoof and Bulk dispositions. Note - This will not exempt messages with Malicious or Suspicious dispositions. + type: boolean + x-auditable: true + is_exempt_recipient: + description: Messages to this recipient will bypass all detections + type: boolean + x-auditable: true + is_recipient: + deprecated: true + description: 'Deprecated as of July 1, 2025. Use `is_exempt_recipient` instead. End of life: July 1, 2026.' + type: boolean + x-auditable: true + is_regex: + type: boolean + x-auditable: true + is_sender: + deprecated: true + description: 'Deprecated as of July 1, 2025. Use `is_trusted_sender` instead. End of life: July 1, 2026.' + type: boolean + x-auditable: true + is_spoof: + deprecated: true + description: 'Deprecated as of July 1, 2025. Use `is_acceptable_sender` instead. End of life: July 1, 2026.' + type: boolean + x-auditable: true + is_trusted_sender: + description: Messages from this sender will bypass all detections and link following + type: boolean + x-auditable: true + last_modified: + deprecated: true + description: 'Deprecated, use `modified_at` instead. End of life: November 1, 2026.' + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + modified_at: + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + pattern: + maxLength: 1024 + minLength: 1 + type: string + x-auditable: true + pattern_type: + $ref: '#/components/schemas/emailSecurityPatternType' + verify_sender: + description: Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors policies that pass authentication. + type: boolean + x-auditable: true + type: object + maxItems: 1000 + type: array + required: + - deletes + - patches + - puts + - posts + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + properties: + deletes: + items: + $ref: '#/components/schemas/emailSecurityDeletedAllowPolicy' + type: array + patches: + $ref: '#/components/schemas/emailSecurityAllowPolicyList' + posts: + $ref: '#/components/schemas/emailSecurityAllowPolicyList' + puts: + $ref: '#/components/schemas/emailSecurityAllowPolicyList' + type: object + required: + - success + - errors + - messages + description: Batch operation results + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Batch allow policies operations + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + /accounts/{account_id}/email-security/settings/allow_policies/{policy_id}: + delete: + description: Removes an allow policy. After deletion, emails matching this pattern will be subject to normal security scanning and disposition actions. + operationId: email_security_delete_allow_policy + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecurityDeletedAllowPolicy' + required: + - success + - errors + - messages + description: Deleted allow policy + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete an email allow policy + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: policy_id + in: path + required: true + description: The Access policy ID. + schema: + type: string + x-stackql-sdk: + service: email_security + resource_chain: + - settings + - allow_policies + method: delete + get: + description: Retrieves details for a specific allow policy including its pattern, dispositions that are exempted, and whether it applies to all detections. + operationId: email_security_get_allow_policy + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecurityAllowPolicy' + required: + - success + - errors + - messages + description: Allow policy details + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get an email allow policy + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + - 'Cloud Email Security: Read' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: policy_id + in: path + required: true + description: The Access policy ID. + schema: + type: string + x-stackql-sdk: + service: email_security + resource_chain: + - settings + - allow_policies + method: get + patch: + description: Updates an existing allow policy. Only provided fields will be modified. Changes take effect for new emails matching the pattern. + operationId: email_security_update_allow_policy + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityUpdateAllowPolicy' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecurityAllowPolicy' + required: + - success + - errors + - messages + description: Updated allow policy + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update an email allow policy + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: policy_id + in: path + required: true + description: The Access policy ID. + schema: + type: string + x-stackql-sdk: + service: email_security + resource_chain: + - settings + - allow_policies + method: edit + /accounts/{account_id}/email-security/settings/block_senders: + get: + description: Returns a paginated list of blocked email sender patterns. These patterns prevent emails from matching senders from being delivered. Supports filtering by pattern type and searching across patterns. + operationId: email_security_list_blocked_senders + parameters: + - description: Current page within paginated list of results. + in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - description: The number of results per page. Maximum value is 1000. + in: query + name: per_page + schema: + default: 20 + maximum: 1000 + minimum: 1 + type: integer + - description: Search term for filtering records. Behavior may change. + in: query + name: search + schema: + type: string + - description: Field to sort by. + in: query + name: order + schema: + enum: + - pattern + - created_at + type: string + - description: The sorting direction. + in: query + name: direction + schema: + enum: + - asc + - desc + type: string + - description: Filter by pattern type. + in: query + name: pattern_type + schema: + $ref: '#/components/schemas/emailSecurityPatternType' + - description: Filter by pattern value. + in: query + name: pattern + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + type: object + result: + $ref: '#/components/schemas/emailSecurityBlockedSenderList' + required: + - success + - errors + - messages + description: List of blocked senders + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List blocked email senders + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + - 'Cloud Email Security: Read' + x-stackql-sdk: + service: email_security + resource_chain: + - settings + - block_senders + method: list + post: + description: Creates a new blocked sender pattern. Emails matching this pattern will be blocked from delivery. Patterns can be email addresses, domains, or IP addresses, and support regular expressions. + operationId: email_security_create_blocked_sender + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityCreateBlockedSender' + responses: + '201': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecurityBlockedSender' + required: + - success + - errors + - messages + description: Created blocked sender + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create blocked email sender + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + x-stackql-sdk: + service: email_security + resource_chain: + - settings + - block_senders + method: create + /accounts/{account_id}/email-security/settings/block_senders/batch: + post: + description: Execute multiple operations atomically. All four operation arrays (deletes, patches, puts, posts) are required and executed in order. Send empty arrays for unused operations. + operationId: email_security_batch_blocked_senders + requestBody: + content: + application/json: + schema: + properties: + deletes: + items: + properties: + id: + $ref: '#/components/schemas/emailSecurityBlockedSenderId' + required: + - id + type: object + maxItems: 1000 + type: array + patches: + items: + description: A blocked sender pattern + minProperties: 1 + properties: + comments: + maxLength: 1024 + nullable: true + type: string + created_at: + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + id: + readOnly: true + $ref: '#/components/schemas/emailSecurityBlockedSenderId' + is_regex: + type: boolean + x-auditable: true + last_modified: + deprecated: true + description: 'Deprecated, use `modified_at` instead. End of life: November 1, 2026.' + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + modified_at: + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + pattern: + maxLength: 1024 + minLength: 1 + type: string + x-auditable: true + pattern_type: + $ref: '#/components/schemas/emailSecurityPatternType' + type: object + maxItems: 1000 + type: array + posts: + items: + $ref: '#/components/schemas/emailSecurityCreateBlockedSender' + maxItems: 1000 + type: array + puts: + items: + description: A blocked sender pattern + properties: + comments: + maxLength: 1024 + nullable: true + type: string + created_at: + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + id: + readOnly: true + $ref: '#/components/schemas/emailSecurityBlockedSenderId' + is_regex: + type: boolean + x-auditable: true + last_modified: + deprecated: true + description: 'Deprecated, use `modified_at` instead. End of life: November 1, 2026.' + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + modified_at: + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + pattern: + maxLength: 1024 + minLength: 1 + type: string + x-auditable: true + pattern_type: + $ref: '#/components/schemas/emailSecurityPatternType' + type: object + maxItems: 1000 + type: array + required: + - deletes + - patches + - puts + - posts + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + properties: + deletes: + items: + $ref: '#/components/schemas/emailSecurityDeletedBlockedSender' + type: array + patches: + $ref: '#/components/schemas/emailSecurityBlockedSenderList' + posts: + $ref: '#/components/schemas/emailSecurityBlockedSenderList' + puts: + $ref: '#/components/schemas/emailSecurityBlockedSenderList' + type: object + required: + - success + - errors + - messages + description: Batch operation results + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Batch blocked senders operations + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + /accounts/{account_id}/email-security/settings/block_senders/{pattern_id}: + delete: + description: Removes a blocked sender pattern. After deletion, emails from this sender will no longer be automatically blocked based on this rule. + operationId: email_security_delete_blocked_sender + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecurityDeletedBlockedSender' + required: + - success + - errors + - messages + description: Deleted blocked sender + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete a blocked email sender + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: pattern_id + schema: + $ref: '#/components/schemas/emailSecurityBlockedSenderId' + required: true + x-stackql-sdk: + service: email_security + resource_chain: + - settings + - block_senders + method: delete + get: + description: Retrieves details for a specific blocked sender pattern including its pattern type, value, and metadata. + operationId: email_security_get_blocked_sender + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecurityBlockedSender' + required: + - success + - errors + - messages + description: Blocked sender details + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get a blocked email sender + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + - 'Cloud Email Security: Read' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: pattern_id + schema: + $ref: '#/components/schemas/emailSecurityBlockedSenderId' + required: true + x-stackql-sdk: + service: email_security + resource_chain: + - settings + - block_senders + method: get + patch: + description: Updates an existing blocked sender pattern. Only provided fields will be modified. The pattern will continue blocking emails until deleted. + operationId: email_security_update_blocked_sender + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityUpdateBlockedSender' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecurityBlockedSender' + required: + - success + - errors + - messages + description: Updated blocked sender + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update a blocked email sender + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: pattern_id + schema: + $ref: '#/components/schemas/emailSecurityBlockedSenderId' + required: true + x-stackql-sdk: + service: email_security + resource_chain: + - settings + - block_senders + method: edit + /accounts/{account_id}/email-security/settings/domains: + get: + description: Returns a paginated list of email domains protected by Email Security. Includes domain configuration, delivery modes, and authorization status. Supports filtering by delivery mode and integration ID. + operationId: email_security_list_domains + parameters: + - description: Current page within paginated list of results. + in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - description: The number of results per page. Maximum value is 1000. + in: query + name: per_page + schema: + default: 20 + maximum: 1000 + minimum: 1 + type: integer + - description: Search term for filtering records. Behavior may change. + in: query + name: search + schema: + type: string + - description: Field to sort by. + in: query + name: order + schema: + enum: + - domain + - created_at + type: string + - description: The sorting direction. + in: query + name: direction + schema: + enum: + - asc + - desc + type: string + - description: Delivery mode to filter by. + in: query + name: allowed_delivery_mode + schema: + $ref: '#/components/schemas/emailSecurityDeliveryMode' + - description: Domain names to filter by. + in: query + name: domain + schema: + items: + type: string + type: array + explode: true + - description: Currently active delivery mode to filter by. + in: query + name: active_delivery_mode + schema: + $ref: '#/components/schemas/emailSecurityDeliveryMode' + - description: Integration ID to filter by. + in: query + name: integration_id + schema: + format: uuid + type: string + - description: Filters response to domains with the provided status. + in: query + name: status + schema: + $ref: '#/components/schemas/emailSecurityDomainStatus' + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + type: object + result: + $ref: '#/components/schemas/emailSecurityDomainList' + required: + - success + - errors + - messages + description: List of domains + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List protected email domains + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + - 'Cloud Email Security: Read' + x-stackql-sdk: + service: email_security + resource_chain: + - settings + - domains + method: list + /accounts/{account_id}/email-security/settings/domains/{domain_id}: + delete: + description: Removes email security protection from a domain. After deletion, emails for this domain will no longer be processed by Email Security. This action cannot be undone. + operationId: email_security_delete_domain + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecurityDeletedDomain' + required: + - success + - errors + - messages + description: Deleted domain + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Unprotect an email domain + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: domain_id + schema: + $ref: '#/components/schemas/emailSecurityDomainId' + required: true + x-stackql-sdk: + service: email_security + resource_chain: + - settings + - domains + method: delete + get: + description: Retrieves detailed information for a specific protected email domain including its delivery configuration, SPF/DMARC status, and authorization state. + operationId: email_security_get_domain + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecurityDomain' + required: + - success + - errors + - messages + description: Domain details + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get an email domain + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + - 'Cloud Email Security: Read' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: domain_id + schema: + $ref: '#/components/schemas/emailSecurityDomainId' + required: true + x-stackql-sdk: + service: email_security + resource_chain: + - settings + - domains + method: get + patch: + description: Updates configuration for a protected email domain. Only provided fields will be modified. Changes affect delivery mode, security settings, and regional processing. + operationId: email_security_update_domain + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityUpdateDomain' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecurityDomain' + required: + - success + - errors + - messages + description: Updated domain + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update an email domain + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: domain_id + schema: + $ref: '#/components/schemas/emailSecurityDomainId' + required: true + x-stackql-sdk: + service: email_security + resource_chain: + - settings + - domains + method: edit + /accounts/{account_id}/email-security/settings/impersonation_registry: + get: + description: Returns a paginated list of protected identities in the impersonation registry. These entries define identities and email addresses to protect from impersonation attacks. Can be manually added or automatically synced from directory integrations. + operationId: email_security_list_impersonation_registry + parameters: + - description: Current page within paginated list of results. + in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - description: The number of results per page. Maximum value is 1000. + in: query + name: per_page + schema: + default: 20 + maximum: 1000 + minimum: 1 + type: integer + - description: Search term for filtering records. Behavior may change. + in: query + name: search + schema: + type: string + - description: Field to sort by. + in: query + name: order + schema: + enum: + - name + - email + - created_at + type: string + - description: The sorting direction. + in: query + name: direction + schema: + enum: + - asc + - desc + type: string + - in: query + name: provenance + schema: + $ref: '#/components/schemas/emailSecurityProvenance' + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + type: object + result: + $ref: '#/components/schemas/emailSecurityImpersonationRegistryList' + required: + - success + - errors + - messages + description: List of impersonation registry entries + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List entries in impersonation registry + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + - 'Cloud Email Security: Read' + x-stackql-sdk: + service: email_security + resource_chain: + - settings + - impersonation_registry + method: list + post: + description: Creates a new entry in the impersonation registry to protect against impersonation. Emails attempting to impersonate this identity will be flagged. Supports regex patterns for flexible email matching. + operationId: email_security_create_impersonation_registry + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityCreateImpersonationRegistry' + responses: + '201': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecurityImpersonationRegistry' + required: + - success + - errors + - messages + description: Created impersonation registry entry + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create impersonation registry entry + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + x-stackql-sdk: + service: email_security + resource_chain: + - settings + - impersonation_registry + method: create + /accounts/{account_id}/email-security/settings/impersonation_registry/{impersonation_registry_id}: + delete: + description: Removes an entry from the impersonation registry. After deletion, this identity will no longer be protected from impersonation. + operationId: email_security_delete_impersonation_registry + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecurityDeletedImpersonationRegistry' + required: + - success + - errors + - messages + description: Deleted impersonation registry entry + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete an impersonation registry entry + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: impersonation_registry_id + schema: + $ref: '#/components/schemas/emailSecurityImpersonationRegistryId' + required: true + x-stackql-sdk: + service: email_security + resource_chain: + - settings + - impersonation_registry + method: delete + get: + description: Retrieves details for a specific impersonation registry entry including the protected identity, email pattern, and synchronization source if directory-synced. + operationId: email_security_get_impersonation_registry + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecurityImpersonationRegistry' + required: + - success + - errors + - messages + description: Impersonation registry entry details + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get an impersonation registry entry + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + - 'Cloud Email Security: Read' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: impersonation_registry_id + schema: + $ref: '#/components/schemas/emailSecurityImpersonationRegistryId' + required: true + x-stackql-sdk: + service: email_security + resource_chain: + - settings + - impersonation_registry + method: get + patch: + description: Updates an existing impersonation registry entry. Only provided fields will be modified. Directory-synced entries can't be updated. + operationId: email_security_update_impersonation_registry + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityUpdateImpersonationRegistry' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecurityImpersonationRegistry' + required: + - success + - errors + - messages + description: Updated impersonation registry entry + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update an impersonation registry entry + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: impersonation_registry_id + schema: + $ref: '#/components/schemas/emailSecurityImpersonationRegistryId' + required: true + x-stackql-sdk: + service: email_security + resource_chain: + - settings + - impersonation_registry + method: edit + /accounts/{account_id}/email-security/settings/sending_domain_restrictions: + get: + description: Returns a paginated list of sending domain restrictions. These restrictions enforce TLS requirements for emails from specific domains. Mail without TLS from restricted domains will be dropped unless the subdomain is in the exclude list. Supports sorting and searching. + operationId: email_security_list_sending_domain_restrictions + parameters: + - description: Current page within paginated list of results. + in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - description: The number of results per page. Maximum value is 1000. + in: query + name: per_page + schema: + default: 20 + maximum: 1000 + minimum: 1 + type: integer + - description: Search term for filtering records. Behavior may change. + in: query + name: search + schema: + type: string + - description: Field to sort by. + in: query + name: order + schema: + enum: + - domain + - created_at + type: string + - description: The sorting direction. + in: query + name: direction + schema: + enum: + - asc + - desc + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + type: object + result: + $ref: '#/components/schemas/emailSecuritySendingDomainRestrictionList' + required: + - success + - errors + - messages + description: List of sending domain restrictions + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List sending domain restrictions + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + - 'Cloud Email Security: Read' + post: + description: Creates a new sending domain restriction to enforce TLS requirements for a domain. Emails without TLS from this domain will be dropped unless the subdomain is in the exclude list. + operationId: email_security_create_sending_domain_restriction + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityCreateSendingDomainRestriction' + responses: + '201': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecuritySendingDomainRestriction' + required: + - success + - errors + - messages + description: Created sending domain restriction + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a sending domain restriction + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + /accounts/{account_id}/email-security/settings/sending_domain_restrictions/batch: + post: + description: Executes multiple delete operations on sending domain restrictions atomically. All operations succeed or fail together as a transaction. Currently only supports batch deletion. Removes TLS enforcement requirements for the specified domains. + operationId: email_security_batch_sending_domain_restrictions + requestBody: + content: + application/json: + schema: + properties: + deletes: + items: + properties: + id: + $ref: '#/components/schemas/emailSecuritySendingDomainRestrictionId' + required: + - id + type: object + maxItems: 1000 + type: array + required: + - deletes + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + properties: + deletes: + items: + properties: + id: + $ref: '#/components/schemas/emailSecuritySendingDomainRestrictionId' + required: + - id + type: object + type: array + required: + - deletes + type: object + required: + - success + - errors + - messages + description: Batch operation results + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Batch sending domain restrictions operations + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + /accounts/{account_id}/email-security/settings/sending_domain_restrictions/{sending_domain_restriction_id}: + delete: + description: Removes a sending domain restriction. After deletion, TLS will no longer be enforced for emails from this domain. + operationId: email_security_delete_sending_domain_restriction + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecurityDeletedSendingDomainRestriction' + required: + - success + - errors + - messages + description: Deleted sending domain restriction + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete a sending domain restriction + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: sending_domain_restriction_id + schema: + $ref: '#/components/schemas/emailSecuritySendingDomainRestrictionId' + required: true + get: + description: Retrieves details for a specific sending domain restriction including the domain requiring TLS and any excluded subdomains exempt from the TLS requirement. + operationId: email_security_get_sending_domain_restriction + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecuritySendingDomainRestriction' + required: + - success + - errors + - messages + description: Sending domain restriction details + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get a sending domain restriction + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + - 'Cloud Email Security: Read' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: sending_domain_restriction_id + schema: + $ref: '#/components/schemas/emailSecuritySendingDomainRestrictionId' + required: true + patch: + description: Updates an existing sending domain restriction. Only provided fields will be modified. Changes affect which domains require TLS and which subdomains are excluded. + operationId: email_security_update_sending_domain_restriction + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityUpdateSendingDomainRestriction' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecuritySendingDomainRestriction' + required: + - success + - errors + - messages + description: Updated sending domain restriction + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update a sending domain restriction + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: sending_domain_restriction_id + schema: + $ref: '#/components/schemas/emailSecuritySendingDomainRestrictionId' + required: true + /accounts/{account_id}/email-security/settings/trusted_domains: + get: + description: Returns a paginated list of trusted domain patterns. Trusted domains prevent false positives for recently registered domains and lookalike domain detections. Patterns can use regular expressions for flexible matching. + operationId: email_security_list_trusted_domains + parameters: + - description: Current page within paginated list of results. + in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - description: The number of results per page. Maximum value is 1000. + in: query + name: per_page + schema: + default: 20 + maximum: 1000 + minimum: 1 + type: integer + - description: Search term for filtering records. Behavior may change. + in: query + name: search + schema: + type: string + - description: Field to sort by. + in: query + name: order + schema: + enum: + - pattern + - created_at + type: string + - description: The sorting direction. + in: query + name: direction + schema: + enum: + - asc + - desc + type: string + - description: Filter to show only recently registered domains that are trusted to prevent triggering Suspicious or Malicious dispositions. + in: query + name: is_recent + schema: + type: boolean + - description: Filter to show only proximity domains (partner or approved domains with similar spelling to connected domains) that prevent Spoof dispositions. + in: query + name: is_similarity + schema: + type: boolean + - in: query + name: pattern + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + type: object + result: + $ref: '#/components/schemas/emailSecurityTrustedDomainList' + required: + - success + - errors + - messages + description: List of trusted domains + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List trusted email domains + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + - 'Cloud Email Security: Read' + x-stackql-sdk: + service: email_security + resource_chain: + - settings + - trusted_domains + method: list + post: + description: Creates a new trusted domain pattern. Use for partner domains or approved senders that should bypass recent domain registration and similarity checks. Configure whether it prevents recent domain or spoof dispositions. + operationId: email_security_create_trusted_domain + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityCreateTrustedDomain' + responses: + '201': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecurityTrustedDomain' + required: + - success + - errors + - messages + description: Created trusted domain + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create trusted email domain + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + x-stackql-sdk: + service: email_security + resource_chain: + - settings + - trusted_domains + method: create + /accounts/{account_id}/email-security/settings/trusted_domains/batch: + post: + description: Execute multiple operations atomically. All four operation arrays (deletes, patches, puts, posts) are required and executed in order. Send empty arrays for unused operations. + operationId: email_security_batch_trusted_domains + requestBody: + content: + application/json: + schema: + properties: + deletes: + items: + properties: + id: + $ref: '#/components/schemas/emailSecurityTrustedDomainId' + required: + - id + type: object + maxItems: 1000 + type: array + patches: + items: + description: A trusted email domain + minProperties: 1 + properties: + comments: + maxLength: 1024 + nullable: true + type: string + created_at: + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + id: + readOnly: true + $ref: '#/components/schemas/emailSecurityTrustedDomainId' + is_recent: + description: Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition. + type: boolean + x-auditable: true + is_regex: + type: boolean + x-auditable: true + is_similarity: + description: Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition. + type: boolean + x-auditable: true + last_modified: + deprecated: true + description: 'Deprecated, use `modified_at` instead. End of life: November 1, 2026.' + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + modified_at: + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + pattern: + maxLength: 1024 + minLength: 1 + type: string + x-auditable: true + type: object + maxItems: 1000 + type: array + posts: + items: + $ref: '#/components/schemas/emailSecurityCreateTrustedDomain' + maxItems: 1000 + type: array + puts: + items: + description: A trusted email domain + properties: + comments: + maxLength: 1024 + nullable: true + type: string + created_at: + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + id: + readOnly: true + $ref: '#/components/schemas/emailSecurityTrustedDomainId' + is_recent: + description: Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition. + type: boolean + x-auditable: true + is_regex: + type: boolean + x-auditable: true + is_similarity: + description: Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition. + type: boolean + x-auditable: true + last_modified: + deprecated: true + description: 'Deprecated, use `modified_at` instead. End of life: November 1, 2026.' + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + modified_at: + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + pattern: + maxLength: 1024 + minLength: 1 + type: string + x-auditable: true + type: object + maxItems: 1000 + type: array + required: + - deletes + - patches + - puts + - posts + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + properties: + deletes: + items: + $ref: '#/components/schemas/emailSecurityDeletedTrustedDomain' + type: array + patches: + $ref: '#/components/schemas/emailSecurityTrustedDomainList' + posts: + $ref: '#/components/schemas/emailSecurityTrustedDomainList' + puts: + $ref: '#/components/schemas/emailSecurityTrustedDomainList' + type: object + required: + - success + - errors + - messages + description: Batch operation results + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Batch trusted domains operations + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + /accounts/{account_id}/email-security/settings/trusted_domains/{trusted_domain_id}: + delete: + description: Removes a trusted domain pattern. After deletion, emails from this domain will be subject to normal recent domain and similarity checks. + operationId: email_security_delete_trusted_domain + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecurityDeletedTrustedDomain' + required: + - success + - errors + - messages + description: Deleted trusted domain + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete a trusted email domain + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: trusted_domain_id + schema: + $ref: '#/components/schemas/emailSecurityTrustedDomainId' + required: true + x-stackql-sdk: + service: email_security + resource_chain: + - settings + - trusted_domains + method: delete + get: + description: Retrieves details for a specific trusted domain pattern including its pattern value, whether it uses regex matching, and which detection types it affects. + operationId: email_security_get_trusted_domain + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecurityTrustedDomain' + required: + - success + - errors + - messages + description: Trusted domain details + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get a trusted email domain + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + - 'Cloud Email Security: Read' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: trusted_domain_id + schema: + $ref: '#/components/schemas/emailSecurityTrustedDomainId' + required: true + x-stackql-sdk: + service: email_security + resource_chain: + - settings + - trusted_domains + method: get + patch: + description: Updates an existing trusted domain pattern. Only provided fields will be modified. Changes take effect for new emails matching the pattern. + operationId: email_security_update_trusted_domain + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityUpdateTrustedDomain' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/emailSecurityTrustedDomain' + required: + - success + - errors + - messages + description: Updated trusted domain + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update a trusted email domain + tags: + - Email Security Settings + x-api-token-group: + - 'Cloud Email Security: Write' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: trusted_domain_id + schema: + $ref: '#/components/schemas/emailSecurityTrustedDomainId' + required: true + x-stackql-sdk: + service: email_security + resource_chain: + - settings + - trusted_domains + method: edit + /accounts/{account_id}/email-security/submissions: + get: + description: Returns information for submissions made to reclassify emails. Shows the status, outcome, and disposition changes for reclassification requests made by users or the security team. Useful for tracking false positive/negative reports. + operationId: email_security_submissions + parameters: + - description: The beginning of the search date range. Defaults to `now - 30 days`. + in: query + name: start + schema: + format: date-time + type: string + - description: The end of the search date range. Defaults to `now`. + in: query + name: end + schema: + format: date-time + type: string + - in: query + name: type + schema: + enum: + - TEAM + - USER + type: string + - in: query + name: submission_id + schema: + type: string + - in: query + name: original_disposition + schema: + $ref: '#/components/schemas/emailSecuritySubmissionDisposition' + - in: query + name: requested_disposition + schema: + $ref: '#/components/schemas/emailSecuritySubmissionDisposition' + - in: query + name: outcome_disposition + schema: + $ref: '#/components/schemas/emailSecuritySubmissionDisposition' + - in: query + name: status + schema: + type: string + - in: query + name: query + schema: + nullable: true + type: string + - description: Current page within paginated list of results. + in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - description: The number of results per page. Maximum value is 1000. + in: query + name: per_page + schema: + default: 20 + maximum: 1000 + minimum: 1 + type: integer + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/emailSecurityMessages' + messages: + $ref: '#/components/schemas/emailSecurityMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + type: object + result: + items: + $ref: '#/components/schemas/emailSecuritySubmission' + type: array + required: + - success + - errors + - messages + description: List of submissions + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSecurityApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get reclassify submissions + tags: + - Email Security + x-api-token-group: null + x-stackql-sdk: + service: email_security + resource_chain: + - submissions + method: list +components: + schemas: + emailSecurityActionEntry: + properties: + completed_at: + description: Timestamp when the action completed + format: date-time + nullable: true + type: string + operation: + enum: + - PREVIEW + - QUARANTINE_RELEASE + - SUBMISSION + - MOVE + type: string + properties: + nullable: true + type: object + $ref: '#/components/schemas/emailSecurityActionEntryProperties' + started_at: + description: Timestamp when the action was initiated + format: date-time + nullable: true + type: string + status: + nullable: true + type: string + success: + nullable: true + type: boolean + required: + - operation + type: object + emailSecurityActionEntryProperties: + properties: + folder: + nullable: true + type: string + requested_by: + nullable: true + type: string + requested_disposition: + nullable: true + type: string + service: + nullable: true + type: string + submission_id: + nullable: true + type: string + submission_type: + nullable: true + type: string + type: object + emailSecurityActionLogEntry: + properties: + completed_at: + description: Timestamp when action completed + format: date-time + readOnly: true + type: string + completed_timestamp: + deprecated: true + description: 'Deprecated, use `completed_at` instead. End of life: November 1, 2026.' + readOnly: true + type: string + operation: + description: Type of action performed + enum: + - MOVE + - RELEASE + - RECLASSIFY + - SUBMISSION + - QUARANTINE_RELEASE + - PREVIEW + type: string + properties: + description: Additional properties for the action + properties: + folder: + description: Target folder for move operations + type: string + requested_by: + description: User who requested the action + type: string + type: object + status: + description: Status of the action + nullable: true + type: string + required: + - completed_at + - operation + type: object + emailSecurityAllowPolicy: + description: An email allow policy + properties: + comments: + example: Trust all messages send from test@example.com + maxLength: 1024 + nullable: true + type: string + created_at: + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + id: + readOnly: true + $ref: '#/components/schemas/emailSecurityAllowPolicyId' + is_acceptable_sender: + description: Messages from this sender will be exempted from Spam, Spoof and Bulk dispositions. Note - This will not exempt messages with Malicious or Suspicious dispositions. + example: false + type: boolean + x-auditable: true + is_exempt_recipient: + description: Messages to this recipient will bypass all detections + example: false + type: boolean + x-auditable: true + is_recipient: + deprecated: true + description: 'Deprecated as of July 1, 2025. Use `is_exempt_recipient` instead. End of life: July 1, 2026.' + example: false + type: boolean + x-auditable: true + is_regex: + example: false + type: boolean + x-auditable: true + is_sender: + deprecated: true + description: 'Deprecated as of July 1, 2025. Use `is_trusted_sender` instead. End of life: July 1, 2026.' + example: true + type: boolean + x-auditable: true + is_spoof: + deprecated: true + description: 'Deprecated as of July 1, 2025. Use `is_acceptable_sender` instead. End of life: July 1, 2026.' + example: false + type: boolean + x-auditable: true + is_trusted_sender: + description: Messages from this sender will bypass all detections and link following + example: true + type: boolean + x-auditable: true + last_modified: + deprecated: true + description: 'Deprecated, use `modified_at` instead. End of life: November 1, 2026.' + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + modified_at: + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + pattern: + example: test@example.com + maxLength: 1024 + minLength: 1 + type: string + x-auditable: true + pattern_type: + $ref: '#/components/schemas/emailSecurityPatternType' + verify_sender: + description: Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors policies that pass authentication. + example: true + type: boolean + x-auditable: true + required: + - id + - created_at + - last_modified + type: object + emailSecurityAllowPolicyId: + description: Allow policy identifier + example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 + format: uuid + type: string + x-auditable: true + emailSecurityAllowPolicyList: + items: + $ref: '#/components/schemas/emailSecurityAllowPolicy' + type: array + emailSecurityApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/emailSecurityMessages' + messages: + example: [] + $ref: '#/components/schemas/emailSecurityMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + emailSecurityAttachment: + properties: + content_type: + description: MIME type of the attachment + nullable: true + type: string + detection: + description: Detection result for this attachment + nullable: true + type: string + $ref: '#/components/schemas/emailSecurityDispositionLabel' + encrypted: + description: Whether the attachment is encrypted + nullable: true + type: boolean + filename: + description: Name of the attached file + nullable: true + type: string + md5: + description: MD5 hash of the attachment + nullable: true + type: string + name: + description: Attachment name (alternative to filename) + nullable: true + type: string + sha1: + description: SHA1 hash of the attachment + nullable: true + type: string + sha256: + description: SHA256 hash of the attachment + nullable: true + type: string + size: + description: Size of the attachment in bytes + minimum: 0 + type: integer + required: + - size + type: object + emailSecurityBlockedSender: + description: A blocked sender pattern + properties: + comments: + example: Block sender with email test@example.com + maxLength: 1024 + nullable: true + type: string + created_at: + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + id: + readOnly: true + $ref: '#/components/schemas/emailSecurityBlockedSenderId' + is_regex: + example: false + type: boolean + x-auditable: true + last_modified: + deprecated: true + description: 'Deprecated, use `modified_at` instead. End of life: November 1, 2026.' + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + modified_at: + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + pattern: + example: test@example.com + maxLength: 1024 + minLength: 1 + type: string + x-auditable: true + pattern_type: + $ref: '#/components/schemas/emailSecurityPatternType' + type: object + emailSecurityBlockedSenderId: + description: Blocked sender pattern identifier + example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 + format: uuid + type: string + x-auditable: true + emailSecurityBlockedSenderList: + items: + $ref: '#/components/schemas/emailSecurityBlockedSender' + type: array + emailSecurityCreateAllowPolicy: + description: Create an allow policy + $ref: '#/components/schemas/emailSecurityAllowPolicy' + emailSecurityCreateBlockedSender: + description: Create a blocked sender pattern + $ref: '#/components/schemas/emailSecurityBlockedSender' + emailSecurityCreateImpersonationRegistry: + description: Create an impersonation registry entry + $ref: '#/components/schemas/emailSecurityImpersonationRegistry' + emailSecurityCreateSendingDomainRestriction: + description: Create a sending domain restriction. + $ref: '#/components/schemas/emailSecuritySendingDomainRestriction' + emailSecurityCreateTrustedDomain: + description: Create a trusted domain + $ref: '#/components/schemas/emailSecurityTrustedDomain' + emailSecurityCursorResultInfo: + properties: + count: + description: Number of items in current page + minimum: 0 + type: integer + next: + description: Cursor for next page + nullable: true + type: string + page: + deprecated: true + description: 'Deprecated: Always returns 0. End of life: November 1, 2026.' + minimum: 0 + type: integer + per_page: + description: Number of items per page + minimum: 0 + type: integer + previous: + description: Cursor for previous page + nullable: true + type: string + total_count: + deprecated: true + description: 'Deprecated: Always returns 0. End of life: November 1, 2026.' + minimum: 0 + type: integer + required: + - per_page + - count + - total_count + type: object + emailSecurityCustomerStatus: + enum: + - escalated + - reviewed + - unreviewed + nullable: true + type: string + emailSecurityDeletedAllowPolicy: + properties: + id: + $ref: '#/components/schemas/emailSecurityAllowPolicyId' + required: + - id + type: object + emailSecurityDeletedBlockedSender: + properties: + id: + $ref: '#/components/schemas/emailSecurityBlockedSenderId' + required: + - id + type: object + emailSecurityDeletedDomain: + properties: + id: + $ref: '#/components/schemas/emailSecurityDomainId' + required: + - id + type: object + emailSecurityDeletedImpersonationRegistry: + properties: + id: + $ref: '#/components/schemas/emailSecurityImpersonationRegistryId' + required: + - id + type: object + emailSecurityDeletedSendingDomainRestriction: + properties: + id: + $ref: '#/components/schemas/emailSecuritySendingDomainRestrictionId' + required: + - id + type: object + emailSecurityDeletedTrustedDomain: + properties: + id: + $ref: '#/components/schemas/emailSecurityTrustedDomainId' + required: + - id + type: object + emailSecurityDeliveryMode: + enum: + - DIRECT + - BCC + - JOURNAL + - API + - RETRO_SCAN + type: string + emailSecurityDispositionLabel: + enum: + - MALICIOUS + - MALICIOUS-BEC + - SUSPICIOUS + - SPOOF + - SPAM + - BULK + - ENCRYPTED + - EXTERNAL + - UNKNOWN + - NONE + type: string + emailSecurityDmarcStatus: + enum: + - none + - good + - invalid + type: string + emailSecurityDomain: + properties: + allowed_delivery_modes: + items: + $ref: '#/components/schemas/emailSecurityDeliveryMode' + type: array + authorization: + $ref: '#/components/schemas/emailSecurityDomainAuthorization' + created_at: + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + dmarc_status: + $ref: '#/components/schemas/emailSecurityDmarcStatus' + domain: + example: example.com + type: string + x-auditable: true + drop_dispositions: + items: + $ref: '#/components/schemas/emailSecurityDispositionLabel' + type: array + emails_processed: + $ref: '#/components/schemas/emailSecurityEmailsProcessed' + folder: + $ref: '#/components/schemas/emailSecurityScannableFolder' + id: + $ref: '#/components/schemas/emailSecurityDomainId' + inbox_provider: + enum: + - Microsoft + - Google + - null + nullable: true + type: string + integration_id: + format: uuid + nullable: true + type: string + ip_restrictions: + example: + - 192.0.2.0/24 + - 2001:db8::/32 + items: + type: string + type: array + last_modified: + deprecated: true + description: 'Deprecated, use `modified_at` instead. End of life: November 1, 2026.' + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + lookback_hops: + type: integer + x-auditable: true + modified_at: + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + o365_tenant_id: + nullable: true + type: string + regions: + items: + $ref: '#/components/schemas/emailSecurityRegion' + type: array + require_tls_inbound: + nullable: true + type: boolean + require_tls_outbound: + nullable: true + type: boolean + spf_status: + $ref: '#/components/schemas/emailSecuritySpfStatus' + status: + $ref: '#/components/schemas/emailSecurityDomainStatus' + transport: + type: string + x-auditable: true + type: object + emailSecurityDomainAuthorization: + properties: + authorized: + type: boolean + status_message: + nullable: true + type: string + timestamp: + format: date-time + readOnly: true + type: string + required: + - authorized + - timestamp + type: object + emailSecurityDomainId: + description: Domain identifier + example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 + format: uuid + type: string + x-auditable: true + emailSecurityDomainList: + items: + $ref: '#/components/schemas/emailSecurityDomain' + type: array + emailSecurityDomainStatus: + enum: + - pending + - active + - failed + - timeout + type: string + emailSecurityEmailsProcessed: + properties: + timestamp: + format: date-time + readOnly: true + type: string + total_emails_processed: + minimum: 0 + type: integer + total_emails_processed_previous: + minimum: 0 + type: integer + required: + - total_emails_processed + - total_emails_processed_previous + - timestamp + type: object + emailSecurityImpersonationRegistry: + description: An impersonation registry entry + properties: + comments: + nullable: true + type: string + created_at: + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + directory_id: + nullable: true + type: integer + directory_node_id: + nullable: true + type: integer + email: + example: john.doe@example.com + type: string + x-auditable: true + external_directory_node_id: + deprecated: true + nullable: true + type: string + id: + readOnly: true + $ref: '#/components/schemas/emailSecurityImpersonationRegistryId' + is_email_regex: + example: false + type: boolean + x-auditable: true + last_modified: + deprecated: true + description: 'Deprecated, use `modified_at` instead. End of life: November 1, 2026.' + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + modified_at: + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + name: + example: John Doe + maxLength: 1024 + type: string + x-auditable: true + provenance: + $ref: '#/components/schemas/emailSecurityProvenance' + type: object + emailSecurityImpersonationRegistryId: + description: Impersonation registry entry identifier + example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 + format: uuid + title: identifier + type: string + x-auditable: true + emailSecurityImpersonationRegistryList: + items: + $ref: '#/components/schemas/emailSecurityImpersonationRegistry' + type: array + emailSecurityInvestigateId: + description: Unique identifier for a message retrieved from investigation + example: 4Njp3P0STMz2c02Q-2024-01-05T10:00:00-12345678 + type: string + emailSecurityLink: + properties: + href: + type: string + text: + nullable: true + type: string + required: + - href + type: object + emailSecurityMailboxDestination: + enum: + - Inbox + - JunkEmail + - DeletedItems + - RecoverableItemsDeletions + - RecoverableItemsPurges + type: string + emailSecurityMessageDeliveryMode: + enum: + - DIRECT + - BCC + - JOURNAL + - REVIEW_SUBMISSION + - DMARC_UNVERIFIED + - DMARC_FAILURE_REPORT + - DMARC_AGGREGATE_REPORT + - THREAT_INTEL_SUBMISSION + - SIMULATION_SUBMISSION + - API + - RETRO_SCAN + type: string + emailSecurityMessageDeliveryStatus: + description: Delivery status of the message. + enum: + - delivered + - moved + - quarantined + - rejected + - deferred + - bounced + - queued + type: string + emailSecurityMessageDetails: + properties: + action_log: + deprecated: true + description: 'Deprecated, use `GET /investigate/{investigate_id}/action_log` instead. End of life: November 1, 2026.' + items: + $ref: '#/components/schemas/emailSecurityActionLogEntry' + type: array + alert_id: + nullable: true + type: string + client_recipients: + items: + type: string + type: array + delivery_mode: + $ref: '#/components/schemas/emailSecurityMessageDeliveryMode' + delivery_status: + items: + $ref: '#/components/schemas/emailSecurityMessageDeliveryStatus' + nullable: true + type: array + detection_reasons: + items: + type: string + type: array + edf_hash: + nullable: true + type: string + envelope_from: + nullable: true + type: string + envelope_to: + items: + type: string + nullable: true + type: array + final_disposition: + $ref: '#/components/schemas/emailSecurityDispositionLabel' + findings: + deprecated: true + description: 'Deprecated, use the `findings` field from `GET /investigate/{investigate_id}/detections` instead. End of life: November 1, 2026. Detection findings for this message.' + items: + properties: + attachment: + nullable: true + type: string + detail: + nullable: true + type: string + detection: + $ref: '#/components/schemas/emailSecurityDispositionLabel' + field: + nullable: true + type: string + name: + nullable: true + type: string + portion: + nullable: true + type: string + reason: + nullable: true + type: string + score: + format: double + nullable: true + type: number + value: + nullable: true + type: string + type: object + nullable: true + type: array + from: + nullable: true + type: string + from_name: + nullable: true + type: string + htmltext_structure_hash: + nullable: true + type: string + id: + x-auditable: true + $ref: '#/components/schemas/emailSecurityInvestigateId' + is_phish_submission: + type: boolean + is_quarantined: + type: boolean + message_id: + nullable: true + type: string + post_delivery_operations: + description: Post-delivery operations performed on this message + items: + enum: + - PREVIEW + - QUARANTINE_RELEASE + - SUBMISSION + - MOVE + type: string + nullable: true + type: array + postfix_id: + $ref: '#/components/schemas/emailSecurityPostfixId' + postfix_id_outbound: + nullable: true + type: string + properties: + description: Message processing properties + properties: + allowlisted_pattern: + description: Pattern that allowlisted this message + nullable: true + type: string + allowlisted_pattern_type: + description: Type of allowlist pattern + enum: + - quarantine_release + - acceptable_sender + - allowed_sender + - allowed_recipient + - domain_similarity + - domain_recency + - managed_acceptable_sender + - outbound_ndr + nullable: true + type: string + blocklisted_message: + description: Whether message was blocklisted + nullable: true + type: boolean + blocklisted_pattern: + description: Pattern that blocklisted this message + nullable: true + type: string + whitelisted_pattern_type: + description: Legacy field for allowlist pattern type + enum: + - quarantine_release + - acceptable_sender + - allowed_sender + - allowed_recipient + - domain_similarity + - domain_recency + - managed_acceptable_sender + - outbound_ndr + nullable: true + type: string + type: object + replyto: + nullable: true + type: string + scanned_at: + description: When the message was scanned (UTC) + format: date-time + nullable: true + type: string + sent_at: + description: When the message was sent (UTC) + format: date-time + nullable: true + type: string + sent_date: + nullable: true + type: string + subject: + nullable: true + type: string + threat_categories: + items: + type: string + nullable: true + type: array + to: + items: + type: string + nullable: true + type: array + to_name: + items: + type: string + nullable: true + type: array + ts: + deprecated: true + description: 'Deprecated, use `scanned_at` instead. End of life: November 1, 2026.' + readOnly: true + type: string + validation: + $ref: '#/components/schemas/emailSecurityValidation' + required: + - id + - ts + - client_recipients + - postfix_id + - detection_reasons + - action_log + - is_quarantined + - is_phish_submission + - properties + type: object + emailSecurityMessageDetectionDetails: + properties: + action: + type: string + attachments: + items: + $ref: '#/components/schemas/emailSecurityAttachment' + type: array + final_disposition: + $ref: '#/components/schemas/emailSecurityDispositionLabel' + findings: + items: + properties: + attachment: + nullable: true + type: string + detail: + nullable: true + type: string + detection: + $ref: '#/components/schemas/emailSecurityDispositionLabel' + field: + nullable: true + type: string + name: + nullable: true + type: string + portion: + nullable: true + type: string + reason: + nullable: true + type: string + score: + format: double + nullable: true + type: number + value: + nullable: true + type: string + type: object + nullable: true + type: array + headers: + items: + $ref: '#/components/schemas/emailSecurityMessageHeader' + type: array + links: + items: + $ref: '#/components/schemas/emailSecurityLink' + type: array + sender_info: + properties: + as_name: + description: The name of the autonomous system. + nullable: true + type: string + as_number: + description: The number of the autonomous system. + nullable: true + type: integer + geo: + nullable: true + type: string + ip: + nullable: true + type: string + pld: + nullable: true + type: string + type: object + threat_categories: + items: + $ref: '#/components/schemas/emailSecurityThreatCategory' + type: array + validation: + $ref: '#/components/schemas/emailSecurityValidation' + required: + - validation + - headers + - threat_categories + - sender_info + - links + - action + - attachments + - findings + type: object + emailSecurityMessageHeader: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + emailSecurityMessagePreview: + properties: + screenshot: + description: A base64 encoded PNG image of the email. + type: string + required: + - screenshot + type: object + emailSecurityMessageRaw: + properties: + raw: + description: A UTF-8 encoded eml file of the email. + type: string + required: + - raw + type: object + emailSecurityMessageTrace: + properties: + inbound: + properties: + lines: + items: + $ref: '#/components/schemas/emailSecurityTraceLine' + nullable: true + type: array + pending: + nullable: true + type: boolean + type: object + outbound: + properties: + lines: + items: + $ref: '#/components/schemas/emailSecurityTraceLine' + nullable: true + type: array + pending: + nullable: true + type: boolean + type: object + required: + - inbound + - outbound + type: object + emailSecurityMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + emailSecurityMoveResponseItem: + properties: + completed_at: + description: When the move operation completed (UTC) + format: date-time + nullable: true + type: string + completed_timestamp: + deprecated: true + description: 'Deprecated, use `completed_at` instead. End of life: November 1, 2026.' + format: date-time + type: string + destination: + description: Destination folder for the message + nullable: true + type: string + item_count: + deprecated: true + description: 'Number of items moved. End of life: November 1, 2026.' + type: integer + message_id: + description: Message identifier + nullable: true + type: string + operation: + description: Type of operation performed + nullable: true + type: string + recipient: + description: Recipient email address + nullable: true + type: string + status: + description: Operation status + nullable: true + type: string + success: + description: Whether the operation succeeded + type: boolean + required: + - success + type: object + emailSecurityOptionalSubmissionDisposition: + nullable: true + type: string + $ref: '#/components/schemas/emailSecuritySubmissionDisposition' + emailSecurityPatternType: + description: 'Type of pattern matching. Note: UNKNOWN is deprecated and cannot be used when creating or updating policies, but may be returned for existing entries.' + enum: + - EMAIL + - DOMAIN + - IP + - UNKNOWN + example: EMAIL + type: string + x-auditable: true + emailSecurityPhishGuardReport: + properties: + content: + type: string + created_at: + format: date-time + nullable: true + readOnly: true + type: string + disposition: + $ref: '#/components/schemas/emailSecurityDispositionLabel' + fields: + properties: + from: + nullable: true + type: string + occurred_at: + format: date-time + readOnly: true + type: string + postfix_id: + nullable: true + type: string + to: + items: + type: string + type: array + ts: + deprecated: true + description: Deprecated, use `occurred_at` instead + format: date-time + readOnly: true + type: string + required: + - to + type: object + id: + type: integer + priority: + type: string + tags: + items: + $ref: '#/components/schemas/emailSecurityPhishGuardReportTag' + nullable: true + type: array + title: + type: string + ts: + deprecated: true + description: Deprecated, use `created_at` instead + format: date-time + readOnly: true + type: string + updated_at: + format: date-time + nullable: true + readOnly: true + type: string + required: + - id + - title + - content + - fields + - priority + - disposition + type: object + emailSecurityPhishGuardReportTag: + properties: + category: + type: string + value: + type: string + required: + - category + - value + type: object + emailSecurityPostfixId: + description: The identifier of the message + example: 4Njp3P0STMz2c02Q + type: string + emailSecurityProvenance: + enum: + - A1S_INTERNAL + - SNOOPY-CASB_OFFICE_365 + - SNOOPY-OFFICE_365 + - SNOOPY-GOOGLE_DIRECTORY + type: string + emailSecurityReclassifyRequest: + properties: + eml_content: + description: Base64 encoded content of the EML file. + type: string + escalated_submission_id: + type: string + x-auditable: true + expected_disposition: + enum: + - NONE + - BULK + - MALICIOUS + - SPAM + - SPOOF + - SUSPICIOUS + type: string + required: + - expected_disposition + type: object + emailSecurityRegion: + enum: + - GLOBAL + - AU + - DE + - IN + - US + type: string + emailSecurityReleaseResponse: + properties: + delivered: + items: + type: string + nullable: true + type: array + failed: + items: + type: string + nullable: true + type: array + id: + x-auditable: true + $ref: '#/components/schemas/emailSecurityInvestigateId' + postfix_id: + deprecated: true + description: 'Deprecated, use `id` instead. End of life: November 1, 2026.' + $ref: '#/components/schemas/emailSecurityPostfixId' + undelivered: + items: + type: string + nullable: true + type: array + required: + - id + type: object + emailSecurityScannableFolder: + enum: + - AllItems + - Inbox + type: string + emailSecuritySendingDomainRestriction: + description: A sending domain restriction that enforces TLS (Transport Layer Security) requirements for emails from specific domains. If TLS is required, mail without TLS from the specified domain will be dropped. + properties: + comments: + example: Enforce TLS for all mail from this domain + maxLength: 1024 + nullable: true + type: string + created_at: + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + domain: + description: Domain that requires TLS enforcement. + example: example.com + type: string + x-auditable: true + exclude: + description: Excluded subdomains that are exempt from TLS requirements. + example: + - subdomain.example.com + items: + type: string + type: array + x-auditable: true + id: + readOnly: true + $ref: '#/components/schemas/emailSecuritySendingDomainRestrictionId' + last_modified: + deprecated: true + description: 'Deprecated, use `modified_at` instead. End of life: November 1, 2026.' + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + modified_at: + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + type: object + emailSecuritySendingDomainRestrictionId: + description: Sending domain restriction identifier. + example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 + format: uuid + title: identifier + type: string + x-auditable: true + emailSecuritySendingDomainRestrictionList: + items: + $ref: '#/components/schemas/emailSecuritySendingDomainRestriction' + type: array + emailSecuritySpfStatus: + enum: + - none + - good + - neutral + - open + - invalid + type: string + emailSecuritySubmission: + properties: + customer_status: + $ref: '#/components/schemas/emailSecurityCustomerStatus' + escalated_as: + $ref: '#/components/schemas/emailSecurityOptionalSubmissionDisposition' + escalated_at: + format: date-time + nullable: true + type: string + escalated_by: + nullable: true + type: string + escalated_submission_id: + nullable: true + type: string + original_disposition: + $ref: '#/components/schemas/emailSecurityOptionalSubmissionDisposition' + original_edf_hash: + nullable: true + type: string + original_postfix_id: + description: The postfix ID of the original message that was submitted + nullable: true + type: string + outcome: + nullable: true + type: string + outcome_disposition: + $ref: '#/components/schemas/emailSecurityOptionalSubmissionDisposition' + requested_at: + description: When the submission was requested (UTC). + format: date-time + type: string + requested_by: + nullable: true + type: string + requested_disposition: + $ref: '#/components/schemas/emailSecurityOptionalSubmissionDisposition' + requested_ts: + deprecated: true + description: Deprecated, use `requested_at` instead + readOnly: true + type: string + status: + nullable: true + type: string + subject: + nullable: true + type: string + submission_id: + type: string + x-auditable: true + type: + description: Whether the submission was created by a team member or an end user. + enum: + - Team + - User + nullable: true + type: string + required: + - submission_id + - requested_at + type: object + emailSecuritySubmissionDisposition: + enum: + - MALICIOUS + - SUSPICIOUS + - SPOOF + - SPAM + - BULK + - NONE + type: string + emailSecurityThreatCategory: + properties: + description: + nullable: true + type: string + id: + type: integer + name: + nullable: true + type: string + type: object + emailSecurityTimestamp: + example: '2014-01-01T05:20:00.12345Z' + format: date-time + type: string + x-auditable: true + emailSecurityTraceLine: + properties: + lineno: + description: Line number in the trace log + type: integer + logged_at: + format: date-time + nullable: true + readOnly: true + type: string + message: + type: string + ts: + deprecated: true + description: 'Deprecated, use `logged_at` instead. End of life: November 1, 2026.' + readOnly: true + type: string + type: object + emailSecurityTrustedDomain: + description: A trusted email domain + properties: + comments: + example: Trusted partner domain + maxLength: 1024 + nullable: true + type: string + created_at: + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + id: + readOnly: true + $ref: '#/components/schemas/emailSecurityTrustedDomainId' + is_recent: + description: Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition. + example: true + type: boolean + x-auditable: true + is_regex: + example: false + type: boolean + x-auditable: true + is_similarity: + description: Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition. + example: false + type: boolean + x-auditable: true + last_modified: + deprecated: true + description: 'Deprecated, use `modified_at` instead. End of life: November 1, 2026.' + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + modified_at: + readOnly: true + $ref: '#/components/schemas/emailSecurityTimestamp' + pattern: + example: example.com + maxLength: 1024 + minLength: 1 + type: string + x-auditable: true + type: object + emailSecurityTrustedDomainId: + description: Trusted domain identifier + example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 + format: uuid + type: string + x-auditable: true + emailSecurityTrustedDomainList: + items: + $ref: '#/components/schemas/emailSecurityTrustedDomain' + type: array + emailSecurityUpdateAllowPolicy: + description: Update an allow policy + minProperties: 1 + $ref: '#/components/schemas/emailSecurityAllowPolicy' + emailSecurityUpdateBlockedSender: + description: Update a blocked sender pattern + minProperties: 1 + $ref: '#/components/schemas/emailSecurityBlockedSender' + emailSecurityUpdateDomain: + properties: + allowed_delivery_modes: + items: + $ref: '#/components/schemas/emailSecurityDeliveryMode' + type: array + domain: + type: string + x-auditable: true + drop_dispositions: + items: + $ref: '#/components/schemas/emailSecurityDispositionLabel' + type: array + folder: + $ref: '#/components/schemas/emailSecurityScannableFolder' + integration_id: + format: uuid + nullable: true + type: string + x-auditable: true + ip_restrictions: + example: + - 192.0.2.0/24 + - 2001:db8::/32 + items: + type: string + x-auditable: true + type: array + lookback_hops: + maximum: 20 + minimum: 1 + type: integer + x-auditable: true + regions: + items: + $ref: '#/components/schemas/emailSecurityRegion' + type: array + require_tls_inbound: + type: boolean + x-auditable: true + require_tls_outbound: + type: boolean + x-auditable: true + transport: + type: string + x-auditable: true + type: object + emailSecurityUpdateImpersonationRegistry: + description: Update an impersonation registry entry + minProperties: 1 + $ref: '#/components/schemas/emailSecurityImpersonationRegistry' + emailSecurityUpdateSendingDomainRestriction: + description: Update a sending domain restriction. + minProperties: 1 + $ref: '#/components/schemas/emailSecuritySendingDomainRestriction' + emailSecurityUpdateTrustedDomain: + description: Update a trusted domain + minProperties: 1 + $ref: '#/components/schemas/emailSecurityTrustedDomain' + emailSecurityValidation: + properties: + comment: + nullable: true + type: string + dkim: + $ref: '#/components/schemas/emailSecurityValidationStatus' + dmarc: + $ref: '#/components/schemas/emailSecurityValidationStatus' + spf: + $ref: '#/components/schemas/emailSecurityValidationStatus' + type: object + emailSecurityValidationStatus: + enum: + - pass + - neutral + - fail + - error + - none + type: string + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + investigate: + id: cloudflare.email_security.investigate + name: investigate + title: Investigate + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1investigate/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + release: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1investigate~1release/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1investigate~1{investigate_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + reclassify: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1investigate~1{investigate_id}~1reclassify/post' + response: + mediaType: application/json + openAPIDocKey: '202' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/investigate/methods/get' + - $ref: '#/components/x-stackQL-resources/investigate/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + move: + id: cloudflare.email_security.move + name: move + title: Move + methods: + email_security_post_bulk_move: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1investigate~1move/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .destination }}{{ $sep }}"destination": {{ toJson .destination }}{{- $sep = "," -}}{{ end }} + + {{- if .ids }}{{ $sep }}"ids": {{ if eq (kindOf .ids) "string" }}{{ .ids }}{{ else }}{{ toJson .ids }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .postfix_ids }}{{ $sep }}"postfix_ids": {{ if eq (kindOf .postfix_ids) "string" }}{{ .postfix_ids }}{{ else }}{{ toJson .postfix_ids }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + email_security_post_message_move: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1investigate~1{investigate_id}~1move/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/move/methods/email_security_post_message_move' + - $ref: '#/components/x-stackQL-resources/move/methods/email_security_post_bulk_move' + update: [] + delete: [] + replace: [] + preview: + id: cloudflare.email_security.preview + name: preview + title: Preview + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1investigate~1preview/post' + response: + mediaType: application/json + openAPIDocKey: '200' + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1investigate~1{investigate_id}~1preview/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/preview/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/preview/methods/create' + update: [] + delete: [] + replace: [] + action_log: + id: cloudflare.email_security.action_log + name: action_log + title: Action Log + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1investigate~1{investigate_id}~1action_log/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/action_log/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + detections: + id: cloudflare.email_security.detections + name: detections + title: Detections + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1investigate~1{investigate_id}~1detections/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/detections/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + raw: + id: cloudflare.email_security.raw + name: raw + title: Raw + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1investigate~1{investigate_id}~1raw/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/raw/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + trace: + id: cloudflare.email_security.trace + name: trace + title: Trace + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1investigate~1{investigate_id}~1trace/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/trace/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + reports: + id: cloudflare.email_security.reports + name: reports + title: Reports + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1phishguard~1reports/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/reports/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + allow_policies: + id: cloudflare.email_security.allow_policies + name: allow_policies + title: Allow Policies + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1allow_policies/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1allow_policies/post' + response: + mediaType: application/json + openAPIDocKey: '201' + batch: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1allow_policies~1batch/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .deletes }}{{ $sep }}"deletes": {{ if eq (kindOf .deletes) "string" }}{{ .deletes }}{{ else }}{{ toJson .deletes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .patches }}{{ $sep }}"patches": {{ if eq (kindOf .patches) "string" }}{{ .patches }}{{ else }}{{ toJson .patches }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .posts }}{{ $sep }}"posts": {{ if eq (kindOf .posts) "string" }}{{ .posts }}{{ else }}{{ toJson .posts }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .puts }}{{ $sep }}"puts": {{ if eq (kindOf .puts) "string" }}{{ .puts }}{{ else }}{{ toJson .puts }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1allow_policies~1{policy_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1allow_policies~1{policy_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1allow_policies~1{policy_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/allow_policies/methods/get' + - $ref: '#/components/x-stackQL-resources/allow_policies/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/allow_policies/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/allow_policies/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/allow_policies/methods/delete' + replace: [] + block_senders: + id: cloudflare.email_security.block_senders + name: block_senders + title: Block Senders + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1block_senders/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1block_senders/post' + response: + mediaType: application/json + openAPIDocKey: '201' + batch: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1block_senders~1batch/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .deletes }}{{ $sep }}"deletes": {{ if eq (kindOf .deletes) "string" }}{{ .deletes }}{{ else }}{{ toJson .deletes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .patches }}{{ $sep }}"patches": {{ if eq (kindOf .patches) "string" }}{{ .patches }}{{ else }}{{ toJson .patches }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .posts }}{{ $sep }}"posts": {{ if eq (kindOf .posts) "string" }}{{ .posts }}{{ else }}{{ toJson .posts }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .puts }}{{ $sep }}"puts": {{ if eq (kindOf .puts) "string" }}{{ .puts }}{{ else }}{{ toJson .puts }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1block_senders~1{pattern_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1block_senders~1{pattern_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1block_senders~1{pattern_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/block_senders/methods/get' + - $ref: '#/components/x-stackQL-resources/block_senders/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/block_senders/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/block_senders/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/block_senders/methods/delete' + replace: [] + domains: + id: cloudflare.email_security.domains + name: domains + title: Domains + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1domains/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1domains~1{domain_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1domains~1{domain_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1domains~1{domain_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allowed_delivery_modes }}{{ $sep }}"allowed_delivery_modes": {{ if eq (kindOf .allowed_delivery_modes) "string" }}{{ .allowed_delivery_modes }}{{ else }}{{ toJson .allowed_delivery_modes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .domain }}{{ $sep }}"domain": {{ toJson .domain }}{{- $sep = "," -}}{{ end }} + + {{- if .drop_dispositions }}{{ $sep }}"drop_dispositions": {{ if eq (kindOf .drop_dispositions) "string" }}{{ .drop_dispositions }}{{ else }}{{ toJson .drop_dispositions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .folder }}{{ $sep }}"folder": {{ toJson .folder }}{{- $sep = "," -}}{{ end }} + + {{- if .integration_id }}{{ $sep }}"integration_id": {{ toJson .integration_id }}{{- $sep = "," -}}{{ end }} + + {{- if .ip_restrictions }}{{ $sep }}"ip_restrictions": {{ if eq (kindOf .ip_restrictions) "string" }}{{ .ip_restrictions }}{{ else }}{{ toJson .ip_restrictions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .lookback_hops }}{{ $sep }}"lookback_hops": {{ toJson .lookback_hops }}{{- $sep = "," -}}{{ end }} + + {{- if .regions }}{{ $sep }}"regions": {{ if eq (kindOf .regions) "string" }}{{ .regions }}{{ else }}{{ toJson .regions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .require_tls_inbound }}{{ $sep }}"require_tls_inbound": {{ toJson .require_tls_inbound }}{{- $sep = "," -}}{{ end }} + + {{- if .require_tls_outbound }}{{ $sep }}"require_tls_outbound": {{ toJson .require_tls_outbound }}{{- $sep = "," -}}{{ end }} + + {{- if .transport }}{{ $sep }}"transport": {{ toJson .transport }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/domains/methods/get' + - $ref: '#/components/x-stackQL-resources/domains/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/domains/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/domains/methods/delete' + replace: [] + impersonation_registry: + id: cloudflare.email_security.impersonation_registry + name: impersonation_registry + title: Impersonation Registry + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1impersonation_registry/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1impersonation_registry/post' + response: + mediaType: application/json + openAPIDocKey: '201' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1impersonation_registry~1{impersonation_registry_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1impersonation_registry~1{impersonation_registry_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1impersonation_registry~1{impersonation_registry_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/impersonation_registry/methods/get' + - $ref: '#/components/x-stackQL-resources/impersonation_registry/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/impersonation_registry/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/impersonation_registry/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/impersonation_registry/methods/delete' + replace: [] + sending_domain_restrictions: + id: cloudflare.email_security.sending_domain_restrictions + name: sending_domain_restrictions + title: Sending Domain Restrictions + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1sending_domain_restrictions/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + email_security_create_sending_domain_restriction: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1sending_domain_restrictions/post' + response: + mediaType: application/json + openAPIDocKey: '201' + batch: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1sending_domain_restrictions~1batch/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .deletes }}{{ $sep }}"deletes": {{ if eq (kindOf .deletes) "string" }}{{ .deletes }}{{ else }}{{ toJson .deletes }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + email_security_delete_sending_domain_restriction: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1sending_domain_restrictions~1{sending_domain_restriction_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1sending_domain_restrictions~1{sending_domain_restriction_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + email_security_update_sending_domain_restriction: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1sending_domain_restrictions~1{sending_domain_restriction_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/sending_domain_restrictions/methods/get' + - $ref: '#/components/x-stackQL-resources/sending_domain_restrictions/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/sending_domain_restrictions/methods/email_security_create_sending_domain_restriction' + update: + - $ref: '#/components/x-stackQL-resources/sending_domain_restrictions/methods/email_security_update_sending_domain_restriction' + delete: + - $ref: '#/components/x-stackQL-resources/sending_domain_restrictions/methods/email_security_delete_sending_domain_restriction' + replace: [] + trusted_domains: + id: cloudflare.email_security.trusted_domains + name: trusted_domains + title: Trusted Domains + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1trusted_domains/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1trusted_domains/post' + response: + mediaType: application/json + openAPIDocKey: '201' + batch: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1trusted_domains~1batch/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .deletes }}{{ $sep }}"deletes": {{ if eq (kindOf .deletes) "string" }}{{ .deletes }}{{ else }}{{ toJson .deletes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .patches }}{{ $sep }}"patches": {{ if eq (kindOf .patches) "string" }}{{ .patches }}{{ else }}{{ toJson .patches }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .posts }}{{ $sep }}"posts": {{ if eq (kindOf .posts) "string" }}{{ .posts }}{{ else }}{{ toJson .posts }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .puts }}{{ $sep }}"puts": {{ if eq (kindOf .puts) "string" }}{{ .puts }}{{ else }}{{ toJson .puts }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1trusted_domains~1{trusted_domain_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1trusted_domains~1{trusted_domain_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1settings~1trusted_domains~1{trusted_domain_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/trusted_domains/methods/get' + - $ref: '#/components/x-stackQL-resources/trusted_domains/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/trusted_domains/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/trusted_domains/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/trusted_domains/methods/delete' + replace: [] + submissions: + id: cloudflare.email_security.submissions + name: submissions + title: Submissions + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email-security~1submissions/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/submissions/methods/list' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/email_sending.yaml b/providers/src/cloudflare/v00.00.00000/services/email_sending.yaml index 93de21f6..1efe290f 100644 --- a/providers/src/cloudflare/v00.00.00000/services/email_sending.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/email_sending.yaml @@ -1,1673 +1,1613 @@ -openapi: 3.0.3 -info: - title: email_sending API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/email/sending/send: - post: - operationId: email-sending-account-send-builder - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSendingEmailBuilder' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - result: - $ref: '#/components/schemas/emailSendingEmailSendResponse' - result_info: - properties: - count: - type: number - cursor: - type: string - page: - type: number - per_page: - type: number - total_count: - type: number - required: - - per_page - - count - - total_count - type: object - success: - enum: - - true - type: boolean - required: - - success - - errors - - result - - messages - type: object - description: Email sending results. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - enum: - - '10001' - - '10200' - - '10201' - - '10202' - type: string - message: - enum: - - email.sending.error.invalid_request_schema - - email.sending.error.email.invalid - - email.sending.error.email.no_content_length - - email.sending.error.email.too_big - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: >- - Invalid request, generally because of the format/content of the - email send request. No email will be sent when this happens. - '403': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - enum: - - 10203 - type: number - message: - enum: - - email.sending.error.email.sending_disabled - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Email sending is disabled for this zone/account. - '429': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - enum: - - 10004 - type: number - message: - enum: - - email.sending.error.throttled - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: >- - Account/zone has surpassed the rate at which it can send email, - please try again later. No email will be sent when this happens. - '500': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - enum: - - 10002 - type: number - message: - enum: - - email.sending.error.internal_server - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: >- - An unexpected error while processing the email send request. No - email will be sent when this happens. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Send an email - tags: - - Email Sending - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.email.sending.create - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: email_sending - resource_chain: [] - method: send - /accounts/{account_id}/email/sending/send_raw: - post: - operationId: email-sending-account-send-raw-message - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/emailSendingSendRawRequest' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - result: - $ref: '#/components/schemas/emailSendingEmailSendResponse' - result_info: - properties: - count: - type: number - cursor: - type: string - page: - type: number - per_page: - type: number - total_count: - type: number - required: - - per_page - - count - - total_count - type: object - success: - enum: - - true - type: boolean - required: - - success - - errors - - result - - messages - type: object - description: Email sending results. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - enum: - - '10001' - - '10200' - - '10201' - - '10202' - type: string - message: - enum: - - email.sending.error.invalid_request_schema - - email.sending.error.email.invalid - - email.sending.error.email.no_content_length - - email.sending.error.email.too_big - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: >- - Invalid request, generally because of the format/content of the - email send request. No email will be sent when this happens. - '403': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - enum: - - 10203 - type: number - message: - enum: - - email.sending.error.email.sending_disabled - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Email sending is disabled for this zone/account. - '429': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - enum: - - 10004 - type: number - message: - enum: - - email.sending.error.throttled - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: >- - Account/zone has surpassed the rate at which it can send email, - please try again later. No email will be sent when this happens. - '500': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - enum: - - 10002 - type: number - message: - enum: - - email.sending.error.internal_server - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: >- - An unexpected error while processing the email send request. No - email will be sent when this happens. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Send a raw MIME email - tags: - - Email Sending - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.email.sending.create - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: email_sending - resource_chain: [] - method: send_raw - /zones/{zone_id}/email/sending/subdomains: - get: - description: Lists all sending-enabled subdomains for the zone. - operationId: email-sending-subdomains-list-sending-subdomains - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/emailSendingSubdomainsResponseCollection' - description: List sending subdomains response - security: - - api_email: [] - api_key: [] - summary: List sending subdomains - tags: - - Email Sending subdomains - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.email.sending.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: email_sending - resource_chain: - - subdomains - method: list - post: - description: >- - Creates a new sending subdomain or re-enables sending on an existing - subdomain that had it disabled. If zone-level Email Sending has not been - enabled yet, the zone flag is automatically set when the entitlement is - present. - operationId: email-sending-subdomains-create-sending-subdomain - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/emailCreateSendingSubdomainProperties' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/emailSendingSubdomainResponseSingle' - description: Create a sending subdomain response - security: - - api_email: [] - api_key: [] - summary: Create a sending subdomain - tags: - - Email Sending subdomains - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.email.sending.create - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: email_sending - resource_chain: - - subdomains - method: create - /zones/{zone_id}/email/sending/subdomains/preview: - post: - description: >- - Returns the DNS records that would be created for a sending subdomain, - flags which records are missing, and reports any conflicts with existing - DNS records. This is a read-only dry-run — no records are created or - modified. Use before or after creating a subdomain to check DNS status. - operationId: email-sending-subdomains-preview-sending-subdomain - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/emailCreateSendingSubdomainProperties' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/emailSendingSubdomainPreviewResponse' - description: Preview sending subdomain DNS response - security: - - api_email: [] - api_key: [] - summary: Preview sending subdomain DNS - tags: - - Email Sending subdomains - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.email.sending.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /zones/{zone_id}/email/sending/subdomains/{subdomain_id}: - delete: - description: >- - Disables sending on a subdomain and removes its DNS records. If routing - is still active on the subdomain, only sending is disabled. - operationId: email-sending-subdomains-delete-sending-subdomain - parameters: - - in: path - name: subdomain_id - schema: - $ref: '#/components/schemas/emailSendingSubdomainIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/emailApiResponseSingle' - description: Delete a sending subdomain response - security: - - api_email: [] - api_key: [] - summary: Delete a sending subdomain - tags: - - Email Sending subdomains - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.email.sending.delete - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: email_sending - resource_chain: - - subdomains - method: delete - get: - description: Gets information for a specific sending subdomain. - operationId: email-sending-subdomains-get-sending-subdomain - parameters: - - in: path - name: subdomain_id - schema: - $ref: '#/components/schemas/emailSendingSubdomainIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/emailSendingSubdomainResponseSingle' - description: Get a sending subdomain response - security: - - api_email: [] - api_key: [] - summary: Get a sending subdomain - tags: - - Email Sending subdomains - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.email.sending.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: email_sending - resource_chain: - - subdomains - method: get - /zones/{zone_id}/email/sending/subdomains/{subdomain_id}/dns: - get: - description: Returns the expected DNS records for a sending subdomain. - operationId: email-sending-subdomains-get-sending-subdomain-dns - parameters: - - in: path - name: subdomain_id - schema: - $ref: '#/components/schemas/emailSendingSubdomainIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/emailDnsSettingsResponseCollection' - description: Get sending subdomain DNS records response - security: - - api_email: [] - api_key: [] - summary: Get sending subdomain DNS records - tags: - - Email Sending subdomains - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.email.sending.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: email_sending - resource_chain: - - subdomains - - dns - method: get - post: - description: >- - Idempotently re-applies the sending DNS records (creates missing - records, re-applies the email_routing lock on records whose lock has - been cleared). Refuses with a 409 if foreign MX, multiple SPF, multiple - DMARC, or multiple DKIM records exist at the relevant DNS names — those - require manual cleanup. - operationId: email-sending-subdomains-fix-sending-subdomain-dns - parameters: - - in: path - name: subdomain_id - schema: - $ref: '#/components/schemas/emailSendingSubdomainIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/emailSendingSubdomainDnsStatusResponse' - description: Fix sending subdomain DNS records response - '400': - description: 'Error 2028: subdomain_id is not a valid UUID.' - '403': - description: 'Error 2043: zone is admin-locked and cannot be mutated.' - '404': - description: 'Error 2033: sending subdomain not found.' - '409': - description: >- - Conflict — manual DNS cleanup required. Errors 2008 (foreign MX), - 2026 (multiple SPF), 2027 (multiple DMARC), or a multi-DKIM error. - security: - - api_email: [] - api_key: [] - summary: Fix sending subdomain DNS records - tags: - - Email Sending subdomains - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.email.sending.create - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /zones/{zone_id}/email/sending/subdomains/{subdomain_id}/dns/status: - get: - description: >- - Returns the desired DNS records for a sending subdomain along with a - live diff against actual DNS state. Use this to detect missing, - unlocked, foreign, or multi-record conflicts before deciding whether to - call the fix endpoint. - operationId: email-sending-subdomains-get-sending-subdomain-dns-status - parameters: - - in: path - name: subdomain_id - schema: - $ref: '#/components/schemas/emailSendingSubdomainIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/emailSendingSubdomainDnsStatusResponse' - description: Get sending subdomain DNS status response - '400': - description: 'Error 2028: subdomain_id is not a valid UUID.' - '404': - description: 'Error 2033: sending subdomain not found.' - security: - - api_email: [] - api_key: [] - summary: Get sending subdomain DNS status - tags: - - Email Sending subdomains - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.account.email.sending.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true -components: - schemas: - emailApiResponseCommon: - properties: - errors: - $ref: '#/components/schemas/emailMessages' - messages: - $ref: '#/components/schemas/emailMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - type: object - emailApiResponseSingle: - type: object - $ref: '#/components/schemas/emailApiResponseCommon' - emailCreateSendingSubdomainProperties: - properties: - name: - description: The subdomain name. Must be within the zone. - example: sub.example.com - type: string - required: - - name - type: object - emailCreated: - description: The date and time the destination address has been created. - example: '2014-01-02T02:20:00Z' - format: date-time - readOnly: true - type: string - emailDnsRecord: - description: List of records needed to enable an Email Routing zone. - properties: - content: - description: DNS record content. - example: route1.mx.cloudflare.net - type: string - name: - description: DNS record name (or @ for the zone apex). - example: example.com - maxLength: 255 - type: string - x-auditable: true - priority: - description: >- - Required for MX, SRV and URI records. Unused by other record types. - Records with lower priorities are preferred. - example: 12 - maximum: 65535 - minimum: 0 - type: number - x-auditable: true - ttl: - description: >- - Time to live, in seconds, of the DNS record. Must be between 60 and - 86400, or 1 for 'automatic'. - example: 1 - type: number - x-auditable: true - enum: - - 1 - type: - description: DNS record type. - enum: - - A - - AAAA - - CNAME - - HTTPS - - TXT - - SRV - - LOC - - MX - - NS - - CERT - - DNSKEY - - DS - - NAPTR - - SMIMEA - - SSHFP - - SVCB - - TLSA - - URI - example: NS - readOnly: true - type: string - x-auditable: true - type: object - emailDnsSettingsResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/emailMessages' - messages: - $ref: '#/components/schemas/emailMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 2000 - type: number - total_pages: - description: The number of total pages in the entire result set. - example: 100 - type: number - type: object - result: - items: - $ref: '#/components/schemas/emailDnsRecord' - type: array - required: - - success - - errors - - messages - emailMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - emailModified: - description: The date and time the destination address was last modified. - example: '2014-01-02T02:20:00Z' - format: date-time - readOnly: true - type: string - emailSendingEmailBuilder: - example: - attachments: - - content: JVBERi0xLjQK... - disposition: attachment - filename: report.pdf - type: application/pdf - from: sender@example.com - html:

Hello

Please find your report attached.

- subject: Monthly Report - text: |- - Hello - - Please find your report attached. - to: - - recipient@example.com - properties: - attachments: - description: File attachments and inline images. - items: - type: object - example: - content: iVBORw0KGgoAAAANSUhEUgAA... - content_id: logo - disposition: inline - filename: logo.png - type: image/png - properties: - content: - description: Base64-encoded content of the attachment. - example: iVBORw0KGgoAAAANSUhEUgAA... - type: string - content_id: - description: >- - Content ID used to reference this attachment in HTML via cid: - URI (e.g., ). - example: logo - type: string - disposition: - description: >- - Must be 'inline'. Indicates the attachment is embedded in the - email body. - enum: - - inline - type: string - filename: - description: Filename for the attachment. - example: logo.png - type: string - type: - description: MIME type of the attachment (e.g., 'image/png', 'text/plain'). - example: image/png - type: string - required: - - content - - disposition - - filename - - type - type: array - bcc: - description: >- - BCC recipient(s). A single email string or an array of email - strings. - type: string - example: user@example.com - items: - type: string - cc: - description: CC recipient(s). A single email string or an array of email strings. - type: string - example: user@example.com - items: - type: string - from: - description: >- - Sender email address. Either a plain string or an object with - address and name. - type: string - example: user@example.com - properties: - address: - description: Email address (e.g., 'user@example.com'). - example: user@example.com - type: string - name: - description: Display name for the email address (e.g., 'John Doe'). - example: John Doe - type: string - required: - - address - - name - headers: - description: Custom email headers as key-value pairs. - example: - X-Custom-Header: value - type: object - html: - description: >- - HTML body of the email. At least one of text or html must be - provided. - example:

Hello

Please find your report attached.

- type: string - reply_to: - description: >- - Reply-to address. Either a plain string or an object with address - and name. - type: string - example: user@example.com - properties: - address: - description: Email address (e.g., 'user@example.com'). - example: user@example.com - type: string - name: - description: Display name for the email address (e.g., 'John Doe'). - example: John Doe - type: string - required: - - address - - name - subject: - description: Email subject line. - example: Monthly Report - type: string - text: - description: >- - Plain text body of the email. At least one of text or html must be - provided. - example: |- - Hello - - Please find your report attached. - type: string - to: - description: Recipient(s). A single email string or an array of email strings. - type: string - example: user@example.com - items: - type: string - required: - - from - - to - - subject - type: object - emailSendingEmailSendResponse: - example: - delivered: - - recipient@example.com - permanent_bounces: [] - queued: [] - properties: - delivered: - description: Email addresses to which the message was delivered immediately. - example: - - recipient@example.com - items: - type: string - type: array - permanent_bounces: - description: Email addresses that permanently bounced. - example: [] - items: - type: string - type: array - queued: - description: Email addresses for which delivery was queued for later. - example: [] - items: - type: string - type: array - required: - - delivered - - queued - - permanent_bounces - type: object - emailSendingSendRawRequest: - example: - from: sender@example.com - mime_message: "From: sender@example.com\r\nTo: recipient@example.com\r\nSubject: Hello\r\nContent-Type: text/plain\r\n\r\nHello, World!" - recipients: - - recipient@example.com - properties: - from: - description: Sender email address. - example: sender@example.com - type: string - mime_message: - description: >- - The full MIME-encoded email message. Should include standard RFC - 5322 headers such as From, To, Subject, and Content-Type. The from - and recipients fields in the request body control SMTP envelope - routing; the From and To headers in the MIME message control what - the recipient's email client displays. - example: "From: sender@example.com\r\nTo: recipient@example.com\r\nSubject: Hello\r\nContent-Type: text/plain\r\n\r\nHello, World!" - type: string - recipients: - description: List of recipient email addresses. - example: - - recipient@example.com - items: - type: string - type: array - required: - - from - - recipients - - mime_message - type: object - emailSendingSubdomain: - $ref: '#/components/schemas/emailSendingSubdomainProperties' - emailSendingSubdomainConfigError: - description: A DNS record status detected during preview, status, or fix. - properties: - code: - description: >- - Error code identifying the type of issue. `dkim.conflict` is - reported whenever 2+ TXT records exist at the DKIM selector, even if - one matches the canonical Cloudflare content — multi-record DKIM can - permerror at recipient verification regardless of which entry is - correct. - enum: - - mx.missing - - mx.foreign - - spf.missing - - spf.foreign - - spf.multiple - - dkim.missing - - dkim.conflict - - dmarc.missing - - dmarc.multiple - example: dkim.conflict - type: string - existing: - $ref: '#/components/schemas/emailDnsRecord' - missing: - $ref: '#/components/schemas/emailDnsRecord' - multiple: - items: - $ref: '#/components/schemas/emailDnsRecord' - type: array - required: - - code - type: object - emailSendingSubdomainDnsStatusResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/emailMessages' - messages: - $ref: '#/components/schemas/emailMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - properties: - errors: - description: DNS issues detected against the current zone state. - items: - $ref: '#/components/schemas/emailSendingSubdomainConfigError' - type: array - records: - description: Desired DNS records for the subdomain. - items: - $ref: '#/components/schemas/emailDnsRecord' - type: array - status: - description: >- - Aggregated DNS state for the subdomain. `unlocked` means desired - records exist with correct content but at least one has had its - email_routing/read_only lock cleared. - enum: - - ready - - unconfigured - - unlocked - - misconfigured - type: string - type: object - required: - - success - - errors - - messages - emailSendingSubdomainIdentifier: - description: Sending subdomain identifier. - example: aabbccdd11223344aabbccdd11223344 - maxLength: 32 - readOnly: true - type: string - x-auditable: true - emailSendingSubdomainPreviewResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/emailMessages' - messages: - $ref: '#/components/schemas/emailMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - properties: - errors: - description: >- - DNS issues detected — missing records that will be created and - conflicts with existing records. - items: - $ref: '#/components/schemas/emailSendingSubdomainConfigError' - type: array - records: - description: DNS records that would be created for the subdomain. - items: - $ref: '#/components/schemas/emailDnsRecord' - type: array - type: object - required: - - success - - errors - - messages - emailSendingSubdomainProperties: - properties: - created: - $ref: '#/components/schemas/emailCreated' - dkim_selector: - description: The DKIM selector used for email signing. - example: cf-bounce - readOnly: true - type: string - enabled: - description: Whether Email Sending is enabled on this subdomain. - readOnly: true - type: boolean - modified: - $ref: '#/components/schemas/emailModified' - name: - description: The subdomain domain name. - example: sub.example.com - type: string - x-auditable: true - return_path_domain: - description: The return-path domain used for bounce handling. - example: cf-bounce.sub.example.com - readOnly: true - type: string - tag: - $ref: '#/components/schemas/emailSendingSubdomainIdentifier' - required: - - tag - - name - - enabled - type: object - emailSendingSubdomainResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/emailMessages' - messages: - $ref: '#/components/schemas/emailMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/emailSendingSubdomain' - required: - - success - - errors - - messages - emailSendingSubdomainsResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/emailMessages' - messages: - $ref: '#/components/schemas/emailMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 2000 - type: number - total_pages: - description: The number of total pages in the entire result set. - example: 100 - type: number - type: object - result: - items: - $ref: '#/components/schemas/emailSendingSubdomain' - type: array - required: - - success - - errors - - messages - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - email: - id: cloudflare.email_sending.email - name: email - title: Email - methods: - send: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1email~1sending~1send/post' - response: - mediaType: application/json - openAPIDocKey: '200' - send_raw: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1email~1sending~1send_raw/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] - subdomains: - id: cloudflare.email_sending.subdomains - name: subdomains - title: Subdomains - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1email~1sending~1subdomains/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1email~1sending~1subdomains/post' - response: - mediaType: application/json - openAPIDocKey: '200' - preview: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1email~1sending~1subdomains~1preview/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1email~1sending~1subdomains~1{subdomain_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1email~1sending~1subdomains~1{subdomain_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/subdomains/methods/get' - - $ref: '#/components/x-stackQL-resources/subdomains/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/subdomains/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/subdomains/methods/delete' - replace: [] - dns: - id: cloudflare.email_sending.dns - name: dns - title: Dns - methods: - list: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1email~1sending~1subdomains~1{subdomain_id}~1dns/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - email_sending_subdomains_fix_sending_subdomain_dns: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1email~1sending~1subdomains~1{subdomain_id}~1dns/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/dns/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/dns/methods/email_sending_subdomains_fix_sending_subdomain_dns - update: [] - delete: [] - replace: [] - status: - id: cloudflare.email_sending.status - name: status - title: Status - methods: - list: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1email~1sending~1subdomains~1{subdomain_id}~1dns~1status/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result.records - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/status/methods/list' - insert: [] - update: [] - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: email_sending API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/email/sending/send: + post: + operationId: email-sending-account-send-builder + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSendingEmailBuilder' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + result: + $ref: '#/components/schemas/emailSendingEmailSendResponse' + result_info: + properties: + count: + type: number + cursor: + type: string + page: + type: number + per_page: + type: number + total_count: + type: number + required: + - per_page + - count + - total_count + type: object + success: + enum: + - true + type: boolean + required: + - success + - errors + - result + - messages + type: object + description: Email sending results. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + enum: + - '10001' + - '10200' + - '10201' + - '10202' + type: string + message: + enum: + - email.sending.error.invalid_request_schema + - email.sending.error.email.invalid + - email.sending.error.email.no_content_length + - email.sending.error.email.too_big + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Invalid request, generally because of the format/content of the email send request. No email will be sent when this happens. + '403': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + enum: + - 10203 + type: number + message: + enum: + - email.sending.error.email.sending_disabled + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Email sending is disabled for this zone/account. + '429': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + enum: + - 10004 + type: number + message: + enum: + - email.sending.error.throttled + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Account/zone has surpassed the rate at which it can send email, please try again later. No email will be sent when this happens. + '500': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + enum: + - 10002 + type: number + message: + enum: + - email.sending.error.internal_server + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: An unexpected error while processing the email send request. No email will be sent when this happens. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Send an email + tags: + - Email Sending + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.email.sending.create + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: email_sending + resource_chain: [] + method: send + /accounts/{account_id}/email/sending/send_raw: + post: + operationId: email-sending-account-send-raw-message + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/emailSendingSendRawRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + result: + $ref: '#/components/schemas/emailSendingEmailSendResponse' + result_info: + properties: + count: + type: number + cursor: + type: string + page: + type: number + per_page: + type: number + total_count: + type: number + required: + - per_page + - count + - total_count + type: object + success: + enum: + - true + type: boolean + required: + - success + - errors + - result + - messages + type: object + description: Email sending results. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + enum: + - '10001' + - '10200' + - '10201' + - '10202' + type: string + message: + enum: + - email.sending.error.invalid_request_schema + - email.sending.error.email.invalid + - email.sending.error.email.no_content_length + - email.sending.error.email.too_big + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Invalid request, generally because of the format/content of the email send request. No email will be sent when this happens. + '403': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + enum: + - 10203 + type: number + message: + enum: + - email.sending.error.email.sending_disabled + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Email sending is disabled for this zone/account. + '429': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + enum: + - 10004 + type: number + message: + enum: + - email.sending.error.throttled + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Account/zone has surpassed the rate at which it can send email, please try again later. No email will be sent when this happens. + '500': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + enum: + - 10002 + type: number + message: + enum: + - email.sending.error.internal_server + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: An unexpected error while processing the email send request. No email will be sent when this happens. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Send a raw MIME email + tags: + - Email Sending + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.email.sending.create + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: email_sending + resource_chain: [] + method: send_raw + /zones/{zone_id}/email/sending/subdomains: + get: + description: Lists all sending-enabled subdomains for the zone. + operationId: email-sending-subdomains-list-sending-subdomains + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/emailSendingSubdomainsResponseCollection' + description: List sending subdomains response + security: + - api_email: [] + api_key: [] + summary: List sending subdomains + tags: + - Email Sending subdomains + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.email.sending.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: email_sending + resource_chain: + - subdomains + method: list + post: + description: Creates a new sending subdomain or re-enables sending on an existing subdomain that had it disabled. If zone-level Email Sending has not been enabled yet, the zone flag is automatically set when the entitlement is present. + operationId: email-sending-subdomains-create-sending-subdomain + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/emailCreateSendingSubdomainProperties' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/emailSendingSubdomainResponseSingle' + description: Create a sending subdomain response + security: + - api_email: [] + api_key: [] + summary: Create a sending subdomain + tags: + - Email Sending subdomains + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.email.sending.create + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: email_sending + resource_chain: + - subdomains + method: create + /zones/{zone_id}/email/sending/subdomains/preview: + post: + description: "Returns the DNS records that would be created for a sending subdomain, flags which records are missing, and reports any conflicts with existing DNS records. This is a read-only dry-run \u2014 no records are created or modified. Use before or after creating a subdomain to check DNS status." + operationId: email-sending-subdomains-preview-sending-subdomain + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/emailCreateSendingSubdomainProperties' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/emailSendingSubdomainPreviewResponse' + description: Preview sending subdomain DNS response + security: + - api_email: [] + api_key: [] + summary: Preview sending subdomain DNS + tags: + - Email Sending subdomains + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.email.sending.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /zones/{zone_id}/email/sending/subdomains/{subdomain_id}: + delete: + description: Disables sending on a subdomain and removes its DNS records. If routing is still active on the subdomain, only sending is disabled. + operationId: email-sending-subdomains-delete-sending-subdomain + parameters: + - in: path + name: subdomain_id + schema: + $ref: '#/components/schemas/emailSendingSubdomainIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/emailApiResponseSingle' + description: Delete a sending subdomain response + security: + - api_email: [] + api_key: [] + summary: Delete a sending subdomain + tags: + - Email Sending subdomains + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.email.sending.delete + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: email_sending + resource_chain: + - subdomains + method: delete + get: + description: Gets information for a specific sending subdomain. + operationId: email-sending-subdomains-get-sending-subdomain + parameters: + - in: path + name: subdomain_id + schema: + $ref: '#/components/schemas/emailSendingSubdomainIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/emailSendingSubdomainResponseSingle' + description: Get a sending subdomain response + security: + - api_email: [] + api_key: [] + summary: Get a sending subdomain + tags: + - Email Sending subdomains + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.email.sending.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: email_sending + resource_chain: + - subdomains + method: get + /zones/{zone_id}/email/sending/subdomains/{subdomain_id}/dns: + get: + description: Returns the expected DNS records for a sending subdomain. + operationId: email-sending-subdomains-get-sending-subdomain-dns + parameters: + - in: path + name: subdomain_id + schema: + $ref: '#/components/schemas/emailSendingSubdomainIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/emailDnsSettingsResponseCollection' + description: Get sending subdomain DNS records response + security: + - api_email: [] + api_key: [] + summary: Get sending subdomain DNS records + tags: + - Email Sending subdomains + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.email.sending.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: email_sending + resource_chain: + - subdomains + - dns + method: get + post: + description: "Idempotently re-applies the sending DNS records (creates missing records, re-applies the email_routing lock on records whose lock has been cleared). Refuses with a 409 if foreign MX, multiple SPF, multiple DMARC, or multiple DKIM records exist at the relevant DNS names \u2014 those require manual cleanup." + operationId: email-sending-subdomains-fix-sending-subdomain-dns + parameters: + - in: path + name: subdomain_id + schema: + $ref: '#/components/schemas/emailSendingSubdomainIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/emailSendingSubdomainDnsStatusResponse' + description: Fix sending subdomain DNS records response + '400': + description: 'Error 2028: subdomain_id is not a valid UUID.' + '403': + description: 'Error 2043: zone is admin-locked and cannot be mutated.' + '404': + description: 'Error 2033: sending subdomain not found.' + '409': + description: "Conflict \u2014 manual DNS cleanup required. Errors 2008 (foreign MX), 2026 (multiple SPF), 2027 (multiple DMARC), or a multi-DKIM error." + security: + - api_email: [] + api_key: [] + summary: Fix sending subdomain DNS records + tags: + - Email Sending subdomains + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.email.sending.create + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /zones/{zone_id}/email/sending/subdomains/{subdomain_id}/dns/status: + get: + description: Returns the desired DNS records for a sending subdomain along with a live diff against actual DNS state. Use this to detect missing, unlocked, foreign, or multi-record conflicts before deciding whether to call the fix endpoint. + operationId: email-sending-subdomains-get-sending-subdomain-dns-status + parameters: + - in: path + name: subdomain_id + schema: + $ref: '#/components/schemas/emailSendingSubdomainIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/emailSendingSubdomainDnsStatusResponse' + description: Get sending subdomain DNS status response + '400': + description: 'Error 2028: subdomain_id is not a valid UUID.' + '404': + description: 'Error 2033: sending subdomain not found.' + security: + - api_email: [] + api_key: [] + summary: Get sending subdomain DNS status + tags: + - Email Sending subdomains + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.account.email.sending.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true +components: + schemas: + emailApiResponseCommon: + properties: + errors: + $ref: '#/components/schemas/emailMessages' + messages: + $ref: '#/components/schemas/emailMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + type: object + emailApiResponseSingle: + type: object + $ref: '#/components/schemas/emailApiResponseCommon' + emailCreateSendingSubdomainProperties: + properties: + name: + description: The subdomain name. Must be within the zone. + example: sub.example.com + type: string + required: + - name + type: object + emailCreated: + description: The date and time the destination address has been created. + example: '2014-01-02T02:20:00Z' + format: date-time + readOnly: true + type: string + emailDnsRecord: + description: List of records needed to enable an Email Routing zone. + properties: + content: + description: DNS record content. + example: route1.mx.cloudflare.net + type: string + name: + description: DNS record name (or @ for the zone apex). + example: example.com + maxLength: 255 + type: string + x-auditable: true + priority: + description: Required for MX, SRV and URI records. Unused by other record types. Records with lower priorities are preferred. + example: 12 + maximum: 65535 + minimum: 0 + type: number + x-auditable: true + ttl: + description: Time to live, in seconds, of the DNS record. Must be between 60 and 86400, or 1 for 'automatic'. + example: 1 + type: number + x-auditable: true + enum: + - 1 + type: + description: DNS record type. + enum: + - A + - AAAA + - CNAME + - HTTPS + - TXT + - SRV + - LOC + - MX + - NS + - CERT + - DNSKEY + - DS + - NAPTR + - SMIMEA + - SSHFP + - SVCB + - TLSA + - URI + example: NS + readOnly: true + type: string + x-auditable: true + type: object + emailDnsSettingsResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/emailMessages' + messages: + $ref: '#/components/schemas/emailMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 2000 + type: number + total_pages: + description: The number of total pages in the entire result set. + example: 100 + type: number + type: object + result: + items: + $ref: '#/components/schemas/emailDnsRecord' + type: array + required: + - success + - errors + - messages + emailMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + emailModified: + description: The date and time the destination address was last modified. + example: '2014-01-02T02:20:00Z' + format: date-time + readOnly: true + type: string + emailSendingEmailBuilder: + example: + attachments: + - content: JVBERi0xLjQK... + disposition: attachment + filename: report.pdf + type: application/pdf + from: sender@example.com + html:

Hello

Please find your report attached.

+ subject: Monthly Report + text: 'Hello + + + Please find your report attached.' + to: + - recipient@example.com + properties: + attachments: + description: File attachments and inline images. + items: + type: object + example: + content: iVBORw0KGgoAAAANSUhEUgAA... + content_id: logo + disposition: inline + filename: logo.png + type: image/png + properties: + content: + description: Base64-encoded content of the attachment. + example: iVBORw0KGgoAAAANSUhEUgAA... + type: string + content_id: + description: 'Content ID used to reference this attachment in HTML via cid: URI (e.g., ).' + example: logo + type: string + disposition: + description: Must be 'inline'. Indicates the attachment is embedded in the email body. + enum: + - inline + type: string + filename: + description: Filename for the attachment. + example: logo.png + type: string + type: + description: MIME type of the attachment (e.g., 'image/png', 'text/plain'). + example: image/png + type: string + required: + - content + - disposition + - filename + - type + type: array + bcc: + description: BCC recipient(s). A single email string or an array of email strings. + type: string + example: user@example.com + items: + type: string + cc: + description: CC recipient(s). A single email string or an array of email strings. + type: string + example: user@example.com + items: + type: string + from: + description: Sender email address. Either a plain string or an object with address and name. + type: string + example: user@example.com + properties: + address: + description: Email address (e.g., 'user@example.com'). + example: user@example.com + type: string + name: + description: Display name for the email address (e.g., 'John Doe'). + example: John Doe + type: string + required: + - address + - name + headers: + description: Custom email headers as key-value pairs. + example: + X-Custom-Header: value + type: object + html: + description: HTML body of the email. At least one of text or html must be provided. + example:

Hello

Please find your report attached.

+ type: string + reply_to: + description: Reply-to address. Either a plain string or an object with address and name. + type: string + example: user@example.com + properties: + address: + description: Email address (e.g., 'user@example.com'). + example: user@example.com + type: string + name: + description: Display name for the email address (e.g., 'John Doe'). + example: John Doe + type: string + required: + - address + - name + subject: + description: Email subject line. + example: Monthly Report + type: string + text: + description: Plain text body of the email. At least one of text or html must be provided. + example: 'Hello + + + Please find your report attached.' + type: string + to: + description: Recipient(s). A single email string or an array of email strings. + type: string + example: user@example.com + items: + type: string + required: + - from + - to + - subject + type: object + emailSendingEmailSendResponse: + example: + delivered: + - recipient@example.com + permanent_bounces: [] + queued: [] + properties: + delivered: + description: Email addresses to which the message was delivered immediately. + example: + - recipient@example.com + items: + type: string + type: array + permanent_bounces: + description: Email addresses that permanently bounced. + example: [] + items: + type: string + type: array + queued: + description: Email addresses for which delivery was queued for later. + example: [] + items: + type: string + type: array + required: + - delivered + - queued + - permanent_bounces + type: object + emailSendingSendRawRequest: + example: + from: sender@example.com + mime_message: "From: sender@example.com\r\nTo: recipient@example.com\r\nSubject: Hello\r\nContent-Type: text/plain\r\n\r\nHello, World!" + recipients: + - recipient@example.com + properties: + from: + description: Sender email address. + example: sender@example.com + type: string + mime_message: + description: The full MIME-encoded email message. Should include standard RFC 5322 headers such as From, To, Subject, and Content-Type. The from and recipients fields in the request body control SMTP envelope routing; the From and To headers in the MIME message control what the recipient's email client displays. + example: "From: sender@example.com\r\nTo: recipient@example.com\r\nSubject: Hello\r\nContent-Type: text/plain\r\n\r\nHello, World!" + type: string + recipients: + description: List of recipient email addresses. + example: + - recipient@example.com + items: + type: string + type: array + required: + - from + - recipients + - mime_message + type: object + emailSendingSubdomain: + $ref: '#/components/schemas/emailSendingSubdomainProperties' + emailSendingSubdomainConfigError: + description: A DNS record status detected during preview, status, or fix. + properties: + code: + description: "Error code identifying the type of issue. `dkim.conflict` is reported whenever 2+ TXT records exist at the DKIM selector, even if one matches the canonical Cloudflare content \u2014 multi-record DKIM can permerror at recipient verification regardless of which entry is correct." + enum: + - mx.missing + - mx.foreign + - spf.missing + - spf.foreign + - spf.multiple + - dkim.missing + - dkim.conflict + - dmarc.missing + - dmarc.multiple + example: dkim.conflict + type: string + existing: + $ref: '#/components/schemas/emailDnsRecord' + missing: + $ref: '#/components/schemas/emailDnsRecord' + multiple: + items: + $ref: '#/components/schemas/emailDnsRecord' + type: array + required: + - code + type: object + emailSendingSubdomainDnsStatusResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/emailMessages' + messages: + $ref: '#/components/schemas/emailMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + properties: + errors: + description: DNS issues detected against the current zone state. + items: + $ref: '#/components/schemas/emailSendingSubdomainConfigError' + type: array + records: + description: Desired DNS records for the subdomain. + items: + $ref: '#/components/schemas/emailDnsRecord' + type: array + status: + description: Aggregated DNS state for the subdomain. `unlocked` means desired records exist with correct content but at least one has had its email_routing/read_only lock cleared. + enum: + - ready + - unconfigured + - unlocked + - misconfigured + type: string + type: object + required: + - success + - errors + - messages + emailSendingSubdomainIdentifier: + description: Sending subdomain identifier. + example: aabbccdd11223344aabbccdd11223344 + maxLength: 32 + readOnly: true + type: string + x-auditable: true + emailSendingSubdomainPreviewResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/emailMessages' + messages: + $ref: '#/components/schemas/emailMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + properties: + errors: + description: "DNS issues detected \u2014 missing records that will be created and conflicts with existing records." + items: + $ref: '#/components/schemas/emailSendingSubdomainConfigError' + type: array + records: + description: DNS records that would be created for the subdomain. + items: + $ref: '#/components/schemas/emailDnsRecord' + type: array + type: object + required: + - success + - errors + - messages + emailSendingSubdomainProperties: + properties: + created: + $ref: '#/components/schemas/emailCreated' + dkim_selector: + description: The DKIM selector used for email signing. + example: cf-bounce + readOnly: true + type: string + enabled: + description: Whether Email Sending is enabled on this subdomain. + readOnly: true + type: boolean + modified: + $ref: '#/components/schemas/emailModified' + name: + description: The subdomain domain name. + example: sub.example.com + type: string + x-auditable: true + return_path_domain: + description: The return-path domain used for bounce handling. + example: cf-bounce.sub.example.com + readOnly: true + type: string + tag: + $ref: '#/components/schemas/emailSendingSubdomainIdentifier' + required: + - tag + - name + - enabled + type: object + emailSendingSubdomainResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/emailMessages' + messages: + $ref: '#/components/schemas/emailMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/emailSendingSubdomain' + required: + - success + - errors + - messages + emailSendingSubdomainsResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/emailMessages' + messages: + $ref: '#/components/schemas/emailMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 2000 + type: number + total_pages: + description: The number of total pages in the entire result set. + example: 100 + type: number + type: object + result: + items: + $ref: '#/components/schemas/emailSendingSubdomain' + type: array + required: + - success + - errors + - messages + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + email: + id: cloudflare.email_sending.email + name: email + title: Email + methods: + send: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email~1sending~1send/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .attachments }}{{ $sep }}"attachments": {{ if eq (kindOf .attachments) "string" }}{{ .attachments }}{{ else }}{{ toJson .attachments }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .bcc }}{{ $sep }}"bcc": {{ toJson .bcc }}{{- $sep = "," -}}{{ end }} + + {{- if .cc }}{{ $sep }}"cc": {{ toJson .cc }}{{- $sep = "," -}}{{ end }} + + {{- if .from }}{{ $sep }}"from": {{ toJson .from }}{{- $sep = "," -}}{{ end }} + + {{- if .headers }}{{ $sep }}"headers": {{ if eq (kindOf .headers) "string" }}{{ .headers }}{{ else }}{{ toJson .headers }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .html }}{{ $sep }}"html": {{ toJson .html }}{{- $sep = "," -}}{{ end }} + + {{- if .reply_to }}{{ $sep }}"reply_to": {{ toJson .reply_to }}{{- $sep = "," -}}{{ end }} + + {{- if .subject }}{{ $sep }}"subject": {{ toJson .subject }}{{- $sep = "," -}}{{ end }} + + {{- if .text }}{{ $sep }}"text": {{ toJson .text }}{{- $sep = "," -}}{{ end }} + + {{- if .to }}{{ $sep }}"to": {{ toJson .to }}{{- $sep = "," -}}{{ end }} + + } + + ' + send_raw: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1email~1sending~1send_raw/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .from }}{{ $sep }}"from": {{ toJson .from }}{{- $sep = "," -}}{{ end }} + + {{- if .mime_message }}{{ $sep }}"mime_message": {{ toJson .mime_message }}{{- $sep = "," -}}{{ end }} + + {{- if .recipients }}{{ $sep }}"recipients": {{ if eq (kindOf .recipients) "string" }}{{ .recipients }}{{ else }}{{ toJson .recipients }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + subdomains: + id: cloudflare.email_sending.subdomains + name: subdomains + title: Subdomains + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1sending~1subdomains/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1sending~1subdomains/post' + response: + mediaType: application/json + openAPIDocKey: '200' + preview: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1sending~1subdomains~1preview/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1sending~1subdomains~1{subdomain_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1sending~1subdomains~1{subdomain_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/subdomains/methods/get' + - $ref: '#/components/x-stackQL-resources/subdomains/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/subdomains/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/subdomains/methods/delete' + replace: [] + dns: + id: cloudflare.email_sending.dns + name: dns + title: Dns + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1sending~1subdomains~1{subdomain_id}~1dns/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + email_sending_subdomains_fix_sending_subdomain_dns: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1sending~1subdomains~1{subdomain_id}~1dns/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/dns/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/dns/methods/email_sending_subdomains_fix_sending_subdomain_dns' + update: [] + delete: [] + replace: [] + status: + id: cloudflare.email_sending.status + name: status + title: Status + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1sending~1subdomains~1{subdomain_id}~1dns~1status/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result.records + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/status/methods/list' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/firewall.yaml b/providers/src/cloudflare/v00.00.00000/services/firewall.yaml index 5980911b..66f8aa0f 100644 --- a/providers/src/cloudflare/v00.00.00000/services/firewall.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/firewall.yaml @@ -1404,8 +1404,8 @@ paths: deleted: $ref: '#/components/schemas/firewallDeleted' required: - - id - deleted + - id enum: - null success: @@ -1511,8 +1511,8 @@ paths: deleted: $ref: '#/components/schemas/firewallDeleted' required: - - id - deleted + - id enum: - null success: @@ -1576,8 +1576,6 @@ paths: properties: id: $ref: '#/components/schemas/firewallComponentsSchemasIdentifier' - required: - - id type: object responses: '200': @@ -1666,7 +1664,6 @@ paths: id: $ref: '#/components/schemas/firewallComponentsSchemasIdentifier' required: - - id - filter - action type: object @@ -1720,8 +1717,8 @@ paths: deleted: $ref: '#/components/schemas/firewallDeleted' required: - - id - deleted + - id enum: - null success: @@ -2181,7 +2178,6 @@ paths: paused: $ref: '#/components/schemas/firewallSchemasPaused' required: - - id - mode - configuration type: object @@ -2952,9 +2948,9 @@ paths: type: object required: - errors - - success - result - messages + - success description: Update a WAF package response 4XX: content: @@ -4485,7 +4481,51 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/firewallSchemasRule' + required: + - mode + - configuration + type: object + properties: + allowed_modes: + description: The available actions that a rule can apply to a matched request. + items: + $ref: '#/components/schemas/firewallSchemasMode' + readOnly: true + type: array + configuration: + $ref: '#/components/schemas/firewallConfiguration' + created_on: + description: The timestamp of when the rule was created. + format: date-time + readOnly: true + type: string + id: + $ref: '#/components/schemas/firewallSchemasIdentifier' + mode: + $ref: '#/components/schemas/firewallSchemasMode' + modified_on: + description: The timestamp of when the rule was last modified. + format: date-time + readOnly: true + type: string + notes: + $ref: '#/components/schemas/firewallNotes' + scope: + description: All zones owned by the user will have the rule applied. + properties: + email: + $ref: '#/components/schemas/firewallEmail' + id: + $ref: '#/components/schemas/firewallIdentifier' + type: + description: Defines the scope of the rule. + enum: + - user + - organization + readOnly: true + type: string + readOnly: true + type: object responses: '200': content: @@ -4812,7 +4852,51 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/firewallSchemasRule' + required: + - mode + - configuration + type: object + properties: + allowed_modes: + description: The available actions that a rule can apply to a matched request. + items: + $ref: '#/components/schemas/firewallSchemasMode' + readOnly: true + type: array + configuration: + $ref: '#/components/schemas/firewallConfiguration' + created_on: + description: The timestamp of when the rule was created. + format: date-time + readOnly: true + type: string + id: + $ref: '#/components/schemas/firewallSchemasIdentifier' + mode: + $ref: '#/components/schemas/firewallSchemasMode' + modified_on: + description: The timestamp of when the rule was last modified. + format: date-time + readOnly: true + type: string + notes: + $ref: '#/components/schemas/firewallNotes' + scope: + description: All zones owned by the user will have the rule applied. + properties: + email: + $ref: '#/components/schemas/firewallEmail' + id: + $ref: '#/components/schemas/firewallIdentifier' + type: + description: Defines the scope of the rule. + enum: + - user + - organization + readOnly: true + type: string + readOnly: true + type: object responses: '200': content: @@ -5370,8 +5454,8 @@ components: deleted: $ref: '#/components/schemas/firewallDeleted' required: - - id - deleted + - id firewallFilterRulesResponseCollection: type: object properties: @@ -5716,9 +5800,9 @@ components: $ref: '#/components/schemas/firewallResultInfo' required: - errors - - success - result - messages + - success firewallPackageResponseSingle: type: object properties: @@ -5736,9 +5820,9 @@ components: type: boolean required: - errors - - success - result - messages + - success firewallPaused: description: When true, indicates that the rule is currently paused. type: boolean @@ -6573,6 +6657,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .configuration }}{{ $sep }}"configuration": {{ if eq (kindOf .configuration) "string" }}{{ .configuration }}{{ else }}{{ toJson .configuration }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .mode }}{{ $sep }}"mode": {{ toJson .mode }}{{- $sep = "," -}}{{ end }} + + {{- if .notes }}{{ $sep }}"notes": {{ toJson .notes }}{{- $sep = "," -}}{{ end }} + + } + + ' ip_access_rules_for_a_user_delete_an_ip_access_rule: operation: $ref: '#/paths/~1user~1firewall~1access_rules~1rules~1{rule_id}/delete' @@ -6612,6 +6713,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .action }}{{ $sep }}"action": {{ if eq (kindOf .action) "string" }}{{ .action }}{{ else }}{{ toJson .action }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .filter }}{{ $sep }}"filter": {{ if eq (kindOf .filter) "string" }}{{ .filter }}{{ else }}{{ toJson .filter }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' firewall_rules_update_firewall_rules: config: requestBodyTranslate: @@ -6645,6 +6761,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .action }}{{ $sep }}"action": {{ if eq (kindOf .action) "string" }}{{ .action }}{{ else }}{{ toJson .action }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .filter }}{{ $sep }}"filter": {{ if eq (kindOf .filter) "string" }}{{ .filter }}{{ else }}{{ toJson .filter }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' edit: config: requestBodyTranslate: @@ -6692,6 +6823,27 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .configurations }}{{ $sep }}"configurations": {{ if eq (kindOf .configurations) "string" }}{{ .configurations }}{{ else }}{{ toJson .configurations }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .paused }}{{ $sep }}"paused": {{ toJson .paused }}{{- $sep = "," -}}{{ end }} + + {{- if .priority }}{{ $sep }}"priority": {{ toJson .priority }}{{- $sep = "," -}}{{ end }} + + {{- if .urls }}{{ $sep }}"urls": {{ if eq (kindOf .urls) "string" }}{{ .urls }}{{ else }}{{ toJson .urls }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1zones~1{zone_id}~1firewall~1lockdowns~1{lock_downs_id}/delete' @@ -6714,6 +6866,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .configurations }}{{ $sep }}"configurations": {{ if eq (kindOf .configurations) "string" }}{{ .configurations }}{{ else }}{{ toJson .configurations }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .urls }}{{ $sep }}"urls": {{ if eq (kindOf .urls) "string" }}{{ .urls }}{{ else }}{{ toJson .urls }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/lockdowns/methods/get' @@ -6773,6 +6940,25 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .configuration }}{{ $sep }}"configuration": {{ if eq (kindOf .configuration) "string" }}{{ .configuration }}{{ else }}{{ toJson .configuration }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .mode }}{{ $sep }}"mode": {{ toJson .mode }}{{- $sep = "," -}}{{ end }} + + {{- if .paused }}{{ $sep }}"paused": {{ toJson .paused }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1zones~1{zone_id}~1firewall~1ua_rules~1{ua_rule_id}/delete' @@ -6795,6 +6981,25 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .configuration }}{{ $sep }}"configuration": {{ if eq (kindOf .configuration) "string" }}{{ .configuration }}{{ else }}{{ toJson .configuration }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .mode }}{{ $sep }}"mode": {{ toJson .mode }}{{- $sep = "," -}}{{ end }} + + {{- if .paused }}{{ $sep }}"paused": {{ toJson .paused }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/ua_rules/methods/get' @@ -6827,6 +7032,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .urls }}{{ $sep }}"urls": {{ if eq (kindOf .urls) "string" }}{{ .urls }}{{ else }}{{ toJson .urls }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1zones~1{zone_id}~1firewall~1waf~1overrides~1{overrides_id}/delete' @@ -6849,6 +7067,25 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .id }}{{ $sep }}"id": {{ toJson .id }}{{- $sep = "," -}}{{ end }} + + {{- if .rewrite_action }}{{ $sep }}"rewrite_action": {{ if eq (kindOf .rewrite_action) "string" }}{{ .rewrite_action }}{{ else }}{{ toJson .rewrite_action }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .rules }}{{ $sep }}"rules": {{ if eq (kindOf .rules) "string" }}{{ .rules }}{{ else }}{{ toJson .rules }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .urls }}{{ $sep }}"urls": {{ if eq (kindOf .urls) "string" }}{{ .urls }}{{ else }}{{ toJson .urls }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/overrides/methods/get' @@ -6979,6 +7216,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .configuration }}{{ $sep }}"configuration": {{ if eq (kindOf .configuration) "string" }}{{ .configuration }}{{ else }}{{ toJson .configuration }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .mode }}{{ $sep }}"mode": {{ toJson .mode }}{{- $sep = "," -}}{{ end }} + + {{- if .notes }}{{ $sep }}"notes": {{ toJson .notes }}{{- $sep = "," -}}{{ end }} + + } + + ' list_by_zone: operation: $ref: '#/paths/~1zones~1{zone_id}~1firewall~1access_rules~1rules/get' @@ -6995,6 +7249,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .configuration }}{{ $sep }}"configuration": {{ if eq (kindOf .configuration) "string" }}{{ .configuration }}{{ else }}{{ toJson .configuration }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .mode }}{{ $sep }}"mode": {{ toJson .mode }}{{- $sep = "," -}}{{ end }} + + {{- if .notes }}{{ $sep }}"notes": {{ toJson .notes }}{{- $sep = "," -}}{{ end }} + + } + + ' get_by_account: operation: $ref: '#/paths/~1accounts~1{account_id}~1firewall~1access_rules~1rules~1{rule_id}/get' @@ -7017,6 +7288,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .configuration }}{{ $sep }}"configuration": {{ if eq (kindOf .configuration) "string" }}{{ .configuration }}{{ else }}{{ toJson .configuration }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .mode }}{{ $sep }}"mode": {{ toJson .mode }}{{- $sep = "," -}}{{ end }} + + {{- if .notes }}{{ $sep }}"notes": {{ toJson .notes }}{{- $sep = "," -}}{{ end }} + + } + + ' get_by_zone: operation: $ref: '#/paths/~1zones~1{zone_id}~1firewall~1access_rules~1rules~1{rule_id}/get' @@ -7039,6 +7327,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .configuration }}{{ $sep }}"configuration": {{ if eq (kindOf .configuration) "string" }}{{ .configuration }}{{ else }}{{ toJson .configuration }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .mode }}{{ $sep }}"mode": {{ toJson .mode }}{{- $sep = "," -}}{{ end }} + + {{- if .notes }}{{ $sep }}"notes": {{ toJson .notes }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/access_rules/methods/get_by_account' diff --git a/providers/src/cloudflare/v00.00.00000/services/fraud.yaml b/providers/src/cloudflare/v00.00.00000/services/fraud.yaml index a25681f1..095e86e6 100644 --- a/providers/src/cloudflare/v00.00.00000/services/fraud.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/fraud.yaml @@ -1,311 +1,282 @@ -openapi: 3.0.3 -info: - title: fraud API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /zones/{zone_id}/fraud_detection/settings: - get: - description: Retrieve Fraud Detection settings for a zone. - operationId: fraud-detection-zone-get-settings - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/fraudFraudSettingsResponseBody' - description: Fraud Detection settings response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/fraudMessages' - messages: - $ref: '#/components/schemas/fraudMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - user_profiles: - $ref: '#/components/schemas/fraudUserProfilesStatus' - username_expressions: - $ref: '#/components/schemas/fraudUsernameExpressions' - type: object - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Fraud Detection settings response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Fraud Detection Settings - tags: - - Fraud Detection - x-api-token-group: - - Fraud Detection Read - - Fraud Detection Write - x-stackql-sdk: - service: fraud - resource_chain: [] - method: get - put: - description: >- - Update Fraud Detection settings for a zone. Notes on - `username_expressions` behavior: - If omitted or set to null, - expressions are not modified. - If provided as an empty array `[]`, all - expressions will be cleared. - operationId: fraud-detection-zone-update-settings - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/fraudFraudSettings' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/fraudFraudSettingsResponseBody' - description: Updated Fraud Detection settings response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/fraudMessages' - messages: - $ref: '#/components/schemas/fraudMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - user_profiles: - $ref: '#/components/schemas/fraudUserProfilesStatus' - username_expressions: - $ref: '#/components/schemas/fraudUsernameExpressions' - type: object - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Update Fraud Detection settings failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Fraud Detection Settings - tags: - - Fraud Detection - x-api-token-group: - - Fraud Detection Write - x-stackql-sdk: - service: fraud - resource_chain: [] - method: update -components: - schemas: - fraudFraudSettings: - properties: - user_profiles: - $ref: '#/components/schemas/fraudUserProfilesStatus' - username_expressions: - $ref: '#/components/schemas/fraudUsernameExpressions' - type: object - fraudFraudSettingsResponseBody: - type: object - properties: - errors: - $ref: '#/components/schemas/fraudMessages' - messages: - $ref: '#/components/schemas/fraudMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/fraudFraudSettings' - required: - - success - - errors - - messages - fraudMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - fraudUserProfilesStatus: - description: Whether Fraud User Profiles is enabled for the zone. - enum: - - enabled - - disabled - example: disabled - type: string - x-auditable: true - fraudUsernameExpressions: - description: >- - List of expressions to detect usernames in write HTTP requests. - - Maximum of 10 expressions. - Omit or set to null to leave unchanged on - update. - Provide an empty array `[]` to clear all expressions on - update. - Invalid expressions will result in a 10400 Bad Request with - details in the `messages` array. - example: - - http.request.body.form["username"][0] - - lookup_json_string(http.request.body.raw, "username") - items: - type: string - x-auditable: true - maxItems: 10 - type: array - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - settings: - id: cloudflare.fraud.settings - name: settings - title: Settings - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1fraud_detection~1settings/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1fraud_detection~1settings/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/settings/methods/list' - insert: [] - update: [] - delete: [] - replace: - - $ref: '#/components/x-stackQL-resources/settings/methods/update' +openapi: 3.0.3 +info: + title: fraud API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /zones/{zone_id}/fraud_detection/settings: + get: + description: Retrieve Fraud Detection settings for a zone. + operationId: fraud-detection-zone-get-settings + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/fraudFraudSettingsResponseBody' + description: Fraud Detection settings response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/fraudMessages' + messages: + $ref: '#/components/schemas/fraudMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + user_profiles: + $ref: '#/components/schemas/fraudUserProfilesStatus' + username_expressions: + $ref: '#/components/schemas/fraudUsernameExpressions' + type: object + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Fraud Detection settings response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Fraud Detection Settings + tags: + - Fraud Detection + x-api-token-group: + - Fraud Detection Read + - Fraud Detection Write + x-stackql-sdk: + service: fraud + resource_chain: [] + method: get + put: + description: 'Update Fraud Detection settings for a zone. Notes on `username_expressions` behavior: - If omitted or set to null, expressions are not modified. - If provided as an empty array `[]`, all expressions will be cleared.' + operationId: fraud-detection-zone-update-settings + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/fraudFraudSettings' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/fraudFraudSettingsResponseBody' + description: Updated Fraud Detection settings response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/fraudMessages' + messages: + $ref: '#/components/schemas/fraudMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + user_profiles: + $ref: '#/components/schemas/fraudUserProfilesStatus' + username_expressions: + $ref: '#/components/schemas/fraudUsernameExpressions' + type: object + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Update Fraud Detection settings failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Fraud Detection Settings + tags: + - Fraud Detection + x-api-token-group: + - Fraud Detection Write + x-stackql-sdk: + service: fraud + resource_chain: [] + method: update +components: + schemas: + fraudFraudSettings: + properties: + user_profiles: + $ref: '#/components/schemas/fraudUserProfilesStatus' + username_expressions: + $ref: '#/components/schemas/fraudUsernameExpressions' + type: object + fraudFraudSettingsResponseBody: + type: object + properties: + errors: + $ref: '#/components/schemas/fraudMessages' + messages: + $ref: '#/components/schemas/fraudMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/fraudFraudSettings' + required: + - success + - errors + - messages + fraudMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + fraudUserProfilesStatus: + description: Whether Fraud User Profiles is enabled for the zone. + enum: + - enabled + - disabled + example: disabled + type: string + x-auditable: true + fraudUsernameExpressions: + description: List of expressions to detect usernames in write HTTP requests. - Maximum of 10 expressions. - Omit or set to null to leave unchanged on update. - Provide an empty array `[]` to clear all expressions on update. - Invalid expressions will result in a 10400 Bad Request with details in the `messages` array. + example: + - http.request.body.form["username"][0] + - lookup_json_string(http.request.body.raw, "username") + items: + type: string + x-auditable: true + maxItems: 10 + type: array + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + settings: + id: cloudflare.fraud.settings + name: settings + title: Settings + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1fraud_detection~1settings/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1fraud_detection~1settings/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .user_profiles }}{{ $sep }}"user_profiles": {{ toJson .user_profiles }}{{- $sep = "," -}}{{ end }} + + {{- if .username_expressions }}{{ $sep }}"username_expressions": {{ if eq (kindOf .username_expressions) "string" }}{{ .username_expressions }}{{ else }}{{ toJson .username_expressions }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/settings/methods/list' + insert: [] + update: [] + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/settings/methods/update' diff --git a/providers/src/cloudflare/v00.00.00000/services/healthchecks.yaml b/providers/src/cloudflare/v00.00.00000/services/healthchecks.yaml index a105a6ab..bb2a9023 100644 --- a/providers/src/cloudflare/v00.00.00000/services/healthchecks.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/healthchecks.yaml @@ -1,1282 +1,1357 @@ -openapi: 3.0.3 -info: - title: healthchecks API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /zones/{zone_id}/healthchecks: - get: - description: List configured health checks. - operationId: health-checks-list-health-checks - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: Page number of paginated results. - in: query - name: page - schema: - default: 1 - minimum: 1 - type: number - - description: Maximum number of results per page. Must be a multiple of 5. - in: query - name: per_page - schema: - default: 25 - maximum: 1000 - minimum: 5 - type: number - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/healthchecksResponseCollection' - description: List Health Checks response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/healthchecksMessages' - messages: - $ref: '#/components/schemas/healthchecksMessages' - result: - items: - $ref: '#/components/schemas/healthchecksHealthchecks' - nullable: true - type: array - enum: - - null - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/healthchecksResultInfo' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: List Health Checks response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Health Checks - tags: - - Health Checks - x-api-token-group: - - Health Checks Write - - Health Checks Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: healthchecks - resource_chain: [] - method: list - post: - description: Create a new health check. - operationId: health-checks-create-health-check - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/healthchecksQueryHealthcheck' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/healthchecksSingleResponse' - description: Create Health Check response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/healthchecksMessages' - messages: - $ref: '#/components/schemas/healthchecksMessages' - result: - $ref: >- - #/components/schemas/unnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Create Health Check response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Health Check - tags: - - Health Checks - x-api-token-group: - - Health Checks Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: healthchecks - resource_chain: [] - method: create - /zones/{zone_id}/healthchecks/preview: - post: - description: Create a new preview health check. - operationId: health-checks-create-preview-health-check - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/healthchecksQueryHealthcheck' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/healthchecksSingleResponse' - description: Create Preview Health Check response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/healthchecksMessages' - messages: - $ref: '#/components/schemas/healthchecksMessages' - result: - $ref: >- - #/components/schemas/unnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Create Preview Health Check response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Preview Health Check - tags: - - Health Checks - x-api-token-group: - - Health Checks Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: healthchecks - resource_chain: - - previews - method: create - /zones/{zone_id}/healthchecks/preview/{healthcheck_id}: - delete: - description: Delete a health check. - operationId: health-checks-delete-preview-health-check - parameters: - - in: path - name: healthcheck_id - schema: - $ref: '#/components/schemas/healthchecksIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/healthchecksIdResponse' - description: Delete Preview Health Check response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/healthchecksMessages' - messages: - $ref: '#/components/schemas/healthchecksMessages' - result: - properties: - id: - $ref: '#/components/schemas/healthchecksIdentifier' - type: object - enum: - - null - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Delete Preview Health Check response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Preview Health Check - tags: - - Health Checks - x-api-token-group: - - Health Checks Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: healthchecks - resource_chain: - - previews - method: delete - get: - description: Fetch a single configured health check preview. - operationId: health-checks-health-check-preview-details - parameters: - - in: path - name: healthcheck_id - schema: - $ref: '#/components/schemas/healthchecksIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/healthchecksSingleResponse' - description: Health Check Preview Details response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/healthchecksMessages' - messages: - $ref: '#/components/schemas/healthchecksMessages' - result: - $ref: >- - #/components/schemas/unnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Health Check Preview Details response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Health Check Preview Details - tags: - - Health Checks - x-api-token-group: - - Health Checks Write - - Health Checks Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: healthchecks - resource_chain: - - previews - method: get - /zones/{zone_id}/healthchecks/{healthcheck_id}: - delete: - description: Delete a health check. - operationId: health-checks-delete-health-check - parameters: - - in: path - name: healthcheck_id - schema: - $ref: '#/components/schemas/healthchecksIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/healthchecksIdResponse' - description: Delete Health Check response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/healthchecksMessages' - messages: - $ref: '#/components/schemas/healthchecksMessages' - result: - properties: - id: - $ref: '#/components/schemas/healthchecksIdentifier' - type: object - enum: - - null - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Delete Health Check response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Health Check - tags: - - Health Checks - x-api-token-group: - - Health Checks Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: healthchecks - resource_chain: [] - method: delete - get: - description: Fetch a single configured health check. - operationId: health-checks-health-check-details - parameters: - - in: path - name: healthcheck_id - schema: - $ref: '#/components/schemas/healthchecksIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/healthchecksSingleResponse' - description: Health Check Details response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/healthchecksMessages' - messages: - $ref: '#/components/schemas/healthchecksMessages' - result: - $ref: >- - #/components/schemas/unnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Health Check Details response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Health Check Details - tags: - - Health Checks - x-api-token-group: - - Health Checks Write - - Health Checks Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: healthchecks - resource_chain: [] - method: get - patch: - description: Patch a configured health check. - operationId: health-checks-patch-health-check - parameters: - - in: path - name: healthcheck_id - schema: - $ref: '#/components/schemas/healthchecksIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/healthchecksQueryHealthcheck' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/healthchecksSingleResponse' - description: Patch Health Check response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/healthchecksMessages' - messages: - $ref: '#/components/schemas/healthchecksMessages' - result: - $ref: >- - #/components/schemas/unnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Patch Health Check response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Patch Health Check - tags: - - Health Checks - x-api-token-group: - - Health Checks Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: healthchecks - resource_chain: [] - method: edit - put: - description: Update a configured health check. - operationId: health-checks-update-health-check - parameters: - - in: path - name: healthcheck_id - schema: - $ref: '#/components/schemas/healthchecksIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/healthchecksQueryHealthcheck' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/healthchecksSingleResponse' - description: Update Health Check response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/healthchecksMessages' - messages: - $ref: '#/components/schemas/healthchecksMessages' - result: - $ref: >- - #/components/schemas/unnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Update Health Check response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Health Check - tags: - - Health Checks - x-api-token-group: - - Health Checks Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: healthchecks - resource_chain: [] - method: update -components: - schemas: - healthchecksAddress: - description: The hostname or IP address of the origin server to run health checks on. - example: www.example.com - type: string - x-auditable: true - healthchecksCheckRegions: - description: >- - A list of regions from which to run health checks. Null means Cloudflare - will pick a default region. - example: - - WEU - - ENAM - items: - description: >- - WNAM: Western North America, ENAM: Eastern North America, WEU: Western - Europe, EEU: Eastern Europe, NSAM: Northern South America, SSAM: - Southern South America, OC: Oceania, ME: Middle East, NAF: North - Africa, SAF: South Africa, IN: India, SEAS: South East Asia, NEAS: - North East Asia, ALL_REGIONS: all regions (BUSINESS and ENTERPRISE - customers only). - enum: - - WNAM - - ENAM - - WEU - - EEU - - NSAM - - SSAM - - OC - - ME - - NAF - - SAF - - IN - - SEAS - - NEAS - - ALL_REGIONS - type: string - nullable: true - type: array - x-auditable: true - healthchecksConsecutiveFails: - default: 1 - description: >- - The number of consecutive fails required from a health check before - changing the health to unhealthy. - type: integer - x-auditable: true - healthchecksConsecutiveSuccesses: - default: 1 - description: >- - The number of consecutive successes required from a health check before - changing the health to healthy. - type: integer - x-auditable: true - healthchecksDescription: - description: A human-readable description of the health check. - example: Health check for www.example.com - type: string - x-auditable: true - healthchecksFailureReason: - description: The current failure reason if status is unhealthy. - example: '' - readOnly: true - type: string - x-auditable: true - healthchecksHealthchecks: - properties: - address: - $ref: '#/components/schemas/healthchecksAddress' - check_regions: - $ref: '#/components/schemas/healthchecksCheckRegions' - consecutive_fails: - $ref: '#/components/schemas/healthchecksConsecutiveFails' - consecutive_successes: - $ref: '#/components/schemas/healthchecksConsecutiveSuccesses' - created_on: - $ref: '#/components/schemas/healthchecksTimestamp' - readOnly: true - description: - $ref: '#/components/schemas/healthchecksDescription' - failure_reason: - $ref: '#/components/schemas/healthchecksFailureReason' - http_config: - $ref: '#/components/schemas/healthchecksHttpConfig' - id: - $ref: '#/components/schemas/healthchecksIdentifier' - interval: - $ref: '#/components/schemas/healthchecksInterval' - modified_on: - $ref: '#/components/schemas/healthchecksTimestamp' - readOnly: true - name: - $ref: '#/components/schemas/healthchecksName' - retries: - $ref: '#/components/schemas/healthchecksRetries' - status: - $ref: '#/components/schemas/healthchecksStatus' - suspended: - $ref: '#/components/schemas/healthchecksSuspended' - tcp_config: - $ref: '#/components/schemas/healthchecksTcpConfig' - timeout: - $ref: '#/components/schemas/healthchecksTimeout' - type: - $ref: '#/components/schemas/healthchecksType' - type: object - healthchecksHttpConfig: - description: Parameters specific to an HTTP or HTTPS health check. - nullable: true - properties: - allow_insecure: - default: false - description: Do not validate the certificate when the health check uses HTTPS. - type: boolean - x-auditable: true - expected_body: - default: '' - description: >- - A case-insensitive sub-string to look for in the response body. If - this string is not found, the origin will be marked as unhealthy. - example: success - type: string - x-auditable: true - expected_codes: - description: >- - The expected HTTP response codes (e.g. "200") or code ranges (e.g. - "2xx" for all codes starting with 2) of the health check. - example: - - 2xx - - '302' - items: - type: string - nullable: true - type: array - x-auditable: true - follow_redirects: - default: false - description: Follow redirects if the origin returns a 3xx status code. - type: boolean - x-auditable: true - header: - description: >- - The HTTP request headers to send in the health check. It is - recommended you set a Host header by default. The User-Agent header - cannot be overridden. - example: - Host: - - example.com - X-App-ID: - - abc123 - nullable: true - type: object - method: - default: GET - description: The HTTP method to use for the health check. - enum: - - GET - - HEAD - type: string - x-auditable: true - path: - default: / - description: The endpoint path to health check against. - example: /health - type: string - x-auditable: true - port: - default: 80 - description: >- - Port number to connect to for the health check. Defaults to 80 if - type is HTTP or 443 if type is HTTPS. - type: integer - x-auditable: true - type: object - healthchecksIdResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/healthchecksMessages' - messages: - $ref: '#/components/schemas/healthchecksMessages' - result: - properties: - id: - $ref: '#/components/schemas/healthchecksIdentifier' - type: object - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - healthchecksIdentifier: - description: Identifier - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - readOnly: true - type: string - x-auditable: true - healthchecksInterval: - default: 60 - description: >- - The interval between each health check. Shorter intervals may give - quicker notifications if the origin status changes, but will increase - load on the origin as we check from multiple locations. - type: integer - x-auditable: true - healthchecksMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - healthchecksName: - description: >- - A short name to identify the health check. Only alphanumeric characters, - hyphens and underscores are allowed. - example: server-1 - type: string - x-auditable: true - healthchecksQueryHealthcheck: - properties: - address: - $ref: '#/components/schemas/healthchecksAddress' - check_regions: - $ref: '#/components/schemas/healthchecksCheckRegions' - consecutive_fails: - $ref: '#/components/schemas/healthchecksConsecutiveFails' - consecutive_successes: - $ref: '#/components/schemas/healthchecksConsecutiveSuccesses' - description: - $ref: '#/components/schemas/healthchecksDescription' - http_config: - $ref: '#/components/schemas/healthchecksHttpConfig' - interval: - $ref: '#/components/schemas/healthchecksInterval' - name: - $ref: '#/components/schemas/healthchecksName' - retries: - $ref: '#/components/schemas/healthchecksRetries' - suspended: - $ref: '#/components/schemas/healthchecksSuspended' - tcp_config: - $ref: '#/components/schemas/healthchecksTcpConfig' - timeout: - $ref: '#/components/schemas/healthchecksTimeout' - x-stainless-naming: - python: - method_argument: healthcheck_timeout - type: - $ref: '#/components/schemas/healthchecksType' - required: - - name - - address - type: object - healthchecksResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/healthchecksMessages' - messages: - $ref: '#/components/schemas/healthchecksMessages' - result: - items: - $ref: '#/components/schemas/healthchecksHealthchecks' - nullable: true - type: array - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/healthchecksResultInfo' - required: - - success - - errors - - messages - - result - healthchecksResultInfo: - properties: - count: - description: Total number of results for the requested service - example: 1 - type: number - page: - description: Current page within paginated list of results - example: 1 - type: number - per_page: - description: Number of results per page of results - example: 20 - type: number - total_count: - description: Total results available without any search parameters - example: 2000 - type: number - type: object - healthchecksRetries: - default: 2 - description: >- - The number of retries to attempt in case of a timeout before marking the - origin as unhealthy. Retries are attempted immediately. - type: integer - x-auditable: true - healthchecksSingleResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/healthchecksMessages' - messages: - $ref: '#/components/schemas/healthchecksMessages' - result: - $ref: '#/components/schemas/healthchecksHealthchecks' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - healthchecksStatus: - description: The current status of the origin server according to the health check. - enum: - - unknown - - healthy - - unhealthy - - suspended - example: healthy - readOnly: true - type: string - x-auditable: true - healthchecksSuspended: - default: false - description: If suspended, no health checks are sent to the origin. - type: boolean - x-auditable: true - healthchecksTcpConfig: - description: Parameters specific to TCP health check. - nullable: true - properties: - method: - default: connection_established - description: The TCP connection method to use for the health check. - enum: - - connection_established - type: string - x-auditable: true - port: - default: 80 - description: Port number to connect to for the health check. Defaults to 80. - type: integer - x-auditable: true - type: object - healthchecksTimeout: - default: 5 - description: The timeout (in seconds) before marking the health check as failed. - type: integer - x-auditable: true - healthchecksTimestamp: - example: '2014-01-01T05:20:00.12345Z' - format: date-time - readOnly: true - type: string - x-auditable: true - healthchecksType: - default: HTTP - description: >- - The protocol to use for the health check. Currently supported protocols - are 'HTTP', 'HTTPS' and 'TCP'. - example: HTTPS - type: string - x-auditable: true - responseInfo: - properties: - code: - minimum: 1000 - type: integer - message: - type: string - documentation_url: - type: string - source: - type: object - properties: - pointer: - type: string - required: - - code - - message - type: object - uniqueItems: true - unnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e: - properties: - address: - $ref: '#/components/schemas/healthchecksAddress' - check_regions: - $ref: '#/components/schemas/healthchecksCheckRegions' - consecutive_fails: - $ref: '#/components/schemas/healthchecksConsecutiveFails' - consecutive_successes: - $ref: '#/components/schemas/healthchecksConsecutiveSuccesses' - created_on: - $ref: '#/components/schemas/healthchecksTimestamp' - readOnly: true - description: - $ref: '#/components/schemas/healthchecksDescription' - failure_reason: - $ref: '#/components/schemas/healthchecksFailureReason' - http_config: - $ref: '#/components/schemas/healthchecksHttpConfig' - id: - $ref: '#/components/schemas/healthchecksIdentifier' - interval: - $ref: '#/components/schemas/healthchecksInterval' - modified_on: - $ref: '#/components/schemas/healthchecksTimestamp' - readOnly: true - name: - $ref: '#/components/schemas/healthchecksName' - retries: - $ref: '#/components/schemas/healthchecksRetries' - status: - $ref: '#/components/schemas/healthchecksStatus' - suspended: - $ref: '#/components/schemas/healthchecksSuspended' - tcp_config: - $ref: '#/components/schemas/healthchecksTcpConfig' - timeout: - $ref: '#/components/schemas/healthchecksTimeout' - type: - $ref: '#/components/schemas/healthchecksType' - type: object - enum: - - null - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - healthchecks: - id: cloudflare.healthchecks.healthchecks - name: healthchecks - title: Healthchecks - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1healthchecks/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1healthchecks/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1healthchecks~1{healthcheck_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1healthchecks~1{healthcheck_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1healthchecks~1{healthcheck_id}/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1healthchecks~1{healthcheck_id}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/healthchecks/methods/get' - - $ref: '#/components/x-stackQL-resources/healthchecks/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/healthchecks/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/healthchecks/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/healthchecks/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/healthchecks/methods/update' - previews: - id: cloudflare.healthchecks.previews - name: previews - title: Previews - methods: - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1healthchecks~1preview/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1healthchecks~1preview~1{healthcheck_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1healthchecks~1preview~1{healthcheck_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/previews/methods/get' - insert: - - $ref: '#/components/x-stackQL-resources/previews/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/previews/methods/delete' - replace: [] +openapi: 3.0.3 +info: + title: healthchecks API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /zones/{zone_id}/healthchecks: + get: + description: List configured health checks. + operationId: health-checks-list-health-checks + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Page number of paginated results. + in: query + name: page + schema: + default: 1 + minimum: 1 + type: number + - description: Maximum number of results per page. Must be a multiple of 5. + in: query + name: per_page + schema: + default: 25 + maximum: 1000 + minimum: 5 + type: number + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/healthchecksResponseCollection' + description: List Health Checks response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/healthchecksMessages' + messages: + $ref: '#/components/schemas/healthchecksMessages' + result: + items: + $ref: '#/components/schemas/healthchecksHealthchecks' + nullable: true + type: array + enum: + - null + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/healthchecksResultInfo' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: List Health Checks response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Health Checks + tags: + - Health Checks + x-api-token-group: + - Health Checks Write + - Health Checks Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: healthchecks + resource_chain: [] + method: list + post: + description: Create a new health check. + operationId: health-checks-create-health-check + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/healthchecksQueryHealthcheck' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/healthchecksSingleResponse' + description: Create Health Check response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/healthchecksMessages' + messages: + $ref: '#/components/schemas/healthchecksMessages' + result: + $ref: '#/components/schemas/unnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Create Health Check response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Health Check + tags: + - Health Checks + x-api-token-group: + - Health Checks Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: healthchecks + resource_chain: [] + method: create + /zones/{zone_id}/healthchecks/preview: + post: + description: Create a new preview health check. + operationId: health-checks-create-preview-health-check + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/healthchecksQueryHealthcheck' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/healthchecksSingleResponse' + description: Create Preview Health Check response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/healthchecksMessages' + messages: + $ref: '#/components/schemas/healthchecksMessages' + result: + $ref: '#/components/schemas/unnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Create Preview Health Check response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Preview Health Check + tags: + - Health Checks + x-api-token-group: + - Health Checks Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: healthchecks + resource_chain: + - previews + method: create + /zones/{zone_id}/healthchecks/preview/{healthcheck_id}: + delete: + description: Delete a health check. + operationId: health-checks-delete-preview-health-check + parameters: + - in: path + name: healthcheck_id + schema: + $ref: '#/components/schemas/healthchecksIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/healthchecksIdResponse' + description: Delete Preview Health Check response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/healthchecksMessages' + messages: + $ref: '#/components/schemas/healthchecksMessages' + result: + properties: + id: + $ref: '#/components/schemas/healthchecksIdentifier' + type: object + enum: + - null + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Delete Preview Health Check response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Preview Health Check + tags: + - Health Checks + x-api-token-group: + - Health Checks Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: healthchecks + resource_chain: + - previews + method: delete + get: + description: Fetch a single configured health check preview. + operationId: health-checks-health-check-preview-details + parameters: + - in: path + name: healthcheck_id + schema: + $ref: '#/components/schemas/healthchecksIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/healthchecksSingleResponse' + description: Health Check Preview Details response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/healthchecksMessages' + messages: + $ref: '#/components/schemas/healthchecksMessages' + result: + $ref: '#/components/schemas/unnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Health Check Preview Details response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Health Check Preview Details + tags: + - Health Checks + x-api-token-group: + - Health Checks Write + - Health Checks Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: healthchecks + resource_chain: + - previews + method: get + /zones/{zone_id}/healthchecks/{healthcheck_id}: + delete: + description: Delete a health check. + operationId: health-checks-delete-health-check + parameters: + - in: path + name: healthcheck_id + schema: + $ref: '#/components/schemas/healthchecksIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/healthchecksIdResponse' + description: Delete Health Check response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/healthchecksMessages' + messages: + $ref: '#/components/schemas/healthchecksMessages' + result: + properties: + id: + $ref: '#/components/schemas/healthchecksIdentifier' + type: object + enum: + - null + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Delete Health Check response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Health Check + tags: + - Health Checks + x-api-token-group: + - Health Checks Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: healthchecks + resource_chain: [] + method: delete + get: + description: Fetch a single configured health check. + operationId: health-checks-health-check-details + parameters: + - in: path + name: healthcheck_id + schema: + $ref: '#/components/schemas/healthchecksIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/healthchecksSingleResponse' + description: Health Check Details response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/healthchecksMessages' + messages: + $ref: '#/components/schemas/healthchecksMessages' + result: + $ref: '#/components/schemas/unnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Health Check Details response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Health Check Details + tags: + - Health Checks + x-api-token-group: + - Health Checks Write + - Health Checks Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: healthchecks + resource_chain: [] + method: get + patch: + description: Patch a configured health check. + operationId: health-checks-patch-health-check + parameters: + - in: path + name: healthcheck_id + schema: + $ref: '#/components/schemas/healthchecksIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/healthchecksQueryHealthcheck' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/healthchecksSingleResponse' + description: Patch Health Check response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/healthchecksMessages' + messages: + $ref: '#/components/schemas/healthchecksMessages' + result: + $ref: '#/components/schemas/unnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Patch Health Check response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Patch Health Check + tags: + - Health Checks + x-api-token-group: + - Health Checks Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: healthchecks + resource_chain: [] + method: edit + put: + description: Update a configured health check. + operationId: health-checks-update-health-check + parameters: + - in: path + name: healthcheck_id + schema: + $ref: '#/components/schemas/healthchecksIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/healthchecksQueryHealthcheck' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/healthchecksSingleResponse' + description: Update Health Check response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/healthchecksMessages' + messages: + $ref: '#/components/schemas/healthchecksMessages' + result: + $ref: '#/components/schemas/unnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Update Health Check response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Health Check + tags: + - Health Checks + x-api-token-group: + - Health Checks Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: healthchecks + resource_chain: [] + method: update +components: + schemas: + healthchecksAddress: + description: The hostname or IP address of the origin server to run health checks on. + example: www.example.com + type: string + x-auditable: true + healthchecksCheckRegions: + description: A list of regions from which to run health checks. Null means Cloudflare will pick a default region. + example: + - WEU + - ENAM + items: + description: 'WNAM: Western North America, ENAM: Eastern North America, WEU: Western Europe, EEU: Eastern Europe, NSAM: Northern South America, SSAM: Southern South America, OC: Oceania, ME: Middle East, NAF: North Africa, SAF: South Africa, IN: India, SEAS: South East Asia, NEAS: North East Asia, ALL_REGIONS: all regions (BUSINESS and ENTERPRISE customers only).' + enum: + - WNAM + - ENAM + - WEU + - EEU + - NSAM + - SSAM + - OC + - ME + - NAF + - SAF + - IN + - SEAS + - NEAS + - ALL_REGIONS + type: string + nullable: true + type: array + x-auditable: true + healthchecksConsecutiveFails: + default: 1 + description: The number of consecutive fails required from a health check before changing the health to unhealthy. + type: integer + x-auditable: true + healthchecksConsecutiveSuccesses: + default: 1 + description: The number of consecutive successes required from a health check before changing the health to healthy. + type: integer + x-auditable: true + healthchecksDescription: + description: A human-readable description of the health check. + example: Health check for www.example.com + type: string + x-auditable: true + healthchecksFailureReason: + description: The current failure reason if status is unhealthy. + example: '' + readOnly: true + type: string + x-auditable: true + healthchecksHealthchecks: + properties: + address: + $ref: '#/components/schemas/healthchecksAddress' + check_regions: + $ref: '#/components/schemas/healthchecksCheckRegions' + consecutive_fails: + $ref: '#/components/schemas/healthchecksConsecutiveFails' + consecutive_successes: + $ref: '#/components/schemas/healthchecksConsecutiveSuccesses' + created_on: + $ref: '#/components/schemas/healthchecksTimestamp' + readOnly: true + description: + $ref: '#/components/schemas/healthchecksDescription' + failure_reason: + $ref: '#/components/schemas/healthchecksFailureReason' + http_config: + $ref: '#/components/schemas/healthchecksHttpConfig' + id: + $ref: '#/components/schemas/healthchecksIdentifier' + interval: + $ref: '#/components/schemas/healthchecksInterval' + modified_on: + $ref: '#/components/schemas/healthchecksTimestamp' + readOnly: true + name: + $ref: '#/components/schemas/healthchecksName' + retries: + $ref: '#/components/schemas/healthchecksRetries' + status: + $ref: '#/components/schemas/healthchecksStatus' + suspended: + $ref: '#/components/schemas/healthchecksSuspended' + tcp_config: + $ref: '#/components/schemas/healthchecksTcpConfig' + timeout: + $ref: '#/components/schemas/healthchecksTimeout' + type: + $ref: '#/components/schemas/healthchecksType' + type: object + healthchecksHttpConfig: + description: Parameters specific to an HTTP or HTTPS health check. + nullable: true + properties: + allow_insecure: + default: false + description: Do not validate the certificate when the health check uses HTTPS. + type: boolean + x-auditable: true + expected_body: + default: '' + description: A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy. + example: success + type: string + x-auditable: true + expected_codes: + description: The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check. + example: + - 2xx + - '302' + items: + type: string + nullable: true + type: array + x-auditable: true + follow_redirects: + default: false + description: Follow redirects if the origin returns a 3xx status code. + type: boolean + x-auditable: true + header: + description: The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. + example: + Host: + - example.com + X-App-ID: + - abc123 + nullable: true + type: object + method: + default: GET + description: The HTTP method to use for the health check. + enum: + - GET + - HEAD + type: string + x-auditable: true + path: + default: / + description: The endpoint path to health check against. + example: /health + type: string + x-auditable: true + port: + default: 80 + description: Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS. + type: integer + x-auditable: true + type: object + healthchecksIdResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/healthchecksMessages' + messages: + $ref: '#/components/schemas/healthchecksMessages' + result: + properties: + id: + $ref: '#/components/schemas/healthchecksIdentifier' + type: object + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + healthchecksIdentifier: + description: Identifier + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + readOnly: true + type: string + x-auditable: true + healthchecksInterval: + default: 60 + description: The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations. + type: integer + x-auditable: true + healthchecksMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + healthchecksName: + description: A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed. + example: server-1 + type: string + x-auditable: true + healthchecksQueryHealthcheck: + properties: + address: + $ref: '#/components/schemas/healthchecksAddress' + check_regions: + $ref: '#/components/schemas/healthchecksCheckRegions' + consecutive_fails: + $ref: '#/components/schemas/healthchecksConsecutiveFails' + consecutive_successes: + $ref: '#/components/schemas/healthchecksConsecutiveSuccesses' + description: + $ref: '#/components/schemas/healthchecksDescription' + http_config: + $ref: '#/components/schemas/healthchecksHttpConfig' + interval: + $ref: '#/components/schemas/healthchecksInterval' + name: + $ref: '#/components/schemas/healthchecksName' + retries: + $ref: '#/components/schemas/healthchecksRetries' + suspended: + $ref: '#/components/schemas/healthchecksSuspended' + tcp_config: + $ref: '#/components/schemas/healthchecksTcpConfig' + timeout: + $ref: '#/components/schemas/healthchecksTimeout' + x-stainless-naming: + python: + method_argument: healthcheck_timeout + type: + $ref: '#/components/schemas/healthchecksType' + required: + - name + - address + type: object + healthchecksResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/healthchecksMessages' + messages: + $ref: '#/components/schemas/healthchecksMessages' + result: + items: + $ref: '#/components/schemas/healthchecksHealthchecks' + nullable: true + type: array + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/healthchecksResultInfo' + required: + - success + - errors + - messages + - result + healthchecksResultInfo: + properties: + count: + description: Total number of results for the requested service + example: 1 + type: number + page: + description: Current page within paginated list of results + example: 1 + type: number + per_page: + description: Number of results per page of results + example: 20 + type: number + total_count: + description: Total results available without any search parameters + example: 2000 + type: number + type: object + healthchecksRetries: + default: 2 + description: The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately. + type: integer + x-auditable: true + healthchecksSingleResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/healthchecksMessages' + messages: + $ref: '#/components/schemas/healthchecksMessages' + result: + $ref: '#/components/schemas/healthchecksHealthchecks' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + healthchecksStatus: + description: The current status of the origin server according to the health check. + enum: + - unknown + - healthy + - unhealthy + - suspended + example: healthy + readOnly: true + type: string + x-auditable: true + healthchecksSuspended: + default: false + description: If suspended, no health checks are sent to the origin. + type: boolean + x-auditable: true + healthchecksTcpConfig: + description: Parameters specific to TCP health check. + nullable: true + properties: + method: + default: connection_established + description: The TCP connection method to use for the health check. + enum: + - connection_established + type: string + x-auditable: true + port: + default: 80 + description: Port number to connect to for the health check. Defaults to 80. + type: integer + x-auditable: true + type: object + healthchecksTimeout: + default: 5 + description: The timeout (in seconds) before marking the health check as failed. + type: integer + x-auditable: true + healthchecksTimestamp: + example: '2014-01-01T05:20:00.12345Z' + format: date-time + readOnly: true + type: string + x-auditable: true + healthchecksType: + default: HTTP + description: The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'. + example: HTTPS + type: string + x-auditable: true + responseInfo: + properties: + code: + minimum: 1000 + type: integer + message: + type: string + documentation_url: + type: string + source: + type: object + properties: + pointer: + type: string + required: + - code + - message + type: object + uniqueItems: true + unnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e: + properties: + address: + $ref: '#/components/schemas/healthchecksAddress' + check_regions: + $ref: '#/components/schemas/healthchecksCheckRegions' + consecutive_fails: + $ref: '#/components/schemas/healthchecksConsecutiveFails' + consecutive_successes: + $ref: '#/components/schemas/healthchecksConsecutiveSuccesses' + created_on: + $ref: '#/components/schemas/healthchecksTimestamp' + readOnly: true + description: + $ref: '#/components/schemas/healthchecksDescription' + failure_reason: + $ref: '#/components/schemas/healthchecksFailureReason' + http_config: + $ref: '#/components/schemas/healthchecksHttpConfig' + id: + $ref: '#/components/schemas/healthchecksIdentifier' + interval: + $ref: '#/components/schemas/healthchecksInterval' + modified_on: + $ref: '#/components/schemas/healthchecksTimestamp' + readOnly: true + name: + $ref: '#/components/schemas/healthchecksName' + retries: + $ref: '#/components/schemas/healthchecksRetries' + status: + $ref: '#/components/schemas/healthchecksStatus' + suspended: + $ref: '#/components/schemas/healthchecksSuspended' + tcp_config: + $ref: '#/components/schemas/healthchecksTcpConfig' + timeout: + $ref: '#/components/schemas/healthchecksTimeout' + type: + $ref: '#/components/schemas/healthchecksType' + type: object + enum: + - null + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + healthchecks: + id: cloudflare.healthchecks.healthchecks + name: healthchecks + title: Healthchecks + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1healthchecks/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1healthchecks/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .address }}{{ $sep }}"address": {{ toJson .address }}{{- $sep = "," -}}{{ end }} + + {{- if .check_regions }}{{ $sep }}"check_regions": {{ if eq (kindOf .check_regions) "string" }}{{ .check_regions }}{{ else }}{{ toJson .check_regions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_fails }}{{ $sep }}"consecutive_fails": {{ toJson .consecutive_fails }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_successes }}{{ $sep }}"consecutive_successes": {{ toJson .consecutive_successes }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .http_config }}{{ $sep }}"http_config": {{ if eq (kindOf .http_config) "string" }}{{ .http_config }}{{ else }}{{ toJson .http_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interval }}{{ $sep }}"interval": {{ toJson .interval }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .retries }}{{ $sep }}"retries": {{ toJson .retries }}{{- $sep = "," -}}{{ end }} + + {{- if .suspended }}{{ $sep }}"suspended": {{ toJson .suspended }}{{- $sep = "," -}}{{ end }} + + {{- if .tcp_config }}{{ $sep }}"tcp_config": {{ if eq (kindOf .tcp_config) "string" }}{{ .tcp_config }}{{ else }}{{ toJson .tcp_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .timeout }}{{ $sep }}"timeout": {{ toJson .timeout }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1healthchecks~1{healthcheck_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1healthchecks~1{healthcheck_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1healthchecks~1{healthcheck_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .address }}{{ $sep }}"address": {{ toJson .address }}{{- $sep = "," -}}{{ end }} + + {{- if .check_regions }}{{ $sep }}"check_regions": {{ if eq (kindOf .check_regions) "string" }}{{ .check_regions }}{{ else }}{{ toJson .check_regions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_fails }}{{ $sep }}"consecutive_fails": {{ toJson .consecutive_fails }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_successes }}{{ $sep }}"consecutive_successes": {{ toJson .consecutive_successes }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .http_config }}{{ $sep }}"http_config": {{ if eq (kindOf .http_config) "string" }}{{ .http_config }}{{ else }}{{ toJson .http_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interval }}{{ $sep }}"interval": {{ toJson .interval }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .retries }}{{ $sep }}"retries": {{ toJson .retries }}{{- $sep = "," -}}{{ end }} + + {{- if .suspended }}{{ $sep }}"suspended": {{ toJson .suspended }}{{- $sep = "," -}}{{ end }} + + {{- if .tcp_config }}{{ $sep }}"tcp_config": {{ if eq (kindOf .tcp_config) "string" }}{{ .tcp_config }}{{ else }}{{ toJson .tcp_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .timeout }}{{ $sep }}"timeout": {{ toJson .timeout }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1healthchecks~1{healthcheck_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .address }}{{ $sep }}"address": {{ toJson .address }}{{- $sep = "," -}}{{ end }} + + {{- if .check_regions }}{{ $sep }}"check_regions": {{ if eq (kindOf .check_regions) "string" }}{{ .check_regions }}{{ else }}{{ toJson .check_regions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_fails }}{{ $sep }}"consecutive_fails": {{ toJson .consecutive_fails }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_successes }}{{ $sep }}"consecutive_successes": {{ toJson .consecutive_successes }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .http_config }}{{ $sep }}"http_config": {{ if eq (kindOf .http_config) "string" }}{{ .http_config }}{{ else }}{{ toJson .http_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interval }}{{ $sep }}"interval": {{ toJson .interval }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .retries }}{{ $sep }}"retries": {{ toJson .retries }}{{- $sep = "," -}}{{ end }} + + {{- if .suspended }}{{ $sep }}"suspended": {{ toJson .suspended }}{{- $sep = "," -}}{{ end }} + + {{- if .tcp_config }}{{ $sep }}"tcp_config": {{ if eq (kindOf .tcp_config) "string" }}{{ .tcp_config }}{{ else }}{{ toJson .tcp_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .timeout }}{{ $sep }}"timeout": {{ toJson .timeout }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/healthchecks/methods/get' + - $ref: '#/components/x-stackQL-resources/healthchecks/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/healthchecks/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/healthchecks/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/healthchecks/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/healthchecks/methods/update' + previews: + id: cloudflare.healthchecks.previews + name: previews + title: Previews + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1healthchecks~1preview/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .address }}{{ $sep }}"address": {{ toJson .address }}{{- $sep = "," -}}{{ end }} + + {{- if .check_regions }}{{ $sep }}"check_regions": {{ if eq (kindOf .check_regions) "string" }}{{ .check_regions }}{{ else }}{{ toJson .check_regions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_fails }}{{ $sep }}"consecutive_fails": {{ toJson .consecutive_fails }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_successes }}{{ $sep }}"consecutive_successes": {{ toJson .consecutive_successes }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .http_config }}{{ $sep }}"http_config": {{ if eq (kindOf .http_config) "string" }}{{ .http_config }}{{ else }}{{ toJson .http_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interval }}{{ $sep }}"interval": {{ toJson .interval }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .retries }}{{ $sep }}"retries": {{ toJson .retries }}{{- $sep = "," -}}{{ end }} + + {{- if .suspended }}{{ $sep }}"suspended": {{ toJson .suspended }}{{- $sep = "," -}}{{ end }} + + {{- if .tcp_config }}{{ $sep }}"tcp_config": {{ if eq (kindOf .tcp_config) "string" }}{{ .tcp_config }}{{ else }}{{ toJson .tcp_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .timeout }}{{ $sep }}"timeout": {{ toJson .timeout }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1healthchecks~1preview~1{healthcheck_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1healthchecks~1preview~1{healthcheck_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/previews/methods/get' + insert: + - $ref: '#/components/x-stackQL-resources/previews/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/previews/methods/delete' + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/hostnames.yaml b/providers/src/cloudflare/v00.00.00000/services/hostnames.yaml index 25fcd2ea..09102a77 100644 --- a/providers/src/cloudflare/v00.00.00000/services/hostnames.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/hostnames.yaml @@ -1,760 +1,684 @@ -openapi: 3.0.3 -info: - title: hostnames API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /zones/{zone_id}/hostnames/settings/{setting_id}: - get: - description: List the requested TLS setting for the hostnames under this zone. - operationId: per-hostname-tls-settings-list - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: path - name: setting_id - schema: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSettingId' - required: true - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesPerHostnameSettingsResponseCollection - description: List per-hostname TLS settings response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: Total pages available of results - type: number - type: object - result: - items: - properties: - created_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasCreatedAt - readOnly: true - hostname: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasHostname - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasStatus - updated_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasUpdatedAt - readOnly: true - value: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesValue - type: object - type: array - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: List per-hostname TLS settings response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List TLS setting for hostnames - tags: - - Per-Hostname TLS Settings - x-api-token-group: - - SSL and Certificates Write - - SSL and Certificates Read - x-cfPermissionsRequired: - enum: - - '#ssl:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: hostnames - resource_chain: - - settings - - tls - method: get - /zones/{zone_id}/hostnames/settings/{setting_id}/{hostname}: - delete: - description: Delete the tls setting value for the hostname. - operationId: per-hostname-tls-settings-delete - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: path - name: setting_id - schema: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSettingId' - required: true - - in: path - name: hostname - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasHostname - required: true - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesPerHostnameSettingsResponseDelete - description: Delete TLS setting for hostname response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - type: object - properties: - created_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasCreatedAt - readOnly: true - hostname: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasHostname - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasStatus - updated_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasUpdatedAt - readOnly: true - value: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesValue' - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Delete TLS setting for hostname response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete TLS setting for hostname - tags: - - Per-Hostname TLS Settings - x-api-token-group: - - SSL and Certificates Write - x-cfPermissionsRequired: - enum: - - '#ssl:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: hostnames - resource_chain: - - settings - - tls - method: delete - get: - description: Get the requested TLS setting for the hostname. - operationId: per-hostname-tls-settings-get - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: path - name: setting_id - schema: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSettingId' - required: true - - in: path - name: hostname - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasHostname - required: true - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesPerHostnameSettingsResponse - description: Get TLS setting for hostname response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - type: object - properties: - created_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasCreatedAt - readOnly: true - hostname: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasHostname - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasStatus - updated_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasUpdatedAt - readOnly: true - value: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesValue' - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Get TLS setting for hostname response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get TLS setting for hostname - tags: - - Per-Hostname TLS Settings - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - put: - description: Update the tls setting value for the hostname. - operationId: per-hostname-tls-settings-put - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: path - name: setting_id - schema: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSettingId' - required: true - - in: path - name: hostname - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasHostname - required: true - requestBody: - content: - application/json: - schema: - properties: - value: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesValue' - required: - - value - type: object - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesPerHostnameSettingsResponse - description: Edit TLS setting for hostname response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - type: object - properties: - created_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasCreatedAt - readOnly: true - hostname: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasHostname - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasStatus - updated_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasUpdatedAt - readOnly: true - value: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesValue' - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Edit TLS setting for hostname response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Edit TLS setting for hostname - tags: - - Per-Hostname TLS Settings - x-api-token-group: - - SSL and Certificates Write - x-cfPermissionsRequired: - enum: - - '#ssl:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: hostnames - resource_chain: - - settings - - tls - method: update -components: - schemas: - tlsCertificatesAndHostnamesComponentsSchemasHostname: - description: The hostname for which the tls settings are set. - example: app.example.com - type: string - x-auditable: true - tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasCreatedAt: - description: >- - This is the time the tls setting was originally created for this - hostname. - example: '2023-07-10T20:01:50.219171Z' - format: date-time - type: string - x-auditable: true - tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasStatus: - description: Deployment status for the given tls setting. - example: pending_deployment - type: string - x-auditable: true - tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasUpdatedAt: - description: This is the time the tls setting was updated. - example: '2023-07-10T20:01:50.219171Z' - format: date-time - type: string - x-auditable: true - tlsCertificatesAndHostnamesMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - tlsCertificatesAndHostnamesPerHostnameSettingsResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - type: object - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSettingObject' - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesPerHostnameSettingsResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 50 - type: number - total_count: - description: Total results available without any search parameters. - example: 1 - type: number - total_pages: - description: Total pages available of results - example: 1 - type: number - type: object - result: - items: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesPerHostnameSettingsResponseCollection_result_item - type: array - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesPerHostnameSettingsResponseCollection_result_item: - properties: - created_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasCreatedAt - readOnly: true - hostname: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasHostname - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasStatus - updated_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasUpdatedAt - readOnly: true - value: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesValue' - type: object - tlsCertificatesAndHostnamesPerHostnameSettingsResponseDelete: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - type: object - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSettingObjectDelete' - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesSettingId: - description: >- - The TLS Setting name. The value type depends on the setting: - - `ciphers`: value is an array of cipher suite strings (e.g., - `["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"]`) - - `min_tls_version`: value is a TLS version string (`"1.0"`, `"1.1"`, - `"1.2"`, or `"1.3"`) - `http2`: value is `"on"` or `"off"` - enum: - - ciphers - - min_tls_version - - http2 - type: string - x-auditable: true - tlsCertificatesAndHostnamesSettingObject: - properties: - created_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasCreatedAt - readOnly: true - hostname: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasHostname - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasStatus - updated_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasUpdatedAt - readOnly: true - value: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesValue' - type: object - tlsCertificatesAndHostnamesSettingObjectDelete: - properties: - created_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasCreatedAt - readOnly: true - hostname: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasHostname - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasStatus - updated_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasUpdatedAt - readOnly: true - value: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesValue' - type: object - tlsCertificatesAndHostnamesValue: - description: >- - The TLS setting value. The type depends on the `setting_id` used in the - request path: - `ciphers`: an array of allowed cipher suite strings in - BoringSSL format (e.g., `["ECDHE-RSA-AES128-GCM-SHA256", - "AES128-GCM-SHA256"]`) - `min_tls_version`: a string indicating the - minimum TLS version — one of `"1.0"`, `"1.1"`, `"1.2"`, or `"1.3"` - (e.g., `"1.2"`) - `http2`: a string indicating whether HTTP/2 is enabled - — `"on"` or `"off"` (e.g., `"on"`) - type: array - example: - - ECDHE-RSA-AES128-GCM-SHA256 - - AES128-GCM-SHA256 - items: - type: string - enum: - - '1.0' - - '1.1' - - '1.2' - - '1.3' - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - tls: - id: cloudflare.hostnames.tls - name: tls - title: Tls - methods: - get: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1hostnames~1settings~1{setting_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1hostnames~1settings~1{setting_id}~1{hostname}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1hostnames~1settings~1{setting_id}~1{hostname}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/tls/methods/get' - insert: [] - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/tls/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/tls/methods/update' - settings: - id: cloudflare.hostnames.settings - name: settings - title: Settings - methods: - get: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1hostnames~1settings~1{setting_id}~1{hostname}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/settings/methods/get' - insert: [] - update: [] - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: hostnames API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /zones/{zone_id}/hostnames/settings/{setting_id}: + get: + description: List the requested TLS setting for the hostnames under this zone. + operationId: per-hostname-tls-settings-list + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: path + name: setting_id + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSettingId' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPerHostnameSettingsResponseCollection' + description: List per-hostname TLS settings response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: Total pages available of results + type: number + type: object + result: + items: + properties: + created_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasCreatedAt' + readOnly: true + hostname: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasHostname' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasStatus' + updated_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasUpdatedAt' + readOnly: true + value: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValue' + type: object + type: array + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: List per-hostname TLS settings response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List TLS setting for hostnames + tags: + - Per-Hostname TLS Settings + x-api-token-group: + - SSL and Certificates Write + - SSL and Certificates Read + x-cfPermissionsRequired: + enum: + - '#ssl:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: hostnames + resource_chain: + - settings + - tls + method: get + /zones/{zone_id}/hostnames/settings/{setting_id}/{hostname}: + delete: + description: Delete the tls setting value for the hostname. + operationId: per-hostname-tls-settings-delete + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: path + name: setting_id + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSettingId' + required: true + - in: path + name: hostname + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasHostname' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPerHostnameSettingsResponseDelete' + description: Delete TLS setting for hostname response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + type: object + properties: + created_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasCreatedAt' + readOnly: true + hostname: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasHostname' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasStatus' + updated_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasUpdatedAt' + readOnly: true + value: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValue' + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Delete TLS setting for hostname response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete TLS setting for hostname + tags: + - Per-Hostname TLS Settings + x-api-token-group: + - SSL and Certificates Write + x-cfPermissionsRequired: + enum: + - '#ssl:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: hostnames + resource_chain: + - settings + - tls + method: delete + get: + description: Get the requested TLS setting for the hostname. + operationId: per-hostname-tls-settings-get + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: path + name: setting_id + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSettingId' + required: true + - in: path + name: hostname + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasHostname' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPerHostnameSettingsResponse' + description: Get TLS setting for hostname response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + type: object + properties: + created_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasCreatedAt' + readOnly: true + hostname: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasHostname' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasStatus' + updated_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasUpdatedAt' + readOnly: true + value: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValue' + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Get TLS setting for hostname response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get TLS setting for hostname + tags: + - Per-Hostname TLS Settings + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + put: + description: Update the tls setting value for the hostname. + operationId: per-hostname-tls-settings-put + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: path + name: setting_id + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSettingId' + required: true + - in: path + name: hostname + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasHostname' + required: true + requestBody: + content: + application/json: + schema: + properties: + value: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValue' + required: + - value + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPerHostnameSettingsResponse' + description: Edit TLS setting for hostname response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + type: object + properties: + created_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasCreatedAt' + readOnly: true + hostname: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasHostname' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasStatus' + updated_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasUpdatedAt' + readOnly: true + value: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValue' + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Edit TLS setting for hostname response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Edit TLS setting for hostname + tags: + - Per-Hostname TLS Settings + x-api-token-group: + - SSL and Certificates Write + x-cfPermissionsRequired: + enum: + - '#ssl:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: hostnames + resource_chain: + - settings + - tls + method: update +components: + schemas: + tlsCertificatesAndHostnamesComponentsSchemasHostname: + description: The hostname for which the tls settings are set. + example: app.example.com + type: string + x-auditable: true + tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasCreatedAt: + description: This is the time the tls setting was originally created for this hostname. + example: '2023-07-10T20:01:50.219171Z' + format: date-time + type: string + x-auditable: true + tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasStatus: + description: Deployment status for the given tls setting. + example: pending_deployment + type: string + x-auditable: true + tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasUpdatedAt: + description: This is the time the tls setting was updated. + example: '2023-07-10T20:01:50.219171Z' + format: date-time + type: string + x-auditable: true + tlsCertificatesAndHostnamesMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + tlsCertificatesAndHostnamesPerHostnameSettingsResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + type: object + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSettingObject' + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesPerHostnameSettingsResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 50 + type: number + total_count: + description: Total results available without any search parameters. + example: 1 + type: number + total_pages: + description: Total pages available of results + example: 1 + type: number + type: object + result: + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPerHostnameSettingsResponseCollection_result_item' + type: array + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesPerHostnameSettingsResponseCollection_result_item: + properties: + created_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasCreatedAt' + readOnly: true + hostname: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasHostname' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasStatus' + updated_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasUpdatedAt' + readOnly: true + value: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValue' + type: object + tlsCertificatesAndHostnamesPerHostnameSettingsResponseDelete: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + type: object + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSettingObjectDelete' + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesSettingId: + description: 'The TLS Setting name. The value type depends on the setting: - `ciphers`: value is an array of cipher suite strings (e.g., `["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"]`) - `min_tls_version`: value is a TLS version string (`"1.0"`, `"1.1"`, `"1.2"`, or `"1.3"`) - `http2`: value is `"on"` or `"off"`' + enum: + - ciphers + - min_tls_version + - http2 + type: string + x-auditable: true + tlsCertificatesAndHostnamesSettingObject: + properties: + created_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasCreatedAt' + readOnly: true + hostname: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasHostname' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasStatus' + updated_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasUpdatedAt' + readOnly: true + value: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValue' + type: object + tlsCertificatesAndHostnamesSettingObjectDelete: + properties: + created_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasCreatedAt' + readOnly: true + hostname: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasHostname' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasStatus' + updated_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameTlsSettingsComponentsSchemasUpdatedAt' + readOnly: true + value: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValue' + type: object + tlsCertificatesAndHostnamesValue: + description: "The TLS setting value. The type depends on the `setting_id` used in the request path: - `ciphers`: an array of allowed cipher suite strings in BoringSSL format (e.g., `[\"ECDHE-RSA-AES128-GCM-SHA256\", \"AES128-GCM-SHA256\"]`) - `min_tls_version`: a string indicating the minimum TLS version \u2014 one of `\"1.0\"`, `\"1.1\"`, `\"1.2\"`, or `\"1.3\"` (e.g., `\"1.2\"`) - `http2`: a string indicating whether HTTP/2 is enabled \u2014 `\"on\"` or `\"off\"` (e.g., `\"on\"`)" + type: array + example: + - ECDHE-RSA-AES128-GCM-SHA256 + - AES128-GCM-SHA256 + items: + type: string + enum: + - '1.0' + - '1.1' + - '1.2' + - '1.3' + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + tls: + id: cloudflare.hostnames.tls + name: tls + title: Tls + methods: + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1hostnames~1settings~1{setting_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1hostnames~1settings~1{setting_id}~1{hostname}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1hostnames~1settings~1{setting_id}~1{hostname}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .value }}{{ $sep }}"value": {{ if eq (kindOf .value) "string" }}{{ .value }}{{ else }}{{ toJson .value }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/tls/methods/get' + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/tls/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/tls/methods/update' + settings: + id: cloudflare.hostnames.settings + name: settings + title: Settings + methods: + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1hostnames~1settings~1{setting_id}~1{hostname}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/settings/methods/get' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/hyperdrive.yaml b/providers/src/cloudflare/v00.00.00000/services/hyperdrive.yaml index 763287e0..2c5c544a 100644 --- a/providers/src/cloudflare/v00.00.00000/services/hyperdrive.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/hyperdrive.yaml @@ -1,855 +1,977 @@ -openapi: 3.0.3 -info: - title: hyperdrive API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/hyperdrive/configs: - get: - description: Returns a list of Hyperdrives. - operationId: list-hyperdrive - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/hyperdriveMessages' - messages: - $ref: '#/components/schemas/hyperdriveMessages' - result: - type: array - items: - $ref: '#/components/schemas/hyperdriveHyperdriveConfigResponse' - success: - description: Return the status of the API call success. - enum: - - true - type: boolean - result_info: - $ref: '#/components/schemas/hyperdriveResultInfo' - required: - - success - - errors - - messages - - result - description: List Hyperdrives Response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/hyperdriveApiResponseCommonFailure' - description: List Hyperdrives Failure Response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Hyperdrives - tags: - - Hyperdrive - x-api-token-group: - - Hyperdrive Write - - Hyperdrive Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.hyperdrive.database.list - x-stackql-sdk: - service: hyperdrive - resource_chain: - - configs - method: list - post: - description: Creates and returns a new Hyperdrive configuration. - operationId: create-hyperdrive - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/hyperdriveHyperdriveConfig' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/hyperdriveMessages' - messages: - $ref: '#/components/schemas/hyperdriveMessages' - result: - type: object - $ref: '#/components/schemas/hyperdriveHyperdriveConfigResponse' - success: - description: Return the status of the API call success. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Create Hyperdrive Response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/hyperdriveApiResponseCommonFailure' - description: Create Hyperdrive Failure Response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Hyperdrive - tags: - - Hyperdrive - x-api-token-group: - - Hyperdrive Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.hyperdrive.database.create - x-stackql-sdk: - service: hyperdrive - resource_chain: - - configs - method: create - /accounts/{account_id}/hyperdrive/configs/{hyperdrive_id}: - delete: - description: Deletes the specified Hyperdrive. - operationId: delete-hyperdrive - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: The unique identifier of the Hyperdrive configuration. - in: path - name: hyperdrive_id - schema: - $ref: '#/components/schemas/hyperdriveIdentifier' - required: true - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/hyperdriveMessages' - messages: - $ref: '#/components/schemas/hyperdriveMessages' - result: - type: object - nullable: true - success: - description: Return the status of the API call success. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Delete Hyperdrive Response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/hyperdriveApiResponseCommonFailure' - description: Delete Hyperdrive Failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Hyperdrive - tags: - - Hyperdrive - x-api-token-group: - - Hyperdrive Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.hyperdrive.database.delete - x-stackql-sdk: - service: hyperdrive - resource_chain: - - configs - method: delete - get: - description: Returns the specified Hyperdrive configuration. - operationId: get-hyperdrive - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: The unique identifier of the Hyperdrive configuration. - in: path - name: hyperdrive_id - schema: - $ref: '#/components/schemas/hyperdriveIdentifier' - required: true - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/hyperdriveMessages' - messages: - $ref: '#/components/schemas/hyperdriveMessages' - result: - type: object - $ref: '#/components/schemas/hyperdriveHyperdriveConfigResponse' - success: - description: Return the status of the API call success. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Get Hyperdrive Response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/hyperdriveApiResponseCommonFailure' - description: Get Hyperdrive Failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Hyperdrive - tags: - - Hyperdrive - x-api-token-group: - - Hyperdrive Write - - Hyperdrive Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.hyperdrive.database.read - x-stackql-sdk: - service: hyperdrive - resource_chain: - - configs - method: get - patch: - description: >- - Patches and returns the specified Hyperdrive configuration. Custom - caching settings are not kept if caching is disabled. - operationId: patch-hyperdrive - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: The unique identifier of the Hyperdrive configuration. - in: path - name: hyperdrive_id - schema: - $ref: '#/components/schemas/hyperdriveIdentifier' - required: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/hyperdriveHyperdriveConfigPatch' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/hyperdriveMessages' - messages: - $ref: '#/components/schemas/hyperdriveMessages' - result: - type: object - $ref: '#/components/schemas/hyperdriveHyperdriveConfigResponse' - success: - description: Return the status of the API call success. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Patch Hyperdrive Response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/hyperdriveApiResponseCommonFailure' - description: Patch Hyperdrive Failure Response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Patch Hyperdrive - tags: - - Hyperdrive - x-api-token-group: - - Hyperdrive Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.hyperdrive.database.update - x-stackql-sdk: - service: hyperdrive - resource_chain: - - configs - method: edit - put: - description: Updates and returns the specified Hyperdrive configuration. - operationId: update-hyperdrive - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: The unique identifier of the Hyperdrive configuration. - in: path - name: hyperdrive_id - schema: - $ref: '#/components/schemas/hyperdriveIdentifier' - required: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/hyperdriveHyperdriveConfig' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/hyperdriveMessages' - messages: - $ref: '#/components/schemas/hyperdriveMessages' - result: - type: object - $ref: '#/components/schemas/hyperdriveHyperdriveConfigResponse' - success: - description: Return the status of the API call success. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Update Hyperdrive Response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/hyperdriveApiResponseCommonFailure' - description: Update Hyperdrive Failure Response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Hyperdrive - tags: - - Hyperdrive - x-api-token-group: - - Hyperdrive Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.hyperdrive.database.update - x-stackql-sdk: - service: hyperdrive - resource_chain: - - configs - method: update -components: - schemas: - hyperdriveApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/hyperdriveMessages' - messages: - example: [] - $ref: '#/components/schemas/hyperdriveMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Return the status of the API call success. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - hyperdriveHyperdriveCaching: - type: object - properties: - disabled: - description: Set to true to disable caching of SQL responses. Default is false. - type: boolean - x-auditable: true - max_age: - description: >- - Specify the maximum duration (in seconds) items should persist in - the cache. Defaults to 60 seconds if not specified. - example: 60 - type: integer - x-auditable: true - stale_while_revalidate: - description: >- - Specify the number of seconds the cache may serve a stale response. - Defaults to 15 seconds if not specified. - example: 15 - type: integer - x-auditable: true - hyperdriveHyperdriveConfig: - properties: - caching: - $ref: '#/components/schemas/hyperdriveHyperdriveCaching' - created_on: - description: Defines the creation time of the Hyperdrive configuration. - example: '2017-01-01T00:00:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - id: - $ref: '#/components/schemas/hyperdriveIdentifier' - modified_on: - description: Defines the last modified time of the Hyperdrive configuration. - example: '2017-01-01T00:00:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - mtls: - $ref: '#/components/schemas/hyperdriveHyperdriveMtls' - name: - $ref: '#/components/schemas/hyperdriveHyperdriveName' - origin: - type: object - title: Public Database - properties: - database: - description: Set the name of your origin database. - example: postgres - type: string - x-auditable: true - password: - description: >- - Set the password needed to access your origin database. The API - never returns this write-only value. - type: string - writeOnly: true - x-sensitive: true - scheme: - $ref: '#/components/schemas/hyperdriveHyperdriveScheme' - user: - description: Set the user of your origin database. - example: postgres - type: string - x-auditable: true - host: - description: Defines the host (hostname or IP) of your origin database. - example: database.example.com - type: string - x-auditable: true - port: - description: >- - Defines the port of your origin database. Defaults to 5432 for - PostgreSQL or 3306 for MySQL if not specified. - example: 5432 - type: integer - x-auditable: true - access_client_id: - description: >- - Defines the Client ID of the Access token to use when connecting - to the origin database. - example: 0123456789abcdef0123456789abcdef.access - type: string - x-auditable: true - access_client_secret: - description: >- - Defines the Client Secret of the Access Token to use when - connecting to the origin database. The API never returns this - write-only value. - example: 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef - type: string - writeOnly: true - x-sensitive: true - service_id: - description: >- - The identifier of the Workers VPC Service to connect through. - Hyperdrive will egress through the specified VPC Service to - reach the origin database. - example: 0123456789abcdef0123456789abcdef - type: string - x-auditable: true - required: - - database - - password - - scheme - - user - origin_connection_limit: - $ref: '#/components/schemas/hyperdriveHyperdriveOriginConnectionLimit' - required: - - id - - name - - origin - type: object - hyperdriveHyperdriveConfigPatch: - properties: - caching: - $ref: '#/components/schemas/hyperdriveHyperdriveCaching' - mtls: - $ref: '#/components/schemas/hyperdriveHyperdriveMtls' - name: - $ref: '#/components/schemas/hyperdriveHyperdriveName' - origin: - type: object - title: Connection Options - properties: - database: - description: Set the name of your origin database. - example: postgres - type: string - x-auditable: true - password: - description: >- - Set the password needed to access your origin database. The API - never returns this write-only value. - type: string - writeOnly: true - x-sensitive: true - scheme: - $ref: '#/components/schemas/hyperdriveHyperdriveScheme' - user: - description: Set the user of your origin database. - example: postgres - type: string - x-auditable: true - host: - description: Defines the host (hostname or IP) of your origin database. - example: database.example.com - type: string - x-auditable: true - port: - description: >- - Defines the port of your origin database. Defaults to 5432 for - PostgreSQL or 3306 for MySQL if not specified. - example: 5432 - type: integer - x-auditable: true - access_client_id: - description: >- - Defines the Client ID of the Access token to use when connecting - to the origin database. - example: 0123456789abcdef0123456789abcdef.access - type: string - x-auditable: true - access_client_secret: - description: >- - Defines the Client Secret of the Access Token to use when - connecting to the origin database. The API never returns this - write-only value. - example: 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef - type: string - writeOnly: true - x-sensitive: true - service_id: - description: >- - The identifier of the Workers VPC Service to connect through. - Hyperdrive will egress through the specified VPC Service to - reach the origin database. - example: 0123456789abcdef0123456789abcdef - type: string - x-auditable: true - description: >- - Connect to a database through a Workers VPC Service. TLS settings - (mTLS, sslmode) cannot be configured on the Hyperdrive when using a - VPC Service origin; TLS must be managed on the VPC Service itself. - required: [] - origin_connection_limit: - $ref: '#/components/schemas/hyperdriveHyperdriveOriginConnectionLimit' - type: object - hyperdriveHyperdriveConfigResponse: - type: object - $ref: '#/components/schemas/hyperdriveHyperdriveConfig' - hyperdriveHyperdriveMtls: - description: >- - mTLS configuration for the origin connection. Cannot be used with VPC - Service origins; TLS must be managed on the VPC Service. - properties: - ca_certificate_id: - description: Define CA certificate ID obtained after uploading CA cert. - example: 00000000-0000-0000-0000-0000000000 - type: string - mtls_certificate_id: - description: Define mTLS certificate ID obtained after uploading client cert. - example: 00000000-0000-0000-0000-0000000000 - type: string - sslmode: - description: >- - Set SSL mode to 'require', 'verify-ca', or 'verify-full' to verify - the CA. - example: verify-full - type: string - title: mTLS - type: object - hyperdriveHyperdriveName: - description: >- - The name of the Hyperdrive configuration. Used to identify the - configuration in the Cloudflare dashboard and API. - example: example-hyperdrive - type: string - x-auditable: true - hyperdriveHyperdriveOriginConnectionLimit: - description: >- - The (soft) maximum number of connections the Hyperdrive is allowed to - make to the origin database. Maximum allowed: 20 for free tier accounts, - 100 for paid tier accounts. If not specified, defaults to 20 for free - tier and 60 for paid tier. Contact Cloudflare if you need a higher - limit. - example: 60 - maximum: 100 - minimum: 5 - type: integer - x-auditable: true - hyperdriveHyperdriveScheme: - description: Specifies the URL scheme used to connect to your origin database. - enum: - - postgres - - postgresql - - mysql - type: string - x-auditable: true - hyperdriveIdentifier: - description: Define configurations using a unique string identifier. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - readOnly: true - type: string - x-auditable: true - hyperdriveMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - hyperdriveResultInfo: - properties: - count: - description: Defines the total number of results for the requested service. - example: 1 - type: number - page: - description: Defines the current page within paginated list of results. - example: 1 - type: number - per_page: - description: Defines the number of results per page of results. - example: 20 - type: number - total_count: - description: Defines the total results available without any search parameters. - example: 2000 - type: number - type: object - responseInfo: - properties: - code: - minimum: 1000 - type: integer - message: - type: string - documentation_url: - type: string - source: - type: object - properties: - pointer: - type: string - required: - - code - - message - type: object - uniqueItems: true - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - configs: - id: cloudflare.hyperdrive.configs - name: configs - title: Configs - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1hyperdrive~1configs/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1hyperdrive~1configs/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1hyperdrive~1configs~1{hyperdrive_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1hyperdrive~1configs~1{hyperdrive_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1hyperdrive~1configs~1{hyperdrive_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1hyperdrive~1configs~1{hyperdrive_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/configs/methods/get' - - $ref: '#/components/x-stackQL-resources/configs/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/configs/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/configs/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/configs/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/configs/methods/update' +openapi: 3.0.3 +info: + title: hyperdrive API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/hyperdrive/configs: + get: + description: Returns a list of Hyperdrives. + operationId: list-hyperdrive + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/hyperdriveMessages' + messages: + $ref: '#/components/schemas/hyperdriveMessages' + result: + type: array + items: + $ref: '#/components/schemas/hyperdriveHyperdriveConfigResponse' + success: + description: Return the status of the API call success. + enum: + - true + type: boolean + result_info: + $ref: '#/components/schemas/hyperdriveResultInfo' + required: + - success + - errors + - messages + - result + description: List Hyperdrives Response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/hyperdriveApiResponseCommonFailure' + description: List Hyperdrives Failure Response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Hyperdrives + tags: + - Hyperdrive + x-api-token-group: + - Hyperdrive Write + - Hyperdrive Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.hyperdrive.database.list + x-stackql-sdk: + service: hyperdrive + resource_chain: + - configs + method: list + post: + description: Creates and returns a new Hyperdrive configuration. + operationId: create-hyperdrive + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + caching: + $ref: '#/components/schemas/hyperdriveHyperdriveCaching' + created_on: + description: Defines the creation time of the Hyperdrive configuration. + format: date-time + readOnly: true + type: string + x-auditable: true + id: + $ref: '#/components/schemas/hyperdriveIdentifier' + modified_on: + description: Defines the last modified time of the Hyperdrive configuration. + format: date-time + readOnly: true + type: string + x-auditable: true + mtls: + $ref: '#/components/schemas/hyperdriveHyperdriveMtls' + name: + $ref: '#/components/schemas/hyperdriveHyperdriveName' + origin: + type: object + title: Public Database + properties: + database: + description: Set the name of your origin database. + type: string + x-auditable: true + password: + description: Set the password needed to access your origin database. The API never returns this write-only value. + type: string + writeOnly: true + x-sensitive: true + scheme: + $ref: '#/components/schemas/hyperdriveHyperdriveScheme' + user: + description: Set the user of your origin database. + type: string + x-auditable: true + host: + description: Defines the host (hostname or IP) of your origin database. + type: string + x-auditable: true + port: + description: Defines the port of your origin database. Defaults to 5432 for PostgreSQL or 3306 for MySQL if not specified. + type: integer + x-auditable: true + access_client_id: + description: Defines the Client ID of the Access token to use when connecting to the origin database. + type: string + x-auditable: true + access_client_secret: + description: Defines the Client Secret of the Access Token to use when connecting to the origin database. The API never returns this write-only value. + type: string + writeOnly: true + x-sensitive: true + service_id: + description: The identifier of the Workers VPC Service to connect through. Hyperdrive will egress through the specified VPC Service to reach the origin database. + type: string + x-auditable: true + required: + - database + - password + - scheme + - user + origin_connection_limit: + $ref: '#/components/schemas/hyperdriveHyperdriveOriginConnectionLimit' + required: + - name + - origin + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/hyperdriveMessages' + messages: + $ref: '#/components/schemas/hyperdriveMessages' + result: + type: object + $ref: '#/components/schemas/hyperdriveHyperdriveConfigResponse' + success: + description: Return the status of the API call success. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Create Hyperdrive Response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/hyperdriveApiResponseCommonFailure' + description: Create Hyperdrive Failure Response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Hyperdrive + tags: + - Hyperdrive + x-api-token-group: + - Hyperdrive Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.hyperdrive.database.create + x-stackql-sdk: + service: hyperdrive + resource_chain: + - configs + method: create + /accounts/{account_id}/hyperdrive/configs/{hyperdrive_id}: + delete: + description: Deletes the specified Hyperdrive. + operationId: delete-hyperdrive + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: The unique identifier of the Hyperdrive configuration. + in: path + name: hyperdrive_id + schema: + $ref: '#/components/schemas/hyperdriveIdentifier' + required: true + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/hyperdriveMessages' + messages: + $ref: '#/components/schemas/hyperdriveMessages' + result: + type: object + nullable: true + success: + description: Return the status of the API call success. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Delete Hyperdrive Response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/hyperdriveApiResponseCommonFailure' + description: Delete Hyperdrive Failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Hyperdrive + tags: + - Hyperdrive + x-api-token-group: + - Hyperdrive Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.hyperdrive.database.delete + x-stackql-sdk: + service: hyperdrive + resource_chain: + - configs + method: delete + get: + description: Returns the specified Hyperdrive configuration. + operationId: get-hyperdrive + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: The unique identifier of the Hyperdrive configuration. + in: path + name: hyperdrive_id + schema: + $ref: '#/components/schemas/hyperdriveIdentifier' + required: true + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/hyperdriveMessages' + messages: + $ref: '#/components/schemas/hyperdriveMessages' + result: + type: object + $ref: '#/components/schemas/hyperdriveHyperdriveConfigResponse' + success: + description: Return the status of the API call success. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Get Hyperdrive Response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/hyperdriveApiResponseCommonFailure' + description: Get Hyperdrive Failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Hyperdrive + tags: + - Hyperdrive + x-api-token-group: + - Hyperdrive Write + - Hyperdrive Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.hyperdrive.database.read + x-stackql-sdk: + service: hyperdrive + resource_chain: + - configs + method: get + patch: + description: Patches and returns the specified Hyperdrive configuration. Custom caching settings are not kept if caching is disabled. + operationId: patch-hyperdrive + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: The unique identifier of the Hyperdrive configuration. + in: path + name: hyperdrive_id + schema: + $ref: '#/components/schemas/hyperdriveIdentifier' + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/hyperdriveHyperdriveConfigPatch' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/hyperdriveMessages' + messages: + $ref: '#/components/schemas/hyperdriveMessages' + result: + type: object + $ref: '#/components/schemas/hyperdriveHyperdriveConfigResponse' + success: + description: Return the status of the API call success. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Patch Hyperdrive Response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/hyperdriveApiResponseCommonFailure' + description: Patch Hyperdrive Failure Response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Patch Hyperdrive + tags: + - Hyperdrive + x-api-token-group: + - Hyperdrive Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.hyperdrive.database.update + x-stackql-sdk: + service: hyperdrive + resource_chain: + - configs + method: edit + put: + description: Updates and returns the specified Hyperdrive configuration. + operationId: update-hyperdrive + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: The unique identifier of the Hyperdrive configuration. + in: path + name: hyperdrive_id + schema: + $ref: '#/components/schemas/hyperdriveIdentifier' + required: true + requestBody: + content: + application/json: + schema: + properties: + caching: + $ref: '#/components/schemas/hyperdriveHyperdriveCaching' + created_on: + description: Defines the creation time of the Hyperdrive configuration. + format: date-time + readOnly: true + type: string + x-auditable: true + id: + $ref: '#/components/schemas/hyperdriveIdentifier' + modified_on: + description: Defines the last modified time of the Hyperdrive configuration. + format: date-time + readOnly: true + type: string + x-auditable: true + mtls: + $ref: '#/components/schemas/hyperdriveHyperdriveMtls' + name: + $ref: '#/components/schemas/hyperdriveHyperdriveName' + origin: + type: object + title: Public Database + properties: + database: + description: Set the name of your origin database. + type: string + x-auditable: true + password: + description: Set the password needed to access your origin database. The API never returns this write-only value. + type: string + writeOnly: true + x-sensitive: true + scheme: + $ref: '#/components/schemas/hyperdriveHyperdriveScheme' + user: + description: Set the user of your origin database. + type: string + x-auditable: true + host: + description: Defines the host (hostname or IP) of your origin database. + type: string + x-auditable: true + port: + description: Defines the port of your origin database. Defaults to 5432 for PostgreSQL or 3306 for MySQL if not specified. + type: integer + x-auditable: true + access_client_id: + description: Defines the Client ID of the Access token to use when connecting to the origin database. + type: string + x-auditable: true + access_client_secret: + description: Defines the Client Secret of the Access Token to use when connecting to the origin database. The API never returns this write-only value. + type: string + writeOnly: true + x-sensitive: true + service_id: + description: The identifier of the Workers VPC Service to connect through. Hyperdrive will egress through the specified VPC Service to reach the origin database. + type: string + x-auditable: true + required: + - database + - password + - scheme + - user + origin_connection_limit: + $ref: '#/components/schemas/hyperdriveHyperdriveOriginConnectionLimit' + required: + - name + - origin + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/hyperdriveMessages' + messages: + $ref: '#/components/schemas/hyperdriveMessages' + result: + type: object + $ref: '#/components/schemas/hyperdriveHyperdriveConfigResponse' + success: + description: Return the status of the API call success. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Update Hyperdrive Response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/hyperdriveApiResponseCommonFailure' + description: Update Hyperdrive Failure Response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Hyperdrive + tags: + - Hyperdrive + x-api-token-group: + - Hyperdrive Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.hyperdrive.database.update + x-stackql-sdk: + service: hyperdrive + resource_chain: + - configs + method: update +components: + schemas: + hyperdriveApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/hyperdriveMessages' + messages: + example: [] + $ref: '#/components/schemas/hyperdriveMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Return the status of the API call success. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + hyperdriveHyperdriveCaching: + type: object + properties: + disabled: + description: Set to true to disable caching of SQL responses. Default is false. + type: boolean + x-auditable: true + max_age: + description: Specify the maximum duration (in seconds) items should persist in the cache. Defaults to 60 seconds if not specified. + example: 60 + type: integer + x-auditable: true + stale_while_revalidate: + description: Specify the number of seconds the cache may serve a stale response. Defaults to 15 seconds if not specified. + example: 15 + type: integer + x-auditable: true + hyperdriveHyperdriveConfig: + properties: + caching: + $ref: '#/components/schemas/hyperdriveHyperdriveCaching' + created_on: + description: Defines the creation time of the Hyperdrive configuration. + example: '2017-01-01T00:00:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + id: + $ref: '#/components/schemas/hyperdriveIdentifier' + modified_on: + description: Defines the last modified time of the Hyperdrive configuration. + example: '2017-01-01T00:00:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + mtls: + $ref: '#/components/schemas/hyperdriveHyperdriveMtls' + name: + $ref: '#/components/schemas/hyperdriveHyperdriveName' + origin: + type: object + title: Public Database + properties: + database: + description: Set the name of your origin database. + example: postgres + type: string + x-auditable: true + password: + description: Set the password needed to access your origin database. The API never returns this write-only value. + type: string + writeOnly: true + x-sensitive: true + scheme: + $ref: '#/components/schemas/hyperdriveHyperdriveScheme' + user: + description: Set the user of your origin database. + example: postgres + type: string + x-auditable: true + host: + description: Defines the host (hostname or IP) of your origin database. + example: database.example.com + type: string + x-auditable: true + port: + description: Defines the port of your origin database. Defaults to 5432 for PostgreSQL or 3306 for MySQL if not specified. + example: 5432 + type: integer + x-auditable: true + access_client_id: + description: Defines the Client ID of the Access token to use when connecting to the origin database. + example: 0123456789abcdef0123456789abcdef.access + type: string + x-auditable: true + access_client_secret: + description: Defines the Client Secret of the Access Token to use when connecting to the origin database. The API never returns this write-only value. + example: 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef + type: string + writeOnly: true + x-sensitive: true + service_id: + description: The identifier of the Workers VPC Service to connect through. Hyperdrive will egress through the specified VPC Service to reach the origin database. + example: 0123456789abcdef0123456789abcdef + type: string + x-auditable: true + required: + - database + - password + - scheme + - user + origin_connection_limit: + $ref: '#/components/schemas/hyperdriveHyperdriveOriginConnectionLimit' + required: + - id + - name + - origin + type: object + hyperdriveHyperdriveConfigPatch: + properties: + caching: + $ref: '#/components/schemas/hyperdriveHyperdriveCaching' + mtls: + $ref: '#/components/schemas/hyperdriveHyperdriveMtls' + name: + $ref: '#/components/schemas/hyperdriveHyperdriveName' + origin: + type: object + title: Connection Options + properties: + database: + description: Set the name of your origin database. + example: postgres + type: string + x-auditable: true + password: + description: Set the password needed to access your origin database. The API never returns this write-only value. + type: string + writeOnly: true + x-sensitive: true + scheme: + $ref: '#/components/schemas/hyperdriveHyperdriveScheme' + user: + description: Set the user of your origin database. + example: postgres + type: string + x-auditable: true + host: + description: Defines the host (hostname or IP) of your origin database. + example: database.example.com + type: string + x-auditable: true + port: + description: Defines the port of your origin database. Defaults to 5432 for PostgreSQL or 3306 for MySQL if not specified. + example: 5432 + type: integer + x-auditable: true + access_client_id: + description: Defines the Client ID of the Access token to use when connecting to the origin database. + example: 0123456789abcdef0123456789abcdef.access + type: string + x-auditable: true + access_client_secret: + description: Defines the Client Secret of the Access Token to use when connecting to the origin database. The API never returns this write-only value. + example: 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef + type: string + writeOnly: true + x-sensitive: true + service_id: + description: The identifier of the Workers VPC Service to connect through. Hyperdrive will egress through the specified VPC Service to reach the origin database. + example: 0123456789abcdef0123456789abcdef + type: string + x-auditable: true + description: Connect to a database through a Workers VPC Service. TLS settings (mTLS, sslmode) cannot be configured on the Hyperdrive when using a VPC Service origin; TLS must be managed on the VPC Service itself. + required: [] + origin_connection_limit: + $ref: '#/components/schemas/hyperdriveHyperdriveOriginConnectionLimit' + type: object + hyperdriveHyperdriveConfigResponse: + type: object + $ref: '#/components/schemas/hyperdriveHyperdriveConfig' + hyperdriveHyperdriveMtls: + description: mTLS configuration for the origin connection. Cannot be used with VPC Service origins; TLS must be managed on the VPC Service. + properties: + ca_certificate_id: + description: Define CA certificate ID obtained after uploading CA cert. + example: 00000000-0000-0000-0000-0000000000 + type: string + mtls_certificate_id: + description: Define mTLS certificate ID obtained after uploading client cert. + example: 00000000-0000-0000-0000-0000000000 + type: string + sslmode: + description: Set SSL mode to 'require', 'verify-ca', or 'verify-full' to verify the CA. + example: verify-full + type: string + title: mTLS + type: object + hyperdriveHyperdriveName: + description: The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API. + example: example-hyperdrive + type: string + x-auditable: true + hyperdriveHyperdriveOriginConnectionLimit: + description: 'The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database. Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts. If not specified, defaults to 20 for free tier and 60 for paid tier. Contact Cloudflare if you need a higher limit.' + example: 60 + maximum: 100 + minimum: 5 + type: integer + x-auditable: true + hyperdriveHyperdriveScheme: + description: Specifies the URL scheme used to connect to your origin database. + enum: + - postgres + - postgresql + - mysql + type: string + x-auditable: true + hyperdriveIdentifier: + description: Define configurations using a unique string identifier. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + readOnly: true + type: string + x-auditable: true + hyperdriveMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + hyperdriveResultInfo: + properties: + count: + description: Defines the total number of results for the requested service. + example: 1 + type: number + page: + description: Defines the current page within paginated list of results. + example: 1 + type: number + per_page: + description: Defines the number of results per page of results. + example: 20 + type: number + total_count: + description: Defines the total results available without any search parameters. + example: 2000 + type: number + type: object + responseInfo: + properties: + code: + minimum: 1000 + type: integer + message: + type: string + documentation_url: + type: string + source: + type: object + properties: + pointer: + type: string + required: + - code + - message + type: object + uniqueItems: true + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + configs: + id: cloudflare.hyperdrive.configs + name: configs + title: Configs + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1hyperdrive~1configs/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1hyperdrive~1configs/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .caching }}{{ $sep }}"caching": {{ if eq (kindOf .caching) "string" }}{{ .caching }}{{ else }}{{ toJson .caching }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .mtls }}{{ $sep }}"mtls": {{ if eq (kindOf .mtls) "string" }}{{ .mtls }}{{ else }}{{ toJson .mtls }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .origin }}{{ $sep }}"origin": {{ if eq (kindOf .origin) "string" }}{{ .origin }}{{ else }}{{ toJson .origin }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .origin_connection_limit }}{{ $sep }}"origin_connection_limit": {{ toJson .origin_connection_limit }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1hyperdrive~1configs~1{hyperdrive_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1hyperdrive~1configs~1{hyperdrive_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1hyperdrive~1configs~1{hyperdrive_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .caching }}{{ $sep }}"caching": {{ if eq (kindOf .caching) "string" }}{{ .caching }}{{ else }}{{ toJson .caching }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .mtls }}{{ $sep }}"mtls": {{ if eq (kindOf .mtls) "string" }}{{ .mtls }}{{ else }}{{ toJson .mtls }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .origin }}{{ $sep }}"origin": {{ if eq (kindOf .origin) "string" }}{{ .origin }}{{ else }}{{ toJson .origin }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .origin_connection_limit }}{{ $sep }}"origin_connection_limit": {{ toJson .origin_connection_limit }}{{- $sep = "," -}}{{ end }} + + } + + ' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1hyperdrive~1configs~1{hyperdrive_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .caching }}{{ $sep }}"caching": {{ if eq (kindOf .caching) "string" }}{{ .caching }}{{ else }}{{ toJson .caching }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .mtls }}{{ $sep }}"mtls": {{ if eq (kindOf .mtls) "string" }}{{ .mtls }}{{ else }}{{ toJson .mtls }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .origin }}{{ $sep }}"origin": {{ if eq (kindOf .origin) "string" }}{{ .origin }}{{ else }}{{ toJson .origin }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .origin_connection_limit }}{{ $sep }}"origin_connection_limit": {{ toJson .origin_connection_limit }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/configs/methods/get' + - $ref: '#/components/x-stackQL-resources/configs/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/configs/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/configs/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/configs/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/configs/methods/update' diff --git a/providers/src/cloudflare/v00.00.00000/services/iam.yaml b/providers/src/cloudflare/v00.00.00000/services/iam.yaml index 87feb460..dcc6b3b0 100644 --- a/providers/src/cloudflare/v00.00.00000/services/iam.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/iam.yaml @@ -4143,6 +4143,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .scope }}{{ $sep }}"scope": {{ if eq (kindOf .scope) "string" }}{{ .scope }}{{ else }}{{ toJson .scope }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1iam~1resource_groups~1{resource_group_id}/delete' @@ -4165,6 +4180,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .scope }}{{ $sep }}"scope": {{ if eq (kindOf .scope) "string" }}{{ .scope }}{{ else }}{{ toJson .scope }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/resource_groups/methods/get' @@ -4197,6 +4227,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .policies }}{{ $sep }}"policies": {{ if eq (kindOf .policies) "string" }}{{ .policies }}{{ else }}{{ toJson .policies }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1iam~1user_groups~1{user_group_id}/delete' @@ -4219,6 +4264,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .policies }}{{ $sep }}"policies": {{ if eq (kindOf .policies) "string" }}{{ .policies }}{{ else }}{{ toJson .policies }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/user_groups/methods/get' @@ -4370,6 +4430,21 @@ components: transform: body: '[{"contents": {{ toJson . }}}]' type: golang_template_text_v0.3.0 + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .Operations }}{{ $sep }}"Operations": {{ if eq (kindOf .Operations) "string" }}{{ .Operations }}{{ else }}{{ toJson .Operations }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .schemas }}{{ $sep }}"schemas": {{ if eq (kindOf .schemas) "string" }}{{ .schemas }}{{ else }}{{ toJson .schemas }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/groups/methods/get' @@ -4497,6 +4572,31 @@ components: transform: body: '[{"contents": {{ toJson . }}}]' type: golang_template_text_v0.3.0 + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .active }}{{ $sep }}"active": {{ toJson .active }}{{- $sep = "," -}}{{ end }} + + {{- if .displayName }}{{ $sep }}"displayName": {{ toJson .displayName }}{{- $sep = "," -}}{{ end }} + + {{- if .emails }}{{ $sep }}"emails": {{ if eq (kindOf .emails) "string" }}{{ .emails }}{{ else }}{{ toJson .emails }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .externalId }}{{ $sep }}"externalId": {{ toJson .externalId }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ if eq (kindOf .name) "string" }}{{ .name }}{{ else }}{{ toJson .name }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .schemas }}{{ $sep }}"schemas": {{ if eq (kindOf .schemas) "string" }}{{ .schemas }}{{ else }}{{ toJson .schemas }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .userName }}{{ $sep }}"userName": {{ toJson .userName }}{{- $sep = "," -}}{{ end }} + + } + + ' get: operation: $ref: '#/paths/~1accounts~1{account_id}~1scim~1v2~1Users~1{user_id}/get' @@ -4520,6 +4620,21 @@ components: transform: body: '[{"contents": {{ toJson . }}}]' type: golang_template_text_v0.3.0 + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .Operations }}{{ $sep }}"Operations": {{ if eq (kindOf .Operations) "string" }}{{ .Operations }}{{ else }}{{ toJson .Operations }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .schemas }}{{ $sep }}"schemas": {{ if eq (kindOf .schemas) "string" }}{{ .schemas }}{{ else }}{{ toJson .schemas }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' scim_users_put: config: requestBodyTranslate: @@ -4533,6 +4648,31 @@ components: transform: body: '[{"contents": {{ toJson . }}}]' type: golang_template_text_v0.3.0 + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .active }}{{ $sep }}"active": {{ toJson .active }}{{- $sep = "," -}}{{ end }} + + {{- if .displayName }}{{ $sep }}"displayName": {{ toJson .displayName }}{{- $sep = "," -}}{{ end }} + + {{- if .emails }}{{ $sep }}"emails": {{ if eq (kindOf .emails) "string" }}{{ .emails }}{{ else }}{{ toJson .emails }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .externalId }}{{ $sep }}"externalId": {{ toJson .externalId }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ if eq (kindOf .name) "string" }}{{ .name }}{{ else }}{{ toJson .name }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .schemas }}{{ $sep }}"schemas": {{ if eq (kindOf .schemas) "string" }}{{ .schemas }}{{ else }}{{ toJson .schemas }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .userName }}{{ $sep }}"userName": {{ toJson .userName }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/users/methods/get' diff --git a/providers/src/cloudflare/v00.00.00000/services/images.yaml b/providers/src/cloudflare/v00.00.00000/services/images.yaml index eb96f90c..7de712c5 100644 --- a/providers/src/cloudflare/v00.00.00000/services/images.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/images.yaml @@ -1988,6 +1988,29 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .creator }}{{ $sep }}"creator": {{ toJson .creator }}{{- $sep = "," -}}{{ end }} + + {{- if .file }}{{ $sep }}"file": {{ toJson .file }}{{- $sep = "," -}}{{ end }} + + {{- if .id }}{{ $sep }}"id": {{ toJson .id }}{{- $sep = "," -}}{{ end }} + + {{- if .metadata }}{{ $sep }}"metadata": {{ if eq (kindOf .metadata) "string" }}{{ .metadata }}{{ else }}{{ toJson .metadata }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .requireSignedURLs }}{{ $sep }}"requireSignedURLs": {{ toJson .requireSignedURLs }}{{- $sep = "," -}}{{ end }} + + {{- if .url }}{{ $sep }}"url": {{ toJson .url }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1images~1v1~1{image_id}/delete' @@ -2010,6 +2033,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .creator }}{{ $sep }}"creator": {{ toJson .creator }}{{- $sep = "," -}}{{ end }} + + {{- if .metadata }}{{ $sep }}"metadata": {{ if eq (kindOf .metadata) "string" }}{{ .metadata }}{{ else }}{{ toJson .metadata }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .requireSignedURLs }}{{ $sep }}"requireSignedURLs": {{ toJson .requireSignedURLs }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/v1/methods/get' @@ -2094,6 +2134,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .id }}{{ $sep }}"id": {{ toJson .id }}{{- $sep = "," -}}{{ end }} + + {{- if .neverRequireSignedURLs }}{{ $sep }}"neverRequireSignedURLs": {{ toJson .neverRequireSignedURLs }}{{- $sep = "," -}}{{ end }} + + {{- if .options }}{{ $sep }}"options": {{ if eq (kindOf .options) "string" }}{{ .options }}{{ else }}{{ toJson .options }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1images~1v1~1variants~1{variant_id}/delete' @@ -2116,6 +2173,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .neverRequireSignedURLs }}{{ $sep }}"neverRequireSignedURLs": {{ toJson .neverRequireSignedURLs }}{{- $sep = "," -}}{{ end }} + + {{- if .options }}{{ $sep }}"options": {{ if eq (kindOf .options) "string" }}{{ .options }}{{ else }}{{ toJson .options }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/variants/methods/get' @@ -2201,6 +2273,27 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .creator }}{{ $sep }}"creator": {{ toJson .creator }}{{- $sep = "," -}}{{ end }} + + {{- if .expiry }}{{ $sep }}"expiry": {{ toJson .expiry }}{{- $sep = "," -}}{{ end }} + + {{- if .id }}{{ $sep }}"id": {{ toJson .id }}{{- $sep = "," -}}{{ end }} + + {{- if .metadata }}{{ $sep }}"metadata": {{ if eq (kindOf .metadata) "string" }}{{ .metadata }}{{ else }}{{ toJson .metadata }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .requireSignedURLs }}{{ $sep }}"requireSignedURLs": {{ toJson .requireSignedURLs }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: [] insert: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/intel.yaml b/providers/src/cloudflare/v00.00.00000/services/intel.yaml index 1aeb97ed..4cd1ae44 100644 --- a/providers/src/cloudflare/v00.00.00000/services/intel.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/intel.yaml @@ -4556,6 +4556,31 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .content_adds }}{{ $sep }}"content_adds": {{ if eq (kindOf .content_adds) "string" }}{{ .content_adds }}{{ else }}{{ toJson .content_adds }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .content_removes }}{{ $sep }}"content_removes": {{ if eq (kindOf .content_removes) "string" }}{{ .content_removes }}{{ else }}{{ toJson .content_removes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .indicator_type }}{{ $sep }}"indicator_type": {{ toJson .indicator_type }}{{- $sep = "," -}}{{ end }} + + {{- if .ip }}{{ $sep }}"ip": {{ toJson .ip }}{{- $sep = "," -}}{{ end }} + + {{- if .security_adds }}{{ $sep }}"security_adds": {{ if eq (kindOf .security_adds) "string" }}{{ .security_adds }}{{ else }}{{ toJson .security_adds }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .security_removes }}{{ $sep }}"security_removes": {{ if eq (kindOf .security_removes) "string" }}{{ .security_removes }}{{ else }}{{ toJson .security_removes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .url }}{{ $sep }}"url": {{ toJson .url }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: [] insert: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/keyless_certificates.yaml b/providers/src/cloudflare/v00.00.00000/services/keyless_certificates.yaml index 3a75d4ca..9be66e5d 100644 --- a/providers/src/cloudflare/v00.00.00000/services/keyless_certificates.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/keyless_certificates.yaml @@ -1,943 +1,938 @@ -openapi: 3.0.3 -info: - title: keyless_certificates API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /zones/{zone_id}/keyless_certificates: - get: - description: List all Keyless SSL configurations for a given zone. - operationId: keyless-ssl-for-a-zone-list-keyless-ssl-configurations - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesKeylessResponseCollection - description: List Keyless SSL Configurations response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesKeylessCertificate - type: array - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: List Keyless SSL Configurations response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Keyless SSL Configurations - tags: - - Keyless SSL for a Zone - x-api-token-group: - - SSL and Certificates Write - - SSL and Certificates Read - x-cfPermissionsRequired: - enum: - - '#ssl:read' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: keyless_certificates - resource_chain: [] - method: list - post: - description: >- - Creates a Keyless SSL configuration that allows SSL/TLS termination - without exposing private keys to Cloudflare. Keys remain on your - infrastructure. - operationId: keyless-ssl-for-a-zone-create-keyless-ssl-configuration - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - bundle_method: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesBundleMethod' - certificate: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasCertificate - host: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesHost' - name: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesNameWrite' - port: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesPort' - tunnel: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesKeylessTunnel - required: - - host - - port - - certificate - type: object - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesKeylessResponseSingle - description: Create Keyless SSL Configuration response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - $ref: >- - #/components/schemas/unnamedSchemaRefA91f0bd72ee433f010eecfdc94ccf298 - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Create Keyless SSL Configuration response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Keyless SSL Configuration - tags: - - Keyless SSL for a Zone - x-api-token-group: - - SSL and Certificates Write - x-cfPermissionsRequired: - enum: - - '#ssl:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: keyless_certificates - resource_chain: [] - method: create - /zones/{zone_id}/keyless_certificates/{keyless_certificate_id}: - delete: - description: >- - Removes a Keyless SSL configuration. SSL connections will no longer use - the keyless server for cryptographic operations. - operationId: keyless-ssl-for-a-zone-delete-keyless-ssl-configuration - parameters: - - in: path - name: keyless_certificate_id - schema: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesKeylessResponseSingleId - description: Delete Keyless SSL Configuration response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - $ref: '#/components/schemas/identifier' - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Delete Keyless SSL Configuration response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Keyless SSL Configuration - tags: - - Keyless SSL for a Zone - x-api-token-group: - - SSL and Certificates Write - x-cfPermissionsRequired: - enum: - - '#ssl:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: keyless_certificates - resource_chain: [] - method: delete - get: - description: Get details for one Keyless SSL configuration. - operationId: keyless-ssl-for-a-zone-get-keyless-ssl-configuration - parameters: - - in: path - name: keyless_certificate_id - schema: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesKeylessResponseSingle - description: Get Keyless SSL Configuration response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - $ref: >- - #/components/schemas/unnamedSchemaRefA91f0bd72ee433f010eecfdc94ccf298 - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Get Keyless SSL Configuration response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Keyless SSL Configuration - tags: - - Keyless SSL for a Zone - x-api-token-group: - - Trust and Safety Write - - Trust and Safety Read - - 'Zero Trust: PII Read' - - Zaraz Edit - - Zaraz Read - - Zaraz Admin - - 'Access: Apps and Policies Revoke' - - 'Access: Apps and Policies Write' - - 'Access: Apps and Policies Read' - - 'Access: Apps and Policies Revoke' - - 'Access: Mutual TLS Certificates Write' - - 'Access: Organizations, Identity Providers, and Groups Write' - - Zone Settings Write - - Zone Settings Read - - Zone Read - - DNS Read - - Workers Scripts Write - - Workers Scripts Read - - Zone Write - - Workers Routes Write - - Workers Routes Read - - Stream Write - - Stream Read - - SSL and Certificates Write - - SSL and Certificates Read - - Logs Write - - Logs Read - - Cache Purge - - Page Rules Write - - Page Rules Read - - Load Balancers Write - - Load Balancers Read - - Firewall Services Write - - Firewall Services Read - - DNS Write - - Apps Write - - Analytics Read - - 'Access: Apps and Policies Write' - - 'Access: Apps and Policies Read' - x-cfPermissionsRequired: - enum: - - '#ssl:read' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: keyless_certificates - resource_chain: [] - method: get - patch: - description: >- - This will update attributes of a Keyless SSL. Consists of one or more of - the following: host,name,port. - operationId: keyless-ssl-for-a-zone-edit-keyless-ssl-configuration - parameters: - - in: path - name: keyless_certificate_id - schema: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - enabled: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesEnabledWrite' - host: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesHost' - name: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesNameWrite' - port: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesPort' - tunnel: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesKeylessTunnel - type: object - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesKeylessResponseSingle - description: Edit Keyless SSL Configuration response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - $ref: >- - #/components/schemas/unnamedSchemaRefA91f0bd72ee433f010eecfdc94ccf298 - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Edit Keyless SSL Configuration response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Edit Keyless SSL Configuration - tags: - - Keyless SSL for a Zone - x-api-token-group: - - SSL and Certificates Write - x-cfPermissionsRequired: - enum: - - '#ssl:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: keyless_certificates - resource_chain: [] - method: edit -components: - schemas: - identifier: - properties: - id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - type: object - enum: - - null - tlsCertificatesAndHostnamesBase: - properties: - created_on: - description: When the Keyless SSL was created. - example: '2014-01-01T05:20:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - enabled: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesEnabled' - host: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesHost' - id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasIdentifier' - modified_on: - description: When the Keyless SSL was last modified. - example: '2014-01-01T05:20:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - name: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesName' - permissions: - description: >- - Available permissions for the Keyless SSL for the current user - requesting the item. - example: - - '#ssl:read' - - '#ssl:edit' - items: - type: string - x-auditable: true - readOnly: true - type: array - port: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesPort' - status: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasStatus' - tunnel: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessTunnel' - required: - - id - - name - - host - - port - - status - - enabled - - permissions - - created_on - - modified_on - type: object - tlsCertificatesAndHostnamesBundleMethod: - $ref: '#/components/schemas/unnamedSchemaRef16aca57bde2963201c7e6e895436c1c1' - tlsCertificatesAndHostnamesEnabled: - description: Whether or not the Keyless SSL is on or off. - example: false - readOnly: true - type: boolean - x-auditable: true - tlsCertificatesAndHostnamesEnabledWrite: - deprecated: true - description: Whether or not the Keyless SSL is on or off. - example: false - type: boolean - x-auditable: true - tlsCertificatesAndHostnamesHost: - description: The keyless SSL name. - example: example.com - format: hostname - maxLength: 253 - type: string - x-auditable: true - tlsCertificatesAndHostnamesIdentifier: - description: Identifier. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - type: string - x-auditable: true - tlsCertificatesAndHostnamesKeylessCertificate: - type: object - $ref: '#/components/schemas/tlsCertificatesAndHostnamesBase' - tlsCertificatesAndHostnamesKeylessPrivateIp: - description: Private IP of the Key Server Host - example: 10.0.0.1 - type: string - x-auditable: true - tlsCertificatesAndHostnamesKeylessResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 2000 - type: number - total_pages: - description: The number of total pages in the entire result set. - example: 100 - type: number - type: object - result: - items: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessCertificate' - type: array - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesKeylessResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - type: object - $ref: '#/components/schemas/tlsCertificatesAndHostnamesBase' - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesKeylessResponseSingleId: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - properties: - id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - type: object - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesKeylessTunnel: - description: Configuration for using Keyless SSL through a Cloudflare Tunnel - properties: - private_ip: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessPrivateIp' - vnet_id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessVnetId' - required: - - private_ip - - vnet_id - type: object - tlsCertificatesAndHostnamesKeylessVnetId: - description: Cloudflare Tunnel Virtual Network ID - example: 7365377a-85a4-4390-9480-531ef7dc7a3c - type: string - x-auditable: true - tlsCertificatesAndHostnamesMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - tlsCertificatesAndHostnamesName: - description: The keyless SSL name. - example: example.com Keyless SSL - maxLength: 180 - readOnly: true - type: string - x-auditable: true - tlsCertificatesAndHostnamesNameWrite: - description: The keyless SSL name. - example: example.com Keyless SSL - maxLength: 180 - type: string - x-auditable: true - tlsCertificatesAndHostnamesPort: - default: 24008 - description: >- - The keyless SSL port used to communicate between Cloudflare and the - client's Keyless SSL server. - example: 24008 - maxLength: 65535 - type: number - x-auditable: true - tlsCertificatesAndHostnamesSchemasCertificate: - description: The zone's SSL certificate or SSL certificate and intermediate(s). - example: |- - -----BEGIN CERTIFICATE----- - MIIDtTCCAp2gAwIBAgIJAM15n7fdxhRtMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV - BAYTAlVTMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX - aWRnaXRzIFB0eSBMdGQwHhcNMTQwMzExMTkyMTU5WhcNMTQwNDEwMTkyMTU5WjBF - MQswCQYDVQQGEwJVUzETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50 - ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB - CgKCAQEAvq3sKsHpeduJHimOK+fvQdKsI8z8A05MZyyLp2/R/GE8FjNv+hkVY1WQ - LIyTNNQH7CJecE1nbTfo8Y56S7x/rhxC6/DJ8MIulapFPnorq46KU6yRxiM0MQ3N - nTJHlHA2ozZta6YBBfVfhHWl1F0IfNbXCLKvGwWWMbCx43OfW6KTkbRnE6gFWKuO - fSO5h2u5TaWVuSIzBvYs7Vza6m+gtYAvKAJV2nSZ+eSEFPDo29corOy8+huEOUL8 - 5FAw4BFPsr1TlrlGPFitduQUHGrSL7skk1ESGza0to3bOtrodKei2s9bk5MXm7lZ - qI+WZJX4Zu9+mzZhc9pCVi8r/qlXuQIDAQABo4GnMIGkMB0GA1UdDgQWBBRvavf+ - sWM4IwKiH9X9w1vl6nUVRDB1BgNVHSMEbjBsgBRvavf+sWM4IwKiH9X9w1vl6nUV - RKFJpEcwRTELMAkGA1UEBhMCVVMxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV - BAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAM15n7fdxhRtMAwGA1UdEwQF - MAMBAf8wDQYJKoZIhvcNAQEFBQADggEBABY2ZzBaW0dMsAAT7tPJzrVWVzQx6KU4 - UEBLudIlWPlkAwTnINCWR/8eNjCCmGA4heUdHmazdpPa8RzwOmc0NT1NQqzSyktt - vTqb4iHD7+8f9MqJ9/FssCfTtqr/Qst/hGH4Wmdf1EJ/6FqYAAb5iRlPgshFZxU8 - uXtA8hWn6fK6eISD9HBdcAFToUvKNZ1BIDPvh9f95Ine8ar6yGd56TUNrHR8eHBs - ESxz5ddVR/oWRysNJ+aGAyYqHS8S/ttmC7r4XCAHqXptkHPCGRqkAhsterYhd4I8 - /cBzejUobNCjjHFbtkAL/SjxZOLW+pNkZwfeYdM8iPkD54Uua1v2tdw= - -----END CERTIFICATE----- - type: string - tlsCertificatesAndHostnamesSchemasIdentifier: - description: Keyless certificate identifier tag. - example: 4d2844d2ce78891c34d0b6c0535a291e - maxLength: 32 - readOnly: true - type: string - x-auditable: true - tlsCertificatesAndHostnamesSchemasStatus: - description: Status of the Keyless SSL. - enum: - - active - - deleted - example: active - readOnly: true - type: string - x-auditable: true - unnamedSchemaRef16aca57bde2963201c7e6e895436c1c1: - default: ubiquitous - description: >- - A ubiquitous bundle has the highest probability of being verified - everywhere, even by clients using outdated or unusual trust stores. An - optimal bundle uses the shortest chain and newest intermediates. And the - force bundle verifies the chain, but does not otherwise modify it. - enum: - - ubiquitous - - optimal - - force - example: ubiquitous - type: string - x-auditable: true - unnamedSchemaRefA91f0bd72ee433f010eecfdc94ccf298: - type: object - properties: - created_on: - description: When the Keyless SSL was created. - example: '2014-01-01T05:20:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - enabled: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesEnabled' - host: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesHost' - id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasIdentifier' - modified_on: - description: When the Keyless SSL was last modified. - example: '2014-01-01T05:20:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - name: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesName' - permissions: - description: >- - Available permissions for the Keyless SSL for the current user - requesting the item. - example: - - '#ssl:read' - - '#ssl:edit' - items: - type: string - x-auditable: true - readOnly: true - type: array - port: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesPort' - status: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasStatus' - tunnel: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessTunnel' - required: - - id - - name - - host - - port - - status - - enabled - - permissions - - created_on - - modified_on - enum: - - null - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - keyless_certificates: - id: cloudflare.keyless_certificates.keyless_certificates - name: keyless_certificates - title: Keyless Certificates - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1keyless_certificates/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1keyless_certificates/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1keyless_certificates~1{keyless_certificate_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1keyless_certificates~1{keyless_certificate_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1keyless_certificates~1{keyless_certificate_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/keyless_certificates/methods/get' - - $ref: '#/components/x-stackQL-resources/keyless_certificates/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/keyless_certificates/methods/create - update: - - $ref: '#/components/x-stackQL-resources/keyless_certificates/methods/edit' - delete: - - $ref: >- - #/components/x-stackQL-resources/keyless_certificates/methods/delete - replace: [] +openapi: 3.0.3 +info: + title: keyless_certificates API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /zones/{zone_id}/keyless_certificates: + get: + description: List all Keyless SSL configurations for a given zone. + operationId: keyless-ssl-for-a-zone-list-keyless-ssl-configurations + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessResponseCollection' + description: List Keyless SSL Configurations response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessCertificate' + type: array + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: List Keyless SSL Configurations response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Keyless SSL Configurations + tags: + - Keyless SSL for a Zone + x-api-token-group: + - SSL and Certificates Write + - SSL and Certificates Read + x-cfPermissionsRequired: + enum: + - '#ssl:read' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: keyless_certificates + resource_chain: [] + method: list + post: + description: Creates a Keyless SSL configuration that allows SSL/TLS termination without exposing private keys to Cloudflare. Keys remain on your infrastructure. + operationId: keyless-ssl-for-a-zone-create-keyless-ssl-configuration + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + bundle_method: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesBundleMethod' + certificate: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasCertificate' + host: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHost' + name: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesNameWrite' + port: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPort' + tunnel: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessTunnel' + required: + - host + - port + - certificate + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessResponseSingle' + description: Create Keyless SSL Configuration response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/unnamedSchemaRefA91f0bd72ee433f010eecfdc94ccf298' + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Create Keyless SSL Configuration response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Keyless SSL Configuration + tags: + - Keyless SSL for a Zone + x-api-token-group: + - SSL and Certificates Write + x-cfPermissionsRequired: + enum: + - '#ssl:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: keyless_certificates + resource_chain: [] + method: create + /zones/{zone_id}/keyless_certificates/{keyless_certificate_id}: + delete: + description: Removes a Keyless SSL configuration. SSL connections will no longer use the keyless server for cryptographic operations. + operationId: keyless-ssl-for-a-zone-delete-keyless-ssl-configuration + parameters: + - in: path + name: keyless_certificate_id + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessResponseSingleId' + description: Delete Keyless SSL Configuration response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/identifier' + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Delete Keyless SSL Configuration response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Keyless SSL Configuration + tags: + - Keyless SSL for a Zone + x-api-token-group: + - SSL and Certificates Write + x-cfPermissionsRequired: + enum: + - '#ssl:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: keyless_certificates + resource_chain: [] + method: delete + get: + description: Get details for one Keyless SSL configuration. + operationId: keyless-ssl-for-a-zone-get-keyless-ssl-configuration + parameters: + - in: path + name: keyless_certificate_id + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessResponseSingle' + description: Get Keyless SSL Configuration response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/unnamedSchemaRefA91f0bd72ee433f010eecfdc94ccf298' + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Get Keyless SSL Configuration response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Keyless SSL Configuration + tags: + - Keyless SSL for a Zone + x-api-token-group: + - Trust and Safety Write + - Trust and Safety Read + - 'Zero Trust: PII Read' + - Zaraz Edit + - Zaraz Read + - Zaraz Admin + - 'Access: Apps and Policies Revoke' + - 'Access: Apps and Policies Write' + - 'Access: Apps and Policies Read' + - 'Access: Apps and Policies Revoke' + - 'Access: Mutual TLS Certificates Write' + - 'Access: Organizations, Identity Providers, and Groups Write' + - Zone Settings Write + - Zone Settings Read + - Zone Read + - DNS Read + - Workers Scripts Write + - Workers Scripts Read + - Zone Write + - Workers Routes Write + - Workers Routes Read + - Stream Write + - Stream Read + - SSL and Certificates Write + - SSL and Certificates Read + - Logs Write + - Logs Read + - Cache Purge + - Page Rules Write + - Page Rules Read + - Load Balancers Write + - Load Balancers Read + - Firewall Services Write + - Firewall Services Read + - DNS Write + - Apps Write + - Analytics Read + - 'Access: Apps and Policies Write' + - 'Access: Apps and Policies Read' + x-cfPermissionsRequired: + enum: + - '#ssl:read' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: keyless_certificates + resource_chain: [] + method: get + patch: + description: 'This will update attributes of a Keyless SSL. Consists of one or more of the following: host,name,port.' + operationId: keyless-ssl-for-a-zone-edit-keyless-ssl-configuration + parameters: + - in: path + name: keyless_certificate_id + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + enabled: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesEnabledWrite' + host: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHost' + name: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesNameWrite' + port: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPort' + tunnel: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessTunnel' + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessResponseSingle' + description: Edit Keyless SSL Configuration response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/unnamedSchemaRefA91f0bd72ee433f010eecfdc94ccf298' + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Edit Keyless SSL Configuration response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Edit Keyless SSL Configuration + tags: + - Keyless SSL for a Zone + x-api-token-group: + - SSL and Certificates Write + x-cfPermissionsRequired: + enum: + - '#ssl:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: keyless_certificates + resource_chain: [] + method: edit +components: + schemas: + identifier: + properties: + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + type: object + enum: + - null + tlsCertificatesAndHostnamesBase: + properties: + created_on: + description: When the Keyless SSL was created. + example: '2014-01-01T05:20:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + enabled: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesEnabled' + host: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHost' + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasIdentifier' + modified_on: + description: When the Keyless SSL was last modified. + example: '2014-01-01T05:20:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + name: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesName' + permissions: + description: Available permissions for the Keyless SSL for the current user requesting the item. + example: + - '#ssl:read' + - '#ssl:edit' + items: + type: string + x-auditable: true + readOnly: true + type: array + port: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPort' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasStatus' + tunnel: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessTunnel' + required: + - id + - name + - host + - port + - status + - enabled + - permissions + - created_on + - modified_on + type: object + tlsCertificatesAndHostnamesBundleMethod: + $ref: '#/components/schemas/unnamedSchemaRef16aca57bde2963201c7e6e895436c1c1' + tlsCertificatesAndHostnamesEnabled: + description: Whether or not the Keyless SSL is on or off. + example: false + readOnly: true + type: boolean + x-auditable: true + tlsCertificatesAndHostnamesEnabledWrite: + deprecated: true + description: Whether or not the Keyless SSL is on or off. + example: false + type: boolean + x-auditable: true + tlsCertificatesAndHostnamesHost: + description: The keyless SSL name. + example: example.com + format: hostname + maxLength: 253 + type: string + x-auditable: true + tlsCertificatesAndHostnamesIdentifier: + description: Identifier. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + type: string + x-auditable: true + tlsCertificatesAndHostnamesKeylessCertificate: + type: object + $ref: '#/components/schemas/tlsCertificatesAndHostnamesBase' + tlsCertificatesAndHostnamesKeylessPrivateIp: + description: Private IP of the Key Server Host + example: 10.0.0.1 + type: string + x-auditable: true + tlsCertificatesAndHostnamesKeylessResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 2000 + type: number + total_pages: + description: The number of total pages in the entire result set. + example: 100 + type: number + type: object + result: + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessCertificate' + type: array + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesKeylessResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + type: object + $ref: '#/components/schemas/tlsCertificatesAndHostnamesBase' + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesKeylessResponseSingleId: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + properties: + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + type: object + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesKeylessTunnel: + description: Configuration for using Keyless SSL through a Cloudflare Tunnel + properties: + private_ip: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessPrivateIp' + vnet_id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessVnetId' + required: + - private_ip + - vnet_id + type: object + tlsCertificatesAndHostnamesKeylessVnetId: + description: Cloudflare Tunnel Virtual Network ID + example: 7365377a-85a4-4390-9480-531ef7dc7a3c + type: string + x-auditable: true + tlsCertificatesAndHostnamesMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + tlsCertificatesAndHostnamesName: + description: The keyless SSL name. + example: example.com Keyless SSL + maxLength: 180 + readOnly: true + type: string + x-auditable: true + tlsCertificatesAndHostnamesNameWrite: + description: The keyless SSL name. + example: example.com Keyless SSL + maxLength: 180 + type: string + x-auditable: true + tlsCertificatesAndHostnamesPort: + default: 24008 + description: The keyless SSL port used to communicate between Cloudflare and the client's Keyless SSL server. + example: 24008 + maxLength: 65535 + type: number + x-auditable: true + tlsCertificatesAndHostnamesSchemasCertificate: + description: The zone's SSL certificate or SSL certificate and intermediate(s). + example: '-----BEGIN CERTIFICATE----- + + MIIDtTCCAp2gAwIBAgIJAM15n7fdxhRtMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV + + BAYTAlVTMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX + + aWRnaXRzIFB0eSBMdGQwHhcNMTQwMzExMTkyMTU5WhcNMTQwNDEwMTkyMTU5WjBF + + MQswCQYDVQQGEwJVUzETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50 + + ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB + + CgKCAQEAvq3sKsHpeduJHimOK+fvQdKsI8z8A05MZyyLp2/R/GE8FjNv+hkVY1WQ + + LIyTNNQH7CJecE1nbTfo8Y56S7x/rhxC6/DJ8MIulapFPnorq46KU6yRxiM0MQ3N + + nTJHlHA2ozZta6YBBfVfhHWl1F0IfNbXCLKvGwWWMbCx43OfW6KTkbRnE6gFWKuO + + fSO5h2u5TaWVuSIzBvYs7Vza6m+gtYAvKAJV2nSZ+eSEFPDo29corOy8+huEOUL8 + + 5FAw4BFPsr1TlrlGPFitduQUHGrSL7skk1ESGza0to3bOtrodKei2s9bk5MXm7lZ + + qI+WZJX4Zu9+mzZhc9pCVi8r/qlXuQIDAQABo4GnMIGkMB0GA1UdDgQWBBRvavf+ + + sWM4IwKiH9X9w1vl6nUVRDB1BgNVHSMEbjBsgBRvavf+sWM4IwKiH9X9w1vl6nUV + + RKFJpEcwRTELMAkGA1UEBhMCVVMxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV + + BAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAM15n7fdxhRtMAwGA1UdEwQF + + MAMBAf8wDQYJKoZIhvcNAQEFBQADggEBABY2ZzBaW0dMsAAT7tPJzrVWVzQx6KU4 + + UEBLudIlWPlkAwTnINCWR/8eNjCCmGA4heUdHmazdpPa8RzwOmc0NT1NQqzSyktt + + vTqb4iHD7+8f9MqJ9/FssCfTtqr/Qst/hGH4Wmdf1EJ/6FqYAAb5iRlPgshFZxU8 + + uXtA8hWn6fK6eISD9HBdcAFToUvKNZ1BIDPvh9f95Ine8ar6yGd56TUNrHR8eHBs + + ESxz5ddVR/oWRysNJ+aGAyYqHS8S/ttmC7r4XCAHqXptkHPCGRqkAhsterYhd4I8 + + /cBzejUobNCjjHFbtkAL/SjxZOLW+pNkZwfeYdM8iPkD54Uua1v2tdw= + + -----END CERTIFICATE-----' + type: string + tlsCertificatesAndHostnamesSchemasIdentifier: + description: Keyless certificate identifier tag. + example: 4d2844d2ce78891c34d0b6c0535a291e + maxLength: 32 + readOnly: true + type: string + x-auditable: true + tlsCertificatesAndHostnamesSchemasStatus: + description: Status of the Keyless SSL. + enum: + - active + - deleted + example: active + readOnly: true + type: string + x-auditable: true + unnamedSchemaRef16aca57bde2963201c7e6e895436c1c1: + default: ubiquitous + description: A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it. + enum: + - ubiquitous + - optimal + - force + example: ubiquitous + type: string + x-auditable: true + unnamedSchemaRefA91f0bd72ee433f010eecfdc94ccf298: + type: object + properties: + created_on: + description: When the Keyless SSL was created. + example: '2014-01-01T05:20:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + enabled: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesEnabled' + host: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHost' + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasIdentifier' + modified_on: + description: When the Keyless SSL was last modified. + example: '2014-01-01T05:20:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + name: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesName' + permissions: + description: Available permissions for the Keyless SSL for the current user requesting the item. + example: + - '#ssl:read' + - '#ssl:edit' + items: + type: string + x-auditable: true + readOnly: true + type: array + port: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPort' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasStatus' + tunnel: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesKeylessTunnel' + required: + - id + - name + - host + - port + - status + - enabled + - permissions + - created_on + - modified_on + enum: + - null + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + keyless_certificates: + id: cloudflare.keyless_certificates.keyless_certificates + name: keyless_certificates + title: Keyless Certificates + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1keyless_certificates/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1keyless_certificates/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .bundle_method }}{{ $sep }}"bundle_method": {{ toJson .bundle_method }}{{- $sep = "," -}}{{ end }} + + {{- if .certificate }}{{ $sep }}"certificate": {{ toJson .certificate }}{{- $sep = "," -}}{{ end }} + + {{- if .host }}{{ $sep }}"host": {{ toJson .host }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .port }}{{ $sep }}"port": {{ toJson .port }}{{- $sep = "," -}}{{ end }} + + {{- if .tunnel }}{{ $sep }}"tunnel": {{ if eq (kindOf .tunnel) "string" }}{{ .tunnel }}{{ else }}{{ toJson .tunnel }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1keyless_certificates~1{keyless_certificate_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1keyless_certificates~1{keyless_certificate_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1keyless_certificates~1{keyless_certificate_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .host }}{{ $sep }}"host": {{ toJson .host }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .port }}{{ $sep }}"port": {{ toJson .port }}{{- $sep = "," -}}{{ end }} + + {{- if .tunnel }}{{ $sep }}"tunnel": {{ if eq (kindOf .tunnel) "string" }}{{ .tunnel }}{{ else }}{{ toJson .tunnel }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/keyless_certificates/methods/get' + - $ref: '#/components/x-stackQL-resources/keyless_certificates/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/keyless_certificates/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/keyless_certificates/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/keyless_certificates/methods/delete' + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/kv.yaml b/providers/src/cloudflare/v00.00.00000/services/kv.yaml index 2f84179c..45227a03 100644 --- a/providers/src/cloudflare/v00.00.00000/services/kv.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/kv.yaml @@ -1355,6 +1355,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .keys }}{{ $sep }}"keys": {{ if eq (kindOf .keys) "string" }}{{ .keys }}{{ else }}{{ toJson .keys }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + {{- if .withMetadata }}{{ $sep }}"withMetadata": {{ toJson .withMetadata }}{{- $sep = "," -}}{{ end }} + + } + + ' list: operation: $ref: '#/paths/~1accounts~1{account_id}~1storage~1kv~1namespaces~1{namespace_id}~1keys/get' diff --git a/providers/src/cloudflare/v00.00.00000/services/load_balancers.yaml b/providers/src/cloudflare/v00.00.00000/services/load_balancers.yaml index 9a67c0f8..38fc1ccf 100644 --- a/providers/src/cloudflare/v00.00.00000/services/load_balancers.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/load_balancers.yaml @@ -1,7762 +1,8121 @@ -openapi: 3.0.3 -info: - title: load_balancers API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/load_balancers/monitor_groups: - get: - description: List configured monitor groups. - operationId: account-load-balancer-monitor-groups-list-monitor-groups - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/loadBalancingMonitorGroupResponseCollection - description: List Monitor Groups response - 4XX: - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - items: - $ref: '#/components/schemas/loadBalancingMonitorGroup' - type: array - enum: - - null - result_info: - $ref: '#/components/schemas/loadBalancingResultInfo' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - type: object - description: List Monitor Groups response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Monitor Groups - tags: - - Account Load Balancer Monitor Groups - x-stackql-sdk: - service: load_balancers - resource_chain: - - monitor_groups - method: list - post: - description: Create a new monitor group. - operationId: account-load-balancer-monitor-groups-create-monitor-group - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorGroup' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorGroupSingleResponse' - description: Create Monitor Group response - '412': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - created_at: - description: The timestamp of when the monitor group was created - format: date-time - readOnly: true - type: string - description: - description: A short description of the monitor group - type: string - id: - $ref: '#/components/schemas/loadBalancingMonitorGroupId' - members: - description: List of monitors in this group - items: - $ref: '#/components/schemas/loadBalancingMonitorGroupMember' - type: array - updated_at: - description: >- - The timestamp of when the monitor group was last - updated - format: date-time - readOnly: true - type: string - required: - - id - - description - - members - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - type: object - description: Precondition Failed - Referenced monitor does not exist - 4XX: - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - created_at: - description: The timestamp of when the monitor group was created - format: date-time - readOnly: true - type: string - description: - description: A short description of the monitor group - type: string - id: - $ref: '#/components/schemas/loadBalancingMonitorGroupId' - members: - description: List of monitors in this group - items: - $ref: '#/components/schemas/loadBalancingMonitorGroupMember' - type: array - updated_at: - description: >- - The timestamp of when the monitor group was last - updated - format: date-time - readOnly: true - type: string - required: - - id - - description - - members - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - type: object - description: Create Monitor Group response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Monitor Group - tags: - - Account Load Balancer Monitor Groups - x-stackql-sdk: - service: load_balancers - resource_chain: - - monitor_groups - method: create - /accounts/{account_id}/load_balancers/monitor_groups/{monitor_group_id}: - delete: - description: Delete a configured monitor group. - operationId: account-load-balancer-monitor-groups-delete-monitor-group - parameters: - - in: path - name: monitor_group_id - schema: - $ref: '#/components/schemas/loadBalancingSchemasIdentifier' - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorGroupSingleResponse' - description: Delete Monitor Group response - '412': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - created_at: - description: The timestamp of when the monitor group was created - format: date-time - readOnly: true - type: string - description: - description: A short description of the monitor group - type: string - id: - $ref: '#/components/schemas/loadBalancingMonitorGroupId' - members: - description: List of monitors in this group - items: - $ref: '#/components/schemas/loadBalancingMonitorGroupMember' - type: array - updated_at: - description: >- - The timestamp of when the monitor group was last - updated - format: date-time - readOnly: true - type: string - required: - - id - - description - - members - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - type: object - description: Precondition Failed - Monitor group is in use by one or more pools - 4XX: - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - created_at: - description: The timestamp of when the monitor group was created - format: date-time - readOnly: true - type: string - description: - description: A short description of the monitor group - type: string - id: - $ref: '#/components/schemas/loadBalancingMonitorGroupId' - members: - description: List of monitors in this group - items: - $ref: '#/components/schemas/loadBalancingMonitorGroupMember' - type: array - updated_at: - description: >- - The timestamp of when the monitor group was last - updated - format: date-time - readOnly: true - type: string - required: - - id - - description - - members - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - type: object - description: Delete Monitor Group response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Monitor Group - tags: - - Account Load Balancer Monitor Groups - x-stackql-sdk: - service: load_balancers - resource_chain: - - monitor_groups - method: delete - get: - description: Fetch a single configured monitor group. - operationId: account-load-balancer-monitor-groups-monitor-group-details - parameters: - - in: path - name: monitor_group_id - schema: - $ref: '#/components/schemas/loadBalancingSchemasIdentifier' - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorGroupSingleResponse' - description: Monitor Group Details response - 4XX: - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - created_at: - description: The timestamp of when the monitor group was created - format: date-time - readOnly: true - type: string - description: - description: A short description of the monitor group - type: string - id: - $ref: '#/components/schemas/loadBalancingMonitorGroupId' - members: - description: List of monitors in this group - items: - $ref: '#/components/schemas/loadBalancingMonitorGroupMember' - type: array - updated_at: - description: >- - The timestamp of when the monitor group was last - updated - format: date-time - readOnly: true - type: string - required: - - id - - description - - members - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - type: object - description: Monitor Group Details response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Monitor Group Details - tags: - - Account Load Balancer Monitor Groups - x-stackql-sdk: - service: load_balancers - resource_chain: - - monitor_groups - method: get - patch: - description: >- - Apply changes to an existing monitor group, overwriting the supplied - properties. - operationId: account-load-balancer-monitor-groups-patch-monitor-group - parameters: - - in: path - name: monitor_group_id - schema: - $ref: '#/components/schemas/loadBalancingSchemasIdentifier' - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorGroup' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorGroupSingleResponse' - description: Patch Monitor Group response - '412': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - created_at: - description: The timestamp of when the monitor group was created - format: date-time - readOnly: true - type: string - description: - description: A short description of the monitor group - type: string - id: - $ref: '#/components/schemas/loadBalancingMonitorGroupId' - members: - description: List of monitors in this group - items: - $ref: '#/components/schemas/loadBalancingMonitorGroupMember' - type: array - updated_at: - description: >- - The timestamp of when the monitor group was last - updated - format: date-time - readOnly: true - type: string - required: - - id - - description - - members - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - type: object - description: Precondition Failed - Referenced monitor does not exist - 4XX: - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - created_at: - description: The timestamp of when the monitor group was created - format: date-time - readOnly: true - type: string - description: - description: A short description of the monitor group - type: string - id: - $ref: '#/components/schemas/loadBalancingMonitorGroupId' - members: - description: List of monitors in this group - items: - $ref: '#/components/schemas/loadBalancingMonitorGroupMember' - type: array - updated_at: - description: >- - The timestamp of when the monitor group was last - updated - format: date-time - readOnly: true - type: string - required: - - id - - description - - members - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - type: object - description: Patch Monitor Group response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Patch Monitor Group - tags: - - Account Load Balancer Monitor Groups - x-stackql-sdk: - service: load_balancers - resource_chain: - - monitor_groups - method: edit - put: - description: Modify a configured monitor group. - operationId: account-load-balancer-monitor-groups-update-monitor-group - parameters: - - in: path - name: monitor_group_id - schema: - $ref: '#/components/schemas/loadBalancingSchemasIdentifier' - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorGroup' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorGroupSingleResponse' - description: Update Monitor Group response - '412': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - created_at: - description: The timestamp of when the monitor group was created - format: date-time - readOnly: true - type: string - description: - description: A short description of the monitor group - type: string - id: - $ref: '#/components/schemas/loadBalancingMonitorGroupId' - members: - description: List of monitors in this group - items: - $ref: '#/components/schemas/loadBalancingMonitorGroupMember' - type: array - updated_at: - description: >- - The timestamp of when the monitor group was last - updated - format: date-time - readOnly: true - type: string - required: - - id - - description - - members - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - type: object - description: Precondition Failed - Referenced monitor does not exist - 4XX: - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - created_at: - description: The timestamp of when the monitor group was created - format: date-time - readOnly: true - type: string - description: - description: A short description of the monitor group - type: string - id: - $ref: '#/components/schemas/loadBalancingMonitorGroupId' - members: - description: List of monitors in this group - items: - $ref: '#/components/schemas/loadBalancingMonitorGroupMember' - type: array - updated_at: - description: >- - The timestamp of when the monitor group was last - updated - format: date-time - readOnly: true - type: string - required: - - id - - description - - members - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - type: object - description: Update Monitor Group response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Monitor Group - tags: - - Account Load Balancer Monitor Groups - x-stackql-sdk: - service: load_balancers - resource_chain: - - monitor_groups - method: update - /accounts/{account_id}/load_balancers/monitor_groups/{monitor_group_id}/references: - get: - description: Get the list of resources that reference the provided monitor group. - operationId: account-load-balancer-monitor-groups-list-monitor-group-references - parameters: - - in: path - name: monitor_group_id - schema: - $ref: '#/components/schemas/loadBalancingIdentifier' - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/loadBalancingMonitorGroupReferencesResponse - description: List Monitor Group References response. - 4XX: - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - description: List of resources that reference a given monitor group. - items: - properties: - reference_type: - enum: - - '*' - - referral - - referrer - type: string - x-auditable: true - resource_id: - type: string - x-auditable: true - resource_name: - type: string - x-auditable: true - resource_type: - type: string - x-auditable: true - type: object - type: array - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - type: object - description: List Monitor Group References response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Monitor Group References - tags: - - Account Load Balancer Monitor Groups - x-stackql-sdk: - service: load_balancers - resource_chain: - - monitor_groups - - references - method: get - /accounts/{account_id}/load_balancers/monitors: - get: - description: List configured monitors for an account. - operationId: account-load-balancer-monitors-list-monitors - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorResponseCollection' - description: List Monitors response. - 4XX: - content: - application/json: - schema: - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/loadBalancingResultInfo' - result: - items: - $ref: '#/components/schemas/loadBalancingMonitor' - type: array - enum: - - null - description: List Monitors response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Monitors - tags: - - Account Load Balancer Monitors - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - - 'Load Balancing: Monitors and Pools Read' - x-stackql-sdk: - service: load_balancers - resource_chain: - - monitors - method: list - post: - description: Create a configured monitor. - operationId: account-load-balancer-monitors-create-monitor - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorEditable' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorResponseSingle' - description: Create Monitor response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - allow_insecure: - $ref: '#/components/schemas/loadBalancingAllowInsecure' - consecutive_down: - $ref: '#/components/schemas/loadBalancingConsecutiveDown' - consecutive_up: - $ref: '#/components/schemas/loadBalancingConsecutiveUp' - description: - $ref: '#/components/schemas/loadBalancingDescription' - expected_body: - $ref: '#/components/schemas/loadBalancingExpectedBody' - expected_codes: - $ref: '#/components/schemas/loadBalancingExpectedCodes' - follow_redirects: - $ref: '#/components/schemas/loadBalancingFollowRedirects' - header: - $ref: '#/components/schemas/loadBalancingHeader' - interval: - $ref: '#/components/schemas/loadBalancingInterval' - method: - $ref: '#/components/schemas/loadBalancingMethod' - path: - $ref: '#/components/schemas/loadBalancingPath' - port: - $ref: '#/components/schemas/loadBalancingPort' - probe_zone: - $ref: '#/components/schemas/loadBalancingProbeZone' - retries: - $ref: '#/components/schemas/loadBalancingRetries' - timeout: - $ref: '#/components/schemas/loadBalancingTimeout' - x-stainless-naming: - python: - method_argument: load_balancer_monitor_timeout - type: - $ref: '#/components/schemas/loadBalancingType' - created_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - id: - $ref: '#/components/schemas/loadBalancingIdentifier' - modified_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Create Monitor response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Monitor - tags: - - Account Load Balancer Monitors - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - x-stackql-sdk: - service: load_balancers - resource_chain: - - monitors - method: create - /accounts/{account_id}/load_balancers/monitors/{monitor_id}: - delete: - description: Delete a configured monitor. - operationId: account-load-balancer-monitors-delete-monitor - parameters: - - name: monitor_id - in: path - required: true - description: The Load Balancer monitor ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingIdResponse' - description: Delete Monitor response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - id: - $ref: '#/components/schemas/loadBalancingIdentifier' - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Delete Monitor response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Monitor - tags: - - Account Load Balancer Monitors - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - x-stackql-sdk: - service: load_balancers - resource_chain: - - monitors - method: delete - get: - description: List a single configured monitor for an account. - operationId: account-load-balancer-monitors-monitor-details - parameters: - - name: monitor_id - in: path - required: true - description: The Load Balancer monitor ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorResponseSingle' - description: Monitor Details response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - allow_insecure: - $ref: '#/components/schemas/loadBalancingAllowInsecure' - consecutive_down: - $ref: '#/components/schemas/loadBalancingConsecutiveDown' - consecutive_up: - $ref: '#/components/schemas/loadBalancingConsecutiveUp' - description: - $ref: '#/components/schemas/loadBalancingDescription' - expected_body: - $ref: '#/components/schemas/loadBalancingExpectedBody' - expected_codes: - $ref: '#/components/schemas/loadBalancingExpectedCodes' - follow_redirects: - $ref: '#/components/schemas/loadBalancingFollowRedirects' - header: - $ref: '#/components/schemas/loadBalancingHeader' - interval: - $ref: '#/components/schemas/loadBalancingInterval' - method: - $ref: '#/components/schemas/loadBalancingMethod' - path: - $ref: '#/components/schemas/loadBalancingPath' - port: - $ref: '#/components/schemas/loadBalancingPort' - probe_zone: - $ref: '#/components/schemas/loadBalancingProbeZone' - retries: - $ref: '#/components/schemas/loadBalancingRetries' - timeout: - $ref: '#/components/schemas/loadBalancingTimeout' - x-stainless-naming: - python: - method_argument: load_balancer_monitor_timeout - type: - $ref: '#/components/schemas/loadBalancingType' - created_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - id: - $ref: '#/components/schemas/loadBalancingIdentifier' - modified_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Monitor Details response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Monitor Details - tags: - - Account Load Balancer Monitors - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - - 'Load Balancing: Monitors and Pools Read' - x-stackql-sdk: - service: load_balancers - resource_chain: - - monitors - method: get - patch: - description: >- - Apply changes to an existing monitor, overwriting the supplied - properties. - operationId: account-load-balancer-monitors-patch-monitor - parameters: - - name: monitor_id - in: path - required: true - description: The Load Balancer monitor ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorEditable' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorResponseSingle' - description: Patch Monitor response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - allow_insecure: - $ref: '#/components/schemas/loadBalancingAllowInsecure' - consecutive_down: - $ref: '#/components/schemas/loadBalancingConsecutiveDown' - consecutive_up: - $ref: '#/components/schemas/loadBalancingConsecutiveUp' - description: - $ref: '#/components/schemas/loadBalancingDescription' - expected_body: - $ref: '#/components/schemas/loadBalancingExpectedBody' - expected_codes: - $ref: '#/components/schemas/loadBalancingExpectedCodes' - follow_redirects: - $ref: '#/components/schemas/loadBalancingFollowRedirects' - header: - $ref: '#/components/schemas/loadBalancingHeader' - interval: - $ref: '#/components/schemas/loadBalancingInterval' - method: - $ref: '#/components/schemas/loadBalancingMethod' - path: - $ref: '#/components/schemas/loadBalancingPath' - port: - $ref: '#/components/schemas/loadBalancingPort' - probe_zone: - $ref: '#/components/schemas/loadBalancingProbeZone' - retries: - $ref: '#/components/schemas/loadBalancingRetries' - timeout: - $ref: '#/components/schemas/loadBalancingTimeout' - x-stainless-naming: - python: - method_argument: load_balancer_monitor_timeout - type: - $ref: '#/components/schemas/loadBalancingType' - created_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - id: - $ref: '#/components/schemas/loadBalancingIdentifier' - modified_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Patch Monitor response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Patch Monitor - tags: - - Account Load Balancer Monitors - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - x-stackql-sdk: - service: load_balancers - resource_chain: - - monitors - method: edit - put: - description: Modify a configured monitor. - operationId: account-load-balancer-monitors-update-monitor - parameters: - - name: monitor_id - in: path - required: true - description: The Load Balancer monitor ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorEditable' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorResponseSingle' - description: Update Monitor response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - allow_insecure: - $ref: '#/components/schemas/loadBalancingAllowInsecure' - consecutive_down: - $ref: '#/components/schemas/loadBalancingConsecutiveDown' - consecutive_up: - $ref: '#/components/schemas/loadBalancingConsecutiveUp' - description: - $ref: '#/components/schemas/loadBalancingDescription' - expected_body: - $ref: '#/components/schemas/loadBalancingExpectedBody' - expected_codes: - $ref: '#/components/schemas/loadBalancingExpectedCodes' - follow_redirects: - $ref: '#/components/schemas/loadBalancingFollowRedirects' - header: - $ref: '#/components/schemas/loadBalancingHeader' - interval: - $ref: '#/components/schemas/loadBalancingInterval' - method: - $ref: '#/components/schemas/loadBalancingMethod' - path: - $ref: '#/components/schemas/loadBalancingPath' - port: - $ref: '#/components/schemas/loadBalancingPort' - probe_zone: - $ref: '#/components/schemas/loadBalancingProbeZone' - retries: - $ref: '#/components/schemas/loadBalancingRetries' - timeout: - $ref: '#/components/schemas/loadBalancingTimeout' - x-stainless-naming: - python: - method_argument: load_balancer_monitor_timeout - type: - $ref: '#/components/schemas/loadBalancingType' - created_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - id: - $ref: '#/components/schemas/loadBalancingIdentifier' - modified_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Update Monitor response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Monitor - tags: - - Account Load Balancer Monitors - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - x-stackql-sdk: - service: load_balancers - resource_chain: - - monitors - method: update - /accounts/{account_id}/load_balancers/monitors/{monitor_id}/preview: - post: - description: >- - Preview pools using the specified monitor with provided monitor details. - The returned preview_id can be used in the preview endpoint to retrieve - the results. - operationId: account-load-balancer-monitors-preview-monitor - parameters: - - name: monitor_id - in: path - required: true - description: The Load Balancer monitor ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorEditable' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingPreviewResponse' - description: Preview Monitor response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - $ref: >- - #/components/schemas/unnamedSchemaRef025497b7e63379c31929636b5186e45c - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Preview Monitor response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Preview Monitor - tags: - - Account Load Balancer Monitors - x-stackql-sdk: - service: load_balancers - resource_chain: - - monitors - - previews - method: create - /accounts/{account_id}/load_balancers/monitors/{monitor_id}/references: - get: - description: Get the list of resources that reference the provided monitor. - operationId: account-load-balancer-monitors-list-monitor-references - parameters: - - name: monitor_id - in: path - required: true - description: The Load Balancer monitor ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorReferencesResponse' - description: List Monitor References response. - 4XX: - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - description: List of resources that reference a given monitor. - items: - properties: - reference_type: - enum: - - '*' - - referral - - referrer - type: string - x-auditable: true - resource_id: - type: string - x-auditable: true - resource_name: - type: string - x-auditable: true - resource_type: - type: string - x-auditable: true - type: object - type: array - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - type: object - description: List Monitor References response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Monitor References - tags: - - Account Load Balancer Monitors - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - - 'Load Balancing: Monitors and Pools Read' - x-stackql-sdk: - service: load_balancers - resource_chain: - - monitors - - references - method: get - /accounts/{account_id}/load_balancers/pools: - get: - description: List configured pools. - operationId: account-load-balancer-pools-list-pools - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: monitor - schema: - description: >- - The ID of the Monitor to use for checking the health of origins - within this pool. - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingSchemasResponseCollection' - description: List Pools response. - 4XX: - content: - application/json: - schema: - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/loadBalancingResultInfo' - result: - items: - $ref: '#/components/schemas/loadBalancingPool' - type: array - enum: - - null - description: List Pools response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Pools - tags: - - Account Load Balancer Pools - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - - 'Load Balancing: Monitors and Pools Read' - x-stackql-sdk: - service: load_balancers - resource_chain: - - pools - method: list - patch: - description: >- - Apply changes to a number of existing pools, overwriting the supplied - properties. Pools are ordered by ascending `name`. Returns the list of - affected pools. Supports the standard pagination query parameters, - either `limit`/`offset` or `per_page`/`page`. - operationId: account-load-balancer-pools-patch-pools - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - notification_email: - $ref: >- - #/components/schemas/loadBalancingPatchPoolsNotificationEmail - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingSchemasResponseCollection' - description: Patch Pools response. - 4XX: - content: - application/json: - schema: - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/loadBalancingResultInfo' - result: - items: - $ref: '#/components/schemas/loadBalancingPool' - type: array - enum: - - null - description: Patch Pools response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Patch Pools - tags: - - Account Load Balancer Pools - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - post: - description: Create a new pool. - operationId: account-load-balancer-pools-create-pool - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - description: - $ref: '#/components/schemas/loadBalancingSchemasDescription' - enabled: - $ref: '#/components/schemas/loadBalancingEnabled' - latitude: - $ref: '#/components/schemas/loadBalancingLatitude' - load_shedding: - $ref: '#/components/schemas/loadBalancingLoadShedding' - longitude: - $ref: '#/components/schemas/loadBalancingLongitude' - minimum_origins: - $ref: '#/components/schemas/loadBalancingMinimumOrigins' - monitor: - $ref: '#/components/schemas/loadBalancingMonitorId' - monitor_group: - $ref: '#/components/schemas/loadBalancingMonitorGroupId' - name: - $ref: '#/components/schemas/loadBalancingName' - notification_email: - $ref: '#/components/schemas/loadBalancingNotificationEmail' - notification_filter: - $ref: '#/components/schemas/loadBalancingNotificationFilter' - origin_steering: - $ref: '#/components/schemas/loadBalancingOriginSteering' - origins: - $ref: '#/components/schemas/loadBalancingOrigins' - required: - - origins - - name - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingSchemasSingleResponse' - description: Create Pool response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - $ref: '#/components/schemas/loadBalancerPool' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Create Pool response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Pool - tags: - - Account Load Balancer Pools - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - x-stackql-sdk: - service: load_balancers - resource_chain: - - pools - method: create - /accounts/{account_id}/load_balancers/pools/{pool_id}: - delete: - description: Delete a configured pool. - operationId: account-load-balancer-pools-delete-pool - parameters: - - name: pool_id - in: path - required: true - description: The Load Balancer pool ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingSchemasIdResponse' - description: Delete Pool response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - id: - $ref: '#/components/schemas/loadBalancingSchemasIdentifier' - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Delete Pool response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Pool - tags: - - Account Load Balancer Pools - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - x-stackql-sdk: - service: load_balancers - resource_chain: - - pools - method: delete - get: - description: Fetch a single configured pool. - operationId: account-load-balancer-pools-pool-details - parameters: - - name: pool_id - in: path - required: true - description: The Load Balancer pool ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingSchemasSingleResponse' - description: Pool Details response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - $ref: '#/components/schemas/loadBalancerPool' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Pool Details response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Pool Details - tags: - - Account Load Balancer Pools - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - - 'Load Balancing: Monitors and Pools Read' - x-stackql-sdk: - service: load_balancers - resource_chain: - - pools - method: get - patch: - description: Apply changes to an existing pool, overwriting the supplied properties. - operationId: account-load-balancer-pools-patch-pool - parameters: - - name: pool_id - in: path - required: true - description: The Load Balancer pool ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - check_regions: - $ref: '#/components/schemas/loadBalancingCheckRegions' - description: - $ref: '#/components/schemas/loadBalancingSchemasDescription' - disabled_at: - $ref: '#/components/schemas/loadBalancingSchemasDisabledAt' - readOnly: true - enabled: - $ref: '#/components/schemas/loadBalancingEnabled' - latitude: - $ref: '#/components/schemas/loadBalancingLatitude' - load_shedding: - $ref: '#/components/schemas/loadBalancingLoadShedding' - longitude: - $ref: '#/components/schemas/loadBalancingLongitude' - minimum_origins: - $ref: '#/components/schemas/loadBalancingMinimumOrigins' - monitor: - $ref: '#/components/schemas/loadBalancingMonitorId' - monitor_group: - $ref: '#/components/schemas/loadBalancingMonitorGroupId' - name: - $ref: '#/components/schemas/loadBalancingName' - notification_email: - $ref: '#/components/schemas/loadBalancingNotificationEmail' - notification_filter: - $ref: '#/components/schemas/loadBalancingNotificationFilter' - origin_steering: - $ref: '#/components/schemas/loadBalancingOriginSteering' - origins: - $ref: '#/components/schemas/loadBalancingOrigins' - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingSchemasSingleResponse' - description: Patch Pool response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - $ref: '#/components/schemas/loadBalancerPool' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Patch Pool response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Patch Pool - tags: - - Account Load Balancer Pools - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - x-stackql-sdk: - service: load_balancers - resource_chain: - - pools - method: edit - put: - description: Modify a configured pool. - operationId: account-load-balancer-pools-update-pool - parameters: - - name: pool_id - in: path - required: true - description: The Load Balancer pool ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - check_regions: - $ref: '#/components/schemas/loadBalancingCheckRegions' - description: - $ref: '#/components/schemas/loadBalancingSchemasDescription' - disabled_at: - $ref: '#/components/schemas/loadBalancingSchemasDisabledAt' - readOnly: true - enabled: - $ref: '#/components/schemas/loadBalancingEnabled' - latitude: - $ref: '#/components/schemas/loadBalancingLatitude' - load_shedding: - $ref: '#/components/schemas/loadBalancingLoadShedding' - longitude: - $ref: '#/components/schemas/loadBalancingLongitude' - minimum_origins: - $ref: '#/components/schemas/loadBalancingMinimumOrigins' - monitor: - $ref: '#/components/schemas/loadBalancingMonitorId' - monitor_group: - $ref: '#/components/schemas/loadBalancingMonitorGroupId' - name: - $ref: '#/components/schemas/loadBalancingName' - notification_email: - $ref: '#/components/schemas/loadBalancingNotificationEmail' - notification_filter: - $ref: '#/components/schemas/loadBalancingNotificationFilter' - origin_steering: - $ref: '#/components/schemas/loadBalancingOriginSteering' - origins: - $ref: '#/components/schemas/loadBalancingOrigins' - required: - - origins - - name - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingSchemasSingleResponse' - description: Update Pool response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - $ref: '#/components/schemas/loadBalancerPool' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Update Pool response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Pool - tags: - - Account Load Balancer Pools - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - x-stackql-sdk: - service: load_balancers - resource_chain: - - pools - method: update - /accounts/{account_id}/load_balancers/pools/{pool_id}/health: - get: - description: Fetch the latest pool health status for a single pool. - operationId: account-load-balancer-pools-pool-health-details - parameters: - - name: pool_id - in: path - required: true - description: The Load Balancer pool ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingHealthDetails' - description: Pool Health Details response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - description: >- - A list of regions from which to run health checks. Null - means every Cloudflare data center. - properties: - pool_id: - description: Pool ID. - type: string - x-auditable: true - pop_health: - description: List of regions and associated health status. - properties: - healthy: - description: Whether health check in region is healthy. - type: boolean - x-auditable: true - origins: - items: - $ref: '#/components/schemas/loadBalancingOriginHealth' - type: array - type: object - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Pool Health Details response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Pool Health Details - tags: - - Account Load Balancer Pools - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - - 'Load Balancing: Monitors and Pools Read' - x-stackql-sdk: - service: load_balancers - resource_chain: - - pools - - health - method: get - /accounts/{account_id}/load_balancers/pools/{pool_id}/preview: - post: - description: >- - Preview pool health using provided monitor details. The returned - preview_id can be used in the preview endpoint to retrieve the results. - operationId: account-load-balancer-pools-preview-pool - parameters: - - name: pool_id - in: path - required: true - description: The Load Balancer pool ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorEditable' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingPreviewResponse' - description: Preview Pool response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - $ref: >- - #/components/schemas/unnamedSchemaRef025497b7e63379c31929636b5186e45c - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Preview Pool response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Preview Pool - tags: - - Account Load Balancer Pools - x-stackql-sdk: - service: load_balancers - resource_chain: - - pools - - health - method: create - /accounts/{account_id}/load_balancers/pools/{pool_id}/references: - get: - description: Get the list of resources that reference the provided pool. - operationId: account-load-balancer-pools-list-pool-references - parameters: - - name: pool_id - in: path - required: true - description: The Load Balancer pool ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingPoolsReferencesResponse' - description: List Pool References response. - 4XX: - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - description: List of resources that reference a given pool. - items: - properties: - reference_type: - enum: - - '*' - - referral - - referrer - type: string - x-auditable: true - resource_id: - type: string - x-auditable: true - resource_name: - type: string - x-auditable: true - resource_type: - type: string - x-auditable: true - type: object - type: array - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - type: object - description: List Pool References response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Pool References - tags: - - Account Load Balancer Pools - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - - 'Load Balancing: Monitors and Pools Read' - x-stackql-sdk: - service: load_balancers - resource_chain: - - pools - - references - method: get - /accounts/{account_id}/load_balancers/preview/{preview_id}: - get: - description: >- - Get the result of a previous preview operation using the provided - preview_id. - operationId: account-load-balancer-monitors-preview-result - parameters: - - in: path - name: preview_id - schema: - $ref: '#/components/schemas/loadBalancingSchemasPreviewId' - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingPreviewResultResponse' - description: Preview Result response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - description: Resulting health data from a preview operation. - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Preview Result response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Preview Result - tags: - - Account Load Balancer Monitors - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - - 'Load Balancing: Monitors and Pools Read' - x-stackql-sdk: - service: load_balancers - resource_chain: - - previews - method: get - /accounts/{account_id}/load_balancers/regions: - get: - description: List all region mappings. - operationId: load-balancer-regions-list-regions - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: subdivision_code - schema: - $ref: '#/components/schemas/loadBalancingSubdivisionCodeA2' - - in: query - name: subdivision_code_a2 - schema: - $ref: '#/components/schemas/loadBalancingSubdivisionCodeA2' - - in: query - name: country_code_a2 - schema: - description: Two-letter alpha-2 country code followed in ISO 3166-1. - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/loadBalancingRegionComponentsSchemasResponseCollection - description: List Regions response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - type: object - enum: - - null - nullable: true - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: List Regions response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Regions - tags: - - Load Balancer Regions - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - - 'Load Balancing: Monitors and Pools Read' - x-stackql-sdk: - service: load_balancers - resource_chain: - - regions - method: list - /accounts/{account_id}/load_balancers/regions/{region_id}: - get: - description: Get a single region mapping. - operationId: load-balancer-regions-get-region - parameters: - - in: path - name: region_id - schema: - $ref: '#/components/schemas/loadBalancingRegionCode' - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/loadBalancingComponentsSchemasSingleResponse - description: Get Region response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - description: A list of countries and subdivisions mapped to a region. - type: object - enum: - - null - nullable: true - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Get Region response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Region - tags: - - Load Balancer Regions - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - - 'Load Balancing: Monitors and Pools Read' - x-stackql-sdk: - service: load_balancers - resource_chain: - - regions - method: get - /accounts/{account_id}/load_balancers/search: - get: - description: Search for Load Balancing resources. - operationId: account-load-balancer-search-search-resources - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: query - schema: - default: '' - description: Search query term. - type: string - - in: query - name: references - schema: - default: '' - description: >- - The type of references to include. "*" to include both referral - and referrer references. "" to not include any reference - information. - enum: - - '' - - '*' - - referral - - referrer - type: string - - in: query - name: page - schema: - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 25 - maximum: 1000 - minimum: 1 - type: number - responses: - '200': - content: - application/json: - schema: - required: - - success - - errors - - messages - - result - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - $ref: '#/components/schemas/loadBalancingResultInfo' - result: - $ref: '#/components/schemas/loadBalancingSearch' - description: Search Resources response. - 4XX: - content: - application/json: - schema: - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/loadBalancingResultInfo' - result: - properties: - resources: - description: A list of resources matching the search query. - items: - $ref: '#/components/schemas/loadBalancingResourceReference' - type: array - type: object - enum: - - null - description: Search Resources response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Search Resources - tags: - - Account Load Balancer Search - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - - 'Load Balancing: Monitors and Pools Read' - x-stackql-sdk: - service: load_balancers - resource_chain: - - searches - method: list - /user/load_balancers/monitors: - get: - description: List configured monitors for a user. - operationId: load-balancer-monitors-list-monitors - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorResponseCollection' - description: Successful list monitors response. - 4XX: - content: - application/json: - schema: - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/loadBalancingResultInfo' - result: - items: - $ref: '#/components/schemas/loadBalancingMonitor' - type: array - enum: - - null - description: Failed list monitors response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Monitors - tags: - - Load Balancer Monitors - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - - 'Load Balancing: Monitors and Pools Read' - post: - description: Create a configured monitor. - operationId: load-balancer-monitors-create-monitor - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorEditable' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorResponseSingle' - description: Create Monitor response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - allow_insecure: - $ref: '#/components/schemas/loadBalancingAllowInsecure' - consecutive_down: - $ref: '#/components/schemas/loadBalancingConsecutiveDown' - consecutive_up: - $ref: '#/components/schemas/loadBalancingConsecutiveUp' - description: - $ref: '#/components/schemas/loadBalancingDescription' - expected_body: - $ref: '#/components/schemas/loadBalancingExpectedBody' - expected_codes: - $ref: '#/components/schemas/loadBalancingExpectedCodes' - follow_redirects: - $ref: '#/components/schemas/loadBalancingFollowRedirects' - header: - $ref: '#/components/schemas/loadBalancingHeader' - interval: - $ref: '#/components/schemas/loadBalancingInterval' - method: - $ref: '#/components/schemas/loadBalancingMethod' - path: - $ref: '#/components/schemas/loadBalancingPath' - port: - $ref: '#/components/schemas/loadBalancingPort' - probe_zone: - $ref: '#/components/schemas/loadBalancingProbeZone' - retries: - $ref: '#/components/schemas/loadBalancingRetries' - timeout: - $ref: '#/components/schemas/loadBalancingTimeout' - x-stainless-naming: - python: - method_argument: load_balancer_monitor_timeout - type: - $ref: '#/components/schemas/loadBalancingType' - created_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - id: - $ref: '#/components/schemas/loadBalancingIdentifier' - modified_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Create Monitor response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Monitor - tags: - - Load Balancer Monitors - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - /user/load_balancers/monitors/{monitor_id}: - delete: - description: Delete a configured monitor. - operationId: load-balancer-monitors-delete-monitor - parameters: - - name: monitor_id - in: path - required: true - description: The Load Balancer monitor ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingIdResponse' - description: Delete Monitor response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - id: - $ref: '#/components/schemas/loadBalancingIdentifier' - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Delete Monitor response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Monitor - tags: - - Load Balancer Monitors - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - get: - description: List a single configured monitor for a user. - operationId: load-balancer-monitors-monitor-details - parameters: - - name: monitor_id - in: path - required: true - description: The Load Balancer monitor ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorResponseSingle' - description: Monitor Details response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - allow_insecure: - $ref: '#/components/schemas/loadBalancingAllowInsecure' - consecutive_down: - $ref: '#/components/schemas/loadBalancingConsecutiveDown' - consecutive_up: - $ref: '#/components/schemas/loadBalancingConsecutiveUp' - description: - $ref: '#/components/schemas/loadBalancingDescription' - expected_body: - $ref: '#/components/schemas/loadBalancingExpectedBody' - expected_codes: - $ref: '#/components/schemas/loadBalancingExpectedCodes' - follow_redirects: - $ref: '#/components/schemas/loadBalancingFollowRedirects' - header: - $ref: '#/components/schemas/loadBalancingHeader' - interval: - $ref: '#/components/schemas/loadBalancingInterval' - method: - $ref: '#/components/schemas/loadBalancingMethod' - path: - $ref: '#/components/schemas/loadBalancingPath' - port: - $ref: '#/components/schemas/loadBalancingPort' - probe_zone: - $ref: '#/components/schemas/loadBalancingProbeZone' - retries: - $ref: '#/components/schemas/loadBalancingRetries' - timeout: - $ref: '#/components/schemas/loadBalancingTimeout' - x-stainless-naming: - python: - method_argument: load_balancer_monitor_timeout - type: - $ref: '#/components/schemas/loadBalancingType' - created_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - id: - $ref: '#/components/schemas/loadBalancingIdentifier' - modified_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Monitor Details response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Monitor Details - tags: - - Load Balancer Monitors - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - - 'Load Balancing: Monitors and Pools Read' - patch: - description: >- - Apply changes to an existing monitor, overwriting the supplied - properties. - operationId: load-balancer-monitors-patch-monitor - parameters: - - name: monitor_id - in: path - required: true - description: The Load Balancer monitor ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorEditable' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorResponseSingle' - description: Patch Monitor response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - allow_insecure: - $ref: '#/components/schemas/loadBalancingAllowInsecure' - consecutive_down: - $ref: '#/components/schemas/loadBalancingConsecutiveDown' - consecutive_up: - $ref: '#/components/schemas/loadBalancingConsecutiveUp' - description: - $ref: '#/components/schemas/loadBalancingDescription' - expected_body: - $ref: '#/components/schemas/loadBalancingExpectedBody' - expected_codes: - $ref: '#/components/schemas/loadBalancingExpectedCodes' - follow_redirects: - $ref: '#/components/schemas/loadBalancingFollowRedirects' - header: - $ref: '#/components/schemas/loadBalancingHeader' - interval: - $ref: '#/components/schemas/loadBalancingInterval' - method: - $ref: '#/components/schemas/loadBalancingMethod' - path: - $ref: '#/components/schemas/loadBalancingPath' - port: - $ref: '#/components/schemas/loadBalancingPort' - probe_zone: - $ref: '#/components/schemas/loadBalancingProbeZone' - retries: - $ref: '#/components/schemas/loadBalancingRetries' - timeout: - $ref: '#/components/schemas/loadBalancingTimeout' - x-stainless-naming: - python: - method_argument: load_balancer_monitor_timeout - type: - $ref: '#/components/schemas/loadBalancingType' - created_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - id: - $ref: '#/components/schemas/loadBalancingIdentifier' - modified_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Patch Monitor response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Patch Monitor - tags: - - Load Balancer Monitors - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - put: - description: Modify a configured monitor. - operationId: load-balancer-monitors-update-monitor - parameters: - - name: monitor_id - in: path - required: true - description: The Load Balancer monitor ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorEditable' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorResponseSingle' - description: Update Monitor response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - allow_insecure: - $ref: '#/components/schemas/loadBalancingAllowInsecure' - consecutive_down: - $ref: '#/components/schemas/loadBalancingConsecutiveDown' - consecutive_up: - $ref: '#/components/schemas/loadBalancingConsecutiveUp' - description: - $ref: '#/components/schemas/loadBalancingDescription' - expected_body: - $ref: '#/components/schemas/loadBalancingExpectedBody' - expected_codes: - $ref: '#/components/schemas/loadBalancingExpectedCodes' - follow_redirects: - $ref: '#/components/schemas/loadBalancingFollowRedirects' - header: - $ref: '#/components/schemas/loadBalancingHeader' - interval: - $ref: '#/components/schemas/loadBalancingInterval' - method: - $ref: '#/components/schemas/loadBalancingMethod' - path: - $ref: '#/components/schemas/loadBalancingPath' - port: - $ref: '#/components/schemas/loadBalancingPort' - probe_zone: - $ref: '#/components/schemas/loadBalancingProbeZone' - retries: - $ref: '#/components/schemas/loadBalancingRetries' - timeout: - $ref: '#/components/schemas/loadBalancingTimeout' - x-stainless-naming: - python: - method_argument: load_balancer_monitor_timeout - type: - $ref: '#/components/schemas/loadBalancingType' - created_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - id: - $ref: '#/components/schemas/loadBalancingIdentifier' - modified_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Update Monitor response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Monitor - tags: - - Load Balancer Monitors - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - /user/load_balancers/monitors/{monitor_id}/preview: - post: - description: >- - Preview pools using the specified monitor with provided monitor details. - The returned preview_id can be used in the preview endpoint to retrieve - the results. - operationId: load-balancer-monitors-preview-monitor - parameters: - - name: monitor_id - in: path - required: true - description: The Load Balancer monitor ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorEditable' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingPreviewResponse' - description: Preview Monitor response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - $ref: >- - #/components/schemas/unnamedSchemaRef025497b7e63379c31929636b5186e45c - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Preview Monitor response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Preview Monitor - tags: - - Load Balancer Monitors - /user/load_balancers/monitors/{monitor_id}/references: - get: - description: Get the list of resources that reference the provided monitor. - operationId: load-balancer-monitors-list-monitor-references - parameters: - - name: monitor_id - in: path - required: true - description: The Load Balancer monitor ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorReferencesResponse' - description: List Monitor References response. - 4XX: - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - description: List of resources that reference a given monitor. - items: - properties: - reference_type: - enum: - - '*' - - referral - - referrer - type: string - x-auditable: true - resource_id: - type: string - x-auditable: true - resource_name: - type: string - x-auditable: true - resource_type: - type: string - x-auditable: true - type: object - type: array - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - type: object - description: List Monitor References response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Monitor References - tags: - - Load Balancer Monitors - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - - 'Load Balancing: Monitors and Pools Read' - /user/load_balancers/pools: - get: - description: List configured pools. - operationId: load-balancer-pools-list-pools - parameters: - - in: query - name: monitor - schema: - description: >- - The ID of the Monitor to use for checking the health of origins - within this pool. - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingSchemasResponseCollection' - description: List Pools response. - 4XX: - content: - application/json: - schema: - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/loadBalancingResultInfo' - result: - items: - $ref: '#/components/schemas/loadBalancingPool' - type: array - enum: - - null - description: List Pools response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Pools - tags: - - Load Balancer Pools - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - - 'Load Balancing: Monitors and Pools Read' - patch: - description: >- - Apply changes to a number of existing pools, overwriting the supplied - properties. Pools are ordered by ascending `name`. Returns the list of - affected pools. Supports the standard pagination query parameters, - either `limit`/`offset` or `per_page`/`page`. - operationId: load-balancer-pools-patch-pools - requestBody: - content: - application/json: - schema: - properties: - notification_email: - $ref: >- - #/components/schemas/loadBalancingPatchPoolsNotificationEmail - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingSchemasResponseCollection' - description: Patch Pools response. - 4XX: - content: - application/json: - schema: - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/loadBalancingResultInfo' - result: - items: - $ref: '#/components/schemas/loadBalancingPool' - type: array - enum: - - null - description: Patch Pools response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Patch Pools - tags: - - Load Balancer Pools - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - post: - description: Create a new pool. - operationId: load-balancer-pools-create-pool - requestBody: - content: - application/json: - schema: - properties: - check_regions: - $ref: '#/components/schemas/loadBalancingCheckRegions' - description: - $ref: '#/components/schemas/loadBalancingSchemasDescription' - enabled: - $ref: '#/components/schemas/loadBalancingEnabled' - latitude: - $ref: '#/components/schemas/loadBalancingLatitude' - load_shedding: - $ref: '#/components/schemas/loadBalancingLoadShedding' - longitude: - $ref: '#/components/schemas/loadBalancingLongitude' - minimum_origins: - $ref: '#/components/schemas/loadBalancingMinimumOrigins' - monitor: - $ref: '#/components/schemas/loadBalancingMonitorId' - monitor_group: - $ref: '#/components/schemas/loadBalancingMonitorGroupId' - name: - $ref: '#/components/schemas/loadBalancingName' - networks: - $ref: '#/components/schemas/loadBalancingNetworks' - notification_email: - $ref: '#/components/schemas/loadBalancingNotificationEmail' - notification_filter: - $ref: '#/components/schemas/loadBalancingNotificationFilter' - origin_steering: - $ref: '#/components/schemas/loadBalancingOriginSteering' - origins: - $ref: '#/components/schemas/loadBalancingOrigins' - required: - - origins - - name - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingSchemasSingleResponse' - description: Create Pool response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - $ref: '#/components/schemas/loadBalancerPool' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Create Pool response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Pool - tags: - - Load Balancer Pools - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - /user/load_balancers/pools/{pool_id}: - delete: - description: Delete a configured pool. - operationId: load-balancer-pools-delete-pool - parameters: - - name: pool_id - in: path - required: true - description: The Load Balancer pool ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingSchemasIdResponse' - description: Delete Pool response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - id: - $ref: '#/components/schemas/loadBalancingSchemasIdentifier' - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Delete Pool response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Pool - tags: - - Load Balancer Pools - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - get: - description: Fetch a single configured pool. - operationId: load-balancer-pools-pool-details - parameters: - - name: pool_id - in: path - required: true - description: The Load Balancer pool ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingSchemasSingleResponse' - description: Pool Details response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - $ref: '#/components/schemas/loadBalancerPool' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Pool Details response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Pool Details - tags: - - Load Balancer Pools - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - - 'Load Balancing: Monitors and Pools Read' - patch: - description: Apply changes to an existing pool, overwriting the supplied properties. - operationId: load-balancer-pools-patch-pool - parameters: - - name: pool_id - in: path - required: true - description: The Load Balancer pool ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - check_regions: - $ref: '#/components/schemas/loadBalancingCheckRegions' - description: - $ref: '#/components/schemas/loadBalancingSchemasDescription' - disabled_at: - $ref: '#/components/schemas/loadBalancingSchemasDisabledAt' - readOnly: true - enabled: - $ref: '#/components/schemas/loadBalancingEnabled' - latitude: - $ref: '#/components/schemas/loadBalancingLatitude' - load_shedding: - $ref: '#/components/schemas/loadBalancingLoadShedding' - longitude: - $ref: '#/components/schemas/loadBalancingLongitude' - minimum_origins: - $ref: '#/components/schemas/loadBalancingMinimumOrigins' - monitor: - $ref: '#/components/schemas/loadBalancingMonitorId' - monitor_group: - $ref: '#/components/schemas/loadBalancingMonitorGroupId' - name: - $ref: '#/components/schemas/loadBalancingName' - notification_email: - $ref: '#/components/schemas/loadBalancingNotificationEmail' - notification_filter: - $ref: '#/components/schemas/loadBalancingNotificationFilter' - origin_steering: - $ref: '#/components/schemas/loadBalancingOriginSteering' - origins: - $ref: '#/components/schemas/loadBalancingOrigins' - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingSchemasSingleResponse' - description: Patch Pool response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - $ref: '#/components/schemas/loadBalancerPool' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Patch Pool response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Patch Pool - tags: - - Load Balancer Pools - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - put: - description: Modify a configured pool. - operationId: load-balancer-pools-update-pool - parameters: - - name: pool_id - in: path - required: true - description: The Load Balancer pool ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - check_regions: - $ref: '#/components/schemas/loadBalancingCheckRegions' - description: - $ref: '#/components/schemas/loadBalancingSchemasDescription' - disabled_at: - $ref: '#/components/schemas/loadBalancingSchemasDisabledAt' - readOnly: true - enabled: - $ref: '#/components/schemas/loadBalancingEnabled' - latitude: - $ref: '#/components/schemas/loadBalancingLatitude' - load_shedding: - $ref: '#/components/schemas/loadBalancingLoadShedding' - longitude: - $ref: '#/components/schemas/loadBalancingLongitude' - minimum_origins: - $ref: '#/components/schemas/loadBalancingMinimumOrigins' - monitor: - $ref: '#/components/schemas/loadBalancingMonitorId' - monitor_group: - $ref: '#/components/schemas/loadBalancingMonitorGroupId' - name: - $ref: '#/components/schemas/loadBalancingName' - networks: - $ref: '#/components/schemas/loadBalancingNetworks' - notification_email: - $ref: '#/components/schemas/loadBalancingNotificationEmail' - notification_filter: - $ref: '#/components/schemas/loadBalancingNotificationFilter' - origin_steering: - $ref: '#/components/schemas/loadBalancingOriginSteering' - origins: - $ref: '#/components/schemas/loadBalancingOrigins' - required: - - origins - - name - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingSchemasSingleResponse' - description: Update Pool response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - $ref: '#/components/schemas/loadBalancerPool' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Update Pool response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Pool - tags: - - Load Balancer Pools - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - /user/load_balancers/pools/{pool_id}/health: - get: - description: Fetch the latest pool health status for a single pool. - operationId: load-balancer-pools-pool-health-details - parameters: - - name: pool_id - in: path - required: true - description: The Load Balancer pool ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingHealthDetails' - description: Pool Health Details response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - description: >- - A list of regions from which to run health checks. Null - means every Cloudflare data center. - properties: - pool_id: - description: Pool ID. - type: string - x-auditable: true - pop_health: - description: List of regions and associated health status. - properties: - healthy: - description: Whether health check in region is healthy. - type: boolean - x-auditable: true - origins: - items: - $ref: '#/components/schemas/loadBalancingOriginHealth' - type: array - type: object - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Pool Health Details response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Pool Health Details - tags: - - Load Balancer Pools - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - - 'Load Balancing: Monitors and Pools Read' - /user/load_balancers/pools/{pool_id}/preview: - post: - description: >- - Preview pool health using provided monitor details. The returned - preview_id can be used in the preview endpoint to retrieve the results. - operationId: load-balancer-pools-preview-pool - parameters: - - name: pool_id - in: path - required: true - description: The Load Balancer pool ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingMonitorEditable' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingPreviewResponse' - description: Preview Pool response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - $ref: >- - #/components/schemas/unnamedSchemaRef025497b7e63379c31929636b5186e45c - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Preview Pool response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Preview Pool - tags: - - Load Balancer Pools - /user/load_balancers/pools/{pool_id}/references: - get: - description: Get the list of resources that reference the provided pool. - operationId: load-balancer-pools-list-pool-references - parameters: - - name: pool_id - in: path - required: true - description: The Load Balancer pool ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingPoolsReferencesResponse' - description: List Pool References response. - 4XX: - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - description: List of resources that reference a given pool. - items: - properties: - reference_type: - enum: - - '*' - - referral - - referrer - type: string - x-auditable: true - resource_id: - type: string - x-auditable: true - resource_name: - type: string - x-auditable: true - resource_type: - type: string - x-auditable: true - type: object - type: array - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - type: object - description: List Pool References response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Pool References - tags: - - Load Balancer Pools - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - - 'Load Balancing: Monitors and Pools Read' - /user/load_balancers/preview/{preview_id}: - get: - description: >- - Get the result of a previous preview operation using the provided - preview_id. - operationId: load-balancer-monitors-preview-result - parameters: - - in: path - name: preview_id - schema: - $ref: '#/components/schemas/loadBalancingPreviewId' - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingPreviewResultResponse' - description: Preview Result response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - description: Resulting health data from a preview operation. - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Preview Result response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Preview Result - tags: - - Load Balancer Monitors - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - - 'Load Balancing: Monitors and Pools Read' - /zones/{zone_id}/load_balancers: - get: - description: List configured load balancers. - operationId: load-balancers-list-load-balancers - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/loadBalancingLoadBalancerComponentsSchemasResponseCollection - description: List Load Balancers response. - 4XX: - content: - application/json: - schema: - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/loadBalancingResultInfo' - result: - items: - $ref: '#/components/schemas/loadBalancingLoadBalancer' - type: array - enum: - - null - description: List Load Balancers response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Load Balancers - tags: - - Load Balancers - x-api-token-group: - - Load Balancers Write - - Load Balancers Read - x-stackql-sdk: - service: load_balancers - resource_chain: [] - method: list - post: - description: Create a new load balancer. - operationId: load-balancers-create-load-balancer - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - adaptive_routing: - $ref: '#/components/schemas/loadBalancingAdaptiveRouting' - country_pools: - $ref: '#/components/schemas/loadBalancingCountryPools' - default_pools: - $ref: '#/components/schemas/loadBalancingDefaultPools' - description: - $ref: >- - #/components/schemas/loadBalancingComponentsSchemasDescription - fallback_pool: - $ref: '#/components/schemas/loadBalancingFallbackPool' - location_strategy: - $ref: '#/components/schemas/loadBalancingLocationStrategy' - name: - $ref: '#/components/schemas/loadBalancingComponentsSchemasName' - networks: - $ref: '#/components/schemas/loadBalancingNetworks' - pop_pools: - $ref: '#/components/schemas/loadBalancingPopPools' - proxied: - $ref: '#/components/schemas/loadBalancingProxied' - random_steering: - $ref: '#/components/schemas/loadBalancingRandomSteering' - region_pools: - $ref: '#/components/schemas/loadBalancingRegionPools' - rules: - $ref: '#/components/schemas/loadBalancingRules' - session_affinity: - $ref: '#/components/schemas/loadBalancingSessionAffinity' - session_affinity_attributes: - $ref: '#/components/schemas/loadBalancingSessionAffinityAttributes' - session_affinity_ttl: - $ref: '#/components/schemas/loadBalancingSessionAffinityTtl' - steering_policy: - $ref: '#/components/schemas/loadBalancingSteeringPolicy' - ttl: - $ref: '#/components/schemas/loadBalancingTtl' - required: - - name - - default_pools - - fallback_pool - type: object - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/loadBalancingLoadBalancerComponentsSchemasSingleResponse - description: Create Load Balancer response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - adaptive_routing: - $ref: '#/components/schemas/loadBalancingAdaptiveRouting' - country_pools: - $ref: '#/components/schemas/loadBalancingCountryPools' - created_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - default_pools: - $ref: '#/components/schemas/loadBalancingDefaultPools' - description: - $ref: >- - #/components/schemas/loadBalancingComponentsSchemasDescription - enabled: - $ref: >- - #/components/schemas/loadBalancingComponentsSchemasEnabled - fallback_pool: - $ref: '#/components/schemas/loadBalancingFallbackPool' - id: - $ref: >- - #/components/schemas/loadBalancingLoadBalancerComponentsSchemasIdentifier - location_strategy: - $ref: '#/components/schemas/loadBalancingLocationStrategy' - modified_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - name: - $ref: >- - #/components/schemas/loadBalancingComponentsSchemasName - networks: - $ref: '#/components/schemas/loadBalancingNetworks' - pop_pools: - $ref: '#/components/schemas/loadBalancingPopPools' - proxied: - $ref: '#/components/schemas/loadBalancingProxied' - random_steering: - $ref: '#/components/schemas/loadBalancingRandomSteering' - region_pools: - $ref: '#/components/schemas/loadBalancingRegionPools' - rules: - $ref: '#/components/schemas/loadBalancingRules' - session_affinity: - $ref: '#/components/schemas/loadBalancingSessionAffinity' - session_affinity_attributes: - $ref: >- - #/components/schemas/loadBalancingSessionAffinityAttributes - session_affinity_ttl: - $ref: '#/components/schemas/loadBalancingSessionAffinityTtl' - steering_policy: - $ref: '#/components/schemas/loadBalancingSteeringPolicy' - ttl: - $ref: '#/components/schemas/loadBalancingTtl' - zone_name: - $ref: >- - #/components/schemas/loadBalancingComponentsSchemasZoneName - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Create Load Balancer response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Load Balancer - tags: - - Load Balancers - x-api-token-group: - - Load Balancers Write - x-stackql-sdk: - service: load_balancers - resource_chain: [] - method: create - /zones/{zone_id}/load_balancers/{load_balancer_id}: - delete: - description: Delete a configured load balancer. - operationId: load-balancers-delete-load-balancer - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - name: load_balancer_id - in: path - required: true - description: The Load Balancer ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/loadBalancingComponentsSchemasIdResponse' - description: Delete Load Balancer response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - id: - $ref: >- - #/components/schemas/loadBalancingLoadBalancerComponentsSchemasIdentifier - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Delete Load Balancer response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Load Balancer - tags: - - Load Balancers - x-api-token-group: - - Load Balancers Write - x-stackql-sdk: - service: load_balancers - resource_chain: [] - method: delete - get: - description: Fetch a single configured load balancer. - operationId: load-balancers-load-balancer-details - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - name: load_balancer_id - in: path - required: true - description: The Load Balancer ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/loadBalancingLoadBalancerComponentsSchemasSingleResponse - description: Load Balancer Details response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - adaptive_routing: - $ref: '#/components/schemas/loadBalancingAdaptiveRouting' - country_pools: - $ref: '#/components/schemas/loadBalancingCountryPools' - created_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - default_pools: - $ref: '#/components/schemas/loadBalancingDefaultPools' - description: - $ref: >- - #/components/schemas/loadBalancingComponentsSchemasDescription - enabled: - $ref: >- - #/components/schemas/loadBalancingComponentsSchemasEnabled - fallback_pool: - $ref: '#/components/schemas/loadBalancingFallbackPool' - id: - $ref: >- - #/components/schemas/loadBalancingLoadBalancerComponentsSchemasIdentifier - location_strategy: - $ref: '#/components/schemas/loadBalancingLocationStrategy' - modified_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - name: - $ref: >- - #/components/schemas/loadBalancingComponentsSchemasName - networks: - $ref: '#/components/schemas/loadBalancingNetworks' - pop_pools: - $ref: '#/components/schemas/loadBalancingPopPools' - proxied: - $ref: '#/components/schemas/loadBalancingProxied' - random_steering: - $ref: '#/components/schemas/loadBalancingRandomSteering' - region_pools: - $ref: '#/components/schemas/loadBalancingRegionPools' - rules: - $ref: '#/components/schemas/loadBalancingRules' - session_affinity: - $ref: '#/components/schemas/loadBalancingSessionAffinity' - session_affinity_attributes: - $ref: >- - #/components/schemas/loadBalancingSessionAffinityAttributes - session_affinity_ttl: - $ref: '#/components/schemas/loadBalancingSessionAffinityTtl' - steering_policy: - $ref: '#/components/schemas/loadBalancingSteeringPolicy' - ttl: - $ref: '#/components/schemas/loadBalancingTtl' - zone_name: - $ref: >- - #/components/schemas/loadBalancingComponentsSchemasZoneName - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Load Balancer Details response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Load Balancer Details - tags: - - Load Balancers - x-api-token-group: - - Load Balancers Write - - Load Balancers Read - x-stackql-sdk: - service: load_balancers - resource_chain: [] - method: get - patch: - description: >- - Apply changes to an existing load balancer, overwriting the supplied - properties. - operationId: load-balancers-patch-load-balancer - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - name: load_balancer_id - in: path - required: true - description: The Load Balancer ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - adaptive_routing: - $ref: '#/components/schemas/loadBalancingAdaptiveRouting' - country_pools: - $ref: '#/components/schemas/loadBalancingCountryPools' - default_pools: - $ref: '#/components/schemas/loadBalancingDefaultPools' - description: - $ref: >- - #/components/schemas/loadBalancingComponentsSchemasDescription - enabled: - $ref: '#/components/schemas/loadBalancingComponentsSchemasEnabled' - fallback_pool: - $ref: '#/components/schemas/loadBalancingFallbackPool' - location_strategy: - $ref: '#/components/schemas/loadBalancingLocationStrategy' - name: - $ref: '#/components/schemas/loadBalancingComponentsSchemasName' - pop_pools: - $ref: '#/components/schemas/loadBalancingPopPools' - proxied: - $ref: '#/components/schemas/loadBalancingProxied' - random_steering: - $ref: '#/components/schemas/loadBalancingRandomSteering' - region_pools: - $ref: '#/components/schemas/loadBalancingRegionPools' - rules: - $ref: '#/components/schemas/loadBalancingRules' - session_affinity: - $ref: '#/components/schemas/loadBalancingSessionAffinity' - session_affinity_attributes: - $ref: '#/components/schemas/loadBalancingSessionAffinityAttributes' - session_affinity_ttl: - $ref: '#/components/schemas/loadBalancingSessionAffinityTtl' - steering_policy: - $ref: '#/components/schemas/loadBalancingSteeringPolicy' - ttl: - $ref: '#/components/schemas/loadBalancingTtl' - type: object - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/loadBalancingLoadBalancerComponentsSchemasSingleResponse - description: Patch Load Balancer response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - adaptive_routing: - $ref: '#/components/schemas/loadBalancingAdaptiveRouting' - country_pools: - $ref: '#/components/schemas/loadBalancingCountryPools' - created_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - default_pools: - $ref: '#/components/schemas/loadBalancingDefaultPools' - description: - $ref: >- - #/components/schemas/loadBalancingComponentsSchemasDescription - enabled: - $ref: >- - #/components/schemas/loadBalancingComponentsSchemasEnabled - fallback_pool: - $ref: '#/components/schemas/loadBalancingFallbackPool' - id: - $ref: >- - #/components/schemas/loadBalancingLoadBalancerComponentsSchemasIdentifier - location_strategy: - $ref: '#/components/schemas/loadBalancingLocationStrategy' - modified_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - name: - $ref: >- - #/components/schemas/loadBalancingComponentsSchemasName - networks: - $ref: '#/components/schemas/loadBalancingNetworks' - pop_pools: - $ref: '#/components/schemas/loadBalancingPopPools' - proxied: - $ref: '#/components/schemas/loadBalancingProxied' - random_steering: - $ref: '#/components/schemas/loadBalancingRandomSteering' - region_pools: - $ref: '#/components/schemas/loadBalancingRegionPools' - rules: - $ref: '#/components/schemas/loadBalancingRules' - session_affinity: - $ref: '#/components/schemas/loadBalancingSessionAffinity' - session_affinity_attributes: - $ref: >- - #/components/schemas/loadBalancingSessionAffinityAttributes - session_affinity_ttl: - $ref: '#/components/schemas/loadBalancingSessionAffinityTtl' - steering_policy: - $ref: '#/components/schemas/loadBalancingSteeringPolicy' - ttl: - $ref: '#/components/schemas/loadBalancingTtl' - zone_name: - $ref: >- - #/components/schemas/loadBalancingComponentsSchemasZoneName - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Patch Load Balancer response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Patch Load Balancer - tags: - - Load Balancers - x-api-token-group: - - Load Balancers Write - x-stackql-sdk: - service: load_balancers - resource_chain: [] - method: edit - put: - description: Update a configured load balancer. - operationId: load-balancers-update-load-balancer - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - name: load_balancer_id - in: path - required: true - description: The Load Balancer ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - adaptive_routing: - $ref: '#/components/schemas/loadBalancingAdaptiveRouting' - country_pools: - $ref: '#/components/schemas/loadBalancingCountryPools' - default_pools: - $ref: '#/components/schemas/loadBalancingDefaultPools' - description: - $ref: >- - #/components/schemas/loadBalancingComponentsSchemasDescription - enabled: - $ref: '#/components/schemas/loadBalancingComponentsSchemasEnabled' - fallback_pool: - $ref: '#/components/schemas/loadBalancingFallbackPool' - location_strategy: - $ref: '#/components/schemas/loadBalancingLocationStrategy' - name: - $ref: '#/components/schemas/loadBalancingComponentsSchemasName' - networks: - $ref: '#/components/schemas/loadBalancingNetworks' - pop_pools: - $ref: '#/components/schemas/loadBalancingPopPools' - proxied: - $ref: '#/components/schemas/loadBalancingProxied' - random_steering: - $ref: '#/components/schemas/loadBalancingRandomSteering' - region_pools: - $ref: '#/components/schemas/loadBalancingRegionPools' - rules: - $ref: '#/components/schemas/loadBalancingRules' - session_affinity: - $ref: '#/components/schemas/loadBalancingSessionAffinity' - session_affinity_attributes: - $ref: '#/components/schemas/loadBalancingSessionAffinityAttributes' - session_affinity_ttl: - $ref: '#/components/schemas/loadBalancingSessionAffinityTtl' - steering_policy: - $ref: '#/components/schemas/loadBalancingSteeringPolicy' - ttl: - $ref: '#/components/schemas/loadBalancingTtl' - required: - - name - - default_pools - - fallback_pool - type: object - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/loadBalancingLoadBalancerComponentsSchemasSingleResponse - description: Update Load Balancer response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - adaptive_routing: - $ref: '#/components/schemas/loadBalancingAdaptiveRouting' - country_pools: - $ref: '#/components/schemas/loadBalancingCountryPools' - created_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - default_pools: - $ref: '#/components/schemas/loadBalancingDefaultPools' - description: - $ref: >- - #/components/schemas/loadBalancingComponentsSchemasDescription - enabled: - $ref: >- - #/components/schemas/loadBalancingComponentsSchemasEnabled - fallback_pool: - $ref: '#/components/schemas/loadBalancingFallbackPool' - id: - $ref: >- - #/components/schemas/loadBalancingLoadBalancerComponentsSchemasIdentifier - location_strategy: - $ref: '#/components/schemas/loadBalancingLocationStrategy' - modified_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - name: - $ref: >- - #/components/schemas/loadBalancingComponentsSchemasName - networks: - $ref: '#/components/schemas/loadBalancingNetworks' - pop_pools: - $ref: '#/components/schemas/loadBalancingPopPools' - proxied: - $ref: '#/components/schemas/loadBalancingProxied' - random_steering: - $ref: '#/components/schemas/loadBalancingRandomSteering' - region_pools: - $ref: '#/components/schemas/loadBalancingRegionPools' - rules: - $ref: '#/components/schemas/loadBalancingRules' - session_affinity: - $ref: '#/components/schemas/loadBalancingSessionAffinity' - session_affinity_attributes: - $ref: >- - #/components/schemas/loadBalancingSessionAffinityAttributes - session_affinity_ttl: - $ref: '#/components/schemas/loadBalancingSessionAffinityTtl' - steering_policy: - $ref: '#/components/schemas/loadBalancingSteeringPolicy' - ttl: - $ref: '#/components/schemas/loadBalancingTtl' - zone_name: - $ref: >- - #/components/schemas/loadBalancingComponentsSchemasZoneName - type: object - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Update Load Balancer response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Load Balancer - tags: - - Load Balancers - x-api-token-group: - - Load Balancers Write - x-stackql-sdk: - service: load_balancers - resource_chain: [] - method: update -components: - schemas: - loadBalancerPool: - properties: - check_regions: - $ref: '#/components/schemas/loadBalancingCheckRegions' - created_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - description: - $ref: '#/components/schemas/loadBalancingSchemasDescription' - disabled_at: - $ref: '#/components/schemas/loadBalancingSchemasDisabledAt' - readOnly: true - enabled: - $ref: '#/components/schemas/loadBalancingEnabled' - id: - $ref: '#/components/schemas/loadBalancingSchemasIdentifier' - latitude: - $ref: '#/components/schemas/loadBalancingLatitude' - load_shedding: - $ref: '#/components/schemas/loadBalancingLoadShedding' - longitude: - $ref: '#/components/schemas/loadBalancingLongitude' - minimum_origins: - $ref: '#/components/schemas/loadBalancingMinimumOrigins' - modified_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - monitor: - $ref: '#/components/schemas/loadBalancingMonitorId' - monitor_group: - $ref: '#/components/schemas/loadBalancingMonitorGroupId' - name: - $ref: '#/components/schemas/loadBalancingName' - networks: - $ref: '#/components/schemas/loadBalancingNetworks' - notification_email: - $ref: '#/components/schemas/loadBalancingNotificationEmail' - notification_filter: - $ref: '#/components/schemas/loadBalancingNotificationFilter' - origin_steering: - $ref: '#/components/schemas/loadBalancingOriginSteering' - origins: - $ref: '#/components/schemas/loadBalancingOrigins' - type: object - enum: - - null - loadBalancingAdaptiveRouting: - description: >- - Controls features that modify the routing of requests to pools and - origins in response to dynamic conditions, such as during the interval - between active health monitoring requests. For example, zero-downtime - failover occurs immediately when an origin becomes unavailable due to - HTTP 521, 522, or 523 response codes. If there is another healthy origin - in the same pool, the request is retried once against this alternate - origin. - properties: - failover_across_pools: - default: false - description: >- - Extends zero-downtime failover of requests to healthy origins from - alternate pools, when no healthy alternate exists in the same pool, - according to the failover order defined by traffic and origin - steering. When set false (the default) zero-downtime failover will - only occur between origins within the same pool. See - `session_affinity_attributes` for control over when sessions are - broken or reassigned. - example: true - type: boolean - x-auditable: true - type: object - loadBalancingAddress: - description: >- - The IP address (IPv4 or IPv6) of the origin, or its publicly addressable - hostname. Hostnames entered here should resolve directly to the origin, - and not be a hostname proxied by Cloudflare. To set an internal/reserved - address, virtual_network_id must also be set. - example: 0.0.0.0 - type: string - x-auditable: true - loadBalancingAllowInsecure: - default: false - description: >- - Do not validate the certificate when monitor use HTTPS. This parameter - is currently only valid for HTTP and HTTPS monitors. - example: true - type: boolean - x-auditable: true - loadBalancingCheckRegions: - description: >- - A list of regions from which to run health checks. Null means every - Cloudflare data center. - example: - - WEU - - ENAM - items: - description: >- - WNAM: Western North America, ENAM: Eastern North America, WEU: Western - Europe, EEU: Eastern Europe, NSAM: Northern South America, SSAM: - Southern South America, OC: Oceania, ME: Middle East, NAF: North - Africa, SAF: South Africa, SAS: Southern Asia, SEAS: South East Asia, - NEAS: North East Asia, ALL_REGIONS: all regions (ENTERPRISE customers - only). - enum: - - WNAM - - ENAM - - WEU - - EEU - - NSAM - - SSAM - - OC - - ME - - NAF - - SAF - - SAS - - SEAS - - NEAS - - ALL_REGIONS - type: string - x-auditable: true - nullable: true - type: array - loadBalancingComponentsSchemasDescription: - description: Object description. - example: Load Balancer for www.example.com - type: string - x-auditable: true - loadBalancingComponentsSchemasEnabled: - default: true - description: Whether to enable (the default) this load balancer. - example: true - type: boolean - x-auditable: true - loadBalancingComponentsSchemasIdResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - properties: - id: - $ref: >- - #/components/schemas/loadBalancingLoadBalancerComponentsSchemasIdentifier - type: object - required: - - success - - errors - - messages - - result - loadBalancingComponentsSchemasName: - description: >- - The DNS hostname to associate with your Load Balancer. If this hostname - already exists as a DNS record in Cloudflare's DNS, the Load Balancer - will take precedence and the DNS record will not be used. - example: www.example.com - type: string - x-auditable: true - loadBalancingComponentsSchemasSingleResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - description: A list of countries and subdivisions mapped to a region. - example: - iso_standard: >- - Country and subdivision codes follow ISO 3166-1 alpha-2 and ISO - 3166-2 - regions: - - countries: - - country_code_a2: CA - country_name: Canada - country_subdivisions: - - subdivision_code_a2: AB - subdivision_name: Alberta - - subdivision_code_a2: BC - subdivision_name: British Columbia - - country_code_a2: HT - country_name: Haiti - - country_code_a2: MX - country_name: Mexico - - country_code_a2: US - country_name: United States - country_subdivisions: - - subdivision_code_a2: AZ - subdivision_name: Arizona - - subdivision_code_a2: CA - subdivision_name: California - - subdivision_code_a2: CO - subdivision_name: Colorado - - subdivision_code_a2: HI - subdivision_name: Hawaii - - subdivision_code_a2: MN - subdivision_name: Minnesota - - subdivision_code_a2: MO - subdivision_name: Missouri - - subdivision_code_a2: NV - subdivision_name: Nevada - - subdivision_code_a2: OR - subdivision_name: Oregon - - subdivision_code_a2: TX - subdivision_name: Texas - - subdivision_code_a2: UT - subdivision_name: Utah - - subdivision_code_a2: WA - subdivision_name: Washington - region_code: WNAM - type: object - required: - - success - - errors - - messages - - result - loadBalancingComponentsSchemasZoneName: - example: example.com - type: string - x-auditable: true - loadBalancingConsecutiveDown: - description: >- - To be marked unhealthy the monitored origin must fail this healthcheck N - consecutive times. - type: integer - x-auditable: true - loadBalancingConsecutiveUp: - description: >- - To be marked healthy the monitored origin must pass this healthcheck N - consecutive times. - type: integer - x-auditable: true - loadBalancingCountryPools: - description: >- - A mapping of country codes to a list of pool IDs (ordered by their - failover priority) for the given country. Any country not explicitly - defined will fall back to using the corresponding region_pool mapping if - it exists else to default_pools. - example: - GB: - - abd90f38ced07c2e2f4df50b1f61d4194 - US: - - de90f38ced07c2e2f4df50b1f61d4194 - - 00920f38ce07c2e2f4df50b1f61d4194 - type: object - loadBalancingDefaultPools: - description: >- - A list of pool IDs ordered by their failover priority. Pools defined - here are used by default, or when region_pools are not configured for a - given region. - example: - - 17b5962d775c646f3f9725cbc7a53df4 - - 9290f38c5d07c2e2f4df57b1f61d4196 - - 00920f38ce07c2e2f4df50b1f61d4194 - items: - description: A pool ID. - type: string - type: array - loadBalancingDescription: - default: '' - description: Object description. - example: Login page monitor - type: string - x-auditable: true - loadBalancingDisabledAt: - description: >- - This field shows up only if the origin is disabled. This field is set - with the time the origin was disabled. - format: date-time - readOnly: true - type: string - x-auditable: true - loadBalancingEnabled: - default: true - description: >- - Whether to enable (the default) or disable this pool. Disabled pools - will not receive traffic and are excluded from health checks. Disabling - a pool will cause any load balancers using it to failover to the next - pool (if any). - example: false - type: boolean - x-auditable: true - loadBalancingExpectedBody: - default: '' - description: >- - A case-insensitive sub-string to look for in the response body. If this - string is not found, the origin will be marked as unhealthy. This - parameter is only valid for HTTP and HTTPS monitors. - example: alive - type: string - x-auditable: true - loadBalancingExpectedCodes: - default: '' - description: >- - The expected HTTP response code or code range of the health check. This - parameter is only valid for HTTP and HTTPS monitors. - example: 2xx - type: string - x-auditable: true - loadBalancingFallbackPool: - description: The pool ID to use when all other pools are detected as unhealthy. - type: string - x-auditable: true - loadBalancingFilterOptions: - description: >- - Filter options for a particular resource type (pool or origin). Use null - to reset. - nullable: true - properties: - disable: - default: false - description: >- - If set true, disable notifications for this type of resource (pool - or origin). - nullable: true - type: boolean - x-auditable: true - x-stainless-terraform-configurability: optional - healthy: - description: >- - If present, send notifications only for this health status (e.g. - false for only DOWN events). Use null to reset (all events). - nullable: true - type: boolean - x-auditable: true - type: object - loadBalancingFollowRedirects: - default: false - description: >- - Follow redirects if returned by the origin. This parameter is only valid - for HTTP and HTTPS monitors. - example: true - type: boolean - x-auditable: true - loadBalancingHeader: - description: >- - The HTTP request headers to send in the health check. It is recommended - you set a Host header by default. The User-Agent header cannot be - overridden. This parameter is only valid for HTTP and HTTPS monitors. - example: - Host: - - example.com - X-App-ID: - - abc123 - type: object - loadBalancingHealthDetails: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - description: >- - A list of regions from which to run health checks. Null means every - Cloudflare data center. - example: - pool_id: 17b5962d775c646f3f9725cbc7a53df4 - pop_health: - Amsterdam, NL: - healthy: true - origins: - - 2001:DB8::5: - failure_reason: No failures - healthy: true - response_code: 401 - rtt: 12.1ms - properties: - pool_id: - description: Pool ID. - example: 17b5962d775c646f3f9725cbc7a53df4 - type: string - x-auditable: true - pop_health: - description: List of regions and associated health status. - properties: - healthy: - description: Whether health check in region is healthy. - example: true - type: boolean - x-auditable: true - origins: - items: - $ref: '#/components/schemas/loadBalancingOriginHealth' - type: array - type: object - type: object - required: - - success - - errors - - messages - - result - loadBalancingHost: - description: >- - The 'Host' header allows to override the hostname set in the HTTP - request. Current support is 1 'Host' header override per origin. - items: - example: example.com - type: string - x-auditable: true - type: array - loadBalancingIdResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - properties: - id: - $ref: '#/components/schemas/loadBalancingIdentifier' - type: object - required: - - success - - errors - - messages - - result - loadBalancingIdentifier: - example: f1aba936b94213e5b8dca0c0dbf1f9cc - type: string - x-auditable: true - loadBalancingInterval: - default: 60 - description: >- - The interval between each health check. Shorter intervals may improve - failover time, but will increase load on the origins as we check from - multiple locations. - type: integer - x-auditable: true - loadBalancingLatitude: - description: >- - The latitude of the data center containing the origins used in this pool - in decimal degrees. If this is set, longitude must also be set. - type: number - x-auditable: true - loadBalancingLoadBalancer: - properties: - adaptive_routing: - $ref: '#/components/schemas/loadBalancingAdaptiveRouting' - country_pools: - $ref: '#/components/schemas/loadBalancingCountryPools' - created_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - default_pools: - $ref: '#/components/schemas/loadBalancingDefaultPools' - description: - $ref: '#/components/schemas/loadBalancingComponentsSchemasDescription' - enabled: - $ref: '#/components/schemas/loadBalancingComponentsSchemasEnabled' - fallback_pool: - $ref: '#/components/schemas/loadBalancingFallbackPool' - id: - $ref: >- - #/components/schemas/loadBalancingLoadBalancerComponentsSchemasIdentifier - location_strategy: - $ref: '#/components/schemas/loadBalancingLocationStrategy' - modified_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - name: - $ref: '#/components/schemas/loadBalancingComponentsSchemasName' - networks: - $ref: '#/components/schemas/loadBalancingNetworks' - pop_pools: - $ref: '#/components/schemas/loadBalancingPopPools' - proxied: - $ref: '#/components/schemas/loadBalancingProxied' - random_steering: - $ref: '#/components/schemas/loadBalancingRandomSteering' - region_pools: - $ref: '#/components/schemas/loadBalancingRegionPools' - rules: - $ref: '#/components/schemas/loadBalancingRules' - session_affinity: - $ref: '#/components/schemas/loadBalancingSessionAffinity' - session_affinity_attributes: - $ref: '#/components/schemas/loadBalancingSessionAffinityAttributes' - session_affinity_ttl: - $ref: '#/components/schemas/loadBalancingSessionAffinityTtl' - steering_policy: - $ref: '#/components/schemas/loadBalancingSteeringPolicy' - ttl: - $ref: '#/components/schemas/loadBalancingTtl' - zone_name: - $ref: '#/components/schemas/loadBalancingComponentsSchemasZoneName' - type: object - loadBalancingLoadBalancerComponentsSchemasIdentifier: - example: 699d98642c564d2e855e9661899b7252 - type: string - x-auditable: true - loadBalancingLoadBalancerComponentsSchemasResponseCollection: - required: - - success - - errors - - messages - - result - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/loadBalancingResultInfo' - result: - items: - $ref: '#/components/schemas/loadBalancingLoadBalancer' - type: array - loadBalancingLoadBalancerComponentsSchemasSingleResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/loadBalancingLoadBalancer' - required: - - success - - errors - - messages - - result - loadBalancingLoadShedding: - description: Configures load shedding policies and percentages for the pool. - nullable: true - properties: - default_percent: - default: 0 - description: >- - The percent of traffic to shed from the pool, according to the - default policy. Applies to new sessions and traffic without session - affinity. - maximum: 100 - minimum: 0 - type: number - x-auditable: true - default_policy: - default: random - description: >- - The default policy to use when load shedding. A random policy - randomly sheds a given percent of requests. A hash policy computes a - hash over the CF-Connecting-IP address and sheds all requests - originating from a percent of IPs. - enum: - - random - - hash - type: string - x-auditable: true - session_percent: - default: 0 - description: >- - The percent of existing sessions to shed from the pool, according to - the session policy. - maximum: 100 - minimum: 0 - type: number - x-auditable: true - session_policy: - default: hash - description: >- - Only the hash policy is supported for existing sessions (to avoid - exponential decay). - enum: - - hash - type: string - x-auditable: true - type: object - x-stainless-terraform-configurability: computed_optional - loadBalancingLocationStrategy: - description: >- - Controls location-based steering for non-proxied requests. See - `steering_policy` to learn how steering is affected. - properties: - mode: - default: pop - description: >- - Determines the authoritative location when ECS is not preferred, - does not exist in the request, or its GeoIP lookup is unsuccessful. - - `"pop"`: Use the Cloudflare PoP location. - `"resolver_ip"`: Use - the DNS resolver GeoIP location. If the GeoIP lookup is - unsuccessful, use the Cloudflare PoP location. - enum: - - pop - - resolver_ip - example: resolver_ip - type: string - x-auditable: true - prefer_ecs: - default: proximity - description: >- - Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as - the authoritative location. - `"always"`: Always prefer ECS. - - `"never"`: Never prefer ECS. - `"proximity"`: Prefer ECS only when - `steering_policy="proximity"`. - `"geo"`: Prefer ECS only when - `steering_policy="geo"`. - enum: - - always - - never - - proximity - - geo - example: always - type: string - x-auditable: true - type: object - loadBalancingLongitude: - description: >- - The longitude of the data center containing the origins used in this - pool in decimal degrees. If this is set, latitude must also be set. - type: number - x-auditable: true - loadBalancingMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - loadBalancingMethod: - description: >- - The method to use for the health check. This defaults to 'GET' for - HTTP/HTTPS based checks and 'connection_established' for TCP based - health checks. - example: GET - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - loadBalancingMinimumOrigins: - default: 1 - description: >- - The minimum number of origins that must be healthy for this pool to - serve traffic. If the number of healthy origins falls below this number, - the pool will be marked unhealthy and will failover to the next - available pool. - type: integer - x-auditable: true - loadBalancingMonitor: - properties: - allow_insecure: - $ref: '#/components/schemas/loadBalancingAllowInsecure' - consecutive_down: - $ref: '#/components/schemas/loadBalancingConsecutiveDown' - consecutive_up: - $ref: '#/components/schemas/loadBalancingConsecutiveUp' - description: - $ref: '#/components/schemas/loadBalancingDescription' - expected_body: - $ref: '#/components/schemas/loadBalancingExpectedBody' - expected_codes: - $ref: '#/components/schemas/loadBalancingExpectedCodes' - follow_redirects: - $ref: '#/components/schemas/loadBalancingFollowRedirects' - header: - $ref: '#/components/schemas/loadBalancingHeader' - interval: - $ref: '#/components/schemas/loadBalancingInterval' - method: - $ref: '#/components/schemas/loadBalancingMethod' - path: - $ref: '#/components/schemas/loadBalancingPath' - port: - $ref: '#/components/schemas/loadBalancingPort' - probe_zone: - $ref: '#/components/schemas/loadBalancingProbeZone' - retries: - $ref: '#/components/schemas/loadBalancingRetries' - timeout: - $ref: '#/components/schemas/loadBalancingTimeout' - x-stainless-naming: - python: - method_argument: load_balancer_monitor_timeout - type: - $ref: '#/components/schemas/loadBalancingType' - created_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - id: - $ref: '#/components/schemas/loadBalancingIdentifier' - modified_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - type: object - loadBalancingMonitorEditable: - properties: - allow_insecure: - $ref: '#/components/schemas/loadBalancingAllowInsecure' - consecutive_down: - $ref: '#/components/schemas/loadBalancingConsecutiveDown' - consecutive_up: - $ref: '#/components/schemas/loadBalancingConsecutiveUp' - description: - $ref: '#/components/schemas/loadBalancingDescription' - expected_body: - $ref: '#/components/schemas/loadBalancingExpectedBody' - expected_codes: - $ref: '#/components/schemas/loadBalancingExpectedCodes' - follow_redirects: - $ref: '#/components/schemas/loadBalancingFollowRedirects' - header: - $ref: '#/components/schemas/loadBalancingHeader' - interval: - $ref: '#/components/schemas/loadBalancingInterval' - method: - $ref: '#/components/schemas/loadBalancingMethod' - path: - $ref: '#/components/schemas/loadBalancingPath' - port: - $ref: '#/components/schemas/loadBalancingPort' - probe_zone: - $ref: '#/components/schemas/loadBalancingProbeZone' - retries: - $ref: '#/components/schemas/loadBalancingRetries' - timeout: - $ref: '#/components/schemas/loadBalancingTimeout' - x-stainless-naming: - python: - method_argument: load_balancer_monitor_timeout - type: - $ref: '#/components/schemas/loadBalancingType' - type: object - loadBalancingMonitorGroup: - properties: - created_at: - description: The timestamp of when the monitor group was created - example: '2014-01-01T05:20:00.12345Z' - format: date-time - readOnly: true - type: string - description: - description: A short description of the monitor group - example: Primary datacenter monitors - type: string - id: - $ref: '#/components/schemas/loadBalancingMonitorGroupId' - members: - description: List of monitors in this group - items: - $ref: '#/components/schemas/loadBalancingMonitorGroupMember' - type: array - updated_at: - description: The timestamp of when the monitor group was last updated - example: '2014-01-01T05:20:00.12345Z' - format: date-time - readOnly: true - type: string - required: - - id - - description - - members - type: object - loadBalancingMonitorGroupId: - description: >- - The ID of the Monitor Group to use for checking the health of origins - within this pool. - type: string - x-auditable: true - loadBalancingMonitorGroupMember: - properties: - created_at: - description: The timestamp of when the monitor was added to the group - example: '2014-01-01T05:20:00.12345Z' - format: date-time - readOnly: true - type: string - enabled: - description: Whether this monitor is enabled in the group - example: true - type: boolean - monitor_id: - $ref: '#/components/schemas/loadBalancingMonitorId' - monitoring_only: - description: >- - Whether this monitor is used for monitoring only (does not affect - pool health) - example: false - type: boolean - must_be_healthy: - description: >- - Whether this monitor must be healthy for the pool to be considered - healthy - example: true - type: boolean - updated_at: - description: The timestamp of when the monitor group member was last updated - example: '2014-01-01T05:20:00.12345Z' - format: date-time - readOnly: true - type: string - required: - - monitor_id - - enabled - - monitoring_only - - must_be_healthy - type: object - loadBalancingMonitorGroupReferencesResponse: - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - description: List of resources that reference a given monitor group. - example: - - reference_type: referrer - resource_id: 17b5962d775c646f3f9725cbc7a53df4 - resource_name: primary-dc-1 - resource_type: pool - items: - $ref: >- - #/components/schemas/loadBalancingMonitorGroupReferencesResponse_result_item - type: array - required: - - success - - errors - - messages - - result - type: object - loadBalancingMonitorGroupReferencesResponse_result_item: - properties: - reference_type: - enum: - - '*' - - referral - - referrer - type: string - x-auditable: true - resource_id: - type: string - x-auditable: true - resource_name: - type: string - x-auditable: true - resource_type: - type: string - x-auditable: true - type: object - loadBalancingMonitorGroupResponseCollection: - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - items: - $ref: '#/components/schemas/loadBalancingMonitorGroup' - type: array - result_info: - $ref: '#/components/schemas/loadBalancingResultInfo' - required: - - success - - errors - - messages - - result - type: object - loadBalancingMonitorGroupSingleResponse: - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/loadBalancingMonitorGroup' - required: - - success - - errors - - messages - - result - type: object - loadBalancingMonitorId: - description: >- - The ID of the Monitor to use for checking the health of origins within - this pool. - type: string - x-auditable: true - loadBalancingMonitorReferencesResponse: - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - description: List of resources that reference a given monitor. - example: - - reference_type: referrer - resource_id: 17b5962d775c646f3f9725cbc7a53df4 - resource_name: primary-dc-1 - resource_type: pool - items: - $ref: >- - #/components/schemas/loadBalancingMonitorReferencesResponse_result_item - type: array - required: - - success - - errors - - messages - - result - type: object - loadBalancingMonitorReferencesResponse_result_item: - properties: - reference_type: - enum: - - '*' - - referral - - referrer - type: string - x-auditable: true - resource_id: - type: string - x-auditable: true - resource_name: - type: string - x-auditable: true - resource_type: - type: string - x-auditable: true - type: object - loadBalancingMonitorResponseCollection: - required: - - success - - errors - - messages - - result - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/loadBalancingResultInfo' - result: - items: - $ref: '#/components/schemas/loadBalancingMonitor' - type: array - loadBalancingMonitorResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/loadBalancingMonitor' - required: - - success - - errors - - messages - - result - loadBalancingName: - description: >- - A short name (tag) for the pool. Only alphanumeric characters, hyphens, - and underscores are allowed. - example: primary-dc-1 - type: string - x-auditable: true - loadBalancingNetworks: - description: List of networks where Load Balancer or Pool is enabled. - items: - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - type: array - loadBalancingNotificationEmail: - default: '' - description: >- - This field is now deprecated. It has been moved to Cloudflare's - Centralized Notification service - https://developers.cloudflare.com/fundamentals/notifications/. The email - address to send health status notifications to. This can be an - individual mailbox or a mailing list. Multiple emails can be supplied as - a comma delimited list. - example: someone@example.com,sometwo@example.com - type: string - x-auditable: true - loadBalancingNotificationFilter: - description: >- - Filter pool and origin health notifications by resource type or health - status. Use null to reset. - example: - origin: - disable: true - pool: - healthy: false - nullable: true - properties: - origin: - $ref: '#/components/schemas/loadBalancingFilterOptions' - pool: - $ref: '#/components/schemas/loadBalancingFilterOptions' - type: object - x-stainless-terraform-configurability: computed_optional - loadBalancingOrigin: - properties: - address: - $ref: '#/components/schemas/loadBalancingAddress' - disabled_at: - $ref: '#/components/schemas/loadBalancingDisabledAt' - readOnly: true - enabled: - $ref: '#/components/schemas/loadBalancingSchemasEnabled' - flatten_cname: - $ref: '#/components/schemas/loadBalancingOriginFlattenCname' - header: - $ref: '#/components/schemas/loadBalancingSchemasHeader' - name: - $ref: '#/components/schemas/loadBalancingSchemasName' - port: - $ref: '#/components/schemas/loadBalancingOriginPort' - virtual_network_id: - $ref: '#/components/schemas/loadBalancingVirtualNetworkId' - weight: - $ref: '#/components/schemas/loadBalancingWeight' - type: object - loadBalancingOriginFlattenCname: - default: true - description: >- - Whether to flatten CNAME records for this origin, resolving them to - A/AAAA records before returning to the client. When true (the default), - the director resolves CNAME addresses to their underlying A/AAAA - records. When false, the origin address is returned as a raw CNAME - record without resolution. This setting mirrors the DNS API record - flatten_cname setting. - type: boolean - loadBalancingOriginHealth: - properties: - ip: - properties: - failure_reason: - description: Failure reason. - example: No failure reasons - type: string - x-auditable: true - healthy: - description: Origin health status. - example: true - type: boolean - x-auditable: true - response_code: - description: Response code from origin health check. - example: 200 - type: number - x-auditable: true - rtt: - description: Origin RTT (Round Trip Time) response. - example: 201.5ms - type: string - x-auditable: true - type: object - type: object - loadBalancingOriginPort: - default: 0 - description: >- - The port for upstream connections. A value of 0 means the default port - for the protocol will be used. - type: integer - loadBalancingOriginSteering: - description: >- - Configures origin steering for the pool. Controls how origins are - selected for new sessions and traffic without session affinity. - nullable: true - properties: - policy: - default: random - description: >- - The type of origin steering policy to use. - `"random"`: Select an - origin randomly. - `"hash"`: Select an origin by computing a hash - over the CF-Connecting-IP address. - `"least_outstanding_requests"`: - Select an origin by taking into consideration origin weights, as - well as each origin's number of outstanding requests. Origins with - more pending requests are weighted proportionately less relative to - others. - `"least_connections"`: Select an origin by taking into - consideration origin weights, as well as each origin's number of - open connections. Origins with more open connections are weighted - proportionately less relative to others. Supported for HTTP/1 and - HTTP/2 connections. - enum: - - random - - hash - - least_outstanding_requests - - least_connections - type: string - x-auditable: true - type: object - x-stainless-terraform-configurability: computed_optional - loadBalancingOrigins: - description: >- - The list of origins within this pool. Traffic directed at this pool is - balanced across all currently healthy origins, provided the pool itself - is healthy. - items: - $ref: '#/components/schemas/loadBalancingOrigin' - type: array - x-stainless-collection-type: set - loadBalancingPatchPoolsNotificationEmail: - description: >- - The email address to send health status notifications to. This field is - now deprecated in favor of Cloudflare Notifications for Load Balancing, - so only resetting this field with an empty string `""` is accepted. - enum: - - '' - example: '' - type: string - loadBalancingPath: - description: >- - The endpoint path you want to conduct a health check against. This - parameter is only valid for HTTP and HTTPS monitors. - example: /health - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - loadBalancingPool: - properties: - check_regions: - $ref: '#/components/schemas/loadBalancingCheckRegions' - created_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - description: - $ref: '#/components/schemas/loadBalancingSchemasDescription' - disabled_at: - $ref: '#/components/schemas/loadBalancingSchemasDisabledAt' - readOnly: true - enabled: - $ref: '#/components/schemas/loadBalancingEnabled' - id: - $ref: '#/components/schemas/loadBalancingSchemasIdentifier' - latitude: - $ref: '#/components/schemas/loadBalancingLatitude' - load_shedding: - $ref: '#/components/schemas/loadBalancingLoadShedding' - longitude: - $ref: '#/components/schemas/loadBalancingLongitude' - minimum_origins: - $ref: '#/components/schemas/loadBalancingMinimumOrigins' - modified_on: - $ref: '#/components/schemas/loadBalancingTimestamp' - readOnly: true - monitor: - $ref: '#/components/schemas/loadBalancingMonitorId' - monitor_group: - $ref: '#/components/schemas/loadBalancingMonitorGroupId' - name: - $ref: '#/components/schemas/loadBalancingName' - networks: - $ref: '#/components/schemas/loadBalancingNetworks' - notification_email: - $ref: '#/components/schemas/loadBalancingNotificationEmail' - notification_filter: - $ref: '#/components/schemas/loadBalancingNotificationFilter' - origin_steering: - $ref: '#/components/schemas/loadBalancingOriginSteering' - origins: - $ref: '#/components/schemas/loadBalancingOrigins' - type: object - loadBalancingPoolsReferencesResponse: - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - description: List of resources that reference a given pool. - example: - - reference_type: referrer - resource_id: 699d98642c564d2e855e9661899b7252 - resource_name: www.example.com - resource_type: load_balancer - - reference_type: referral - resource_id: f1aba936b94213e5b8dca0c0dbf1f9cc - resource_name: Login page monitor - resource_type: monitor - items: - $ref: >- - #/components/schemas/loadBalancingPoolsReferencesResponse_result_item - type: array - required: - - success - - errors - - messages - - result - type: object - loadBalancingPoolsReferencesResponse_result_item: - properties: - reference_type: - enum: - - '*' - - referral - - referrer - type: string - x-auditable: true - resource_id: - type: string - x-auditable: true - resource_name: - type: string - x-auditable: true - resource_type: - type: string - x-auditable: true - type: object - loadBalancingPopPools: - description: >- - Enterprise only: A mapping of Cloudflare PoP identifiers to a list of - pool IDs (ordered by their failover priority) for the PoP (datacenter). - Any PoPs not explicitly defined will fall back to using the - corresponding country_pool, then region_pool mapping if it exists else - to default_pools. - example: - LAX: - - de90f38ced07c2e2f4df50b1f61d4194 - - 9290f38c5d07c2e2f4df57b1f61d4196 - LHR: - - abd90f38ced07c2e2f4df50b1f61d4194 - - f9138c5d07c2e2f4df57b1f61d4196 - SJC: - - 00920f38ce07c2e2f4df50b1f61d4194 - type: object - loadBalancingPort: - description: >- - The port number to connect to for the health check. Required for TCP, - UDP, and SMTP checks. HTTP and HTTPS checks should only define the port - when using a non-standard port (HTTP: default 80, HTTPS: default 443). - nullable: true - type: integer - x-auditable: true - x-stainless-terraform-configurability: optional - loadBalancingPreviewId: - example: f1aba936b94213e5b8dca0c0dbf1f9cc - type: string - loadBalancingPreviewResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - properties: - pools: - description: Monitored pool IDs mapped to their respective names. - example: - abwlnp5jbqn45ecgxd03erbgtxtqai0d: WNAM Datacenter - ve8h9lrcip5n5bbga9yqmdws28ay5d0l: EEU Datacenter - type: object - preview_id: - $ref: '#/components/schemas/loadBalancingIdentifier' - type: object - required: - - success - - errors - - messages - - result - loadBalancingPreviewResult: - description: Resulting health data from a preview operation. - example: - abwlnp5jbqn45ecgxd03erbgtxtqai0d: - healthy: true - origins: - - originone.example.com.: - failure_reason: No failures - healthy: true - response_code: 200 - rtt: 66ms - type: object - loadBalancingPreviewResultResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/loadBalancingPreviewResult' - required: - - success - - errors - - messages - - result - loadBalancingProbeZone: - default: '' - description: >- - Assign this monitor to emulate the specified zone while probing. This - parameter is only valid for HTTP and HTTPS monitors. - example: example.com - type: string - x-auditable: true - loadBalancingProxied: - default: false - description: >- - Whether the hostname should be gray clouded (false) or orange clouded - (true). - example: true - type: boolean - x-auditable: true - loadBalancingRandomSteering: - description: >- - Configures pool weights. - `steering_policy="random"`: A random pool is - selected with probability proportional to pool weights. - - `steering_policy="least_outstanding_requests"`: Use pool weights to - scale each pool's outstanding requests. - - `steering_policy="least_connections"`: Use pool weights to scale each - pool's open connections. - properties: - default_weight: - default: 1 - description: >- - The default weight for pools in the load balancer that are not - specified in the pool_weights map. - example: 0.2 - maximum: 1 - minimum: 0 - multipleOf: 0.1 - type: number - x-auditable: true - pool_weights: - description: >- - A mapping of pool IDs to custom weights. The weight is relative to - other pools in the load balancer. - example: - 9290f38c5d07c2e2f4df57b1f61d4196: 0.5 - de90f38ced07c2e2f4df50b1f61d4194: 0.3 - type: object - type: object - loadBalancingRegionCode: - description: >- - A list of Cloudflare regions. WNAM: Western North America, ENAM: Eastern - North America, WEU: Western Europe, EEU: Eastern Europe, NSAM: Northern - South America, SSAM: Southern South America, OC: Oceania, ME: Middle - East, NAF: North Africa, SAF: South Africa, SAS: Southern Asia, SEAS: - South East Asia, NEAS: North East Asia). - enum: - - WNAM - - ENAM - - WEU - - EEU - - NSAM - - SSAM - - OC - - ME - - NAF - - SAF - - SAS - - SEAS - - NEAS - example: WNAM - type: string - loadBalancingRegionComponentsSchemasResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - type: object - required: - - success - - errors - - messages - - result - loadBalancingRegionPools: - description: >- - A mapping of region codes to a list of pool IDs (ordered by their - failover priority) for the given region. Any regions not explicitly - defined will fall back to using default_pools. - example: - ENAM: - - 00920f38ce07c2e2f4df50b1f61d4194 - WNAM: - - de90f38ced07c2e2f4df50b1f61d4194 - - 9290f38c5d07c2e2f4df57b1f61d4196 - type: object - loadBalancingResourceReference: - description: A reference to a load balancer resource. - properties: - reference_type: - description: When listed as a reference, the type (direction) of the reference. - enum: - - referral - - referrer - type: string - x-auditable: true - references: - description: A list of references to (referrer) or from (referral) this resource. - example: - - reference_type: referrer - resource_id: 699d98642c564d2e855e9661899b7252 - resource_name: www.example.com - resource_type: load_balancer - - reference_type: referral - resource_id: f1aba936b94213e5b8dca0c0dbf1f9cc - resource_name: Login page monitor - resource_type: monitor - items: - description: A reference to a load balancer resource. - type: object - type: array - resource_id: - example: 17b5962d775c646f3f9725cbc7a53df4 - type: string - resource_name: - description: The human-identifiable name of the resource. - example: primary-dc-1 - type: string - x-auditable: true - resource_type: - description: The type of the resource. - enum: - - load_balancer - - monitor - - pool - example: pool - type: string - x-auditable: true - type: object - loadBalancingResultInfo: - properties: - count: - description: Total number of results on the current page. - example: 20 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 2000 - type: number - total_pages: - description: Total number of pages available. - example: 100 - type: number - type: object - loadBalancingRetries: - default: 2 - description: >- - The number of retries to attempt in case of a timeout before marking the - origin as unhealthy. Retries are attempted immediately. - type: integer - x-auditable: true - loadBalancingRules: - description: >- - BETA Field Not General Access: A list of rules for this load balancer to - execute. - items: - description: >- - A rule object containing conditions and overrides for this load - balancer to evaluate. - properties: - condition: - description: >- - The condition expressions to evaluate. If the condition evaluates - to true, the overrides or fixed_response in this rule will be - applied. An empty condition is always true. For more details on - condition expressions, please see - https://developers.cloudflare.com/load-balancing/understand-basics/load-balancing-rules/expressions. - example: http.request.uri.path contains "/testing" - type: string - x-auditable: true - disabled: - default: false - description: >- - Disable this specific rule. It will no longer be evaluated by this - load balancer. - type: boolean - x-auditable: true - fixed_response: - description: >- - A collection of fields used to directly respond to the eyeball - instead of routing to a pool. If a fixed_response is supplied the - rule will be marked as terminates. - properties: - content_type: - description: The http 'Content-Type' header to include in the response. - example: application/json - maxLength: 32 - type: string - x-auditable: true - location: - description: The http 'Location' header to include in the response. - example: www.example.com - maxLength: 2048 - type: string - x-auditable: true - message_body: - description: Text to include as the http body. - example: Testing Hello - maxLength: 1024 - type: string - x-auditable: true - status_code: - description: The http status code to respond with. - type: integer - x-auditable: true - type: object - name: - description: Name of this rule. Only used for human readability. - example: route the path /testing to testing datacenter. - maxLength: 200 - type: string - x-auditable: true - overrides: - description: >- - A collection of overrides to apply to the load balancer when this - rule's condition is true. All fields are optional. - properties: - adaptive_routing: - $ref: '#/components/schemas/loadBalancingAdaptiveRouting' - country_pools: - $ref: '#/components/schemas/loadBalancingCountryPools' - default_pools: - $ref: '#/components/schemas/loadBalancingDefaultPools' - fallback_pool: - $ref: '#/components/schemas/loadBalancingFallbackPool' - location_strategy: - $ref: '#/components/schemas/loadBalancingLocationStrategy' - pop_pools: - $ref: '#/components/schemas/loadBalancingPopPools' - random_steering: - $ref: '#/components/schemas/loadBalancingRandomSteering' - region_pools: - $ref: '#/components/schemas/loadBalancingRegionPools' - session_affinity: - $ref: '#/components/schemas/loadBalancingSessionAffinity' - session_affinity_attributes: - $ref: '#/components/schemas/loadBalancingSessionAffinityAttributes' - session_affinity_ttl: - $ref: '#/components/schemas/loadBalancingSessionAffinityTtl' - steering_policy: - $ref: '#/components/schemas/loadBalancingSteeringPolicy' - ttl: - $ref: '#/components/schemas/loadBalancingTtl' - type: object - priority: - default: 0 - description: >- - The order in which rules should be executed in relation to each - other. Lower values are executed first. Values do not need to be - sequential. If no value is provided for any rule the array order - of the rules field will be used to assign a priority. - minimum: 0 - type: integer - x-auditable: true - terminates: - description: >- - If this rule's condition is true, this causes rule evaluation to - stop after processing this rule. - type: boolean - x-auditable: true - type: object - type: array - loadBalancingSchemasDescription: - default: '' - description: A human-readable description of the pool. - example: Primary data center - Provider XYZ - type: string - x-auditable: true - loadBalancingSchemasDisabledAt: - description: >- - This field shows up only if the pool is disabled. This field is set with - the time the pool was disabled at. - format: date-time - readOnly: true - type: string - x-auditable: true - loadBalancingSchemasEnabled: - default: true - description: >- - Whether to enable (the default) this origin within the pool. Disabled - origins will not receive traffic and are excluded from health checks. - The origin will only be disabled for the current pool. - example: true - type: boolean - x-auditable: true - loadBalancingSchemasHeader: - description: >- - The request header is used to pass additional information with an HTTP - request. Currently supported header is 'Host'. - properties: - Host: - $ref: '#/components/schemas/loadBalancingHost' - type: object - loadBalancingSchemasIdResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - properties: - id: - $ref: '#/components/schemas/loadBalancingSchemasIdentifier' - type: object - required: - - success - - errors - - messages - - result - loadBalancingSchemasIdentifier: - example: 17b5962d775c646f3f9725cbc7a53df4 - type: string - x-auditable: true - loadBalancingSchemasName: - description: A human-identifiable name for the origin. - example: app-server-1 - type: string - x-auditable: true - loadBalancingSchemasPreviewId: - example: p1aba936b94213e5b8dca0c0dbf1f9cc - type: string - loadBalancingSchemasResponseCollection: - required: - - success - - errors - - messages - - result - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/loadBalancingResultInfo' - result: - items: - $ref: '#/components/schemas/loadBalancingPool' - type: array - loadBalancingSchemasSingleResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/loadBalancingPool' - required: - - success - - errors - - messages - - result - loadBalancingSearch: - properties: - resources: - description: A list of resources matching the search query. - items: - $ref: '#/components/schemas/loadBalancingResourceReference' - type: array - type: object - loadBalancingSessionAffinity: - default: none - description: >- - Specifies the type of session affinity the load balancer should use - unless specified as `"none"`. The supported types are: - `"cookie"`: On - the first request to a proxied load balancer, a cookie is generated, - encoding information of which origin the request will be forwarded to. - Subsequent requests, by the same client to the same load balancer, will - be sent to the origin server the cookie encodes, for the duration of the - cookie and as long as the origin server remains healthy. If the cookie - has expired or the origin server is unhealthy, then a new origin server - is calculated and used. - `"ip_cookie"`: Behaves the same as `"cookie"` - except the initial origin selection is stable and based on the client's - ip address. - `"header"`: On the first request to a proxied load - balancer, a session key based on the configured HTTP headers (see - `session_affinity_attributes.headers`) is generated, encoding the - request headers used for storing in the load balancer session state - which origin the request will be forwarded to. Subsequent requests to - the load balancer with the same headers will be sent to the same origin - server, for the duration of the session and as long as the origin server - remains healthy. If the session has been idle for the duration of - `session_affinity_ttl` seconds or the origin server is unhealthy, then a - new origin server is calculated and used. See `headers` in - `session_affinity_attributes` for additional required configuration. - enum: - - none - - cookie - - ip_cookie - - header - example: cookie - type: string - x-auditable: true - loadBalancingSessionAffinityAttributes: - description: Configures attributes for session affinity. - properties: - drain_duration: - description: >- - Configures the drain duration in seconds. This field is only used - when session affinity is enabled on the load balancer. - example: 100 - type: number - x-auditable: true - headers: - description: >- - Configures the names of HTTP headers to base session affinity on - when header `session_affinity` is enabled. At least one HTTP header - name must be provided. To specify the exact cookies to be used, - include an item in the following format: - `"cookie:,"` (example) where - everything after the colon is a comma-separated list of cookie - names. Providing only `"cookie"` will result in all cookies being - used. The default max number of HTTP header names that can be - provided depends on your plan: 5 for Enterprise, 1 for all other - plans. - items: - description: An HTTP header name. - maxLength: 100 - minLength: 1 - type: string - x-auditable: true - type: array - uniqueItems: true - require_all_headers: - default: false - description: >- - When header `session_affinity` is enabled, this option can be used - to specify how HTTP headers on load balancing requests will be used. - The supported values are: - `"true"`: Load balancing requests must - contain *all* of the HTTP headers specified by the `headers` session - affinity attribute, otherwise sessions aren't created. - `"false"`: - Load balancing requests must contain *at least one* of the HTTP - headers specified by the `headers` session affinity attribute, - otherwise sessions aren't created. - type: boolean - x-auditable: true - samesite: - default: Auto - description: >- - Configures the SameSite attribute on session affinity cookie. Value - "Auto" will be translated to "Lax" or "None" depending if Always Use - HTTPS is enabled. Note: when using value "None", the secure - attribute can not be set to "Never". - enum: - - Auto - - Lax - - None - - Strict - example: Auto - type: string - x-auditable: true - secure: - default: Auto - description: >- - Configures the Secure attribute on session affinity cookie. Value - "Always" indicates the Secure attribute will be set in the - Set-Cookie header, "Never" indicates the Secure attribute will not - be set, and "Auto" will set the Secure attribute depending if Always - Use HTTPS is enabled. - enum: - - Auto - - Always - - Never - example: Auto - type: string - x-auditable: true - zero_downtime_failover: - default: none - description: >- - Configures the zero-downtime failover between origins within a pool - when session affinity is enabled. This feature is currently - incompatible with Argo, Tiered Cache, and Bandwidth Alliance. The - supported values are: - `"none"`: No failover takes place for - sessions pinned to the origin (default). - `"temporary"`: Traffic - will be sent to another other healthy origin until the originally - pinned origin is available; note that this can potentially result in - heavy origin flapping. - `"sticky"`: The session affinity cookie is - updated and subsequent requests are sent to the new origin. Note: - Zero-downtime failover with sticky sessions is currently not - supported for session affinity by header. - enum: - - none - - temporary - - sticky - example: sticky - type: string - x-auditable: true - type: object - loadBalancingSessionAffinityTtl: - description: >- - Time, in seconds, until a client's session expires after being created. - Once the expiry time has been reached, subsequent requests may get sent - to a different origin server. The accepted ranges per `session_affinity` - policy are: - `"cookie"` / `"ip_cookie"`: The current default of 23 - hours will be used unless explicitly set. The accepted range of values - is between [1800, 604800]. - `"header"`: The current default of 1800 - seconds will be used unless explicitly set. The accepted range of values - is between [30, 3600]. Note: With session affinity by header, sessions - only expire after they haven't been used for the number of seconds - specified. - example: 1800 - type: number - x-auditable: true - loadBalancingSteeringPolicy: - default: '' - description: >- - Steering Policy for this load balancer. - `"off"`: Use `default_pools`. - - `"geo"`: Use `region_pools`/`country_pools`/`pop_pools`. For - non-proxied requests, the country for `country_pools` is determined by - `location_strategy`. - `"random"`: Select a pool randomly. - - `"dynamic_latency"`: Use round trip time to select the closest pool in - default_pools (requires pool health checks). - `"proximity"`: Use the - pools' latitude and longitude to select the closest pool using the - Cloudflare PoP location for proxied requests or the location determined - by `location_strategy` for non-proxied requests. - - `"least_outstanding_requests"`: Select a pool by taking into - consideration `random_steering` weights, as well as each pool's number - of outstanding requests. Pools with more pending requests are weighted - proportionately less relative to others. - `"least_connections"`: Select - a pool by taking into consideration `random_steering` weights, as well - as each pool's number of open connections. Pools with more open - connections are weighted proportionately less relative to others. - Supported for HTTP/1 and HTTP/2 connections. - `""`: Will map to `"geo"` - if you use `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. - enum: - - 'off' - - geo - - random - - dynamic_latency - - proximity - - least_outstanding_requests - - least_connections - - '' - example: dynamic_latency - type: string - x-auditable: true - loadBalancingSubdivisionCodeA2: - description: Two-letter subdivision code followed in ISO 3166-2. - example: CA - type: string - x-auditable: true - loadBalancingTimeout: - default: 5 - description: The timeout (in seconds) before marking the health check as failed. - type: integer - x-auditable: true - loadBalancingTimestamp: - example: '2014-01-01T05:20:00.12345Z' - readOnly: true - type: string - x-auditable: true - loadBalancingTtl: - description: >- - Time to live (TTL) of the DNS entry for the IP address returned by this - load balancer. This only applies to gray-clouded (unproxied) load - balancers. - example: 30 - type: number - x-auditable: true - loadBalancingType: - default: http - description: >- - The protocol to use for the health check. Currently supported protocols - are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. - enum: - - http - - https - - tcp - - udp_icmp - - icmp_ping - - smtp - example: https - type: string - x-auditable: true - loadBalancingVirtualNetworkId: - description: >- - The virtual network subnet ID the origin belongs in. Virtual network - must also belong to the account. - example: a5624d4e-044a-4ff0-b3e1-e2465353d4b4 - type: string - loadBalancingWeight: - default: 1 - description: >- - The weight of this origin relative to other origins in the pool. Based - on the configured weight the total traffic is distributed among origins - within the pool. - - `origin_steering.policy="least_outstanding_requests"`: Use weight to - scale the origin's outstanding requests. - - `origin_steering.policy="least_connections"`: Use weight to scale the - origin's open connections. - example: 0.6 - maximum: 1 - minimum: 0 - multipleOf: 0.01 - type: number - x-auditable: true - responseInfo: - properties: - code: - minimum: 1000 - type: integer - message: - type: string - documentation_url: - type: string - source: - type: object - properties: - pointer: - type: string - required: - - code - - message - type: object - uniqueItems: true - unnamedSchemaRef025497b7e63379c31929636b5186e45c: - properties: - pools: - description: Monitored pool IDs mapped to their respective names. - example: - abwlnp5jbqn45ecgxd03erbgtxtqai0d: WNAM Datacenter - ve8h9lrcip5n5bbga9yqmdws28ay5d0l: EEU Datacenter - type: object - preview_id: - $ref: '#/components/schemas/loadBalancingIdentifier' - type: object - enum: - - null - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - monitor_groups: - id: cloudflare.load_balancers.monitor_groups - name: monitor_groups - title: Monitor Groups - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1load_balancers~1monitor_groups/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1load_balancers~1monitor_groups/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1load_balancers~1monitor_groups~1{monitor_group_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1load_balancers~1monitor_groups~1{monitor_group_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1load_balancers~1monitor_groups~1{monitor_group_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1load_balancers~1monitor_groups~1{monitor_group_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/monitor_groups/methods/get' - - $ref: '#/components/x-stackQL-resources/monitor_groups/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/monitor_groups/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/monitor_groups/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/monitor_groups/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/monitor_groups/methods/update' - monitor_groups_references: - id: cloudflare.load_balancers.monitor_groups_references - name: monitor_groups_references - title: Monitor Groups References - methods: - list_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1load_balancers~1monitor_groups~1{monitor_group_id}~1references/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/monitor_groups_references/methods/list_by_account - insert: [] - update: [] - delete: [] - replace: [] - monitors: - id: cloudflare.load_balancers.monitors - name: monitors - title: Monitors - methods: - list_by_account: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1monitors/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1monitors/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1load_balancers~1monitors~1{monitor_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1load_balancers~1monitors~1{monitor_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1load_balancers~1monitors~1{monitor_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1load_balancers~1monitors~1{monitor_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - list_by_user: - operation: - $ref: '#/paths/~1user~1load_balancers~1monitors/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - load_balancer_monitors_create_monitor: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1user~1load_balancers~1monitors/post' - response: - mediaType: application/json - openAPIDocKey: '200' - load_balancer_monitors_delete_monitor: - operation: - $ref: '#/paths/~1user~1load_balancers~1monitors~1{monitor_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - get_by_user: - operation: - $ref: '#/paths/~1user~1load_balancers~1monitors~1{monitor_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - load_balancer_monitors_patch_monitor: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1user~1load_balancers~1monitors~1{monitor_id}/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - load_balancer_monitors_update_monitor: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1user~1load_balancers~1monitors~1{monitor_id}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/monitors/methods/get_by_account' - - $ref: '#/components/x-stackQL-resources/monitors/methods/list_by_account' - - $ref: '#/components/x-stackQL-resources/monitors/methods/get_by_user' - - $ref: '#/components/x-stackQL-resources/monitors/methods/list_by_user' - insert: - - $ref: '#/components/x-stackQL-resources/monitors/methods/create' - - $ref: >- - #/components/x-stackQL-resources/monitors/methods/load_balancer_monitors_create_monitor - update: - - $ref: '#/components/x-stackQL-resources/monitors/methods/edit' - - $ref: >- - #/components/x-stackQL-resources/monitors/methods/load_balancer_monitors_patch_monitor - delete: - - $ref: '#/components/x-stackQL-resources/monitors/methods/delete' - - $ref: >- - #/components/x-stackQL-resources/monitors/methods/load_balancer_monitors_delete_monitor - replace: - - $ref: '#/components/x-stackQL-resources/monitors/methods/update' - - $ref: >- - #/components/x-stackQL-resources/monitors/methods/load_balancer_monitors_update_monitor - previews: - id: cloudflare.load_balancers.previews - name: previews - title: Previews - methods: - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1load_balancers~1monitors~1{monitor_id}~1preview/post - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1load_balancers~1preview~1{preview_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/previews/methods/get' - insert: - - $ref: '#/components/x-stackQL-resources/previews/methods/create' - update: [] - delete: [] - replace: [] - monitors_references: - id: cloudflare.load_balancers.monitors_references - name: monitors_references - title: Monitors References - methods: - list_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1load_balancers~1monitors~1{monitor_id}~1references/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - list_by_user: - operation: - $ref: >- - #/paths/~1user~1load_balancers~1monitors~1{monitor_id}~1references/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/monitors_references/methods/list_by_account - - $ref: >- - #/components/x-stackQL-resources/monitors_references/methods/list_by_user - insert: [] - update: [] - delete: [] - replace: [] - pools: - id: cloudflare.load_balancers.pools - name: pools - title: Pools - methods: - list_by_account: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1pools/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - account_load_balancer_pools_patch_pools: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1pools/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1pools/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1load_balancers~1pools~1{pool_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1load_balancers~1pools~1{pool_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1load_balancers~1pools~1{pool_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1load_balancers~1pools~1{pool_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - list_by_user: - operation: - $ref: '#/paths/~1user~1load_balancers~1pools/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - load_balancer_pools_patch_pools: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1user~1load_balancers~1pools/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - load_balancer_pools_create_pool: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1user~1load_balancers~1pools/post' - response: - mediaType: application/json - openAPIDocKey: '200' - load_balancer_pools_delete_pool: - operation: - $ref: '#/paths/~1user~1load_balancers~1pools~1{pool_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - get_by_user: - operation: - $ref: '#/paths/~1user~1load_balancers~1pools~1{pool_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - load_balancer_pools_patch_pool: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1user~1load_balancers~1pools~1{pool_id}/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - load_balancer_pools_update_pool: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1user~1load_balancers~1pools~1{pool_id}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/pools/methods/get_by_account' - - $ref: '#/components/x-stackQL-resources/pools/methods/list_by_account' - - $ref: '#/components/x-stackQL-resources/pools/methods/get_by_user' - - $ref: '#/components/x-stackQL-resources/pools/methods/list_by_user' - insert: - - $ref: '#/components/x-stackQL-resources/pools/methods/create' - - $ref: >- - #/components/x-stackQL-resources/pools/methods/load_balancer_pools_create_pool - update: - - $ref: '#/components/x-stackQL-resources/pools/methods/edit' - - $ref: >- - #/components/x-stackQL-resources/pools/methods/account_load_balancer_pools_patch_pools - - $ref: >- - #/components/x-stackQL-resources/pools/methods/load_balancer_pools_patch_pool - - $ref: >- - #/components/x-stackQL-resources/pools/methods/load_balancer_pools_patch_pools - delete: - - $ref: '#/components/x-stackQL-resources/pools/methods/delete' - - $ref: >- - #/components/x-stackQL-resources/pools/methods/load_balancer_pools_delete_pool - replace: - - $ref: '#/components/x-stackQL-resources/pools/methods/update' - - $ref: >- - #/components/x-stackQL-resources/pools/methods/load_balancer_pools_update_pool - health: - id: cloudflare.load_balancers.health - name: health - title: Health - methods: - list_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1load_balancers~1pools~1{pool_id}~1health/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1load_balancers~1pools~1{pool_id}~1preview/post - response: - mediaType: application/json - openAPIDocKey: '200' - list_by_user: - operation: - $ref: '#/paths/~1user~1load_balancers~1pools~1{pool_id}~1health/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/health/methods/list_by_account' - - $ref: '#/components/x-stackQL-resources/health/methods/list_by_user' - insert: - - $ref: '#/components/x-stackQL-resources/health/methods/create' - update: [] - delete: [] - replace: [] - pools_references: - id: cloudflare.load_balancers.pools_references - name: pools_references - title: Pools References - methods: - list_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1load_balancers~1pools~1{pool_id}~1references/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - list_by_user: - operation: - $ref: '#/paths/~1user~1load_balancers~1pools~1{pool_id}~1references/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/pools_references/methods/list_by_account - - $ref: >- - #/components/x-stackQL-resources/pools_references/methods/list_by_user - insert: [] - update: [] - delete: [] - replace: [] - regions: - id: cloudflare.load_balancers.regions - name: regions - title: Regions - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1regions/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1load_balancers~1regions~1{region_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/regions/methods/get' - - $ref: '#/components/x-stackQL-resources/regions/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - searches: - id: cloudflare.load_balancers.searches - name: searches - title: Searches - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1search/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result.resources - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/searches/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - preview: - id: cloudflare.load_balancers.preview - name: preview - title: Preview - methods: - load_balancer_monitors_preview_monitor: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1user~1load_balancers~1monitors~1{monitor_id}~1preview/post - response: - mediaType: application/json - openAPIDocKey: '200' - load_balancer_pools_preview_pool: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1user~1load_balancers~1pools~1{pool_id}~1preview/post' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1user~1load_balancers~1preview~1{preview_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/preview/methods/get' - insert: - - $ref: >- - #/components/x-stackQL-resources/preview/methods/load_balancer_monitors_preview_monitor - - $ref: >- - #/components/x-stackQL-resources/preview/methods/load_balancer_pools_preview_pool - update: [] - delete: [] - replace: [] - load_balancers: - id: cloudflare.load_balancers.load_balancers - name: load_balancers - title: Load Balancers - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1load_balancers/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1load_balancers/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1load_balancers~1{load_balancer_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1load_balancers~1{load_balancer_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1load_balancers~1{load_balancer_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1load_balancers~1{load_balancer_id}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/load_balancers/methods/get' - - $ref: '#/components/x-stackQL-resources/load_balancers/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/load_balancers/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/load_balancers/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/load_balancers/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/load_balancers/methods/update' +openapi: 3.0.3 +info: + title: load_balancers API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/load_balancers/monitor_groups: + get: + description: List configured monitor groups. + operationId: account-load-balancer-monitor-groups-list-monitor-groups + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorGroupResponseCollection' + description: List Monitor Groups response + 4XX: + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + items: + $ref: '#/components/schemas/loadBalancingMonitorGroup' + type: array + enum: + - null + result_info: + $ref: '#/components/schemas/loadBalancingResultInfo' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + type: object + description: List Monitor Groups response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Monitor Groups + tags: + - Account Load Balancer Monitor Groups + x-stackql-sdk: + service: load_balancers + resource_chain: + - monitor_groups + method: list + post: + description: Create a new monitor group. + operationId: account-load-balancer-monitor-groups-create-monitor-group + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorGroup' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorGroupSingleResponse' + description: Create Monitor Group response + '412': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + created_at: + description: The timestamp of when the monitor group was created + format: date-time + readOnly: true + type: string + description: + description: A short description of the monitor group + type: string + id: + $ref: '#/components/schemas/loadBalancingMonitorGroupId' + members: + description: List of monitors in this group + items: + $ref: '#/components/schemas/loadBalancingMonitorGroupMember' + type: array + updated_at: + description: The timestamp of when the monitor group was last updated + format: date-time + readOnly: true + type: string + required: + - id + - description + - members + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + type: object + description: Precondition Failed - Referenced monitor does not exist + 4XX: + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + created_at: + description: The timestamp of when the monitor group was created + format: date-time + readOnly: true + type: string + description: + description: A short description of the monitor group + type: string + id: + $ref: '#/components/schemas/loadBalancingMonitorGroupId' + members: + description: List of monitors in this group + items: + $ref: '#/components/schemas/loadBalancingMonitorGroupMember' + type: array + updated_at: + description: The timestamp of when the monitor group was last updated + format: date-time + readOnly: true + type: string + required: + - id + - description + - members + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + type: object + description: Create Monitor Group response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Monitor Group + tags: + - Account Load Balancer Monitor Groups + x-stackql-sdk: + service: load_balancers + resource_chain: + - monitor_groups + method: create + /accounts/{account_id}/load_balancers/monitor_groups/{monitor_group_id}: + delete: + description: Delete a configured monitor group. + operationId: account-load-balancer-monitor-groups-delete-monitor-group + parameters: + - in: path + name: monitor_group_id + schema: + $ref: '#/components/schemas/loadBalancingSchemasIdentifier' + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorGroupSingleResponse' + description: Delete Monitor Group response + '412': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + created_at: + description: The timestamp of when the monitor group was created + format: date-time + readOnly: true + type: string + description: + description: A short description of the monitor group + type: string + id: + $ref: '#/components/schemas/loadBalancingMonitorGroupId' + members: + description: List of monitors in this group + items: + $ref: '#/components/schemas/loadBalancingMonitorGroupMember' + type: array + updated_at: + description: The timestamp of when the monitor group was last updated + format: date-time + readOnly: true + type: string + required: + - id + - description + - members + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + type: object + description: Precondition Failed - Monitor group is in use by one or more pools + 4XX: + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + created_at: + description: The timestamp of when the monitor group was created + format: date-time + readOnly: true + type: string + description: + description: A short description of the monitor group + type: string + id: + $ref: '#/components/schemas/loadBalancingMonitorGroupId' + members: + description: List of monitors in this group + items: + $ref: '#/components/schemas/loadBalancingMonitorGroupMember' + type: array + updated_at: + description: The timestamp of when the monitor group was last updated + format: date-time + readOnly: true + type: string + required: + - id + - description + - members + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + type: object + description: Delete Monitor Group response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Monitor Group + tags: + - Account Load Balancer Monitor Groups + x-stackql-sdk: + service: load_balancers + resource_chain: + - monitor_groups + method: delete + get: + description: Fetch a single configured monitor group. + operationId: account-load-balancer-monitor-groups-monitor-group-details + parameters: + - in: path + name: monitor_group_id + schema: + $ref: '#/components/schemas/loadBalancingSchemasIdentifier' + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorGroupSingleResponse' + description: Monitor Group Details response + 4XX: + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + created_at: + description: The timestamp of when the monitor group was created + format: date-time + readOnly: true + type: string + description: + description: A short description of the monitor group + type: string + id: + $ref: '#/components/schemas/loadBalancingMonitorGroupId' + members: + description: List of monitors in this group + items: + $ref: '#/components/schemas/loadBalancingMonitorGroupMember' + type: array + updated_at: + description: The timestamp of when the monitor group was last updated + format: date-time + readOnly: true + type: string + required: + - id + - description + - members + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + type: object + description: Monitor Group Details response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Monitor Group Details + tags: + - Account Load Balancer Monitor Groups + x-stackql-sdk: + service: load_balancers + resource_chain: + - monitor_groups + method: get + patch: + description: Apply changes to an existing monitor group, overwriting the supplied properties. + operationId: account-load-balancer-monitor-groups-patch-monitor-group + parameters: + - in: path + name: monitor_group_id + schema: + $ref: '#/components/schemas/loadBalancingSchemasIdentifier' + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorGroup' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorGroupSingleResponse' + description: Patch Monitor Group response + '412': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + created_at: + description: The timestamp of when the monitor group was created + format: date-time + readOnly: true + type: string + description: + description: A short description of the monitor group + type: string + id: + $ref: '#/components/schemas/loadBalancingMonitorGroupId' + members: + description: List of monitors in this group + items: + $ref: '#/components/schemas/loadBalancingMonitorGroupMember' + type: array + updated_at: + description: The timestamp of when the monitor group was last updated + format: date-time + readOnly: true + type: string + required: + - id + - description + - members + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + type: object + description: Precondition Failed - Referenced monitor does not exist + 4XX: + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + created_at: + description: The timestamp of when the monitor group was created + format: date-time + readOnly: true + type: string + description: + description: A short description of the monitor group + type: string + id: + $ref: '#/components/schemas/loadBalancingMonitorGroupId' + members: + description: List of monitors in this group + items: + $ref: '#/components/schemas/loadBalancingMonitorGroupMember' + type: array + updated_at: + description: The timestamp of when the monitor group was last updated + format: date-time + readOnly: true + type: string + required: + - id + - description + - members + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + type: object + description: Patch Monitor Group response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Patch Monitor Group + tags: + - Account Load Balancer Monitor Groups + x-stackql-sdk: + service: load_balancers + resource_chain: + - monitor_groups + method: edit + put: + description: Modify a configured monitor group. + operationId: account-load-balancer-monitor-groups-update-monitor-group + parameters: + - in: path + name: monitor_group_id + schema: + $ref: '#/components/schemas/loadBalancingSchemasIdentifier' + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorGroup' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorGroupSingleResponse' + description: Update Monitor Group response + '412': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + created_at: + description: The timestamp of when the monitor group was created + format: date-time + readOnly: true + type: string + description: + description: A short description of the monitor group + type: string + id: + $ref: '#/components/schemas/loadBalancingMonitorGroupId' + members: + description: List of monitors in this group + items: + $ref: '#/components/schemas/loadBalancingMonitorGroupMember' + type: array + updated_at: + description: The timestamp of when the monitor group was last updated + format: date-time + readOnly: true + type: string + required: + - id + - description + - members + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + type: object + description: Precondition Failed - Referenced monitor does not exist + 4XX: + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + created_at: + description: The timestamp of when the monitor group was created + format: date-time + readOnly: true + type: string + description: + description: A short description of the monitor group + type: string + id: + $ref: '#/components/schemas/loadBalancingMonitorGroupId' + members: + description: List of monitors in this group + items: + $ref: '#/components/schemas/loadBalancingMonitorGroupMember' + type: array + updated_at: + description: The timestamp of when the monitor group was last updated + format: date-time + readOnly: true + type: string + required: + - id + - description + - members + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + type: object + description: Update Monitor Group response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Monitor Group + tags: + - Account Load Balancer Monitor Groups + x-stackql-sdk: + service: load_balancers + resource_chain: + - monitor_groups + method: update + /accounts/{account_id}/load_balancers/monitor_groups/{monitor_group_id}/references: + get: + description: Get the list of resources that reference the provided monitor group. + operationId: account-load-balancer-monitor-groups-list-monitor-group-references + parameters: + - in: path + name: monitor_group_id + schema: + $ref: '#/components/schemas/loadBalancingIdentifier' + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorGroupReferencesResponse' + description: List Monitor Group References response. + 4XX: + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + description: List of resources that reference a given monitor group. + items: + properties: + reference_type: + enum: + - '*' + - referral + - referrer + type: string + x-auditable: true + resource_id: + type: string + x-auditable: true + resource_name: + type: string + x-auditable: true + resource_type: + type: string + x-auditable: true + type: object + type: array + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + type: object + description: List Monitor Group References response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Monitor Group References + tags: + - Account Load Balancer Monitor Groups + x-stackql-sdk: + service: load_balancers + resource_chain: + - monitor_groups + - references + method: get + /accounts/{account_id}/load_balancers/monitors: + get: + description: List configured monitors for an account. + operationId: account-load-balancer-monitors-list-monitors + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorResponseCollection' + description: List Monitors response. + 4XX: + content: + application/json: + schema: + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/loadBalancingResultInfo' + result: + items: + $ref: '#/components/schemas/loadBalancingMonitor' + type: array + enum: + - null + description: List Monitors response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Monitors + tags: + - Account Load Balancer Monitors + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + - 'Load Balancing: Monitors and Pools Read' + x-stackql-sdk: + service: load_balancers + resource_chain: + - monitors + method: list + post: + description: Create a configured monitor. + operationId: account-load-balancer-monitors-create-monitor + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorEditable' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorResponseSingle' + description: Create Monitor response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + allow_insecure: + $ref: '#/components/schemas/loadBalancingAllowInsecure' + consecutive_down: + $ref: '#/components/schemas/loadBalancingConsecutiveDown' + consecutive_up: + $ref: '#/components/schemas/loadBalancingConsecutiveUp' + description: + $ref: '#/components/schemas/loadBalancingDescription' + expected_body: + $ref: '#/components/schemas/loadBalancingExpectedBody' + expected_codes: + $ref: '#/components/schemas/loadBalancingExpectedCodes' + follow_redirects: + $ref: '#/components/schemas/loadBalancingFollowRedirects' + header: + $ref: '#/components/schemas/loadBalancingHeader' + interval: + $ref: '#/components/schemas/loadBalancingInterval' + method: + $ref: '#/components/schemas/loadBalancingMethod' + path: + $ref: '#/components/schemas/loadBalancingPath' + port: + $ref: '#/components/schemas/loadBalancingPort' + probe_zone: + $ref: '#/components/schemas/loadBalancingProbeZone' + retries: + $ref: '#/components/schemas/loadBalancingRetries' + timeout: + $ref: '#/components/schemas/loadBalancingTimeout' + x-stainless-naming: + python: + method_argument: load_balancer_monitor_timeout + type: + $ref: '#/components/schemas/loadBalancingType' + created_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + id: + $ref: '#/components/schemas/loadBalancingIdentifier' + modified_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Create Monitor response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Monitor + tags: + - Account Load Balancer Monitors + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + x-stackql-sdk: + service: load_balancers + resource_chain: + - monitors + method: create + /accounts/{account_id}/load_balancers/monitors/{monitor_id}: + delete: + description: Delete a configured monitor. + operationId: account-load-balancer-monitors-delete-monitor + parameters: + - name: monitor_id + in: path + required: true + description: The Load Balancer monitor ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingIdResponse' + description: Delete Monitor response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + id: + $ref: '#/components/schemas/loadBalancingIdentifier' + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Delete Monitor response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Monitor + tags: + - Account Load Balancer Monitors + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + x-stackql-sdk: + service: load_balancers + resource_chain: + - monitors + method: delete + get: + description: List a single configured monitor for an account. + operationId: account-load-balancer-monitors-monitor-details + parameters: + - name: monitor_id + in: path + required: true + description: The Load Balancer monitor ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorResponseSingle' + description: Monitor Details response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + allow_insecure: + $ref: '#/components/schemas/loadBalancingAllowInsecure' + consecutive_down: + $ref: '#/components/schemas/loadBalancingConsecutiveDown' + consecutive_up: + $ref: '#/components/schemas/loadBalancingConsecutiveUp' + description: + $ref: '#/components/schemas/loadBalancingDescription' + expected_body: + $ref: '#/components/schemas/loadBalancingExpectedBody' + expected_codes: + $ref: '#/components/schemas/loadBalancingExpectedCodes' + follow_redirects: + $ref: '#/components/schemas/loadBalancingFollowRedirects' + header: + $ref: '#/components/schemas/loadBalancingHeader' + interval: + $ref: '#/components/schemas/loadBalancingInterval' + method: + $ref: '#/components/schemas/loadBalancingMethod' + path: + $ref: '#/components/schemas/loadBalancingPath' + port: + $ref: '#/components/schemas/loadBalancingPort' + probe_zone: + $ref: '#/components/schemas/loadBalancingProbeZone' + retries: + $ref: '#/components/schemas/loadBalancingRetries' + timeout: + $ref: '#/components/schemas/loadBalancingTimeout' + x-stainless-naming: + python: + method_argument: load_balancer_monitor_timeout + type: + $ref: '#/components/schemas/loadBalancingType' + created_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + id: + $ref: '#/components/schemas/loadBalancingIdentifier' + modified_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Monitor Details response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Monitor Details + tags: + - Account Load Balancer Monitors + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + - 'Load Balancing: Monitors and Pools Read' + x-stackql-sdk: + service: load_balancers + resource_chain: + - monitors + method: get + patch: + description: Apply changes to an existing monitor, overwriting the supplied properties. + operationId: account-load-balancer-monitors-patch-monitor + parameters: + - name: monitor_id + in: path + required: true + description: The Load Balancer monitor ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorEditable' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorResponseSingle' + description: Patch Monitor response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + allow_insecure: + $ref: '#/components/schemas/loadBalancingAllowInsecure' + consecutive_down: + $ref: '#/components/schemas/loadBalancingConsecutiveDown' + consecutive_up: + $ref: '#/components/schemas/loadBalancingConsecutiveUp' + description: + $ref: '#/components/schemas/loadBalancingDescription' + expected_body: + $ref: '#/components/schemas/loadBalancingExpectedBody' + expected_codes: + $ref: '#/components/schemas/loadBalancingExpectedCodes' + follow_redirects: + $ref: '#/components/schemas/loadBalancingFollowRedirects' + header: + $ref: '#/components/schemas/loadBalancingHeader' + interval: + $ref: '#/components/schemas/loadBalancingInterval' + method: + $ref: '#/components/schemas/loadBalancingMethod' + path: + $ref: '#/components/schemas/loadBalancingPath' + port: + $ref: '#/components/schemas/loadBalancingPort' + probe_zone: + $ref: '#/components/schemas/loadBalancingProbeZone' + retries: + $ref: '#/components/schemas/loadBalancingRetries' + timeout: + $ref: '#/components/schemas/loadBalancingTimeout' + x-stainless-naming: + python: + method_argument: load_balancer_monitor_timeout + type: + $ref: '#/components/schemas/loadBalancingType' + created_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + id: + $ref: '#/components/schemas/loadBalancingIdentifier' + modified_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Patch Monitor response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Patch Monitor + tags: + - Account Load Balancer Monitors + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + x-stackql-sdk: + service: load_balancers + resource_chain: + - monitors + method: edit + put: + description: Modify a configured monitor. + operationId: account-load-balancer-monitors-update-monitor + parameters: + - name: monitor_id + in: path + required: true + description: The Load Balancer monitor ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorEditable' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorResponseSingle' + description: Update Monitor response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + allow_insecure: + $ref: '#/components/schemas/loadBalancingAllowInsecure' + consecutive_down: + $ref: '#/components/schemas/loadBalancingConsecutiveDown' + consecutive_up: + $ref: '#/components/schemas/loadBalancingConsecutiveUp' + description: + $ref: '#/components/schemas/loadBalancingDescription' + expected_body: + $ref: '#/components/schemas/loadBalancingExpectedBody' + expected_codes: + $ref: '#/components/schemas/loadBalancingExpectedCodes' + follow_redirects: + $ref: '#/components/schemas/loadBalancingFollowRedirects' + header: + $ref: '#/components/schemas/loadBalancingHeader' + interval: + $ref: '#/components/schemas/loadBalancingInterval' + method: + $ref: '#/components/schemas/loadBalancingMethod' + path: + $ref: '#/components/schemas/loadBalancingPath' + port: + $ref: '#/components/schemas/loadBalancingPort' + probe_zone: + $ref: '#/components/schemas/loadBalancingProbeZone' + retries: + $ref: '#/components/schemas/loadBalancingRetries' + timeout: + $ref: '#/components/schemas/loadBalancingTimeout' + x-stainless-naming: + python: + method_argument: load_balancer_monitor_timeout + type: + $ref: '#/components/schemas/loadBalancingType' + created_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + id: + $ref: '#/components/schemas/loadBalancingIdentifier' + modified_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Update Monitor response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Monitor + tags: + - Account Load Balancer Monitors + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + x-stackql-sdk: + service: load_balancers + resource_chain: + - monitors + method: update + /accounts/{account_id}/load_balancers/monitors/{monitor_id}/preview: + post: + description: Preview pools using the specified monitor with provided monitor details. The returned preview_id can be used in the preview endpoint to retrieve the results. + operationId: account-load-balancer-monitors-preview-monitor + parameters: + - name: monitor_id + in: path + required: true + description: The Load Balancer monitor ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorEditable' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingPreviewResponse' + description: Preview Monitor response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/unnamedSchemaRef025497b7e63379c31929636b5186e45c' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Preview Monitor response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Preview Monitor + tags: + - Account Load Balancer Monitors + x-stackql-sdk: + service: load_balancers + resource_chain: + - monitors + - previews + method: create + /accounts/{account_id}/load_balancers/monitors/{monitor_id}/references: + get: + description: Get the list of resources that reference the provided monitor. + operationId: account-load-balancer-monitors-list-monitor-references + parameters: + - name: monitor_id + in: path + required: true + description: The Load Balancer monitor ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorReferencesResponse' + description: List Monitor References response. + 4XX: + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + description: List of resources that reference a given monitor. + items: + properties: + reference_type: + enum: + - '*' + - referral + - referrer + type: string + x-auditable: true + resource_id: + type: string + x-auditable: true + resource_name: + type: string + x-auditable: true + resource_type: + type: string + x-auditable: true + type: object + type: array + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + type: object + description: List Monitor References response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Monitor References + tags: + - Account Load Balancer Monitors + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + - 'Load Balancing: Monitors and Pools Read' + x-stackql-sdk: + service: load_balancers + resource_chain: + - monitors + - references + method: get + /accounts/{account_id}/load_balancers/pools: + get: + description: List configured pools. + operationId: account-load-balancer-pools-list-pools + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: monitor + schema: + description: The ID of the Monitor to use for checking the health of origins within this pool. + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingSchemasResponseCollection' + description: List Pools response. + 4XX: + content: + application/json: + schema: + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/loadBalancingResultInfo' + result: + items: + $ref: '#/components/schemas/loadBalancingPool' + type: array + enum: + - null + description: List Pools response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Pools + tags: + - Account Load Balancer Pools + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + - 'Load Balancing: Monitors and Pools Read' + x-stackql-sdk: + service: load_balancers + resource_chain: + - pools + method: list + patch: + description: Apply changes to a number of existing pools, overwriting the supplied properties. Pools are ordered by ascending `name`. Returns the list of affected pools. Supports the standard pagination query parameters, either `limit`/`offset` or `per_page`/`page`. + operationId: account-load-balancer-pools-patch-pools + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + notification_email: + $ref: '#/components/schemas/loadBalancingPatchPoolsNotificationEmail' + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingSchemasResponseCollection' + description: Patch Pools response. + 4XX: + content: + application/json: + schema: + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/loadBalancingResultInfo' + result: + items: + $ref: '#/components/schemas/loadBalancingPool' + type: array + enum: + - null + description: Patch Pools response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Patch Pools + tags: + - Account Load Balancer Pools + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + post: + description: Create a new pool. + operationId: account-load-balancer-pools-create-pool + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + description: + $ref: '#/components/schemas/loadBalancingSchemasDescription' + enabled: + $ref: '#/components/schemas/loadBalancingEnabled' + latitude: + $ref: '#/components/schemas/loadBalancingLatitude' + load_shedding: + $ref: '#/components/schemas/loadBalancingLoadShedding' + longitude: + $ref: '#/components/schemas/loadBalancingLongitude' + minimum_origins: + $ref: '#/components/schemas/loadBalancingMinimumOrigins' + monitor: + $ref: '#/components/schemas/loadBalancingMonitorId' + monitor_group: + $ref: '#/components/schemas/loadBalancingMonitorGroupId' + name: + $ref: '#/components/schemas/loadBalancingName' + notification_email: + $ref: '#/components/schemas/loadBalancingNotificationEmail' + notification_filter: + $ref: '#/components/schemas/loadBalancingNotificationFilter' + origin_steering: + $ref: '#/components/schemas/loadBalancingOriginSteering' + origins: + $ref: '#/components/schemas/loadBalancingOrigins' + required: + - origins + - name + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingSchemasSingleResponse' + description: Create Pool response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/loadBalancerPool' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Create Pool response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Pool + tags: + - Account Load Balancer Pools + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + x-stackql-sdk: + service: load_balancers + resource_chain: + - pools + method: create + /accounts/{account_id}/load_balancers/pools/{pool_id}: + delete: + description: Delete a configured pool. + operationId: account-load-balancer-pools-delete-pool + parameters: + - name: pool_id + in: path + required: true + description: The Load Balancer pool ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingSchemasIdResponse' + description: Delete Pool response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + id: + $ref: '#/components/schemas/loadBalancingSchemasIdentifier' + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Delete Pool response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Pool + tags: + - Account Load Balancer Pools + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + x-stackql-sdk: + service: load_balancers + resource_chain: + - pools + method: delete + get: + description: Fetch a single configured pool. + operationId: account-load-balancer-pools-pool-details + parameters: + - name: pool_id + in: path + required: true + description: The Load Balancer pool ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingSchemasSingleResponse' + description: Pool Details response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/loadBalancerPool' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Pool Details response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Pool Details + tags: + - Account Load Balancer Pools + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + - 'Load Balancing: Monitors and Pools Read' + x-stackql-sdk: + service: load_balancers + resource_chain: + - pools + method: get + patch: + description: Apply changes to an existing pool, overwriting the supplied properties. + operationId: account-load-balancer-pools-patch-pool + parameters: + - name: pool_id + in: path + required: true + description: The Load Balancer pool ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + check_regions: + $ref: '#/components/schemas/loadBalancingCheckRegions' + description: + $ref: '#/components/schemas/loadBalancingSchemasDescription' + disabled_at: + $ref: '#/components/schemas/loadBalancingSchemasDisabledAt' + readOnly: true + enabled: + $ref: '#/components/schemas/loadBalancingEnabled' + latitude: + $ref: '#/components/schemas/loadBalancingLatitude' + load_shedding: + $ref: '#/components/schemas/loadBalancingLoadShedding' + longitude: + $ref: '#/components/schemas/loadBalancingLongitude' + minimum_origins: + $ref: '#/components/schemas/loadBalancingMinimumOrigins' + monitor: + $ref: '#/components/schemas/loadBalancingMonitorId' + monitor_group: + $ref: '#/components/schemas/loadBalancingMonitorGroupId' + name: + $ref: '#/components/schemas/loadBalancingName' + notification_email: + $ref: '#/components/schemas/loadBalancingNotificationEmail' + notification_filter: + $ref: '#/components/schemas/loadBalancingNotificationFilter' + origin_steering: + $ref: '#/components/schemas/loadBalancingOriginSteering' + origins: + $ref: '#/components/schemas/loadBalancingOrigins' + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingSchemasSingleResponse' + description: Patch Pool response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/loadBalancerPool' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Patch Pool response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Patch Pool + tags: + - Account Load Balancer Pools + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + x-stackql-sdk: + service: load_balancers + resource_chain: + - pools + method: edit + put: + description: Modify a configured pool. + operationId: account-load-balancer-pools-update-pool + parameters: + - name: pool_id + in: path + required: true + description: The Load Balancer pool ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + check_regions: + $ref: '#/components/schemas/loadBalancingCheckRegions' + description: + $ref: '#/components/schemas/loadBalancingSchemasDescription' + disabled_at: + $ref: '#/components/schemas/loadBalancingSchemasDisabledAt' + readOnly: true + enabled: + $ref: '#/components/schemas/loadBalancingEnabled' + latitude: + $ref: '#/components/schemas/loadBalancingLatitude' + load_shedding: + $ref: '#/components/schemas/loadBalancingLoadShedding' + longitude: + $ref: '#/components/schemas/loadBalancingLongitude' + minimum_origins: + $ref: '#/components/schemas/loadBalancingMinimumOrigins' + monitor: + $ref: '#/components/schemas/loadBalancingMonitorId' + monitor_group: + $ref: '#/components/schemas/loadBalancingMonitorGroupId' + name: + $ref: '#/components/schemas/loadBalancingName' + notification_email: + $ref: '#/components/schemas/loadBalancingNotificationEmail' + notification_filter: + $ref: '#/components/schemas/loadBalancingNotificationFilter' + origin_steering: + $ref: '#/components/schemas/loadBalancingOriginSteering' + origins: + $ref: '#/components/schemas/loadBalancingOrigins' + required: + - origins + - name + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingSchemasSingleResponse' + description: Update Pool response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/loadBalancerPool' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Update Pool response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Pool + tags: + - Account Load Balancer Pools + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + x-stackql-sdk: + service: load_balancers + resource_chain: + - pools + method: update + /accounts/{account_id}/load_balancers/pools/{pool_id}/health: + get: + description: Fetch the latest pool health status for a single pool. + operationId: account-load-balancer-pools-pool-health-details + parameters: + - name: pool_id + in: path + required: true + description: The Load Balancer pool ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingHealthDetails' + description: Pool Health Details response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + description: A list of regions from which to run health checks. Null means every Cloudflare data center. + properties: + pool_id: + description: Pool ID. + type: string + x-auditable: true + pop_health: + description: List of regions and associated health status. + properties: + healthy: + description: Whether health check in region is healthy. + type: boolean + x-auditable: true + origins: + items: + $ref: '#/components/schemas/loadBalancingOriginHealth' + type: array + type: object + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Pool Health Details response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Pool Health Details + tags: + - Account Load Balancer Pools + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + - 'Load Balancing: Monitors and Pools Read' + x-stackql-sdk: + service: load_balancers + resource_chain: + - pools + - health + method: get + /accounts/{account_id}/load_balancers/pools/{pool_id}/preview: + post: + description: Preview pool health using provided monitor details. The returned preview_id can be used in the preview endpoint to retrieve the results. + operationId: account-load-balancer-pools-preview-pool + parameters: + - name: pool_id + in: path + required: true + description: The Load Balancer pool ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorEditable' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingPreviewResponse' + description: Preview Pool response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/unnamedSchemaRef025497b7e63379c31929636b5186e45c' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Preview Pool response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Preview Pool + tags: + - Account Load Balancer Pools + x-stackql-sdk: + service: load_balancers + resource_chain: + - pools + - health + method: create + /accounts/{account_id}/load_balancers/pools/{pool_id}/references: + get: + description: Get the list of resources that reference the provided pool. + operationId: account-load-balancer-pools-list-pool-references + parameters: + - name: pool_id + in: path + required: true + description: The Load Balancer pool ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingPoolsReferencesResponse' + description: List Pool References response. + 4XX: + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + description: List of resources that reference a given pool. + items: + properties: + reference_type: + enum: + - '*' + - referral + - referrer + type: string + x-auditable: true + resource_id: + type: string + x-auditable: true + resource_name: + type: string + x-auditable: true + resource_type: + type: string + x-auditable: true + type: object + type: array + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + type: object + description: List Pool References response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Pool References + tags: + - Account Load Balancer Pools + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + - 'Load Balancing: Monitors and Pools Read' + x-stackql-sdk: + service: load_balancers + resource_chain: + - pools + - references + method: get + /accounts/{account_id}/load_balancers/preview/{preview_id}: + get: + description: Get the result of a previous preview operation using the provided preview_id. + operationId: account-load-balancer-monitors-preview-result + parameters: + - in: path + name: preview_id + schema: + $ref: '#/components/schemas/loadBalancingSchemasPreviewId' + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingPreviewResultResponse' + description: Preview Result response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + description: Resulting health data from a preview operation. + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Preview Result response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Preview Result + tags: + - Account Load Balancer Monitors + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + - 'Load Balancing: Monitors and Pools Read' + x-stackql-sdk: + service: load_balancers + resource_chain: + - previews + method: get + /accounts/{account_id}/load_balancers/regions: + get: + description: List all region mappings. + operationId: load-balancer-regions-list-regions + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: subdivision_code + schema: + $ref: '#/components/schemas/loadBalancingSubdivisionCodeA2' + - in: query + name: subdivision_code_a2 + schema: + $ref: '#/components/schemas/loadBalancingSubdivisionCodeA2' + - in: query + name: country_code_a2 + schema: + description: Two-letter alpha-2 country code followed in ISO 3166-1. + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingRegionComponentsSchemasResponseCollection' + description: List Regions response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + type: object + enum: + - null + nullable: true + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: List Regions response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Regions + tags: + - Load Balancer Regions + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + - 'Load Balancing: Monitors and Pools Read' + x-stackql-sdk: + service: load_balancers + resource_chain: + - regions + method: list + /accounts/{account_id}/load_balancers/regions/{region_id}: + get: + description: Get a single region mapping. + operationId: load-balancer-regions-get-region + parameters: + - in: path + name: region_id + schema: + $ref: '#/components/schemas/loadBalancingRegionCode' + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingComponentsSchemasSingleResponse' + description: Get Region response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + description: A list of countries and subdivisions mapped to a region. + type: object + enum: + - null + nullable: true + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Get Region response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Region + tags: + - Load Balancer Regions + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + - 'Load Balancing: Monitors and Pools Read' + x-stackql-sdk: + service: load_balancers + resource_chain: + - regions + method: get + /accounts/{account_id}/load_balancers/search: + get: + description: Search for Load Balancing resources. + operationId: account-load-balancer-search-search-resources + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: query + schema: + default: '' + description: Search query term. + type: string + - in: query + name: references + schema: + default: '' + description: The type of references to include. "*" to include both referral and referrer references. "" to not include any reference information. + enum: + - '' + - '*' + - referral + - referrer + type: string + - in: query + name: page + schema: + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 25 + maximum: 1000 + minimum: 1 + type: number + responses: + '200': + content: + application/json: + schema: + required: + - success + - errors + - messages + - result + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + $ref: '#/components/schemas/loadBalancingResultInfo' + result: + $ref: '#/components/schemas/loadBalancingSearch' + description: Search Resources response. + 4XX: + content: + application/json: + schema: + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/loadBalancingResultInfo' + result: + properties: + resources: + description: A list of resources matching the search query. + items: + $ref: '#/components/schemas/loadBalancingResourceReference' + type: array + type: object + enum: + - null + description: Search Resources response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Search Resources + tags: + - Account Load Balancer Search + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + - 'Load Balancing: Monitors and Pools Read' + x-stackql-sdk: + service: load_balancers + resource_chain: + - searches + method: list + /user/load_balancers/monitors: + get: + description: List configured monitors for a user. + operationId: load-balancer-monitors-list-monitors + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorResponseCollection' + description: Successful list monitors response. + 4XX: + content: + application/json: + schema: + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/loadBalancingResultInfo' + result: + items: + $ref: '#/components/schemas/loadBalancingMonitor' + type: array + enum: + - null + description: Failed list monitors response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Monitors + tags: + - Load Balancer Monitors + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + - 'Load Balancing: Monitors and Pools Read' + post: + description: Create a configured monitor. + operationId: load-balancer-monitors-create-monitor + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorEditable' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorResponseSingle' + description: Create Monitor response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + allow_insecure: + $ref: '#/components/schemas/loadBalancingAllowInsecure' + consecutive_down: + $ref: '#/components/schemas/loadBalancingConsecutiveDown' + consecutive_up: + $ref: '#/components/schemas/loadBalancingConsecutiveUp' + description: + $ref: '#/components/schemas/loadBalancingDescription' + expected_body: + $ref: '#/components/schemas/loadBalancingExpectedBody' + expected_codes: + $ref: '#/components/schemas/loadBalancingExpectedCodes' + follow_redirects: + $ref: '#/components/schemas/loadBalancingFollowRedirects' + header: + $ref: '#/components/schemas/loadBalancingHeader' + interval: + $ref: '#/components/schemas/loadBalancingInterval' + method: + $ref: '#/components/schemas/loadBalancingMethod' + path: + $ref: '#/components/schemas/loadBalancingPath' + port: + $ref: '#/components/schemas/loadBalancingPort' + probe_zone: + $ref: '#/components/schemas/loadBalancingProbeZone' + retries: + $ref: '#/components/schemas/loadBalancingRetries' + timeout: + $ref: '#/components/schemas/loadBalancingTimeout' + x-stainless-naming: + python: + method_argument: load_balancer_monitor_timeout + type: + $ref: '#/components/schemas/loadBalancingType' + created_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + id: + $ref: '#/components/schemas/loadBalancingIdentifier' + modified_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Create Monitor response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Monitor + tags: + - Load Balancer Monitors + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + /user/load_balancers/monitors/{monitor_id}: + delete: + description: Delete a configured monitor. + operationId: load-balancer-monitors-delete-monitor + parameters: + - name: monitor_id + in: path + required: true + description: The Load Balancer monitor ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingIdResponse' + description: Delete Monitor response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + id: + $ref: '#/components/schemas/loadBalancingIdentifier' + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Delete Monitor response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Monitor + tags: + - Load Balancer Monitors + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + get: + description: List a single configured monitor for a user. + operationId: load-balancer-monitors-monitor-details + parameters: + - name: monitor_id + in: path + required: true + description: The Load Balancer monitor ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorResponseSingle' + description: Monitor Details response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + allow_insecure: + $ref: '#/components/schemas/loadBalancingAllowInsecure' + consecutive_down: + $ref: '#/components/schemas/loadBalancingConsecutiveDown' + consecutive_up: + $ref: '#/components/schemas/loadBalancingConsecutiveUp' + description: + $ref: '#/components/schemas/loadBalancingDescription' + expected_body: + $ref: '#/components/schemas/loadBalancingExpectedBody' + expected_codes: + $ref: '#/components/schemas/loadBalancingExpectedCodes' + follow_redirects: + $ref: '#/components/schemas/loadBalancingFollowRedirects' + header: + $ref: '#/components/schemas/loadBalancingHeader' + interval: + $ref: '#/components/schemas/loadBalancingInterval' + method: + $ref: '#/components/schemas/loadBalancingMethod' + path: + $ref: '#/components/schemas/loadBalancingPath' + port: + $ref: '#/components/schemas/loadBalancingPort' + probe_zone: + $ref: '#/components/schemas/loadBalancingProbeZone' + retries: + $ref: '#/components/schemas/loadBalancingRetries' + timeout: + $ref: '#/components/schemas/loadBalancingTimeout' + x-stainless-naming: + python: + method_argument: load_balancer_monitor_timeout + type: + $ref: '#/components/schemas/loadBalancingType' + created_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + id: + $ref: '#/components/schemas/loadBalancingIdentifier' + modified_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Monitor Details response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Monitor Details + tags: + - Load Balancer Monitors + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + - 'Load Balancing: Monitors and Pools Read' + patch: + description: Apply changes to an existing monitor, overwriting the supplied properties. + operationId: load-balancer-monitors-patch-monitor + parameters: + - name: monitor_id + in: path + required: true + description: The Load Balancer monitor ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorEditable' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorResponseSingle' + description: Patch Monitor response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + allow_insecure: + $ref: '#/components/schemas/loadBalancingAllowInsecure' + consecutive_down: + $ref: '#/components/schemas/loadBalancingConsecutiveDown' + consecutive_up: + $ref: '#/components/schemas/loadBalancingConsecutiveUp' + description: + $ref: '#/components/schemas/loadBalancingDescription' + expected_body: + $ref: '#/components/schemas/loadBalancingExpectedBody' + expected_codes: + $ref: '#/components/schemas/loadBalancingExpectedCodes' + follow_redirects: + $ref: '#/components/schemas/loadBalancingFollowRedirects' + header: + $ref: '#/components/schemas/loadBalancingHeader' + interval: + $ref: '#/components/schemas/loadBalancingInterval' + method: + $ref: '#/components/schemas/loadBalancingMethod' + path: + $ref: '#/components/schemas/loadBalancingPath' + port: + $ref: '#/components/schemas/loadBalancingPort' + probe_zone: + $ref: '#/components/schemas/loadBalancingProbeZone' + retries: + $ref: '#/components/schemas/loadBalancingRetries' + timeout: + $ref: '#/components/schemas/loadBalancingTimeout' + x-stainless-naming: + python: + method_argument: load_balancer_monitor_timeout + type: + $ref: '#/components/schemas/loadBalancingType' + created_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + id: + $ref: '#/components/schemas/loadBalancingIdentifier' + modified_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Patch Monitor response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Patch Monitor + tags: + - Load Balancer Monitors + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + put: + description: Modify a configured monitor. + operationId: load-balancer-monitors-update-monitor + parameters: + - name: monitor_id + in: path + required: true + description: The Load Balancer monitor ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorEditable' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorResponseSingle' + description: Update Monitor response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + allow_insecure: + $ref: '#/components/schemas/loadBalancingAllowInsecure' + consecutive_down: + $ref: '#/components/schemas/loadBalancingConsecutiveDown' + consecutive_up: + $ref: '#/components/schemas/loadBalancingConsecutiveUp' + description: + $ref: '#/components/schemas/loadBalancingDescription' + expected_body: + $ref: '#/components/schemas/loadBalancingExpectedBody' + expected_codes: + $ref: '#/components/schemas/loadBalancingExpectedCodes' + follow_redirects: + $ref: '#/components/schemas/loadBalancingFollowRedirects' + header: + $ref: '#/components/schemas/loadBalancingHeader' + interval: + $ref: '#/components/schemas/loadBalancingInterval' + method: + $ref: '#/components/schemas/loadBalancingMethod' + path: + $ref: '#/components/schemas/loadBalancingPath' + port: + $ref: '#/components/schemas/loadBalancingPort' + probe_zone: + $ref: '#/components/schemas/loadBalancingProbeZone' + retries: + $ref: '#/components/schemas/loadBalancingRetries' + timeout: + $ref: '#/components/schemas/loadBalancingTimeout' + x-stainless-naming: + python: + method_argument: load_balancer_monitor_timeout + type: + $ref: '#/components/schemas/loadBalancingType' + created_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + id: + $ref: '#/components/schemas/loadBalancingIdentifier' + modified_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Update Monitor response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Monitor + tags: + - Load Balancer Monitors + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + /user/load_balancers/monitors/{monitor_id}/preview: + post: + description: Preview pools using the specified monitor with provided monitor details. The returned preview_id can be used in the preview endpoint to retrieve the results. + operationId: load-balancer-monitors-preview-monitor + parameters: + - name: monitor_id + in: path + required: true + description: The Load Balancer monitor ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorEditable' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingPreviewResponse' + description: Preview Monitor response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/unnamedSchemaRef025497b7e63379c31929636b5186e45c' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Preview Monitor response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Preview Monitor + tags: + - Load Balancer Monitors + /user/load_balancers/monitors/{monitor_id}/references: + get: + description: Get the list of resources that reference the provided monitor. + operationId: load-balancer-monitors-list-monitor-references + parameters: + - name: monitor_id + in: path + required: true + description: The Load Balancer monitor ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorReferencesResponse' + description: List Monitor References response. + 4XX: + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + description: List of resources that reference a given monitor. + items: + properties: + reference_type: + enum: + - '*' + - referral + - referrer + type: string + x-auditable: true + resource_id: + type: string + x-auditable: true + resource_name: + type: string + x-auditable: true + resource_type: + type: string + x-auditable: true + type: object + type: array + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + type: object + description: List Monitor References response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Monitor References + tags: + - Load Balancer Monitors + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + - 'Load Balancing: Monitors and Pools Read' + /user/load_balancers/pools: + get: + description: List configured pools. + operationId: load-balancer-pools-list-pools + parameters: + - in: query + name: monitor + schema: + description: The ID of the Monitor to use for checking the health of origins within this pool. + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingSchemasResponseCollection' + description: List Pools response. + 4XX: + content: + application/json: + schema: + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/loadBalancingResultInfo' + result: + items: + $ref: '#/components/schemas/loadBalancingPool' + type: array + enum: + - null + description: List Pools response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Pools + tags: + - Load Balancer Pools + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + - 'Load Balancing: Monitors and Pools Read' + patch: + description: Apply changes to a number of existing pools, overwriting the supplied properties. Pools are ordered by ascending `name`. Returns the list of affected pools. Supports the standard pagination query parameters, either `limit`/`offset` or `per_page`/`page`. + operationId: load-balancer-pools-patch-pools + requestBody: + content: + application/json: + schema: + properties: + notification_email: + $ref: '#/components/schemas/loadBalancingPatchPoolsNotificationEmail' + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingSchemasResponseCollection' + description: Patch Pools response. + 4XX: + content: + application/json: + schema: + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/loadBalancingResultInfo' + result: + items: + $ref: '#/components/schemas/loadBalancingPool' + type: array + enum: + - null + description: Patch Pools response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Patch Pools + tags: + - Load Balancer Pools + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + post: + description: Create a new pool. + operationId: load-balancer-pools-create-pool + requestBody: + content: + application/json: + schema: + properties: + check_regions: + $ref: '#/components/schemas/loadBalancingCheckRegions' + description: + $ref: '#/components/schemas/loadBalancingSchemasDescription' + enabled: + $ref: '#/components/schemas/loadBalancingEnabled' + latitude: + $ref: '#/components/schemas/loadBalancingLatitude' + load_shedding: + $ref: '#/components/schemas/loadBalancingLoadShedding' + longitude: + $ref: '#/components/schemas/loadBalancingLongitude' + minimum_origins: + $ref: '#/components/schemas/loadBalancingMinimumOrigins' + monitor: + $ref: '#/components/schemas/loadBalancingMonitorId' + monitor_group: + $ref: '#/components/schemas/loadBalancingMonitorGroupId' + name: + $ref: '#/components/schemas/loadBalancingName' + networks: + $ref: '#/components/schemas/loadBalancingNetworks' + notification_email: + $ref: '#/components/schemas/loadBalancingNotificationEmail' + notification_filter: + $ref: '#/components/schemas/loadBalancingNotificationFilter' + origin_steering: + $ref: '#/components/schemas/loadBalancingOriginSteering' + origins: + $ref: '#/components/schemas/loadBalancingOrigins' + required: + - origins + - name + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingSchemasSingleResponse' + description: Create Pool response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/loadBalancerPool' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Create Pool response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Pool + tags: + - Load Balancer Pools + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + /user/load_balancers/pools/{pool_id}: + delete: + description: Delete a configured pool. + operationId: load-balancer-pools-delete-pool + parameters: + - name: pool_id + in: path + required: true + description: The Load Balancer pool ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingSchemasIdResponse' + description: Delete Pool response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + id: + $ref: '#/components/schemas/loadBalancingSchemasIdentifier' + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Delete Pool response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Pool + tags: + - Load Balancer Pools + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + get: + description: Fetch a single configured pool. + operationId: load-balancer-pools-pool-details + parameters: + - name: pool_id + in: path + required: true + description: The Load Balancer pool ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingSchemasSingleResponse' + description: Pool Details response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/loadBalancerPool' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Pool Details response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Pool Details + tags: + - Load Balancer Pools + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + - 'Load Balancing: Monitors and Pools Read' + patch: + description: Apply changes to an existing pool, overwriting the supplied properties. + operationId: load-balancer-pools-patch-pool + parameters: + - name: pool_id + in: path + required: true + description: The Load Balancer pool ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + check_regions: + $ref: '#/components/schemas/loadBalancingCheckRegions' + description: + $ref: '#/components/schemas/loadBalancingSchemasDescription' + disabled_at: + $ref: '#/components/schemas/loadBalancingSchemasDisabledAt' + readOnly: true + enabled: + $ref: '#/components/schemas/loadBalancingEnabled' + latitude: + $ref: '#/components/schemas/loadBalancingLatitude' + load_shedding: + $ref: '#/components/schemas/loadBalancingLoadShedding' + longitude: + $ref: '#/components/schemas/loadBalancingLongitude' + minimum_origins: + $ref: '#/components/schemas/loadBalancingMinimumOrigins' + monitor: + $ref: '#/components/schemas/loadBalancingMonitorId' + monitor_group: + $ref: '#/components/schemas/loadBalancingMonitorGroupId' + name: + $ref: '#/components/schemas/loadBalancingName' + notification_email: + $ref: '#/components/schemas/loadBalancingNotificationEmail' + notification_filter: + $ref: '#/components/schemas/loadBalancingNotificationFilter' + origin_steering: + $ref: '#/components/schemas/loadBalancingOriginSteering' + origins: + $ref: '#/components/schemas/loadBalancingOrigins' + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingSchemasSingleResponse' + description: Patch Pool response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/loadBalancerPool' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Patch Pool response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Patch Pool + tags: + - Load Balancer Pools + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + put: + description: Modify a configured pool. + operationId: load-balancer-pools-update-pool + parameters: + - name: pool_id + in: path + required: true + description: The Load Balancer pool ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + check_regions: + $ref: '#/components/schemas/loadBalancingCheckRegions' + description: + $ref: '#/components/schemas/loadBalancingSchemasDescription' + disabled_at: + $ref: '#/components/schemas/loadBalancingSchemasDisabledAt' + readOnly: true + enabled: + $ref: '#/components/schemas/loadBalancingEnabled' + latitude: + $ref: '#/components/schemas/loadBalancingLatitude' + load_shedding: + $ref: '#/components/schemas/loadBalancingLoadShedding' + longitude: + $ref: '#/components/schemas/loadBalancingLongitude' + minimum_origins: + $ref: '#/components/schemas/loadBalancingMinimumOrigins' + monitor: + $ref: '#/components/schemas/loadBalancingMonitorId' + monitor_group: + $ref: '#/components/schemas/loadBalancingMonitorGroupId' + name: + $ref: '#/components/schemas/loadBalancingName' + networks: + $ref: '#/components/schemas/loadBalancingNetworks' + notification_email: + $ref: '#/components/schemas/loadBalancingNotificationEmail' + notification_filter: + $ref: '#/components/schemas/loadBalancingNotificationFilter' + origin_steering: + $ref: '#/components/schemas/loadBalancingOriginSteering' + origins: + $ref: '#/components/schemas/loadBalancingOrigins' + required: + - origins + - name + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingSchemasSingleResponse' + description: Update Pool response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/loadBalancerPool' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Update Pool response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Pool + tags: + - Load Balancer Pools + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + /user/load_balancers/pools/{pool_id}/health: + get: + description: Fetch the latest pool health status for a single pool. + operationId: load-balancer-pools-pool-health-details + parameters: + - name: pool_id + in: path + required: true + description: The Load Balancer pool ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingHealthDetails' + description: Pool Health Details response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + description: A list of regions from which to run health checks. Null means every Cloudflare data center. + properties: + pool_id: + description: Pool ID. + type: string + x-auditable: true + pop_health: + description: List of regions and associated health status. + properties: + healthy: + description: Whether health check in region is healthy. + type: boolean + x-auditable: true + origins: + items: + $ref: '#/components/schemas/loadBalancingOriginHealth' + type: array + type: object + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Pool Health Details response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Pool Health Details + tags: + - Load Balancer Pools + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + - 'Load Balancing: Monitors and Pools Read' + /user/load_balancers/pools/{pool_id}/preview: + post: + description: Preview pool health using provided monitor details. The returned preview_id can be used in the preview endpoint to retrieve the results. + operationId: load-balancer-pools-preview-pool + parameters: + - name: pool_id + in: path + required: true + description: The Load Balancer pool ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingMonitorEditable' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingPreviewResponse' + description: Preview Pool response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/unnamedSchemaRef025497b7e63379c31929636b5186e45c' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Preview Pool response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Preview Pool + tags: + - Load Balancer Pools + /user/load_balancers/pools/{pool_id}/references: + get: + description: Get the list of resources that reference the provided pool. + operationId: load-balancer-pools-list-pool-references + parameters: + - name: pool_id + in: path + required: true + description: The Load Balancer pool ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingPoolsReferencesResponse' + description: List Pool References response. + 4XX: + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + description: List of resources that reference a given pool. + items: + properties: + reference_type: + enum: + - '*' + - referral + - referrer + type: string + x-auditable: true + resource_id: + type: string + x-auditable: true + resource_name: + type: string + x-auditable: true + resource_type: + type: string + x-auditable: true + type: object + type: array + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + type: object + description: List Pool References response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Pool References + tags: + - Load Balancer Pools + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + - 'Load Balancing: Monitors and Pools Read' + /user/load_balancers/preview/{preview_id}: + get: + description: Get the result of a previous preview operation using the provided preview_id. + operationId: load-balancer-monitors-preview-result + parameters: + - in: path + name: preview_id + schema: + $ref: '#/components/schemas/loadBalancingPreviewId' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingPreviewResultResponse' + description: Preview Result response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + description: Resulting health data from a preview operation. + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Preview Result response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Preview Result + tags: + - Load Balancer Monitors + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + - 'Load Balancing: Monitors and Pools Read' + /zones/{zone_id}/load_balancers: + get: + description: List configured load balancers. + operationId: load-balancers-list-load-balancers + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingLoadBalancerComponentsSchemasResponseCollection' + description: List Load Balancers response. + 4XX: + content: + application/json: + schema: + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/loadBalancingResultInfo' + result: + items: + $ref: '#/components/schemas/loadBalancingLoadBalancer' + type: array + enum: + - null + description: List Load Balancers response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Load Balancers + tags: + - Load Balancers + x-api-token-group: + - Load Balancers Write + - Load Balancers Read + x-stackql-sdk: + service: load_balancers + resource_chain: [] + method: list + post: + description: Create a new load balancer. + operationId: load-balancers-create-load-balancer + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + adaptive_routing: + $ref: '#/components/schemas/loadBalancingAdaptiveRouting' + country_pools: + $ref: '#/components/schemas/loadBalancingCountryPools' + default_pools: + $ref: '#/components/schemas/loadBalancingDefaultPools' + description: + $ref: '#/components/schemas/loadBalancingComponentsSchemasDescription' + fallback_pool: + $ref: '#/components/schemas/loadBalancingFallbackPool' + location_strategy: + $ref: '#/components/schemas/loadBalancingLocationStrategy' + name: + $ref: '#/components/schemas/loadBalancingComponentsSchemasName' + networks: + $ref: '#/components/schemas/loadBalancingNetworks' + pop_pools: + $ref: '#/components/schemas/loadBalancingPopPools' + proxied: + $ref: '#/components/schemas/loadBalancingProxied' + random_steering: + $ref: '#/components/schemas/loadBalancingRandomSteering' + region_pools: + $ref: '#/components/schemas/loadBalancingRegionPools' + rules: + $ref: '#/components/schemas/loadBalancingRules' + session_affinity: + $ref: '#/components/schemas/loadBalancingSessionAffinity' + session_affinity_attributes: + $ref: '#/components/schemas/loadBalancingSessionAffinityAttributes' + session_affinity_ttl: + $ref: '#/components/schemas/loadBalancingSessionAffinityTtl' + steering_policy: + $ref: '#/components/schemas/loadBalancingSteeringPolicy' + ttl: + $ref: '#/components/schemas/loadBalancingTtl' + required: + - name + - default_pools + - fallback_pool + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingLoadBalancerComponentsSchemasSingleResponse' + description: Create Load Balancer response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + adaptive_routing: + $ref: '#/components/schemas/loadBalancingAdaptiveRouting' + country_pools: + $ref: '#/components/schemas/loadBalancingCountryPools' + created_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + default_pools: + $ref: '#/components/schemas/loadBalancingDefaultPools' + description: + $ref: '#/components/schemas/loadBalancingComponentsSchemasDescription' + enabled: + $ref: '#/components/schemas/loadBalancingComponentsSchemasEnabled' + fallback_pool: + $ref: '#/components/schemas/loadBalancingFallbackPool' + id: + $ref: '#/components/schemas/loadBalancingLoadBalancerComponentsSchemasIdentifier' + location_strategy: + $ref: '#/components/schemas/loadBalancingLocationStrategy' + modified_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + name: + $ref: '#/components/schemas/loadBalancingComponentsSchemasName' + networks: + $ref: '#/components/schemas/loadBalancingNetworks' + pop_pools: + $ref: '#/components/schemas/loadBalancingPopPools' + proxied: + $ref: '#/components/schemas/loadBalancingProxied' + random_steering: + $ref: '#/components/schemas/loadBalancingRandomSteering' + region_pools: + $ref: '#/components/schemas/loadBalancingRegionPools' + rules: + $ref: '#/components/schemas/loadBalancingRules' + session_affinity: + $ref: '#/components/schemas/loadBalancingSessionAffinity' + session_affinity_attributes: + $ref: '#/components/schemas/loadBalancingSessionAffinityAttributes' + session_affinity_ttl: + $ref: '#/components/schemas/loadBalancingSessionAffinityTtl' + steering_policy: + $ref: '#/components/schemas/loadBalancingSteeringPolicy' + ttl: + $ref: '#/components/schemas/loadBalancingTtl' + zone_name: + $ref: '#/components/schemas/loadBalancingComponentsSchemasZoneName' + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Create Load Balancer response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Load Balancer + tags: + - Load Balancers + x-api-token-group: + - Load Balancers Write + x-stackql-sdk: + service: load_balancers + resource_chain: [] + method: create + /zones/{zone_id}/load_balancers/{load_balancer_id}: + delete: + description: Delete a configured load balancer. + operationId: load-balancers-delete-load-balancer + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - name: load_balancer_id + in: path + required: true + description: The Load Balancer ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingComponentsSchemasIdResponse' + description: Delete Load Balancer response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + id: + $ref: '#/components/schemas/loadBalancingLoadBalancerComponentsSchemasIdentifier' + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Delete Load Balancer response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Load Balancer + tags: + - Load Balancers + x-api-token-group: + - Load Balancers Write + x-stackql-sdk: + service: load_balancers + resource_chain: [] + method: delete + get: + description: Fetch a single configured load balancer. + operationId: load-balancers-load-balancer-details + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - name: load_balancer_id + in: path + required: true + description: The Load Balancer ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingLoadBalancerComponentsSchemasSingleResponse' + description: Load Balancer Details response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + adaptive_routing: + $ref: '#/components/schemas/loadBalancingAdaptiveRouting' + country_pools: + $ref: '#/components/schemas/loadBalancingCountryPools' + created_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + default_pools: + $ref: '#/components/schemas/loadBalancingDefaultPools' + description: + $ref: '#/components/schemas/loadBalancingComponentsSchemasDescription' + enabled: + $ref: '#/components/schemas/loadBalancingComponentsSchemasEnabled' + fallback_pool: + $ref: '#/components/schemas/loadBalancingFallbackPool' + id: + $ref: '#/components/schemas/loadBalancingLoadBalancerComponentsSchemasIdentifier' + location_strategy: + $ref: '#/components/schemas/loadBalancingLocationStrategy' + modified_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + name: + $ref: '#/components/schemas/loadBalancingComponentsSchemasName' + networks: + $ref: '#/components/schemas/loadBalancingNetworks' + pop_pools: + $ref: '#/components/schemas/loadBalancingPopPools' + proxied: + $ref: '#/components/schemas/loadBalancingProxied' + random_steering: + $ref: '#/components/schemas/loadBalancingRandomSteering' + region_pools: + $ref: '#/components/schemas/loadBalancingRegionPools' + rules: + $ref: '#/components/schemas/loadBalancingRules' + session_affinity: + $ref: '#/components/schemas/loadBalancingSessionAffinity' + session_affinity_attributes: + $ref: '#/components/schemas/loadBalancingSessionAffinityAttributes' + session_affinity_ttl: + $ref: '#/components/schemas/loadBalancingSessionAffinityTtl' + steering_policy: + $ref: '#/components/schemas/loadBalancingSteeringPolicy' + ttl: + $ref: '#/components/schemas/loadBalancingTtl' + zone_name: + $ref: '#/components/schemas/loadBalancingComponentsSchemasZoneName' + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Load Balancer Details response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Load Balancer Details + tags: + - Load Balancers + x-api-token-group: + - Load Balancers Write + - Load Balancers Read + x-stackql-sdk: + service: load_balancers + resource_chain: [] + method: get + patch: + description: Apply changes to an existing load balancer, overwriting the supplied properties. + operationId: load-balancers-patch-load-balancer + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - name: load_balancer_id + in: path + required: true + description: The Load Balancer ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + adaptive_routing: + $ref: '#/components/schemas/loadBalancingAdaptiveRouting' + country_pools: + $ref: '#/components/schemas/loadBalancingCountryPools' + default_pools: + $ref: '#/components/schemas/loadBalancingDefaultPools' + description: + $ref: '#/components/schemas/loadBalancingComponentsSchemasDescription' + enabled: + $ref: '#/components/schemas/loadBalancingComponentsSchemasEnabled' + fallback_pool: + $ref: '#/components/schemas/loadBalancingFallbackPool' + location_strategy: + $ref: '#/components/schemas/loadBalancingLocationStrategy' + name: + $ref: '#/components/schemas/loadBalancingComponentsSchemasName' + pop_pools: + $ref: '#/components/schemas/loadBalancingPopPools' + proxied: + $ref: '#/components/schemas/loadBalancingProxied' + random_steering: + $ref: '#/components/schemas/loadBalancingRandomSteering' + region_pools: + $ref: '#/components/schemas/loadBalancingRegionPools' + rules: + $ref: '#/components/schemas/loadBalancingRules' + session_affinity: + $ref: '#/components/schemas/loadBalancingSessionAffinity' + session_affinity_attributes: + $ref: '#/components/schemas/loadBalancingSessionAffinityAttributes' + session_affinity_ttl: + $ref: '#/components/schemas/loadBalancingSessionAffinityTtl' + steering_policy: + $ref: '#/components/schemas/loadBalancingSteeringPolicy' + ttl: + $ref: '#/components/schemas/loadBalancingTtl' + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingLoadBalancerComponentsSchemasSingleResponse' + description: Patch Load Balancer response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + adaptive_routing: + $ref: '#/components/schemas/loadBalancingAdaptiveRouting' + country_pools: + $ref: '#/components/schemas/loadBalancingCountryPools' + created_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + default_pools: + $ref: '#/components/schemas/loadBalancingDefaultPools' + description: + $ref: '#/components/schemas/loadBalancingComponentsSchemasDescription' + enabled: + $ref: '#/components/schemas/loadBalancingComponentsSchemasEnabled' + fallback_pool: + $ref: '#/components/schemas/loadBalancingFallbackPool' + id: + $ref: '#/components/schemas/loadBalancingLoadBalancerComponentsSchemasIdentifier' + location_strategy: + $ref: '#/components/schemas/loadBalancingLocationStrategy' + modified_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + name: + $ref: '#/components/schemas/loadBalancingComponentsSchemasName' + networks: + $ref: '#/components/schemas/loadBalancingNetworks' + pop_pools: + $ref: '#/components/schemas/loadBalancingPopPools' + proxied: + $ref: '#/components/schemas/loadBalancingProxied' + random_steering: + $ref: '#/components/schemas/loadBalancingRandomSteering' + region_pools: + $ref: '#/components/schemas/loadBalancingRegionPools' + rules: + $ref: '#/components/schemas/loadBalancingRules' + session_affinity: + $ref: '#/components/schemas/loadBalancingSessionAffinity' + session_affinity_attributes: + $ref: '#/components/schemas/loadBalancingSessionAffinityAttributes' + session_affinity_ttl: + $ref: '#/components/schemas/loadBalancingSessionAffinityTtl' + steering_policy: + $ref: '#/components/schemas/loadBalancingSteeringPolicy' + ttl: + $ref: '#/components/schemas/loadBalancingTtl' + zone_name: + $ref: '#/components/schemas/loadBalancingComponentsSchemasZoneName' + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Patch Load Balancer response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Patch Load Balancer + tags: + - Load Balancers + x-api-token-group: + - Load Balancers Write + x-stackql-sdk: + service: load_balancers + resource_chain: [] + method: edit + put: + description: Update a configured load balancer. + operationId: load-balancers-update-load-balancer + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - name: load_balancer_id + in: path + required: true + description: The Load Balancer ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + adaptive_routing: + $ref: '#/components/schemas/loadBalancingAdaptiveRouting' + country_pools: + $ref: '#/components/schemas/loadBalancingCountryPools' + default_pools: + $ref: '#/components/schemas/loadBalancingDefaultPools' + description: + $ref: '#/components/schemas/loadBalancingComponentsSchemasDescription' + enabled: + $ref: '#/components/schemas/loadBalancingComponentsSchemasEnabled' + fallback_pool: + $ref: '#/components/schemas/loadBalancingFallbackPool' + location_strategy: + $ref: '#/components/schemas/loadBalancingLocationStrategy' + name: + $ref: '#/components/schemas/loadBalancingComponentsSchemasName' + networks: + $ref: '#/components/schemas/loadBalancingNetworks' + pop_pools: + $ref: '#/components/schemas/loadBalancingPopPools' + proxied: + $ref: '#/components/schemas/loadBalancingProxied' + random_steering: + $ref: '#/components/schemas/loadBalancingRandomSteering' + region_pools: + $ref: '#/components/schemas/loadBalancingRegionPools' + rules: + $ref: '#/components/schemas/loadBalancingRules' + session_affinity: + $ref: '#/components/schemas/loadBalancingSessionAffinity' + session_affinity_attributes: + $ref: '#/components/schemas/loadBalancingSessionAffinityAttributes' + session_affinity_ttl: + $ref: '#/components/schemas/loadBalancingSessionAffinityTtl' + steering_policy: + $ref: '#/components/schemas/loadBalancingSteeringPolicy' + ttl: + $ref: '#/components/schemas/loadBalancingTtl' + required: + - name + - default_pools + - fallback_pool + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingLoadBalancerComponentsSchemasSingleResponse' + description: Update Load Balancer response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + adaptive_routing: + $ref: '#/components/schemas/loadBalancingAdaptiveRouting' + country_pools: + $ref: '#/components/schemas/loadBalancingCountryPools' + created_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + default_pools: + $ref: '#/components/schemas/loadBalancingDefaultPools' + description: + $ref: '#/components/schemas/loadBalancingComponentsSchemasDescription' + enabled: + $ref: '#/components/schemas/loadBalancingComponentsSchemasEnabled' + fallback_pool: + $ref: '#/components/schemas/loadBalancingFallbackPool' + id: + $ref: '#/components/schemas/loadBalancingLoadBalancerComponentsSchemasIdentifier' + location_strategy: + $ref: '#/components/schemas/loadBalancingLocationStrategy' + modified_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + name: + $ref: '#/components/schemas/loadBalancingComponentsSchemasName' + networks: + $ref: '#/components/schemas/loadBalancingNetworks' + pop_pools: + $ref: '#/components/schemas/loadBalancingPopPools' + proxied: + $ref: '#/components/schemas/loadBalancingProxied' + random_steering: + $ref: '#/components/schemas/loadBalancingRandomSteering' + region_pools: + $ref: '#/components/schemas/loadBalancingRegionPools' + rules: + $ref: '#/components/schemas/loadBalancingRules' + session_affinity: + $ref: '#/components/schemas/loadBalancingSessionAffinity' + session_affinity_attributes: + $ref: '#/components/schemas/loadBalancingSessionAffinityAttributes' + session_affinity_ttl: + $ref: '#/components/schemas/loadBalancingSessionAffinityTtl' + steering_policy: + $ref: '#/components/schemas/loadBalancingSteeringPolicy' + ttl: + $ref: '#/components/schemas/loadBalancingTtl' + zone_name: + $ref: '#/components/schemas/loadBalancingComponentsSchemasZoneName' + type: object + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Update Load Balancer response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Load Balancer + tags: + - Load Balancers + x-api-token-group: + - Load Balancers Write + x-stackql-sdk: + service: load_balancers + resource_chain: [] + method: update +components: + schemas: + loadBalancerPool: + properties: + check_regions: + $ref: '#/components/schemas/loadBalancingCheckRegions' + created_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + description: + $ref: '#/components/schemas/loadBalancingSchemasDescription' + disabled_at: + $ref: '#/components/schemas/loadBalancingSchemasDisabledAt' + readOnly: true + enabled: + $ref: '#/components/schemas/loadBalancingEnabled' + id: + $ref: '#/components/schemas/loadBalancingSchemasIdentifier' + latitude: + $ref: '#/components/schemas/loadBalancingLatitude' + load_shedding: + $ref: '#/components/schemas/loadBalancingLoadShedding' + longitude: + $ref: '#/components/schemas/loadBalancingLongitude' + minimum_origins: + $ref: '#/components/schemas/loadBalancingMinimumOrigins' + modified_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + monitor: + $ref: '#/components/schemas/loadBalancingMonitorId' + monitor_group: + $ref: '#/components/schemas/loadBalancingMonitorGroupId' + name: + $ref: '#/components/schemas/loadBalancingName' + networks: + $ref: '#/components/schemas/loadBalancingNetworks' + notification_email: + $ref: '#/components/schemas/loadBalancingNotificationEmail' + notification_filter: + $ref: '#/components/schemas/loadBalancingNotificationFilter' + origin_steering: + $ref: '#/components/schemas/loadBalancingOriginSteering' + origins: + $ref: '#/components/schemas/loadBalancingOrigins' + type: object + enum: + - null + loadBalancingAdaptiveRouting: + description: Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests. For example, zero-downtime failover occurs immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 response codes. If there is another healthy origin in the same pool, the request is retried once against this alternate origin. + properties: + failover_across_pools: + default: false + description: Extends zero-downtime failover of requests to healthy origins from alternate pools, when no healthy alternate exists in the same pool, according to the failover order defined by traffic and origin steering. When set false (the default) zero-downtime failover will only occur between origins within the same pool. See `session_affinity_attributes` for control over when sessions are broken or reassigned. + example: true + type: boolean + x-auditable: true + type: object + loadBalancingAddress: + description: The IP address (IPv4 or IPv6) of the origin, or its publicly addressable hostname. Hostnames entered here should resolve directly to the origin, and not be a hostname proxied by Cloudflare. To set an internal/reserved address, virtual_network_id must also be set. + example: 0.0.0.0 + type: string + x-auditable: true + loadBalancingAllowInsecure: + default: false + description: Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors. + example: true + type: boolean + x-auditable: true + loadBalancingCheckRegions: + description: A list of regions from which to run health checks. Null means every Cloudflare data center. + example: + - WEU + - ENAM + items: + description: 'WNAM: Western North America, ENAM: Eastern North America, WEU: Western Europe, EEU: Eastern Europe, NSAM: Northern South America, SSAM: Southern South America, OC: Oceania, ME: Middle East, NAF: North Africa, SAF: South Africa, SAS: Southern Asia, SEAS: South East Asia, NEAS: North East Asia, ALL_REGIONS: all regions (ENTERPRISE customers only).' + enum: + - WNAM + - ENAM + - WEU + - EEU + - NSAM + - SSAM + - OC + - ME + - NAF + - SAF + - SAS + - SEAS + - NEAS + - ALL_REGIONS + type: string + x-auditable: true + nullable: true + type: array + loadBalancingComponentsSchemasDescription: + description: Object description. + example: Load Balancer for www.example.com + type: string + x-auditable: true + loadBalancingComponentsSchemasEnabled: + default: true + description: Whether to enable (the default) this load balancer. + example: true + type: boolean + x-auditable: true + loadBalancingComponentsSchemasIdResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + properties: + id: + $ref: '#/components/schemas/loadBalancingLoadBalancerComponentsSchemasIdentifier' + type: object + required: + - success + - errors + - messages + - result + loadBalancingComponentsSchemasName: + description: The DNS hostname to associate with your Load Balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the Load Balancer will take precedence and the DNS record will not be used. + example: www.example.com + type: string + x-auditable: true + loadBalancingComponentsSchemasSingleResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + description: A list of countries and subdivisions mapped to a region. + example: + iso_standard: Country and subdivision codes follow ISO 3166-1 alpha-2 and ISO 3166-2 + regions: + - countries: + - country_code_a2: CA + country_name: Canada + country_subdivisions: + - subdivision_code_a2: AB + subdivision_name: Alberta + - subdivision_code_a2: BC + subdivision_name: British Columbia + - country_code_a2: HT + country_name: Haiti + - country_code_a2: MX + country_name: Mexico + - country_code_a2: US + country_name: United States + country_subdivisions: + - subdivision_code_a2: AZ + subdivision_name: Arizona + - subdivision_code_a2: CA + subdivision_name: California + - subdivision_code_a2: CO + subdivision_name: Colorado + - subdivision_code_a2: HI + subdivision_name: Hawaii + - subdivision_code_a2: MN + subdivision_name: Minnesota + - subdivision_code_a2: MO + subdivision_name: Missouri + - subdivision_code_a2: NV + subdivision_name: Nevada + - subdivision_code_a2: OR + subdivision_name: Oregon + - subdivision_code_a2: TX + subdivision_name: Texas + - subdivision_code_a2: UT + subdivision_name: Utah + - subdivision_code_a2: WA + subdivision_name: Washington + region_code: WNAM + type: object + required: + - success + - errors + - messages + - result + loadBalancingComponentsSchemasZoneName: + example: example.com + type: string + x-auditable: true + loadBalancingConsecutiveDown: + description: To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times. + type: integer + x-auditable: true + loadBalancingConsecutiveUp: + description: To be marked healthy the monitored origin must pass this healthcheck N consecutive times. + type: integer + x-auditable: true + loadBalancingCountryPools: + description: A mapping of country codes to a list of pool IDs (ordered by their failover priority) for the given country. Any country not explicitly defined will fall back to using the corresponding region_pool mapping if it exists else to default_pools. + example: + GB: + - abd90f38ced07c2e2f4df50b1f61d4194 + US: + - de90f38ced07c2e2f4df50b1f61d4194 + - 00920f38ce07c2e2f4df50b1f61d4194 + type: object + loadBalancingDefaultPools: + description: A list of pool IDs ordered by their failover priority. Pools defined here are used by default, or when region_pools are not configured for a given region. + example: + - 17b5962d775c646f3f9725cbc7a53df4 + - 9290f38c5d07c2e2f4df57b1f61d4196 + - 00920f38ce07c2e2f4df50b1f61d4194 + items: + description: A pool ID. + type: string + type: array + loadBalancingDescription: + default: '' + description: Object description. + example: Login page monitor + type: string + x-auditable: true + loadBalancingDisabledAt: + description: This field shows up only if the origin is disabled. This field is set with the time the origin was disabled. + format: date-time + readOnly: true + type: string + x-auditable: true + loadBalancingEnabled: + default: true + description: Whether to enable (the default) or disable this pool. Disabled pools will not receive traffic and are excluded from health checks. Disabling a pool will cause any load balancers using it to failover to the next pool (if any). + example: false + type: boolean + x-auditable: true + loadBalancingExpectedBody: + default: '' + description: A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors. + example: alive + type: string + x-auditable: true + loadBalancingExpectedCodes: + default: '' + description: The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors. + example: 2xx + type: string + x-auditable: true + loadBalancingFallbackPool: + description: The pool ID to use when all other pools are detected as unhealthy. + type: string + x-auditable: true + loadBalancingFilterOptions: + description: Filter options for a particular resource type (pool or origin). Use null to reset. + nullable: true + properties: + disable: + default: false + description: If set true, disable notifications for this type of resource (pool or origin). + nullable: true + type: boolean + x-auditable: true + x-stainless-terraform-configurability: optional + healthy: + description: If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events). + nullable: true + type: boolean + x-auditable: true + type: object + loadBalancingFollowRedirects: + default: false + description: Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors. + example: true + type: boolean + x-auditable: true + loadBalancingHeader: + description: The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. This parameter is only valid for HTTP and HTTPS monitors. + example: + Host: + - example.com + X-App-ID: + - abc123 + type: object + loadBalancingHealthDetails: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + description: A list of regions from which to run health checks. Null means every Cloudflare data center. + example: + pool_id: 17b5962d775c646f3f9725cbc7a53df4 + pop_health: + Amsterdam, NL: + healthy: true + origins: + - 2001:DB8::5: + failure_reason: No failures + healthy: true + response_code: 401 + rtt: 12.1ms + properties: + pool_id: + description: Pool ID. + example: 17b5962d775c646f3f9725cbc7a53df4 + type: string + x-auditable: true + pop_health: + description: List of regions and associated health status. + properties: + healthy: + description: Whether health check in region is healthy. + example: true + type: boolean + x-auditable: true + origins: + items: + $ref: '#/components/schemas/loadBalancingOriginHealth' + type: array + type: object + type: object + required: + - success + - errors + - messages + - result + loadBalancingHost: + description: The 'Host' header allows to override the hostname set in the HTTP request. Current support is 1 'Host' header override per origin. + items: + example: example.com + type: string + x-auditable: true + type: array + loadBalancingIdResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + properties: + id: + $ref: '#/components/schemas/loadBalancingIdentifier' + type: object + required: + - success + - errors + - messages + - result + loadBalancingIdentifier: + example: f1aba936b94213e5b8dca0c0dbf1f9cc + type: string + x-auditable: true + loadBalancingInterval: + default: 60 + description: The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations. + type: integer + x-auditable: true + loadBalancingLatitude: + description: The latitude of the data center containing the origins used in this pool in decimal degrees. If this is set, longitude must also be set. + type: number + x-auditable: true + loadBalancingLoadBalancer: + properties: + adaptive_routing: + $ref: '#/components/schemas/loadBalancingAdaptiveRouting' + country_pools: + $ref: '#/components/schemas/loadBalancingCountryPools' + created_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + default_pools: + $ref: '#/components/schemas/loadBalancingDefaultPools' + description: + $ref: '#/components/schemas/loadBalancingComponentsSchemasDescription' + enabled: + $ref: '#/components/schemas/loadBalancingComponentsSchemasEnabled' + fallback_pool: + $ref: '#/components/schemas/loadBalancingFallbackPool' + id: + $ref: '#/components/schemas/loadBalancingLoadBalancerComponentsSchemasIdentifier' + location_strategy: + $ref: '#/components/schemas/loadBalancingLocationStrategy' + modified_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + name: + $ref: '#/components/schemas/loadBalancingComponentsSchemasName' + networks: + $ref: '#/components/schemas/loadBalancingNetworks' + pop_pools: + $ref: '#/components/schemas/loadBalancingPopPools' + proxied: + $ref: '#/components/schemas/loadBalancingProxied' + random_steering: + $ref: '#/components/schemas/loadBalancingRandomSteering' + region_pools: + $ref: '#/components/schemas/loadBalancingRegionPools' + rules: + $ref: '#/components/schemas/loadBalancingRules' + session_affinity: + $ref: '#/components/schemas/loadBalancingSessionAffinity' + session_affinity_attributes: + $ref: '#/components/schemas/loadBalancingSessionAffinityAttributes' + session_affinity_ttl: + $ref: '#/components/schemas/loadBalancingSessionAffinityTtl' + steering_policy: + $ref: '#/components/schemas/loadBalancingSteeringPolicy' + ttl: + $ref: '#/components/schemas/loadBalancingTtl' + zone_name: + $ref: '#/components/schemas/loadBalancingComponentsSchemasZoneName' + type: object + loadBalancingLoadBalancerComponentsSchemasIdentifier: + example: 699d98642c564d2e855e9661899b7252 + type: string + x-auditable: true + loadBalancingLoadBalancerComponentsSchemasResponseCollection: + required: + - success + - errors + - messages + - result + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/loadBalancingResultInfo' + result: + items: + $ref: '#/components/schemas/loadBalancingLoadBalancer' + type: array + loadBalancingLoadBalancerComponentsSchemasSingleResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/loadBalancingLoadBalancer' + required: + - success + - errors + - messages + - result + loadBalancingLoadShedding: + description: Configures load shedding policies and percentages for the pool. + nullable: true + properties: + default_percent: + default: 0 + description: The percent of traffic to shed from the pool, according to the default policy. Applies to new sessions and traffic without session affinity. + maximum: 100 + minimum: 0 + type: number + x-auditable: true + default_policy: + default: random + description: The default policy to use when load shedding. A random policy randomly sheds a given percent of requests. A hash policy computes a hash over the CF-Connecting-IP address and sheds all requests originating from a percent of IPs. + enum: + - random + - hash + type: string + x-auditable: true + session_percent: + default: 0 + description: The percent of existing sessions to shed from the pool, according to the session policy. + maximum: 100 + minimum: 0 + type: number + x-auditable: true + session_policy: + default: hash + description: Only the hash policy is supported for existing sessions (to avoid exponential decay). + enum: + - hash + type: string + x-auditable: true + type: object + x-stainless-terraform-configurability: computed_optional + loadBalancingLocationStrategy: + description: Controls location-based steering for non-proxied requests. See `steering_policy` to learn how steering is affected. + properties: + mode: + default: pop + description: 'Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful. - `"pop"`: Use the Cloudflare PoP location. - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is unsuccessful, use the Cloudflare PoP location.' + enum: + - pop + - resolver_ip + example: resolver_ip + type: string + x-auditable: true + prefer_ecs: + default: proximity + description: 'Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location. - `"always"`: Always prefer ECS. - `"never"`: Never prefer ECS. - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. - `"geo"`: Prefer ECS only when `steering_policy="geo"`.' + enum: + - always + - never + - proximity + - geo + example: always + type: string + x-auditable: true + type: object + loadBalancingLongitude: + description: The longitude of the data center containing the origins used in this pool in decimal degrees. If this is set, latitude must also be set. + type: number + x-auditable: true + loadBalancingMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + loadBalancingMethod: + description: The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks. + example: GET + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + loadBalancingMinimumOrigins: + default: 1 + description: The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and will failover to the next available pool. + type: integer + x-auditable: true + loadBalancingMonitor: + properties: + allow_insecure: + $ref: '#/components/schemas/loadBalancingAllowInsecure' + consecutive_down: + $ref: '#/components/schemas/loadBalancingConsecutiveDown' + consecutive_up: + $ref: '#/components/schemas/loadBalancingConsecutiveUp' + description: + $ref: '#/components/schemas/loadBalancingDescription' + expected_body: + $ref: '#/components/schemas/loadBalancingExpectedBody' + expected_codes: + $ref: '#/components/schemas/loadBalancingExpectedCodes' + follow_redirects: + $ref: '#/components/schemas/loadBalancingFollowRedirects' + header: + $ref: '#/components/schemas/loadBalancingHeader' + interval: + $ref: '#/components/schemas/loadBalancingInterval' + method: + $ref: '#/components/schemas/loadBalancingMethod' + path: + $ref: '#/components/schemas/loadBalancingPath' + port: + $ref: '#/components/schemas/loadBalancingPort' + probe_zone: + $ref: '#/components/schemas/loadBalancingProbeZone' + retries: + $ref: '#/components/schemas/loadBalancingRetries' + timeout: + $ref: '#/components/schemas/loadBalancingTimeout' + x-stainless-naming: + python: + method_argument: load_balancer_monitor_timeout + type: + $ref: '#/components/schemas/loadBalancingType' + created_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + id: + $ref: '#/components/schemas/loadBalancingIdentifier' + modified_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + type: object + loadBalancingMonitorEditable: + properties: + allow_insecure: + $ref: '#/components/schemas/loadBalancingAllowInsecure' + consecutive_down: + $ref: '#/components/schemas/loadBalancingConsecutiveDown' + consecutive_up: + $ref: '#/components/schemas/loadBalancingConsecutiveUp' + description: + $ref: '#/components/schemas/loadBalancingDescription' + expected_body: + $ref: '#/components/schemas/loadBalancingExpectedBody' + expected_codes: + $ref: '#/components/schemas/loadBalancingExpectedCodes' + follow_redirects: + $ref: '#/components/schemas/loadBalancingFollowRedirects' + header: + $ref: '#/components/schemas/loadBalancingHeader' + interval: + $ref: '#/components/schemas/loadBalancingInterval' + method: + $ref: '#/components/schemas/loadBalancingMethod' + path: + $ref: '#/components/schemas/loadBalancingPath' + port: + $ref: '#/components/schemas/loadBalancingPort' + probe_zone: + $ref: '#/components/schemas/loadBalancingProbeZone' + retries: + $ref: '#/components/schemas/loadBalancingRetries' + timeout: + $ref: '#/components/schemas/loadBalancingTimeout' + x-stainless-naming: + python: + method_argument: load_balancer_monitor_timeout + type: + $ref: '#/components/schemas/loadBalancingType' + type: object + loadBalancingMonitorGroup: + properties: + created_at: + description: The timestamp of when the monitor group was created + example: '2014-01-01T05:20:00.12345Z' + format: date-time + readOnly: true + type: string + description: + description: A short description of the monitor group + example: Primary datacenter monitors + type: string + id: + $ref: '#/components/schemas/loadBalancingMonitorGroupId' + members: + description: List of monitors in this group + items: + $ref: '#/components/schemas/loadBalancingMonitorGroupMember' + type: array + updated_at: + description: The timestamp of when the monitor group was last updated + example: '2014-01-01T05:20:00.12345Z' + format: date-time + readOnly: true + type: string + required: + - id + - description + - members + type: object + loadBalancingMonitorGroupId: + description: The ID of the Monitor Group to use for checking the health of origins within this pool. + type: string + x-auditable: true + loadBalancingMonitorGroupMember: + properties: + created_at: + description: The timestamp of when the monitor was added to the group + example: '2014-01-01T05:20:00.12345Z' + format: date-time + readOnly: true + type: string + enabled: + description: Whether this monitor is enabled in the group + example: true + type: boolean + monitor_id: + $ref: '#/components/schemas/loadBalancingMonitorId' + monitoring_only: + description: Whether this monitor is used for monitoring only (does not affect pool health) + example: false + type: boolean + must_be_healthy: + description: Whether this monitor must be healthy for the pool to be considered healthy + example: true + type: boolean + updated_at: + description: The timestamp of when the monitor group member was last updated + example: '2014-01-01T05:20:00.12345Z' + format: date-time + readOnly: true + type: string + required: + - monitor_id + - enabled + - monitoring_only + - must_be_healthy + type: object + loadBalancingMonitorGroupReferencesResponse: + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + description: List of resources that reference a given monitor group. + example: + - reference_type: referrer + resource_id: 17b5962d775c646f3f9725cbc7a53df4 + resource_name: primary-dc-1 + resource_type: pool + items: + $ref: '#/components/schemas/loadBalancingMonitorGroupReferencesResponse_result_item' + type: array + required: + - success + - errors + - messages + - result + type: object + loadBalancingMonitorGroupReferencesResponse_result_item: + properties: + reference_type: + enum: + - '*' + - referral + - referrer + type: string + x-auditable: true + resource_id: + type: string + x-auditable: true + resource_name: + type: string + x-auditable: true + resource_type: + type: string + x-auditable: true + type: object + loadBalancingMonitorGroupResponseCollection: + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + items: + $ref: '#/components/schemas/loadBalancingMonitorGroup' + type: array + result_info: + $ref: '#/components/schemas/loadBalancingResultInfo' + required: + - success + - errors + - messages + - result + type: object + loadBalancingMonitorGroupSingleResponse: + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/loadBalancingMonitorGroup' + required: + - success + - errors + - messages + - result + type: object + loadBalancingMonitorId: + description: The ID of the Monitor to use for checking the health of origins within this pool. + type: string + x-auditable: true + loadBalancingMonitorReferencesResponse: + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + description: List of resources that reference a given monitor. + example: + - reference_type: referrer + resource_id: 17b5962d775c646f3f9725cbc7a53df4 + resource_name: primary-dc-1 + resource_type: pool + items: + $ref: '#/components/schemas/loadBalancingMonitorReferencesResponse_result_item' + type: array + required: + - success + - errors + - messages + - result + type: object + loadBalancingMonitorReferencesResponse_result_item: + properties: + reference_type: + enum: + - '*' + - referral + - referrer + type: string + x-auditable: true + resource_id: + type: string + x-auditable: true + resource_name: + type: string + x-auditable: true + resource_type: + type: string + x-auditable: true + type: object + loadBalancingMonitorResponseCollection: + required: + - success + - errors + - messages + - result + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/loadBalancingResultInfo' + result: + items: + $ref: '#/components/schemas/loadBalancingMonitor' + type: array + loadBalancingMonitorResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/loadBalancingMonitor' + required: + - success + - errors + - messages + - result + loadBalancingName: + description: A short name (tag) for the pool. Only alphanumeric characters, hyphens, and underscores are allowed. + example: primary-dc-1 + type: string + x-auditable: true + loadBalancingNetworks: + description: List of networks where Load Balancer or Pool is enabled. + items: + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + type: array + loadBalancingNotificationEmail: + default: '' + description: This field is now deprecated. It has been moved to Cloudflare's Centralized Notification service https://developers.cloudflare.com/fundamentals/notifications/. The email address to send health status notifications to. This can be an individual mailbox or a mailing list. Multiple emails can be supplied as a comma delimited list. + example: someone@example.com,sometwo@example.com + type: string + x-auditable: true + loadBalancingNotificationFilter: + description: Filter pool and origin health notifications by resource type or health status. Use null to reset. + example: + origin: + disable: true + pool: + healthy: false + nullable: true + properties: + origin: + $ref: '#/components/schemas/loadBalancingFilterOptions' + pool: + $ref: '#/components/schemas/loadBalancingFilterOptions' + type: object + x-stainless-terraform-configurability: computed_optional + loadBalancingOrigin: + properties: + address: + $ref: '#/components/schemas/loadBalancingAddress' + disabled_at: + $ref: '#/components/schemas/loadBalancingDisabledAt' + readOnly: true + enabled: + $ref: '#/components/schemas/loadBalancingSchemasEnabled' + flatten_cname: + $ref: '#/components/schemas/loadBalancingOriginFlattenCname' + header: + $ref: '#/components/schemas/loadBalancingSchemasHeader' + name: + $ref: '#/components/schemas/loadBalancingSchemasName' + port: + $ref: '#/components/schemas/loadBalancingOriginPort' + virtual_network_id: + $ref: '#/components/schemas/loadBalancingVirtualNetworkId' + weight: + $ref: '#/components/schemas/loadBalancingWeight' + type: object + loadBalancingOriginFlattenCname: + default: true + description: Whether to flatten CNAME records for this origin, resolving them to A/AAAA records before returning to the client. When true (the default), the director resolves CNAME addresses to their underlying A/AAAA records. When false, the origin address is returned as a raw CNAME record without resolution. This setting mirrors the DNS API record flatten_cname setting. + type: boolean + loadBalancingOriginHealth: + properties: + ip: + properties: + failure_reason: + description: Failure reason. + example: No failure reasons + type: string + x-auditable: true + healthy: + description: Origin health status. + example: true + type: boolean + x-auditable: true + response_code: + description: Response code from origin health check. + example: 200 + type: number + x-auditable: true + rtt: + description: Origin RTT (Round Trip Time) response. + example: 201.5ms + type: string + x-auditable: true + type: object + type: object + loadBalancingOriginPort: + default: 0 + description: The port for upstream connections. A value of 0 means the default port for the protocol will be used. + type: integer + loadBalancingOriginSteering: + description: Configures origin steering for the pool. Controls how origins are selected for new sessions and traffic without session affinity. + nullable: true + properties: + policy: + default: random + description: 'The type of origin steering policy to use. - `"random"`: Select an origin randomly. - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP address. - `"least_outstanding_requests"`: Select an origin by taking into consideration origin weights, as well as each origin''s number of outstanding requests. Origins with more pending requests are weighted proportionately less relative to others. - `"least_connections"`: Select an origin by taking into consideration origin weights, as well as each origin''s number of open connections. Origins with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections.' + enum: + - random + - hash + - least_outstanding_requests + - least_connections + type: string + x-auditable: true + type: object + x-stainless-terraform-configurability: computed_optional + loadBalancingOrigins: + description: The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy. + items: + $ref: '#/components/schemas/loadBalancingOrigin' + type: array + x-stainless-collection-type: set + loadBalancingPatchPoolsNotificationEmail: + description: The email address to send health status notifications to. This field is now deprecated in favor of Cloudflare Notifications for Load Balancing, so only resetting this field with an empty string `""` is accepted. + enum: + - '' + example: '' + type: string + loadBalancingPath: + description: The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors. + example: /health + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + loadBalancingPool: + properties: + check_regions: + $ref: '#/components/schemas/loadBalancingCheckRegions' + created_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + description: + $ref: '#/components/schemas/loadBalancingSchemasDescription' + disabled_at: + $ref: '#/components/schemas/loadBalancingSchemasDisabledAt' + readOnly: true + enabled: + $ref: '#/components/schemas/loadBalancingEnabled' + id: + $ref: '#/components/schemas/loadBalancingSchemasIdentifier' + latitude: + $ref: '#/components/schemas/loadBalancingLatitude' + load_shedding: + $ref: '#/components/schemas/loadBalancingLoadShedding' + longitude: + $ref: '#/components/schemas/loadBalancingLongitude' + minimum_origins: + $ref: '#/components/schemas/loadBalancingMinimumOrigins' + modified_on: + $ref: '#/components/schemas/loadBalancingTimestamp' + readOnly: true + monitor: + $ref: '#/components/schemas/loadBalancingMonitorId' + monitor_group: + $ref: '#/components/schemas/loadBalancingMonitorGroupId' + name: + $ref: '#/components/schemas/loadBalancingName' + networks: + $ref: '#/components/schemas/loadBalancingNetworks' + notification_email: + $ref: '#/components/schemas/loadBalancingNotificationEmail' + notification_filter: + $ref: '#/components/schemas/loadBalancingNotificationFilter' + origin_steering: + $ref: '#/components/schemas/loadBalancingOriginSteering' + origins: + $ref: '#/components/schemas/loadBalancingOrigins' + type: object + loadBalancingPoolsReferencesResponse: + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + description: List of resources that reference a given pool. + example: + - reference_type: referrer + resource_id: 699d98642c564d2e855e9661899b7252 + resource_name: www.example.com + resource_type: load_balancer + - reference_type: referral + resource_id: f1aba936b94213e5b8dca0c0dbf1f9cc + resource_name: Login page monitor + resource_type: monitor + items: + $ref: '#/components/schemas/loadBalancingPoolsReferencesResponse_result_item' + type: array + required: + - success + - errors + - messages + - result + type: object + loadBalancingPoolsReferencesResponse_result_item: + properties: + reference_type: + enum: + - '*' + - referral + - referrer + type: string + x-auditable: true + resource_id: + type: string + x-auditable: true + resource_name: + type: string + x-auditable: true + resource_type: + type: string + x-auditable: true + type: object + loadBalancingPopPools: + description: 'Enterprise only: A mapping of Cloudflare PoP identifiers to a list of pool IDs (ordered by their failover priority) for the PoP (datacenter). Any PoPs not explicitly defined will fall back to using the corresponding country_pool, then region_pool mapping if it exists else to default_pools.' + example: + LAX: + - de90f38ced07c2e2f4df50b1f61d4194 + - 9290f38c5d07c2e2f4df57b1f61d4196 + LHR: + - abd90f38ced07c2e2f4df50b1f61d4194 + - f9138c5d07c2e2f4df57b1f61d4196 + SJC: + - 00920f38ce07c2e2f4df50b1f61d4194 + type: object + loadBalancingPort: + description: 'The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).' + nullable: true + type: integer + x-auditable: true + x-stainless-terraform-configurability: optional + loadBalancingPreviewId: + example: f1aba936b94213e5b8dca0c0dbf1f9cc + type: string + loadBalancingPreviewResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + properties: + pools: + description: Monitored pool IDs mapped to their respective names. + example: + abwlnp5jbqn45ecgxd03erbgtxtqai0d: WNAM Datacenter + ve8h9lrcip5n5bbga9yqmdws28ay5d0l: EEU Datacenter + type: object + preview_id: + $ref: '#/components/schemas/loadBalancingIdentifier' + type: object + required: + - success + - errors + - messages + - result + loadBalancingPreviewResult: + description: Resulting health data from a preview operation. + example: + abwlnp5jbqn45ecgxd03erbgtxtqai0d: + healthy: true + origins: + - originone.example.com.: + failure_reason: No failures + healthy: true + response_code: 200 + rtt: 66ms + type: object + loadBalancingPreviewResultResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/loadBalancingPreviewResult' + required: + - success + - errors + - messages + - result + loadBalancingProbeZone: + default: '' + description: Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors. + example: example.com + type: string + x-auditable: true + loadBalancingProxied: + default: false + description: Whether the hostname should be gray clouded (false) or orange clouded (true). + example: true + type: boolean + x-auditable: true + loadBalancingRandomSteering: + description: 'Configures pool weights. - `steering_policy="random"`: A random pool is selected with probability proportional to pool weights. - `steering_policy="least_outstanding_requests"`: Use pool weights to scale each pool''s outstanding requests. - `steering_policy="least_connections"`: Use pool weights to scale each pool''s open connections.' + properties: + default_weight: + default: 1 + description: The default weight for pools in the load balancer that are not specified in the pool_weights map. + example: 0.2 + maximum: 1 + minimum: 0 + multipleOf: 0.1 + type: number + x-auditable: true + pool_weights: + description: A mapping of pool IDs to custom weights. The weight is relative to other pools in the load balancer. + example: + 9290f38c5d07c2e2f4df57b1f61d4196: 0.5 + de90f38ced07c2e2f4df50b1f61d4194: 0.3 + type: object + type: object + loadBalancingRegionCode: + description: 'A list of Cloudflare regions. WNAM: Western North America, ENAM: Eastern North America, WEU: Western Europe, EEU: Eastern Europe, NSAM: Northern South America, SSAM: Southern South America, OC: Oceania, ME: Middle East, NAF: North Africa, SAF: South Africa, SAS: Southern Asia, SEAS: South East Asia, NEAS: North East Asia).' + enum: + - WNAM + - ENAM + - WEU + - EEU + - NSAM + - SSAM + - OC + - ME + - NAF + - SAF + - SAS + - SEAS + - NEAS + example: WNAM + type: string + loadBalancingRegionComponentsSchemasResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + type: object + required: + - success + - errors + - messages + - result + loadBalancingRegionPools: + description: A mapping of region codes to a list of pool IDs (ordered by their failover priority) for the given region. Any regions not explicitly defined will fall back to using default_pools. + example: + ENAM: + - 00920f38ce07c2e2f4df50b1f61d4194 + WNAM: + - de90f38ced07c2e2f4df50b1f61d4194 + - 9290f38c5d07c2e2f4df57b1f61d4196 + type: object + loadBalancingResourceReference: + description: A reference to a load balancer resource. + properties: + reference_type: + description: When listed as a reference, the type (direction) of the reference. + enum: + - referral + - referrer + type: string + x-auditable: true + references: + description: A list of references to (referrer) or from (referral) this resource. + example: + - reference_type: referrer + resource_id: 699d98642c564d2e855e9661899b7252 + resource_name: www.example.com + resource_type: load_balancer + - reference_type: referral + resource_id: f1aba936b94213e5b8dca0c0dbf1f9cc + resource_name: Login page monitor + resource_type: monitor + items: + description: A reference to a load balancer resource. + type: object + type: array + resource_id: + example: 17b5962d775c646f3f9725cbc7a53df4 + type: string + resource_name: + description: The human-identifiable name of the resource. + example: primary-dc-1 + type: string + x-auditable: true + resource_type: + description: The type of the resource. + enum: + - load_balancer + - monitor + - pool + example: pool + type: string + x-auditable: true + type: object + loadBalancingResultInfo: + properties: + count: + description: Total number of results on the current page. + example: 20 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 2000 + type: number + total_pages: + description: Total number of pages available. + example: 100 + type: number + type: object + loadBalancingRetries: + default: 2 + description: The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately. + type: integer + x-auditable: true + loadBalancingRules: + description: 'BETA Field Not General Access: A list of rules for this load balancer to execute.' + items: + description: A rule object containing conditions and overrides for this load balancer to evaluate. + properties: + condition: + description: The condition expressions to evaluate. If the condition evaluates to true, the overrides or fixed_response in this rule will be applied. An empty condition is always true. For more details on condition expressions, please see https://developers.cloudflare.com/load-balancing/understand-basics/load-balancing-rules/expressions. + example: http.request.uri.path contains "/testing" + type: string + x-auditable: true + disabled: + default: false + description: Disable this specific rule. It will no longer be evaluated by this load balancer. + type: boolean + x-auditable: true + fixed_response: + description: A collection of fields used to directly respond to the eyeball instead of routing to a pool. If a fixed_response is supplied the rule will be marked as terminates. + properties: + content_type: + description: The http 'Content-Type' header to include in the response. + example: application/json + maxLength: 32 + type: string + x-auditable: true + location: + description: The http 'Location' header to include in the response. + example: www.example.com + maxLength: 2048 + type: string + x-auditable: true + message_body: + description: Text to include as the http body. + example: Testing Hello + maxLength: 1024 + type: string + x-auditable: true + status_code: + description: The http status code to respond with. + type: integer + x-auditable: true + type: object + name: + description: Name of this rule. Only used for human readability. + example: route the path /testing to testing datacenter. + maxLength: 200 + type: string + x-auditable: true + overrides: + description: A collection of overrides to apply to the load balancer when this rule's condition is true. All fields are optional. + properties: + adaptive_routing: + $ref: '#/components/schemas/loadBalancingAdaptiveRouting' + country_pools: + $ref: '#/components/schemas/loadBalancingCountryPools' + default_pools: + $ref: '#/components/schemas/loadBalancingDefaultPools' + fallback_pool: + $ref: '#/components/schemas/loadBalancingFallbackPool' + location_strategy: + $ref: '#/components/schemas/loadBalancingLocationStrategy' + pop_pools: + $ref: '#/components/schemas/loadBalancingPopPools' + random_steering: + $ref: '#/components/schemas/loadBalancingRandomSteering' + region_pools: + $ref: '#/components/schemas/loadBalancingRegionPools' + session_affinity: + $ref: '#/components/schemas/loadBalancingSessionAffinity' + session_affinity_attributes: + $ref: '#/components/schemas/loadBalancingSessionAffinityAttributes' + session_affinity_ttl: + $ref: '#/components/schemas/loadBalancingSessionAffinityTtl' + steering_policy: + $ref: '#/components/schemas/loadBalancingSteeringPolicy' + ttl: + $ref: '#/components/schemas/loadBalancingTtl' + type: object + priority: + default: 0 + description: The order in which rules should be executed in relation to each other. Lower values are executed first. Values do not need to be sequential. If no value is provided for any rule the array order of the rules field will be used to assign a priority. + minimum: 0 + type: integer + x-auditable: true + terminates: + description: If this rule's condition is true, this causes rule evaluation to stop after processing this rule. + type: boolean + x-auditable: true + type: object + type: array + loadBalancingSchemasDescription: + default: '' + description: A human-readable description of the pool. + example: Primary data center - Provider XYZ + type: string + x-auditable: true + loadBalancingSchemasDisabledAt: + description: This field shows up only if the pool is disabled. This field is set with the time the pool was disabled at. + format: date-time + readOnly: true + type: string + x-auditable: true + loadBalancingSchemasEnabled: + default: true + description: Whether to enable (the default) this origin within the pool. Disabled origins will not receive traffic and are excluded from health checks. The origin will only be disabled for the current pool. + example: true + type: boolean + x-auditable: true + loadBalancingSchemasHeader: + description: The request header is used to pass additional information with an HTTP request. Currently supported header is 'Host'. + properties: + Host: + $ref: '#/components/schemas/loadBalancingHost' + type: object + loadBalancingSchemasIdResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + properties: + id: + $ref: '#/components/schemas/loadBalancingSchemasIdentifier' + type: object + required: + - success + - errors + - messages + - result + loadBalancingSchemasIdentifier: + example: 17b5962d775c646f3f9725cbc7a53df4 + type: string + x-auditable: true + loadBalancingSchemasName: + description: A human-identifiable name for the origin. + example: app-server-1 + type: string + x-auditable: true + loadBalancingSchemasPreviewId: + example: p1aba936b94213e5b8dca0c0dbf1f9cc + type: string + loadBalancingSchemasResponseCollection: + required: + - success + - errors + - messages + - result + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/loadBalancingResultInfo' + result: + items: + $ref: '#/components/schemas/loadBalancingPool' + type: array + loadBalancingSchemasSingleResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/loadBalancingPool' + required: + - success + - errors + - messages + - result + loadBalancingSearch: + properties: + resources: + description: A list of resources matching the search query. + items: + $ref: '#/components/schemas/loadBalancingResourceReference' + type: array + type: object + loadBalancingSessionAffinity: + default: none + description: 'Specifies the type of session affinity the load balancer should use unless specified as `"none"`. The supported types are: - `"cookie"`: On the first request to a proxied load balancer, a cookie is generated, encoding information of which origin the request will be forwarded to. Subsequent requests, by the same client to the same load balancer, will be sent to the origin server the cookie encodes, for the duration of the cookie and as long as the origin server remains healthy. If the cookie has expired or the origin server is unhealthy, then a new origin server is calculated and used. - `"ip_cookie"`: Behaves the same as `"cookie"` except the initial origin selection is stable and based on the client''s ip address. - `"header"`: On the first request to a proxied load balancer, a session key based on the configured HTTP headers (see `session_affinity_attributes.headers`) is generated, encoding the request headers used for storing in the load balancer session state which + origin the request will be forwarded to. Subsequent requests to the load balancer with the same headers will be sent to the same origin server, for the duration of the session and as long as the origin server remains healthy. If the session has been idle for the duration of `session_affinity_ttl` seconds or the origin server is unhealthy, then a new origin server is calculated and used. See `headers` in `session_affinity_attributes` for additional required configuration.' + enum: + - none + - cookie + - ip_cookie + - header + example: cookie + type: string + x-auditable: true + loadBalancingSessionAffinityAttributes: + description: Configures attributes for session affinity. + properties: + drain_duration: + description: Configures the drain duration in seconds. This field is only used when session affinity is enabled on the load balancer. + example: 100 + type: number + x-auditable: true + headers: + description: 'Configures the names of HTTP headers to base session affinity on when header `session_affinity` is enabled. At least one HTTP header name must be provided. To specify the exact cookies to be used, include an item in the following format: `"cookie:,"` (example) where everything after the colon is a comma-separated list of cookie names. Providing only `"cookie"` will result in all cookies being used. The default max number of HTTP header names that can be provided depends on your plan: 5 for Enterprise, 1 for all other plans.' + items: + description: An HTTP header name. + maxLength: 100 + minLength: 1 + type: string + x-auditable: true + type: array + uniqueItems: true + require_all_headers: + default: false + description: 'When header `session_affinity` is enabled, this option can be used to specify how HTTP headers on load balancing requests will be used. The supported values are: - `"true"`: Load balancing requests must contain *all* of the HTTP headers specified by the `headers` session affinity attribute, otherwise sessions aren''t created. - `"false"`: Load balancing requests must contain *at least one* of the HTTP headers specified by the `headers` session affinity attribute, otherwise sessions aren''t created.' + type: boolean + x-auditable: true + samesite: + default: Auto + description: 'Configures the SameSite attribute on session affinity cookie. Value "Auto" will be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: when using value "None", the secure attribute can not be set to "Never".' + enum: + - Auto + - Lax + - None + - Strict + example: Auto + type: string + x-auditable: true + secure: + default: Auto + description: Configures the Secure attribute on session affinity cookie. Value "Always" indicates the Secure attribute will be set in the Set-Cookie header, "Never" indicates the Secure attribute will not be set, and "Auto" will set the Secure attribute depending if Always Use HTTPS is enabled. + enum: + - Auto + - Always + - Never + example: Auto + type: string + x-auditable: true + zero_downtime_failover: + default: none + description: 'Configures the zero-downtime failover between origins within a pool when session affinity is enabled. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. The supported values are: - `"none"`: No failover takes place for sessions pinned to the origin (default). - `"temporary"`: Traffic will be sent to another other healthy origin until the originally pinned origin is available; note that this can potentially result in heavy origin flapping. - `"sticky"`: The session affinity cookie is updated and subsequent requests are sent to the new origin. Note: Zero-downtime failover with sticky sessions is currently not supported for session affinity by header.' + enum: + - none + - temporary + - sticky + example: sticky + type: string + x-auditable: true + type: object + loadBalancingSessionAffinityTtl: + description: 'Time, in seconds, until a client''s session expires after being created. Once the expiry time has been reached, subsequent requests may get sent to a different origin server. The accepted ranges per `session_affinity` policy are: - `"cookie"` / `"ip_cookie"`: The current default of 23 hours will be used unless explicitly set. The accepted range of values is between [1800, 604800]. - `"header"`: The current default of 1800 seconds will be used unless explicitly set. The accepted range of values is between [30, 3600]. Note: With session affinity by header, sessions only expire after they haven''t been used for the number of seconds specified.' + example: 1800 + type: number + x-auditable: true + loadBalancingSteeringPolicy: + default: '' + description: 'Steering Policy for this load balancer. - `"off"`: Use `default_pools`. - `"geo"`: Use `region_pools`/`country_pools`/`pop_pools`. For non-proxied requests, the country for `country_pools` is determined by `location_strategy`. - `"random"`: Select a pool randomly. - `"dynamic_latency"`: Use round trip time to select the closest pool in default_pools (requires pool health checks). - `"proximity"`: Use the pools'' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined by `location_strategy` for non-proxied requests. - `"least_outstanding_requests"`: Select a pool by taking into consideration `random_steering` weights, as well as each pool''s number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others. - `"least_connections"`: Select a pool by taking into consideration `random_steering` weights, as well as each pool''s number of open connections. + Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections. - `""`: Will map to `"geo"` if you use `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`.' + enum: + - 'off' + - geo + - random + - dynamic_latency + - proximity + - least_outstanding_requests + - least_connections + - '' + example: dynamic_latency + type: string + x-auditable: true + loadBalancingSubdivisionCodeA2: + description: Two-letter subdivision code followed in ISO 3166-2. + example: CA + type: string + x-auditable: true + loadBalancingTimeout: + default: 5 + description: The timeout (in seconds) before marking the health check as failed. + type: integer + x-auditable: true + loadBalancingTimestamp: + example: '2014-01-01T05:20:00.12345Z' + readOnly: true + type: string + x-auditable: true + loadBalancingTtl: + description: Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This only applies to gray-clouded (unproxied) load balancers. + example: 30 + type: number + x-auditable: true + loadBalancingType: + default: http + description: The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. + enum: + - http + - https + - tcp + - udp_icmp + - icmp_ping + - smtp + example: https + type: string + x-auditable: true + loadBalancingVirtualNetworkId: + description: The virtual network subnet ID the origin belongs in. Virtual network must also belong to the account. + example: a5624d4e-044a-4ff0-b3e1-e2465353d4b4 + type: string + loadBalancingWeight: + default: 1 + description: 'The weight of this origin relative to other origins in the pool. Based on the configured weight the total traffic is distributed among origins within the pool. - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the origin''s outstanding requests. - `origin_steering.policy="least_connections"`: Use weight to scale the origin''s open connections.' + example: 0.6 + maximum: 1 + minimum: 0 + multipleOf: 0.01 + type: number + x-auditable: true + responseInfo: + properties: + code: + minimum: 1000 + type: integer + message: + type: string + documentation_url: + type: string + source: + type: object + properties: + pointer: + type: string + required: + - code + - message + type: object + uniqueItems: true + unnamedSchemaRef025497b7e63379c31929636b5186e45c: + properties: + pools: + description: Monitored pool IDs mapped to their respective names. + example: + abwlnp5jbqn45ecgxd03erbgtxtqai0d: WNAM Datacenter + ve8h9lrcip5n5bbga9yqmdws28ay5d0l: EEU Datacenter + type: object + preview_id: + $ref: '#/components/schemas/loadBalancingIdentifier' + type: object + enum: + - null + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + monitor_groups: + id: cloudflare.load_balancers.monitor_groups + name: monitor_groups + title: Monitor Groups + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1monitor_groups/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1monitor_groups/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .id }}{{ $sep }}"id": {{ toJson .id }}{{- $sep = "," -}}{{ end }} + + {{- if .members }}{{ $sep }}"members": {{ if eq (kindOf .members) "string" }}{{ .members }}{{ else }}{{ toJson .members }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1monitor_groups~1{monitor_group_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1monitor_groups~1{monitor_group_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1monitor_groups~1{monitor_group_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .id }}{{ $sep }}"id": {{ toJson .id }}{{- $sep = "," -}}{{ end }} + + {{- if .members }}{{ $sep }}"members": {{ if eq (kindOf .members) "string" }}{{ .members }}{{ else }}{{ toJson .members }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1monitor_groups~1{monitor_group_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .id }}{{ $sep }}"id": {{ toJson .id }}{{- $sep = "," -}}{{ end }} + + {{- if .members }}{{ $sep }}"members": {{ if eq (kindOf .members) "string" }}{{ .members }}{{ else }}{{ toJson .members }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/monitor_groups/methods/get' + - $ref: '#/components/x-stackQL-resources/monitor_groups/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/monitor_groups/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/monitor_groups/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/monitor_groups/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/monitor_groups/methods/update' + monitor_groups_references: + id: cloudflare.load_balancers.monitor_groups_references + name: monitor_groups_references + title: Monitor Groups References + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1monitor_groups~1{monitor_group_id}~1references/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/monitor_groups_references/methods/list_by_account' + insert: [] + update: [] + delete: [] + replace: [] + monitors: + id: cloudflare.load_balancers.monitors + name: monitors + title: Monitors + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1monitors/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1monitors/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allow_insecure }}{{ $sep }}"allow_insecure": {{ toJson .allow_insecure }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_down }}{{ $sep }}"consecutive_down": {{ toJson .consecutive_down }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_up }}{{ $sep }}"consecutive_up": {{ toJson .consecutive_up }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .expected_body }}{{ $sep }}"expected_body": {{ toJson .expected_body }}{{- $sep = "," -}}{{ end }} + + {{- if .expected_codes }}{{ $sep }}"expected_codes": {{ toJson .expected_codes }}{{- $sep = "," -}}{{ end }} + + {{- if .follow_redirects }}{{ $sep }}"follow_redirects": {{ toJson .follow_redirects }}{{- $sep = "," -}}{{ end }} + + {{- if .header }}{{ $sep }}"header": {{ if eq (kindOf .header) "string" }}{{ .header }}{{ else }}{{ toJson .header }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interval }}{{ $sep }}"interval": {{ toJson .interval }}{{- $sep = "," -}}{{ end }} + + {{- if .method }}{{ $sep }}"method": {{ toJson .method }}{{- $sep = "," -}}{{ end }} + + {{- if .path }}{{ $sep }}"path": {{ toJson .path }}{{- $sep = "," -}}{{ end }} + + {{- if .port }}{{ $sep }}"port": {{ toJson .port }}{{- $sep = "," -}}{{ end }} + + {{- if .probe_zone }}{{ $sep }}"probe_zone": {{ toJson .probe_zone }}{{- $sep = "," -}}{{ end }} + + {{- if .retries }}{{ $sep }}"retries": {{ toJson .retries }}{{- $sep = "," -}}{{ end }} + + {{- if .timeout }}{{ $sep }}"timeout": {{ toJson .timeout }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1monitors~1{monitor_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1monitors~1{monitor_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1monitors~1{monitor_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allow_insecure }}{{ $sep }}"allow_insecure": {{ toJson .allow_insecure }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_down }}{{ $sep }}"consecutive_down": {{ toJson .consecutive_down }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_up }}{{ $sep }}"consecutive_up": {{ toJson .consecutive_up }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .expected_body }}{{ $sep }}"expected_body": {{ toJson .expected_body }}{{- $sep = "," -}}{{ end }} + + {{- if .expected_codes }}{{ $sep }}"expected_codes": {{ toJson .expected_codes }}{{- $sep = "," -}}{{ end }} + + {{- if .follow_redirects }}{{ $sep }}"follow_redirects": {{ toJson .follow_redirects }}{{- $sep = "," -}}{{ end }} + + {{- if .header }}{{ $sep }}"header": {{ if eq (kindOf .header) "string" }}{{ .header }}{{ else }}{{ toJson .header }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interval }}{{ $sep }}"interval": {{ toJson .interval }}{{- $sep = "," -}}{{ end }} + + {{- if .method }}{{ $sep }}"method": {{ toJson .method }}{{- $sep = "," -}}{{ end }} + + {{- if .path }}{{ $sep }}"path": {{ toJson .path }}{{- $sep = "," -}}{{ end }} + + {{- if .port }}{{ $sep }}"port": {{ toJson .port }}{{- $sep = "," -}}{{ end }} + + {{- if .probe_zone }}{{ $sep }}"probe_zone": {{ toJson .probe_zone }}{{- $sep = "," -}}{{ end }} + + {{- if .retries }}{{ $sep }}"retries": {{ toJson .retries }}{{- $sep = "," -}}{{ end }} + + {{- if .timeout }}{{ $sep }}"timeout": {{ toJson .timeout }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1monitors~1{monitor_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allow_insecure }}{{ $sep }}"allow_insecure": {{ toJson .allow_insecure }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_down }}{{ $sep }}"consecutive_down": {{ toJson .consecutive_down }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_up }}{{ $sep }}"consecutive_up": {{ toJson .consecutive_up }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .expected_body }}{{ $sep }}"expected_body": {{ toJson .expected_body }}{{- $sep = "," -}}{{ end }} + + {{- if .expected_codes }}{{ $sep }}"expected_codes": {{ toJson .expected_codes }}{{- $sep = "," -}}{{ end }} + + {{- if .follow_redirects }}{{ $sep }}"follow_redirects": {{ toJson .follow_redirects }}{{- $sep = "," -}}{{ end }} + + {{- if .header }}{{ $sep }}"header": {{ if eq (kindOf .header) "string" }}{{ .header }}{{ else }}{{ toJson .header }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interval }}{{ $sep }}"interval": {{ toJson .interval }}{{- $sep = "," -}}{{ end }} + + {{- if .method }}{{ $sep }}"method": {{ toJson .method }}{{- $sep = "," -}}{{ end }} + + {{- if .path }}{{ $sep }}"path": {{ toJson .path }}{{- $sep = "," -}}{{ end }} + + {{- if .port }}{{ $sep }}"port": {{ toJson .port }}{{- $sep = "," -}}{{ end }} + + {{- if .probe_zone }}{{ $sep }}"probe_zone": {{ toJson .probe_zone }}{{- $sep = "," -}}{{ end }} + + {{- if .retries }}{{ $sep }}"retries": {{ toJson .retries }}{{- $sep = "," -}}{{ end }} + + {{- if .timeout }}{{ $sep }}"timeout": {{ toJson .timeout }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' + list_by_user: + operation: + $ref: '#/paths/~1user~1load_balancers~1monitors/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + load_balancer_monitors_create_monitor: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1user~1load_balancers~1monitors/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allow_insecure }}{{ $sep }}"allow_insecure": {{ toJson .allow_insecure }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_down }}{{ $sep }}"consecutive_down": {{ toJson .consecutive_down }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_up }}{{ $sep }}"consecutive_up": {{ toJson .consecutive_up }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .expected_body }}{{ $sep }}"expected_body": {{ toJson .expected_body }}{{- $sep = "," -}}{{ end }} + + {{- if .expected_codes }}{{ $sep }}"expected_codes": {{ toJson .expected_codes }}{{- $sep = "," -}}{{ end }} + + {{- if .follow_redirects }}{{ $sep }}"follow_redirects": {{ toJson .follow_redirects }}{{- $sep = "," -}}{{ end }} + + {{- if .header }}{{ $sep }}"header": {{ if eq (kindOf .header) "string" }}{{ .header }}{{ else }}{{ toJson .header }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interval }}{{ $sep }}"interval": {{ toJson .interval }}{{- $sep = "," -}}{{ end }} + + {{- if .method }}{{ $sep }}"method": {{ toJson .method }}{{- $sep = "," -}}{{ end }} + + {{- if .path }}{{ $sep }}"path": {{ toJson .path }}{{- $sep = "," -}}{{ end }} + + {{- if .port }}{{ $sep }}"port": {{ toJson .port }}{{- $sep = "," -}}{{ end }} + + {{- if .probe_zone }}{{ $sep }}"probe_zone": {{ toJson .probe_zone }}{{- $sep = "," -}}{{ end }} + + {{- if .retries }}{{ $sep }}"retries": {{ toJson .retries }}{{- $sep = "," -}}{{ end }} + + {{- if .timeout }}{{ $sep }}"timeout": {{ toJson .timeout }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' + load_balancer_monitors_delete_monitor: + operation: + $ref: '#/paths/~1user~1load_balancers~1monitors~1{monitor_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get_by_user: + operation: + $ref: '#/paths/~1user~1load_balancers~1monitors~1{monitor_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + load_balancer_monitors_patch_monitor: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1user~1load_balancers~1monitors~1{monitor_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allow_insecure }}{{ $sep }}"allow_insecure": {{ toJson .allow_insecure }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_down }}{{ $sep }}"consecutive_down": {{ toJson .consecutive_down }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_up }}{{ $sep }}"consecutive_up": {{ toJson .consecutive_up }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .expected_body }}{{ $sep }}"expected_body": {{ toJson .expected_body }}{{- $sep = "," -}}{{ end }} + + {{- if .expected_codes }}{{ $sep }}"expected_codes": {{ toJson .expected_codes }}{{- $sep = "," -}}{{ end }} + + {{- if .follow_redirects }}{{ $sep }}"follow_redirects": {{ toJson .follow_redirects }}{{- $sep = "," -}}{{ end }} + + {{- if .header }}{{ $sep }}"header": {{ if eq (kindOf .header) "string" }}{{ .header }}{{ else }}{{ toJson .header }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interval }}{{ $sep }}"interval": {{ toJson .interval }}{{- $sep = "," -}}{{ end }} + + {{- if .method }}{{ $sep }}"method": {{ toJson .method }}{{- $sep = "," -}}{{ end }} + + {{- if .path }}{{ $sep }}"path": {{ toJson .path }}{{- $sep = "," -}}{{ end }} + + {{- if .port }}{{ $sep }}"port": {{ toJson .port }}{{- $sep = "," -}}{{ end }} + + {{- if .probe_zone }}{{ $sep }}"probe_zone": {{ toJson .probe_zone }}{{- $sep = "," -}}{{ end }} + + {{- if .retries }}{{ $sep }}"retries": {{ toJson .retries }}{{- $sep = "," -}}{{ end }} + + {{- if .timeout }}{{ $sep }}"timeout": {{ toJson .timeout }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' + load_balancer_monitors_update_monitor: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1user~1load_balancers~1monitors~1{monitor_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allow_insecure }}{{ $sep }}"allow_insecure": {{ toJson .allow_insecure }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_down }}{{ $sep }}"consecutive_down": {{ toJson .consecutive_down }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_up }}{{ $sep }}"consecutive_up": {{ toJson .consecutive_up }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .expected_body }}{{ $sep }}"expected_body": {{ toJson .expected_body }}{{- $sep = "," -}}{{ end }} + + {{- if .expected_codes }}{{ $sep }}"expected_codes": {{ toJson .expected_codes }}{{- $sep = "," -}}{{ end }} + + {{- if .follow_redirects }}{{ $sep }}"follow_redirects": {{ toJson .follow_redirects }}{{- $sep = "," -}}{{ end }} + + {{- if .header }}{{ $sep }}"header": {{ if eq (kindOf .header) "string" }}{{ .header }}{{ else }}{{ toJson .header }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interval }}{{ $sep }}"interval": {{ toJson .interval }}{{- $sep = "," -}}{{ end }} + + {{- if .method }}{{ $sep }}"method": {{ toJson .method }}{{- $sep = "," -}}{{ end }} + + {{- if .path }}{{ $sep }}"path": {{ toJson .path }}{{- $sep = "," -}}{{ end }} + + {{- if .port }}{{ $sep }}"port": {{ toJson .port }}{{- $sep = "," -}}{{ end }} + + {{- if .probe_zone }}{{ $sep }}"probe_zone": {{ toJson .probe_zone }}{{- $sep = "," -}}{{ end }} + + {{- if .retries }}{{ $sep }}"retries": {{ toJson .retries }}{{- $sep = "," -}}{{ end }} + + {{- if .timeout }}{{ $sep }}"timeout": {{ toJson .timeout }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/monitors/methods/get_by_account' + - $ref: '#/components/x-stackQL-resources/monitors/methods/list_by_account' + - $ref: '#/components/x-stackQL-resources/monitors/methods/get_by_user' + - $ref: '#/components/x-stackQL-resources/monitors/methods/list_by_user' + insert: + - $ref: '#/components/x-stackQL-resources/monitors/methods/create' + - $ref: '#/components/x-stackQL-resources/monitors/methods/load_balancer_monitors_create_monitor' + update: + - $ref: '#/components/x-stackQL-resources/monitors/methods/edit' + - $ref: '#/components/x-stackQL-resources/monitors/methods/load_balancer_monitors_patch_monitor' + delete: + - $ref: '#/components/x-stackQL-resources/monitors/methods/delete' + - $ref: '#/components/x-stackQL-resources/monitors/methods/load_balancer_monitors_delete_monitor' + replace: + - $ref: '#/components/x-stackQL-resources/monitors/methods/update' + - $ref: '#/components/x-stackQL-resources/monitors/methods/load_balancer_monitors_update_monitor' + previews: + id: cloudflare.load_balancers.previews + name: previews + title: Previews + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1monitors~1{monitor_id}~1preview/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allow_insecure }}{{ $sep }}"allow_insecure": {{ toJson .allow_insecure }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_down }}{{ $sep }}"consecutive_down": {{ toJson .consecutive_down }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_up }}{{ $sep }}"consecutive_up": {{ toJson .consecutive_up }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .expected_body }}{{ $sep }}"expected_body": {{ toJson .expected_body }}{{- $sep = "," -}}{{ end }} + + {{- if .expected_codes }}{{ $sep }}"expected_codes": {{ toJson .expected_codes }}{{- $sep = "," -}}{{ end }} + + {{- if .follow_redirects }}{{ $sep }}"follow_redirects": {{ toJson .follow_redirects }}{{- $sep = "," -}}{{ end }} + + {{- if .header }}{{ $sep }}"header": {{ if eq (kindOf .header) "string" }}{{ .header }}{{ else }}{{ toJson .header }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interval }}{{ $sep }}"interval": {{ toJson .interval }}{{- $sep = "," -}}{{ end }} + + {{- if .method }}{{ $sep }}"method": {{ toJson .method }}{{- $sep = "," -}}{{ end }} + + {{- if .path }}{{ $sep }}"path": {{ toJson .path }}{{- $sep = "," -}}{{ end }} + + {{- if .port }}{{ $sep }}"port": {{ toJson .port }}{{- $sep = "," -}}{{ end }} + + {{- if .probe_zone }}{{ $sep }}"probe_zone": {{ toJson .probe_zone }}{{- $sep = "," -}}{{ end }} + + {{- if .retries }}{{ $sep }}"retries": {{ toJson .retries }}{{- $sep = "," -}}{{ end }} + + {{- if .timeout }}{{ $sep }}"timeout": {{ toJson .timeout }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1preview~1{preview_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/previews/methods/get' + insert: + - $ref: '#/components/x-stackQL-resources/previews/methods/create' + update: [] + delete: [] + replace: [] + monitors_references: + id: cloudflare.load_balancers.monitors_references + name: monitors_references + title: Monitors References + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1monitors~1{monitor_id}~1references/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + list_by_user: + operation: + $ref: '#/paths/~1user~1load_balancers~1monitors~1{monitor_id}~1references/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/monitors_references/methods/list_by_account' + - $ref: '#/components/x-stackQL-resources/monitors_references/methods/list_by_user' + insert: [] + update: [] + delete: [] + replace: [] + pools: + id: cloudflare.load_balancers.pools + name: pools + title: Pools + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1pools/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + account_load_balancer_pools_patch_pools: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1pools/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1pools/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .latitude }}{{ $sep }}"latitude": {{ toJson .latitude }}{{- $sep = "," -}}{{ end }} + + {{- if .load_shedding }}{{ $sep }}"load_shedding": {{ if eq (kindOf .load_shedding) "string" }}{{ .load_shedding }}{{ else }}{{ toJson .load_shedding }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .longitude }}{{ $sep }}"longitude": {{ toJson .longitude }}{{- $sep = "," -}}{{ end }} + + {{- if .minimum_origins }}{{ $sep }}"minimum_origins": {{ toJson .minimum_origins }}{{- $sep = "," -}}{{ end }} + + {{- if .monitor }}{{ $sep }}"monitor": {{ toJson .monitor }}{{- $sep = "," -}}{{ end }} + + {{- if .monitor_group }}{{ $sep }}"monitor_group": {{ toJson .monitor_group }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .notification_email }}{{ $sep }}"notification_email": {{ toJson .notification_email }}{{- $sep = "," -}}{{ end }} + + {{- if .notification_filter }}{{ $sep }}"notification_filter": {{ if eq (kindOf .notification_filter) "string" }}{{ .notification_filter }}{{ else }}{{ toJson .notification_filter }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .origin_steering }}{{ $sep }}"origin_steering": {{ if eq (kindOf .origin_steering) "string" }}{{ .origin_steering }}{{ else }}{{ toJson .origin_steering }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .origins }}{{ $sep }}"origins": {{ if eq (kindOf .origins) "string" }}{{ .origins }}{{ else }}{{ toJson .origins }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1pools~1{pool_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1pools~1{pool_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1pools~1{pool_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .check_regions }}{{ $sep }}"check_regions": {{ if eq (kindOf .check_regions) "string" }}{{ .check_regions }}{{ else }}{{ toJson .check_regions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .latitude }}{{ $sep }}"latitude": {{ toJson .latitude }}{{- $sep = "," -}}{{ end }} + + {{- if .load_shedding }}{{ $sep }}"load_shedding": {{ if eq (kindOf .load_shedding) "string" }}{{ .load_shedding }}{{ else }}{{ toJson .load_shedding }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .longitude }}{{ $sep }}"longitude": {{ toJson .longitude }}{{- $sep = "," -}}{{ end }} + + {{- if .minimum_origins }}{{ $sep }}"minimum_origins": {{ toJson .minimum_origins }}{{- $sep = "," -}}{{ end }} + + {{- if .monitor }}{{ $sep }}"monitor": {{ toJson .monitor }}{{- $sep = "," -}}{{ end }} + + {{- if .monitor_group }}{{ $sep }}"monitor_group": {{ toJson .monitor_group }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .notification_email }}{{ $sep }}"notification_email": {{ toJson .notification_email }}{{- $sep = "," -}}{{ end }} + + {{- if .notification_filter }}{{ $sep }}"notification_filter": {{ if eq (kindOf .notification_filter) "string" }}{{ .notification_filter }}{{ else }}{{ toJson .notification_filter }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .origin_steering }}{{ $sep }}"origin_steering": {{ if eq (kindOf .origin_steering) "string" }}{{ .origin_steering }}{{ else }}{{ toJson .origin_steering }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .origins }}{{ $sep }}"origins": {{ if eq (kindOf .origins) "string" }}{{ .origins }}{{ else }}{{ toJson .origins }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1pools~1{pool_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .check_regions }}{{ $sep }}"check_regions": {{ if eq (kindOf .check_regions) "string" }}{{ .check_regions }}{{ else }}{{ toJson .check_regions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .latitude }}{{ $sep }}"latitude": {{ toJson .latitude }}{{- $sep = "," -}}{{ end }} + + {{- if .load_shedding }}{{ $sep }}"load_shedding": {{ if eq (kindOf .load_shedding) "string" }}{{ .load_shedding }}{{ else }}{{ toJson .load_shedding }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .longitude }}{{ $sep }}"longitude": {{ toJson .longitude }}{{- $sep = "," -}}{{ end }} + + {{- if .minimum_origins }}{{ $sep }}"minimum_origins": {{ toJson .minimum_origins }}{{- $sep = "," -}}{{ end }} + + {{- if .monitor }}{{ $sep }}"monitor": {{ toJson .monitor }}{{- $sep = "," -}}{{ end }} + + {{- if .monitor_group }}{{ $sep }}"monitor_group": {{ toJson .monitor_group }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .notification_email }}{{ $sep }}"notification_email": {{ toJson .notification_email }}{{- $sep = "," -}}{{ end }} + + {{- if .notification_filter }}{{ $sep }}"notification_filter": {{ if eq (kindOf .notification_filter) "string" }}{{ .notification_filter }}{{ else }}{{ toJson .notification_filter }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .origin_steering }}{{ $sep }}"origin_steering": {{ if eq (kindOf .origin_steering) "string" }}{{ .origin_steering }}{{ else }}{{ toJson .origin_steering }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .origins }}{{ $sep }}"origins": {{ if eq (kindOf .origins) "string" }}{{ .origins }}{{ else }}{{ toJson .origins }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + list_by_user: + operation: + $ref: '#/paths/~1user~1load_balancers~1pools/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + load_balancer_pools_patch_pools: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1user~1load_balancers~1pools/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + load_balancer_pools_create_pool: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1user~1load_balancers~1pools/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .check_regions }}{{ $sep }}"check_regions": {{ if eq (kindOf .check_regions) "string" }}{{ .check_regions }}{{ else }}{{ toJson .check_regions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .latitude }}{{ $sep }}"latitude": {{ toJson .latitude }}{{- $sep = "," -}}{{ end }} + + {{- if .load_shedding }}{{ $sep }}"load_shedding": {{ if eq (kindOf .load_shedding) "string" }}{{ .load_shedding }}{{ else }}{{ toJson .load_shedding }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .longitude }}{{ $sep }}"longitude": {{ toJson .longitude }}{{- $sep = "," -}}{{ end }} + + {{- if .minimum_origins }}{{ $sep }}"minimum_origins": {{ toJson .minimum_origins }}{{- $sep = "," -}}{{ end }} + + {{- if .monitor }}{{ $sep }}"monitor": {{ toJson .monitor }}{{- $sep = "," -}}{{ end }} + + {{- if .monitor_group }}{{ $sep }}"monitor_group": {{ toJson .monitor_group }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .networks }}{{ $sep }}"networks": {{ if eq (kindOf .networks) "string" }}{{ .networks }}{{ else }}{{ toJson .networks }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .notification_email }}{{ $sep }}"notification_email": {{ toJson .notification_email }}{{- $sep = "," -}}{{ end }} + + {{- if .notification_filter }}{{ $sep }}"notification_filter": {{ if eq (kindOf .notification_filter) "string" }}{{ .notification_filter }}{{ else }}{{ toJson .notification_filter }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .origin_steering }}{{ $sep }}"origin_steering": {{ if eq (kindOf .origin_steering) "string" }}{{ .origin_steering }}{{ else }}{{ toJson .origin_steering }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .origins }}{{ $sep }}"origins": {{ if eq (kindOf .origins) "string" }}{{ .origins }}{{ else }}{{ toJson .origins }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + load_balancer_pools_delete_pool: + operation: + $ref: '#/paths/~1user~1load_balancers~1pools~1{pool_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get_by_user: + operation: + $ref: '#/paths/~1user~1load_balancers~1pools~1{pool_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + load_balancer_pools_patch_pool: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1user~1load_balancers~1pools~1{pool_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .check_regions }}{{ $sep }}"check_regions": {{ if eq (kindOf .check_regions) "string" }}{{ .check_regions }}{{ else }}{{ toJson .check_regions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .latitude }}{{ $sep }}"latitude": {{ toJson .latitude }}{{- $sep = "," -}}{{ end }} + + {{- if .load_shedding }}{{ $sep }}"load_shedding": {{ if eq (kindOf .load_shedding) "string" }}{{ .load_shedding }}{{ else }}{{ toJson .load_shedding }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .longitude }}{{ $sep }}"longitude": {{ toJson .longitude }}{{- $sep = "," -}}{{ end }} + + {{- if .minimum_origins }}{{ $sep }}"minimum_origins": {{ toJson .minimum_origins }}{{- $sep = "," -}}{{ end }} + + {{- if .monitor }}{{ $sep }}"monitor": {{ toJson .monitor }}{{- $sep = "," -}}{{ end }} + + {{- if .monitor_group }}{{ $sep }}"monitor_group": {{ toJson .monitor_group }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .notification_email }}{{ $sep }}"notification_email": {{ toJson .notification_email }}{{- $sep = "," -}}{{ end }} + + {{- if .notification_filter }}{{ $sep }}"notification_filter": {{ if eq (kindOf .notification_filter) "string" }}{{ .notification_filter }}{{ else }}{{ toJson .notification_filter }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .origin_steering }}{{ $sep }}"origin_steering": {{ if eq (kindOf .origin_steering) "string" }}{{ .origin_steering }}{{ else }}{{ toJson .origin_steering }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .origins }}{{ $sep }}"origins": {{ if eq (kindOf .origins) "string" }}{{ .origins }}{{ else }}{{ toJson .origins }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + load_balancer_pools_update_pool: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1user~1load_balancers~1pools~1{pool_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .check_regions }}{{ $sep }}"check_regions": {{ if eq (kindOf .check_regions) "string" }}{{ .check_regions }}{{ else }}{{ toJson .check_regions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .latitude }}{{ $sep }}"latitude": {{ toJson .latitude }}{{- $sep = "," -}}{{ end }} + + {{- if .load_shedding }}{{ $sep }}"load_shedding": {{ if eq (kindOf .load_shedding) "string" }}{{ .load_shedding }}{{ else }}{{ toJson .load_shedding }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .longitude }}{{ $sep }}"longitude": {{ toJson .longitude }}{{- $sep = "," -}}{{ end }} + + {{- if .minimum_origins }}{{ $sep }}"minimum_origins": {{ toJson .minimum_origins }}{{- $sep = "," -}}{{ end }} + + {{- if .monitor }}{{ $sep }}"monitor": {{ toJson .monitor }}{{- $sep = "," -}}{{ end }} + + {{- if .monitor_group }}{{ $sep }}"monitor_group": {{ toJson .monitor_group }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .networks }}{{ $sep }}"networks": {{ if eq (kindOf .networks) "string" }}{{ .networks }}{{ else }}{{ toJson .networks }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .notification_email }}{{ $sep }}"notification_email": {{ toJson .notification_email }}{{- $sep = "," -}}{{ end }} + + {{- if .notification_filter }}{{ $sep }}"notification_filter": {{ if eq (kindOf .notification_filter) "string" }}{{ .notification_filter }}{{ else }}{{ toJson .notification_filter }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .origin_steering }}{{ $sep }}"origin_steering": {{ if eq (kindOf .origin_steering) "string" }}{{ .origin_steering }}{{ else }}{{ toJson .origin_steering }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .origins }}{{ $sep }}"origins": {{ if eq (kindOf .origins) "string" }}{{ .origins }}{{ else }}{{ toJson .origins }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/pools/methods/get_by_account' + - $ref: '#/components/x-stackQL-resources/pools/methods/list_by_account' + - $ref: '#/components/x-stackQL-resources/pools/methods/get_by_user' + - $ref: '#/components/x-stackQL-resources/pools/methods/list_by_user' + insert: + - $ref: '#/components/x-stackQL-resources/pools/methods/create' + - $ref: '#/components/x-stackQL-resources/pools/methods/load_balancer_pools_create_pool' + update: + - $ref: '#/components/x-stackQL-resources/pools/methods/edit' + - $ref: '#/components/x-stackQL-resources/pools/methods/account_load_balancer_pools_patch_pools' + - $ref: '#/components/x-stackQL-resources/pools/methods/load_balancer_pools_patch_pool' + - $ref: '#/components/x-stackQL-resources/pools/methods/load_balancer_pools_patch_pools' + delete: + - $ref: '#/components/x-stackQL-resources/pools/methods/delete' + - $ref: '#/components/x-stackQL-resources/pools/methods/load_balancer_pools_delete_pool' + replace: + - $ref: '#/components/x-stackQL-resources/pools/methods/update' + - $ref: '#/components/x-stackQL-resources/pools/methods/load_balancer_pools_update_pool' + health: + id: cloudflare.load_balancers.health + name: health + title: Health + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1pools~1{pool_id}~1health/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1pools~1{pool_id}~1preview/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allow_insecure }}{{ $sep }}"allow_insecure": {{ toJson .allow_insecure }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_down }}{{ $sep }}"consecutive_down": {{ toJson .consecutive_down }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_up }}{{ $sep }}"consecutive_up": {{ toJson .consecutive_up }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .expected_body }}{{ $sep }}"expected_body": {{ toJson .expected_body }}{{- $sep = "," -}}{{ end }} + + {{- if .expected_codes }}{{ $sep }}"expected_codes": {{ toJson .expected_codes }}{{- $sep = "," -}}{{ end }} + + {{- if .follow_redirects }}{{ $sep }}"follow_redirects": {{ toJson .follow_redirects }}{{- $sep = "," -}}{{ end }} + + {{- if .header }}{{ $sep }}"header": {{ if eq (kindOf .header) "string" }}{{ .header }}{{ else }}{{ toJson .header }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interval }}{{ $sep }}"interval": {{ toJson .interval }}{{- $sep = "," -}}{{ end }} + + {{- if .method }}{{ $sep }}"method": {{ toJson .method }}{{- $sep = "," -}}{{ end }} + + {{- if .path }}{{ $sep }}"path": {{ toJson .path }}{{- $sep = "," -}}{{ end }} + + {{- if .port }}{{ $sep }}"port": {{ toJson .port }}{{- $sep = "," -}}{{ end }} + + {{- if .probe_zone }}{{ $sep }}"probe_zone": {{ toJson .probe_zone }}{{- $sep = "," -}}{{ end }} + + {{- if .retries }}{{ $sep }}"retries": {{ toJson .retries }}{{- $sep = "," -}}{{ end }} + + {{- if .timeout }}{{ $sep }}"timeout": {{ toJson .timeout }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' + list_by_user: + operation: + $ref: '#/paths/~1user~1load_balancers~1pools~1{pool_id}~1health/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/health/methods/list_by_account' + - $ref: '#/components/x-stackQL-resources/health/methods/list_by_user' + insert: + - $ref: '#/components/x-stackQL-resources/health/methods/create' + update: [] + delete: [] + replace: [] + pools_references: + id: cloudflare.load_balancers.pools_references + name: pools_references + title: Pools References + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1pools~1{pool_id}~1references/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + list_by_user: + operation: + $ref: '#/paths/~1user~1load_balancers~1pools~1{pool_id}~1references/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/pools_references/methods/list_by_account' + - $ref: '#/components/x-stackQL-resources/pools_references/methods/list_by_user' + insert: [] + update: [] + delete: [] + replace: [] + regions: + id: cloudflare.load_balancers.regions + name: regions + title: Regions + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1regions/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1regions~1{region_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/regions/methods/get' + - $ref: '#/components/x-stackQL-resources/regions/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + searches: + id: cloudflare.load_balancers.searches + name: searches + title: Searches + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1load_balancers~1search/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result.resources + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/searches/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + preview: + id: cloudflare.load_balancers.preview + name: preview + title: Preview + methods: + load_balancer_monitors_preview_monitor: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1user~1load_balancers~1monitors~1{monitor_id}~1preview/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allow_insecure }}{{ $sep }}"allow_insecure": {{ toJson .allow_insecure }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_down }}{{ $sep }}"consecutive_down": {{ toJson .consecutive_down }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_up }}{{ $sep }}"consecutive_up": {{ toJson .consecutive_up }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .expected_body }}{{ $sep }}"expected_body": {{ toJson .expected_body }}{{- $sep = "," -}}{{ end }} + + {{- if .expected_codes }}{{ $sep }}"expected_codes": {{ toJson .expected_codes }}{{- $sep = "," -}}{{ end }} + + {{- if .follow_redirects }}{{ $sep }}"follow_redirects": {{ toJson .follow_redirects }}{{- $sep = "," -}}{{ end }} + + {{- if .header }}{{ $sep }}"header": {{ if eq (kindOf .header) "string" }}{{ .header }}{{ else }}{{ toJson .header }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interval }}{{ $sep }}"interval": {{ toJson .interval }}{{- $sep = "," -}}{{ end }} + + {{- if .method }}{{ $sep }}"method": {{ toJson .method }}{{- $sep = "," -}}{{ end }} + + {{- if .path }}{{ $sep }}"path": {{ toJson .path }}{{- $sep = "," -}}{{ end }} + + {{- if .port }}{{ $sep }}"port": {{ toJson .port }}{{- $sep = "," -}}{{ end }} + + {{- if .probe_zone }}{{ $sep }}"probe_zone": {{ toJson .probe_zone }}{{- $sep = "," -}}{{ end }} + + {{- if .retries }}{{ $sep }}"retries": {{ toJson .retries }}{{- $sep = "," -}}{{ end }} + + {{- if .timeout }}{{ $sep }}"timeout": {{ toJson .timeout }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' + load_balancer_pools_preview_pool: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1user~1load_balancers~1pools~1{pool_id}~1preview/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allow_insecure }}{{ $sep }}"allow_insecure": {{ toJson .allow_insecure }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_down }}{{ $sep }}"consecutive_down": {{ toJson .consecutive_down }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_up }}{{ $sep }}"consecutive_up": {{ toJson .consecutive_up }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .expected_body }}{{ $sep }}"expected_body": {{ toJson .expected_body }}{{- $sep = "," -}}{{ end }} + + {{- if .expected_codes }}{{ $sep }}"expected_codes": {{ toJson .expected_codes }}{{- $sep = "," -}}{{ end }} + + {{- if .follow_redirects }}{{ $sep }}"follow_redirects": {{ toJson .follow_redirects }}{{- $sep = "," -}}{{ end }} + + {{- if .header }}{{ $sep }}"header": {{ if eq (kindOf .header) "string" }}{{ .header }}{{ else }}{{ toJson .header }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interval }}{{ $sep }}"interval": {{ toJson .interval }}{{- $sep = "," -}}{{ end }} + + {{- if .method }}{{ $sep }}"method": {{ toJson .method }}{{- $sep = "," -}}{{ end }} + + {{- if .path }}{{ $sep }}"path": {{ toJson .path }}{{- $sep = "," -}}{{ end }} + + {{- if .port }}{{ $sep }}"port": {{ toJson .port }}{{- $sep = "," -}}{{ end }} + + {{- if .probe_zone }}{{ $sep }}"probe_zone": {{ toJson .probe_zone }}{{- $sep = "," -}}{{ end }} + + {{- if .retries }}{{ $sep }}"retries": {{ toJson .retries }}{{- $sep = "," -}}{{ end }} + + {{- if .timeout }}{{ $sep }}"timeout": {{ toJson .timeout }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' + get: + operation: + $ref: '#/paths/~1user~1load_balancers~1preview~1{preview_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/preview/methods/get' + insert: + - $ref: '#/components/x-stackQL-resources/preview/methods/load_balancer_monitors_preview_monitor' + - $ref: '#/components/x-stackQL-resources/preview/methods/load_balancer_pools_preview_pool' + update: [] + delete: [] + replace: [] + load_balancers: + id: cloudflare.load_balancers.load_balancers + name: load_balancers + title: Load Balancers + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1load_balancers/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1load_balancers/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .adaptive_routing }}{{ $sep }}"adaptive_routing": {{ if eq (kindOf .adaptive_routing) "string" }}{{ .adaptive_routing }}{{ else }}{{ toJson .adaptive_routing }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .country_pools }}{{ $sep }}"country_pools": {{ if eq (kindOf .country_pools) "string" }}{{ .country_pools }}{{ else }}{{ toJson .country_pools }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .default_pools }}{{ $sep }}"default_pools": {{ if eq (kindOf .default_pools) "string" }}{{ .default_pools }}{{ else }}{{ toJson .default_pools }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .fallback_pool }}{{ $sep }}"fallback_pool": {{ toJson .fallback_pool }}{{- $sep = "," -}}{{ end }} + + {{- if .location_strategy }}{{ $sep }}"location_strategy": {{ if eq (kindOf .location_strategy) "string" }}{{ .location_strategy }}{{ else }}{{ toJson .location_strategy }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .networks }}{{ $sep }}"networks": {{ if eq (kindOf .networks) "string" }}{{ .networks }}{{ else }}{{ toJson .networks }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .pop_pools }}{{ $sep }}"pop_pools": {{ if eq (kindOf .pop_pools) "string" }}{{ .pop_pools }}{{ else }}{{ toJson .pop_pools }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .proxied }}{{ $sep }}"proxied": {{ toJson .proxied }}{{- $sep = "," -}}{{ end }} + + {{- if .random_steering }}{{ $sep }}"random_steering": {{ if eq (kindOf .random_steering) "string" }}{{ .random_steering }}{{ else }}{{ toJson .random_steering }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .region_pools }}{{ $sep }}"region_pools": {{ if eq (kindOf .region_pools) "string" }}{{ .region_pools }}{{ else }}{{ toJson .region_pools }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .rules }}{{ $sep }}"rules": {{ if eq (kindOf .rules) "string" }}{{ .rules }}{{ else }}{{ toJson .rules }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .session_affinity }}{{ $sep }}"session_affinity": {{ toJson .session_affinity }}{{- $sep = "," -}}{{ end }} + + {{- if .session_affinity_attributes }}{{ $sep }}"session_affinity_attributes": {{ if eq (kindOf .session_affinity_attributes) "string" }}{{ .session_affinity_attributes }}{{ else }}{{ toJson .session_affinity_attributes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .session_affinity_ttl }}{{ $sep }}"session_affinity_ttl": {{ toJson .session_affinity_ttl }}{{- $sep = "," -}}{{ end }} + + {{- if .steering_policy }}{{ $sep }}"steering_policy": {{ toJson .steering_policy }}{{- $sep = "," -}}{{ end }} + + {{- if .ttl }}{{ $sep }}"ttl": {{ toJson .ttl }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1load_balancers~1{load_balancer_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1load_balancers~1{load_balancer_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1load_balancers~1{load_balancer_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .adaptive_routing }}{{ $sep }}"adaptive_routing": {{ if eq (kindOf .adaptive_routing) "string" }}{{ .adaptive_routing }}{{ else }}{{ toJson .adaptive_routing }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .country_pools }}{{ $sep }}"country_pools": {{ if eq (kindOf .country_pools) "string" }}{{ .country_pools }}{{ else }}{{ toJson .country_pools }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .default_pools }}{{ $sep }}"default_pools": {{ if eq (kindOf .default_pools) "string" }}{{ .default_pools }}{{ else }}{{ toJson .default_pools }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .fallback_pool }}{{ $sep }}"fallback_pool": {{ toJson .fallback_pool }}{{- $sep = "," -}}{{ end }} + + {{- if .location_strategy }}{{ $sep }}"location_strategy": {{ if eq (kindOf .location_strategy) "string" }}{{ .location_strategy }}{{ else }}{{ toJson .location_strategy }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .pop_pools }}{{ $sep }}"pop_pools": {{ if eq (kindOf .pop_pools) "string" }}{{ .pop_pools }}{{ else }}{{ toJson .pop_pools }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .proxied }}{{ $sep }}"proxied": {{ toJson .proxied }}{{- $sep = "," -}}{{ end }} + + {{- if .random_steering }}{{ $sep }}"random_steering": {{ if eq (kindOf .random_steering) "string" }}{{ .random_steering }}{{ else }}{{ toJson .random_steering }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .region_pools }}{{ $sep }}"region_pools": {{ if eq (kindOf .region_pools) "string" }}{{ .region_pools }}{{ else }}{{ toJson .region_pools }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .rules }}{{ $sep }}"rules": {{ if eq (kindOf .rules) "string" }}{{ .rules }}{{ else }}{{ toJson .rules }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .session_affinity }}{{ $sep }}"session_affinity": {{ toJson .session_affinity }}{{- $sep = "," -}}{{ end }} + + {{- if .session_affinity_attributes }}{{ $sep }}"session_affinity_attributes": {{ if eq (kindOf .session_affinity_attributes) "string" }}{{ .session_affinity_attributes }}{{ else }}{{ toJson .session_affinity_attributes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .session_affinity_ttl }}{{ $sep }}"session_affinity_ttl": {{ toJson .session_affinity_ttl }}{{- $sep = "," -}}{{ end }} + + {{- if .steering_policy }}{{ $sep }}"steering_policy": {{ toJson .steering_policy }}{{- $sep = "," -}}{{ end }} + + {{- if .ttl }}{{ $sep }}"ttl": {{ toJson .ttl }}{{- $sep = "," -}}{{ end }} + + } + + ' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1load_balancers~1{load_balancer_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .adaptive_routing }}{{ $sep }}"adaptive_routing": {{ if eq (kindOf .adaptive_routing) "string" }}{{ .adaptive_routing }}{{ else }}{{ toJson .adaptive_routing }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .country_pools }}{{ $sep }}"country_pools": {{ if eq (kindOf .country_pools) "string" }}{{ .country_pools }}{{ else }}{{ toJson .country_pools }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .default_pools }}{{ $sep }}"default_pools": {{ if eq (kindOf .default_pools) "string" }}{{ .default_pools }}{{ else }}{{ toJson .default_pools }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .fallback_pool }}{{ $sep }}"fallback_pool": {{ toJson .fallback_pool }}{{- $sep = "," -}}{{ end }} + + {{- if .location_strategy }}{{ $sep }}"location_strategy": {{ if eq (kindOf .location_strategy) "string" }}{{ .location_strategy }}{{ else }}{{ toJson .location_strategy }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .networks }}{{ $sep }}"networks": {{ if eq (kindOf .networks) "string" }}{{ .networks }}{{ else }}{{ toJson .networks }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .pop_pools }}{{ $sep }}"pop_pools": {{ if eq (kindOf .pop_pools) "string" }}{{ .pop_pools }}{{ else }}{{ toJson .pop_pools }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .proxied }}{{ $sep }}"proxied": {{ toJson .proxied }}{{- $sep = "," -}}{{ end }} + + {{- if .random_steering }}{{ $sep }}"random_steering": {{ if eq (kindOf .random_steering) "string" }}{{ .random_steering }}{{ else }}{{ toJson .random_steering }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .region_pools }}{{ $sep }}"region_pools": {{ if eq (kindOf .region_pools) "string" }}{{ .region_pools }}{{ else }}{{ toJson .region_pools }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .rules }}{{ $sep }}"rules": {{ if eq (kindOf .rules) "string" }}{{ .rules }}{{ else }}{{ toJson .rules }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .session_affinity }}{{ $sep }}"session_affinity": {{ toJson .session_affinity }}{{- $sep = "," -}}{{ end }} + + {{- if .session_affinity_attributes }}{{ $sep }}"session_affinity_attributes": {{ if eq (kindOf .session_affinity_attributes) "string" }}{{ .session_affinity_attributes }}{{ else }}{{ toJson .session_affinity_attributes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .session_affinity_ttl }}{{ $sep }}"session_affinity_ttl": {{ toJson .session_affinity_ttl }}{{- $sep = "," -}}{{ end }} + + {{- if .steering_policy }}{{ $sep }}"steering_policy": {{ toJson .steering_policy }}{{- $sep = "," -}}{{ end }} + + {{- if .ttl }}{{ $sep }}"ttl": {{ toJson .ttl }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/load_balancers/methods/get' + - $ref: '#/components/x-stackQL-resources/load_balancers/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/load_balancers/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/load_balancers/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/load_balancers/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/load_balancers/methods/update' diff --git a/providers/src/cloudflare/v00.00.00000/services/logpush.yaml b/providers/src/cloudflare/v00.00.00000/services/logpush.yaml index a1bb11f7..9cb49e50 100644 --- a/providers/src/cloudflare/v00.00.00000/services/logpush.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/logpush.yaml @@ -1,2680 +1,2679 @@ -openapi: 3.0.3 -info: - title: logpush API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /zones/{zone_id}/logpush/edge/jobs: - get: - description: Lists Instant Logs jobs for a zone. - operationId: get-zones-zone_id-logpush-edge-jobs - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logpushInstantLogsJobResponseCollection' - description: List Instant Logs jobs response. - 4XX: - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/logpushMessages' - messages: - $ref: '#/components/schemas/logpushMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - items: - $ref: '#/components/schemas/logpushInstantLogsJob' - type: array - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - type: object - description: List Instant Logs jobs response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Instant Logs jobs - tags: - - Instant Logs jobs for a zone - x-api-token-group: - - Logs Read - x-cfPermissionsRequired: - enum: - - '#logs:read' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logpush - resource_chain: - - edge - method: get - post: - description: Creates a new Instant Logs job for a zone. - operationId: post-zones-zone_id-logpush-edge-jobs - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - fields: - $ref: '#/components/schemas/logpushFields' - filter: - $ref: '#/components/schemas/logpushSchemasFilter' - sample: - $ref: '#/components/schemas/logpushSample' - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logpushInstantLogsJobResponseSingle' - description: Create Instant Logs job response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/logpushMessages' - messages: - $ref: '#/components/schemas/logpushMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - nullable: true - properties: - destination_conf: - $ref: '#/components/schemas/logpushSchemasDestinationConf' - fields: - $ref: '#/components/schemas/logpushFields' - filter: - $ref: '#/components/schemas/logpushSchemasFilter' - sample: - $ref: '#/components/schemas/logpushSample' - session_id: - $ref: '#/components/schemas/logpushSessionId' - type: object - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Create Instant Logs job response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Instant Logs job - tags: - - Instant Logs jobs for a zone - x-api-token-group: - - Logs Read - x-cfPermissionsRequired: - enum: - - '#logs:read' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logpush - resource_chain: - - edge - method: create - /accounts/{account_id}/logpush/datasets/{dataset_id}/fields: - get: - description: >- - Lists all fields available for a dataset. The response result is. an - object with key-value pairs, where keys are field names, and values are - descriptions. - parameters: - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logpushLogpushFieldResponseCollection' - description: List fields response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logpushApiResponseCommonFailure' - description: List fields response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List fields - tags: [] - x-api-token-group: - - Logs Read - x-cfPermissionsRequired: - enum: - - '#logs:read' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logpush - resource_chain: - - datasets - - fields - method: get - operationId: get_accounts_account_id_logpush_datasets_dataset_id_fields - /zones/{zone_id}/logpush/datasets/{dataset_id}/fields: - get: - description: >- - Lists all fields available for a dataset. The response result is. an - object with key-value pairs, where keys are field names, and values are - descriptions. - parameters: - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logpushLogpushFieldResponseCollection' - description: List fields response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logpushApiResponseCommonFailure' - description: List fields response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List fields - tags: [] - x-api-token-group: - - Logs Read - x-cfPermissionsRequired: - enum: - - '#logs:read' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logpush - resource_chain: - - datasets - - fields - method: get - operationId: get_zones_zone_id_logpush_datasets_dataset_id_fields - /accounts/{account_id}/logpush/datasets/{dataset_id}/jobs: - get: - description: Lists Logpush jobs for an account or zone for a dataset. - parameters: - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logpushLogpushJobResponseCollection' - description: List Logpush jobs for a dataset response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logpushApiResponseCommonFailure' - description: List Logpush jobs for a dataset response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Logpush jobs for a dataset - tags: [] - x-api-token-group: - - Logs Write - x-cfPermissionsRequired: - enum: - - '#logs:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logpush - resource_chain: - - datasets - - jobs - method: get - operationId: get_accounts_account_id_logpush_datasets_dataset_id_jobs - /zones/{zone_id}/logpush/datasets/{dataset_id}/jobs: - get: - description: Lists Logpush jobs for an account or zone for a dataset. - parameters: - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logpushLogpushJobResponseCollection' - description: List Logpush jobs for a dataset response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logpushApiResponseCommonFailure' - description: List Logpush jobs for a dataset response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Logpush jobs for a dataset - tags: [] - x-api-token-group: - - Logs Write - x-cfPermissionsRequired: - enum: - - '#logs:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logpush - resource_chain: - - datasets - - jobs - method: get - operationId: get_zones_zone_id_logpush_datasets_dataset_id_jobs - /accounts/{account_id}/logpush/jobs: - get: - description: Lists Logpush jobs for an account or zone. - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logpushLogpushJobResponseCollection' - description: List Logpush jobs response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logpushApiResponseCommonFailure' - description: List Logpush jobs response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Logpush jobs - tags: [] - x-api-token-group: - - Logs Write - x-cfPermissionsRequired: - enum: - - '#logs:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logpush - resource_chain: - - jobs - method: list - operationId: get_accounts_account_id_logpush_jobs - post: - description: Creates a new Logpush job for an account or zone. - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - dataset: - $ref: '#/components/schemas/logpushDataset' - destination_conf: - $ref: '#/components/schemas/logpushDestinationConf' - enabled: - $ref: '#/components/schemas/logpushEnabled' - filter: - $ref: '#/components/schemas/logpushFilter' - frequency: - $ref: '#/components/schemas/logpushFrequency' - kind: - $ref: '#/components/schemas/logpushKind' - logpull_options: - $ref: '#/components/schemas/logpushLogpullOptions' - max_upload_bytes: - $ref: '#/components/schemas/logpushMaxUploadBytes' - max_upload_interval_seconds: - $ref: '#/components/schemas/logpushMaxUploadIntervalSeconds' - max_upload_records: - $ref: '#/components/schemas/logpushMaxUploadRecords' - name: - $ref: '#/components/schemas/logpushName' - output_options: - $ref: '#/components/schemas/logpushOutputOptions' - ownership_challenge: - $ref: '#/components/schemas/logpushOwnershipChallenge' - required: - - destination_conf - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logpushLogpushJobResponseSingle' - description: Create Logpush job response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logpushApiResponseCommonFailure' - description: Create Logpush job response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Logpush job - tags: [] - x-api-token-group: - - Logs Write - x-cfPermissionsRequired: - enum: - - '#logs:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logpush - resource_chain: - - jobs - method: create - operationId: post_accounts_account_id_logpush_jobs - /zones/{zone_id}/logpush/jobs: - get: - description: Lists Logpush jobs for an account or zone. - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logpushLogpushJobResponseCollection' - description: List Logpush jobs response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logpushApiResponseCommonFailure' - description: List Logpush jobs response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Logpush jobs - tags: [] - x-api-token-group: - - Logs Write - x-cfPermissionsRequired: - enum: - - '#logs:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logpush - resource_chain: - - jobs - method: list - operationId: get_zones_zone_id_logpush_jobs - post: - description: Creates a new Logpush job for an account or zone. - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - dataset: - $ref: '#/components/schemas/logpushDataset' - destination_conf: - $ref: '#/components/schemas/logpushDestinationConf' - enabled: - $ref: '#/components/schemas/logpushEnabled' - filter: - $ref: '#/components/schemas/logpushFilter' - frequency: - $ref: '#/components/schemas/logpushFrequency' - kind: - $ref: '#/components/schemas/logpushKind' - logpull_options: - $ref: '#/components/schemas/logpushLogpullOptions' - max_upload_bytes: - $ref: '#/components/schemas/logpushMaxUploadBytes' - max_upload_interval_seconds: - $ref: '#/components/schemas/logpushMaxUploadIntervalSeconds' - max_upload_records: - $ref: '#/components/schemas/logpushMaxUploadRecords' - name: - $ref: '#/components/schemas/logpushName' - output_options: - $ref: '#/components/schemas/logpushOutputOptions' - ownership_challenge: - $ref: '#/components/schemas/logpushOwnershipChallenge' - required: - - destination_conf - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logpushLogpushJobResponseSingle' - description: Create Logpush job response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logpushApiResponseCommonFailure' - description: Create Logpush job response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Logpush job - tags: [] - x-api-token-group: - - Logs Write - x-cfPermissionsRequired: - enum: - - '#logs:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logpush - resource_chain: - - jobs - method: create - operationId: post_zones_zone_id_logpush_jobs - /accounts/{account_id}/logpush/jobs/{job_id}: - get: - description: Gets the details of a Logpush job. - parameters: - - name: job_id - in: path - required: true - description: The job ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logpushLogpushJobResponseSingle' - description: Get Logpush job details response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logpushApiResponseCommonFailure' - description: Get Logpush job details response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Logpush job details - tags: [] - x-api-token-group: - - Logs Write - x-cfPermissionsRequired: - enum: - - '#logs:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logpush - resource_chain: - - jobs - method: get - operationId: get_accounts_account_id_logpush_jobs_job_id - put: - description: Updates a Logpush job. - parameters: - - name: job_id - in: path - required: true - description: The job ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - destination_conf: - $ref: '#/components/schemas/logpushDestinationConf' - enabled: - $ref: '#/components/schemas/logpushEnabled' - filter: - $ref: '#/components/schemas/logpushFilter' - frequency: - $ref: '#/components/schemas/logpushFrequency' - kind: - $ref: '#/components/schemas/logpushKind' - logpull_options: - $ref: '#/components/schemas/logpushLogpullOptions' - max_upload_bytes: - $ref: '#/components/schemas/logpushMaxUploadBytes' - max_upload_interval_seconds: - $ref: '#/components/schemas/logpushMaxUploadIntervalSeconds' - max_upload_records: - $ref: '#/components/schemas/logpushMaxUploadRecords' - name: - $ref: '#/components/schemas/logpushName' - output_options: - $ref: '#/components/schemas/logpushOutputOptions' - ownership_challenge: - $ref: '#/components/schemas/logpushOwnershipChallenge' - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logpushLogpushJobResponseSingle' - description: Update Logpush job response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logpushApiResponseCommonFailure' - description: Update Logpush job response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Logpush job - tags: [] - x-api-token-group: - - Logs Write - x-cfPermissionsRequired: - enum: - - '#logs:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logpush - resource_chain: - - jobs - method: update - operationId: put_accounts_account_id_logpush_jobs_job_id - delete: - description: Deletes a Logpush job. - parameters: - - name: job_id - in: path - required: true - description: The job ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/logpushMessages' - messages: - $ref: '#/components/schemas/logpushMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - properties: - id: - $ref: '#/components/schemas/logpushId' - type: object - required: - - success - - errors - - messages - type: object - description: Delete Logpush job response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logpushApiResponseCommonFailure' - description: Delete Logpush job response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Logpush job - tags: [] - x-api-token-group: - - Logs Write - x-cfPermissionsRequired: - enum: - - '#logs:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logpush - resource_chain: - - jobs - method: delete - operationId: delete_accounts_account_id_logpush_jobs_job_id - /zones/{zone_id}/logpush/jobs/{job_id}: - get: - description: Gets the details of a Logpush job. - parameters: - - name: job_id - in: path - required: true - description: The job ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logpushLogpushJobResponseSingle' - description: Get Logpush job details response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logpushApiResponseCommonFailure' - description: Get Logpush job details response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Logpush job details - tags: [] - x-api-token-group: - - Logs Write - x-cfPermissionsRequired: - enum: - - '#logs:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logpush - resource_chain: - - jobs - method: get - operationId: get_zones_zone_id_logpush_jobs_job_id - put: - description: Updates a Logpush job. - parameters: - - name: job_id - in: path - required: true - description: The job ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - destination_conf: - $ref: '#/components/schemas/logpushDestinationConf' - enabled: - $ref: '#/components/schemas/logpushEnabled' - filter: - $ref: '#/components/schemas/logpushFilter' - frequency: - $ref: '#/components/schemas/logpushFrequency' - kind: - $ref: '#/components/schemas/logpushKind' - logpull_options: - $ref: '#/components/schemas/logpushLogpullOptions' - max_upload_bytes: - $ref: '#/components/schemas/logpushMaxUploadBytes' - max_upload_interval_seconds: - $ref: '#/components/schemas/logpushMaxUploadIntervalSeconds' - max_upload_records: - $ref: '#/components/schemas/logpushMaxUploadRecords' - name: - $ref: '#/components/schemas/logpushName' - output_options: - $ref: '#/components/schemas/logpushOutputOptions' - ownership_challenge: - $ref: '#/components/schemas/logpushOwnershipChallenge' - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logpushLogpushJobResponseSingle' - description: Update Logpush job response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logpushApiResponseCommonFailure' - description: Update Logpush job response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Logpush job - tags: [] - x-api-token-group: - - Logs Write - x-cfPermissionsRequired: - enum: - - '#logs:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logpush - resource_chain: - - jobs - method: update - operationId: put_zones_zone_id_logpush_jobs_job_id - delete: - description: Deletes a Logpush job. - parameters: - - name: job_id - in: path - required: true - description: The job ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/logpushMessages' - messages: - $ref: '#/components/schemas/logpushMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - properties: - id: - $ref: '#/components/schemas/logpushId' - type: object - required: - - success - - errors - - messages - type: object - description: Delete Logpush job response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logpushApiResponseCommonFailure' - description: Delete Logpush job response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Logpush job - tags: [] - x-api-token-group: - - Logs Write - x-cfPermissionsRequired: - enum: - - '#logs:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logpush - resource_chain: - - jobs - method: delete - operationId: delete_zones_zone_id_logpush_jobs_job_id - /accounts/{account_id}/logpush/ownership: - post: - description: Gets a new ownership challenge sent to your destination. - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - destination_conf: - $ref: '#/components/schemas/logpushDestinationConf' - required: - - destination_conf - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logpushGetOwnershipResponse' - description: Get ownership challenge response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logpushApiResponseCommonFailure' - description: Get ownership challenge response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get ownership challenge - tags: [] - x-api-token-group: - - Logs Write - x-cfPermissionsRequired: - enum: - - '#logs:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logpush - resource_chain: - - ownership - method: create - operationId: post_accounts_account_id_logpush_ownership - /zones/{zone_id}/logpush/ownership: - post: - description: Gets a new ownership challenge sent to your destination. - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - destination_conf: - $ref: '#/components/schemas/logpushDestinationConf' - required: - - destination_conf - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logpushGetOwnershipResponse' - description: Get ownership challenge response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logpushApiResponseCommonFailure' - description: Get ownership challenge response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get ownership challenge - tags: [] - x-api-token-group: - - Logs Write - x-cfPermissionsRequired: - enum: - - '#logs:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logpush - resource_chain: - - ownership - method: create - operationId: post_zones_zone_id_logpush_ownership - /accounts/{account_id}/logpush/ownership/validate: - post: - description: Validates ownership challenge of the destination. - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - destination_conf: - $ref: '#/components/schemas/logpushDestinationConf' - ownership_challenge: - $ref: '#/components/schemas/logpushOwnershipChallenge' - required: - - destination_conf - - ownership_challenge - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logpushValidateOwnershipResponse' - description: Validate ownership challenge response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logpushApiResponseCommonFailure' - description: Validate ownership challenge response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Validate ownership challenge - tags: [] - x-api-token-group: - - Logs Write - x-cfPermissionsRequired: - enum: - - '#logs:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logpush - resource_chain: - - ownership - method: validate - operationId: post_accounts_account_id_logpush_ownership_validate - /zones/{zone_id}/logpush/ownership/validate: - post: - description: Validates ownership challenge of the destination. - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - destination_conf: - $ref: '#/components/schemas/logpushDestinationConf' - ownership_challenge: - $ref: '#/components/schemas/logpushOwnershipChallenge' - required: - - destination_conf - - ownership_challenge - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logpushValidateOwnershipResponse' - description: Validate ownership challenge response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logpushApiResponseCommonFailure' - description: Validate ownership challenge response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Validate ownership challenge - tags: [] - x-api-token-group: - - Logs Write - x-cfPermissionsRequired: - enum: - - '#logs:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logpush - resource_chain: - - ownership - method: validate - operationId: post_zones_zone_id_logpush_ownership_validate - /accounts/{account_id}/logpush/validate/destination: - post: - description: Validates destination. - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - destination_conf: - $ref: '#/components/schemas/logpushDestinationConf' - required: - - destination_conf - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logpushValidateResponse' - description: Validate destination response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logpushApiResponseCommonFailure' - description: Validate destination response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Validate destination - tags: [] - x-api-token-group: - - Logs Write - x-cfPermissionsRequired: - enum: - - '#logs:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logpush - resource_chain: - - validate - method: destination - operationId: post_accounts_account_id_logpush_validate_destination - /zones/{zone_id}/logpush/validate/destination: - post: - description: Validates destination. - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - destination_conf: - $ref: '#/components/schemas/logpushDestinationConf' - required: - - destination_conf - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logpushValidateResponse' - description: Validate destination response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logpushApiResponseCommonFailure' - description: Validate destination response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Validate destination - tags: [] - x-api-token-group: - - Logs Write - x-cfPermissionsRequired: - enum: - - '#logs:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logpush - resource_chain: - - validate - method: destination - operationId: post_zones_zone_id_logpush_validate_destination - /accounts/{account_id}/logpush/validate/destination/exists: - post: - description: Checks if there is an existing job with a destination. - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - destination_conf: - $ref: '#/components/schemas/logpushDestinationConf' - required: - - destination_conf - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logpushDestinationExistsResponse' - description: Check destination exists response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logpushApiResponseCommonFailure' - description: Check destination exists response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Check destination exists - tags: [] - x-api-token-group: - - Logs Write - x-cfPermissionsRequired: - enum: - - '#logs:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logpush - resource_chain: - - validate - method: destination_exists - operationId: post_accounts_account_id_logpush_validate_destination_exists - /zones/{zone_id}/logpush/validate/destination/exists: - post: - description: Checks if there is an existing job with a destination. - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - destination_conf: - $ref: '#/components/schemas/logpushDestinationConf' - required: - - destination_conf - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logpushDestinationExistsResponse' - description: Check destination exists response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logpushApiResponseCommonFailure' - description: Check destination exists response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Check destination exists - tags: [] - x-api-token-group: - - Logs Write - x-cfPermissionsRequired: - enum: - - '#logs:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logpush - resource_chain: - - validate - method: destination_exists - operationId: post_zones_zone_id_logpush_validate_destination_exists - /accounts/{account_id}/logpush/validate/origin: - post: - description: Validates logpull origin with logpull_options. - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - logpull_options: - $ref: '#/components/schemas/logpushLogpullOptions' - required: - - logpull_options - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logpushValidateResponse' - description: Validate origin response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logpushApiResponseCommonFailure' - description: Validate origin response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Validate origin - tags: [] - x-api-token-group: - - Logs Write - x-cfPermissionsRequired: - enum: - - '#logs:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logpush - resource_chain: - - validate - method: origin - operationId: post_accounts_account_id_logpush_validate_origin - /zones/{zone_id}/logpush/validate/origin: - post: - description: Validates logpull origin with logpull_options. - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - logpull_options: - $ref: '#/components/schemas/logpushLogpullOptions' - required: - - logpull_options - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logpushValidateResponse' - description: Validate origin response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logpushApiResponseCommonFailure' - description: Validate origin response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Validate origin - tags: [] - x-api-token-group: - - Logs Write - x-cfPermissionsRequired: - enum: - - '#logs:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logpush - resource_chain: - - validate - method: origin - operationId: post_zones_zone_id_logpush_validate_origin -components: - schemas: - logpushApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/logpushMessages' - messages: - example: [] - $ref: '#/components/schemas/logpushMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - logpushDataset: - default: http_requests - description: >- - Name of the dataset. A list of supported datasets can be found on the - [Developer - Docs](https://developers.cloudflare.com/logs/reference/log-fields/). - enum: - - access_requests - - audit_logs - - audit_logs_v2 - - biso_user_actions - - casb_findings - - device_posture_results - - dex_application_tests - - dex_device_state_events - - dlp_forensic_copies - - dns_firewall_logs - - dns_logs - - email_security_alerts - - email_security_post_delivery_events - - firewall_events - - gateway_dns - - gateway_http - - gateway_network - - http_requests - - ipsec_logs - - magic_ids_detections - - mcp_portal_logs - - nel_reports - - network_analytics_logs - - page_shield_events - - sinkhole_http_logs - - spectrum_events - - ssh_logs - - warp_config_changes - - warp_toggle_changes - - workers_trace_events - - zaraz_events - - zero_trust_network_sessions - example: http_requests - nullable: true - type: string - x-auditable: true - logpushDestinationConf: - description: >- - Uniquely identifies a resource (such as an s3 bucket) where data. will - be pushed. Additional configuration parameters supported by the - destination may be included. - example: s3://mybucket/logs?region=us-west-2 - format: uri - maxLength: 4096 - type: string - x-sensitive: true - logpushDestinationExistsResponse: - properties: - errors: - $ref: '#/components/schemas/logpushMessages' - messages: - $ref: '#/components/schemas/logpushMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - nullable: true - properties: - exists: - example: false - type: boolean - x-auditable: true - type: object - required: - - success - - errors - - messages - type: object - logpushEnabled: - default: false - description: Flag that indicates if the job is enabled. - example: false - type: boolean - x-auditable: true - logpushErrorMessage: - description: >- - If not null, the job is currently failing. Failures are usually. - repetitive (example: no permissions to write to destination bucket). - Only the last failure is recorded. On successful execution of a job the - error_message and last_error are set to null. - nullable: true - type: string - x-auditable: true - logpushFields: - description: Comma-separated list of fields. - example: >- - ClientIP,ClientRequestHost,ClientRequestMethod,ClientRequestURI,EdgeEndTimestamp,EdgeResponseBytes,EdgeResponseStatus,EdgeStartTimestamp,RayID - type: string - x-auditable: true - logpushFilter: - description: >- - The filters to select the events to include and/or remove from your - logs. For more information, refer to - [Filters](https://developers.cloudflare.com/logs/reference/filters/). - example: >- - {"where":{"and":[{"key":"ClientRequestPath","operator":"contains","value":"/static"},{"key":"ClientRequestHost","operator":"eq","value":"example.com"}]}} - nullable: true - type: string - logpushFrequency: - default: high - deprecated: true - description: >- - This field is deprecated. Please use `max_upload_*` parameters instead. - . The frequency at which Cloudflare sends batches of logs to your - destination. Setting frequency to high sends your logs in larger - quantities of smaller files. Setting frequency to low sends logs in - smaller quantities of larger files. - enum: - - high - - low - example: high - nullable: true - type: string - x-auditable: true - logpushGetOwnershipResponse: - properties: - errors: - $ref: '#/components/schemas/logpushMessages' - messages: - $ref: '#/components/schemas/logpushMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - nullable: true - properties: - filename: - example: logs/challenge-filename.txt - type: string - x-auditable: true - message: - example: '' - type: string - x-auditable: true - valid: - example: true - type: boolean - x-auditable: true - type: object - required: - - success - - errors - - messages - type: object - logpushId: - description: Unique id of the job. - minimum: 1 - type: integer - x-auditable: true - logpushInstantLogsJob: - nullable: true - properties: - destination_conf: - $ref: '#/components/schemas/logpushSchemasDestinationConf' - fields: - $ref: '#/components/schemas/logpushFields' - filter: - $ref: '#/components/schemas/logpushSchemasFilter' - sample: - $ref: '#/components/schemas/logpushSample' - session_id: - $ref: '#/components/schemas/logpushSessionId' - type: object - logpushInstantLogsJobResponseCollection: - properties: - errors: - $ref: '#/components/schemas/logpushMessages' - messages: - $ref: '#/components/schemas/logpushMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - items: - $ref: '#/components/schemas/logpushInstantLogsJob' - type: array - required: - - success - - errors - - messages - type: object - logpushInstantLogsJobResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/logpushMessages' - messages: - $ref: '#/components/schemas/logpushMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/logpushInstantLogsJob' - required: - - success - - errors - - messages - logpushKind: - default: '' - description: >- - The kind parameter (optional) is used to differentiate between Logpush - and Edge Log Delivery jobs (when supported by the dataset). - enum: - - '' - - edge - example: '' - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - logpushLastComplete: - description: >- - Records the last time for which logs have been successfully pushed. If - the last successful push was for logs range 2018-07-23T10:00:00Z to - 2018-07-23T10:01:00Z then the value of this field will be - 2018-07-23T10:01:00Z. If the job has never run or has just been enabled - and hasn't run yet then the field will be empty. - format: date-time - nullable: true - type: string - x-auditable: true - logpushLastError: - description: >- - Records the last time the job failed. If not null, the job is currently. - failing. If null, the job has either never failed or has run - successfully at least once since last failure. See also the - error_message field. - format: date-time - nullable: true - type: string - x-auditable: true - logpushLogpullOptions: - deprecated: true - description: >- - This field is deprecated. Use `output_options` instead. Configuration - string. It specifies things like requested fields and timestamp formats. - If migrating from the logpull api, copy the url (full url or just the - query string) of your call here, and logpush will keep on making this - call for you, setting start and end times appropriately. - example: fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339 - format: uri-reference - maxLength: 4096 - nullable: true - type: string - x-auditable: true - logpushLogpushFieldResponseCollection: - properties: - errors: - $ref: '#/components/schemas/logpushMessages' - messages: - $ref: '#/components/schemas/logpushMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - items: - $ref: >- - #/components/schemas/logpushLogpushFieldResponseCollection_result_item - type: object - required: - - success - - errors - - messages - type: object - logpushLogpushFieldResponseCollection_result_item: - nullable: true - properties: - key: - example: value - type: string - x-auditable: true - type: object - logpushLogpushJob: - nullable: true - properties: - dataset: - $ref: '#/components/schemas/logpushDataset' - destination_conf: - $ref: '#/components/schemas/logpushDestinationConf' - enabled: - $ref: '#/components/schemas/logpushEnabled' - error_message: - $ref: '#/components/schemas/logpushErrorMessage' - frequency: - $ref: '#/components/schemas/logpushFrequency' - id: - $ref: '#/components/schemas/logpushId' - kind: - $ref: '#/components/schemas/logpushKind' - last_complete: - $ref: '#/components/schemas/logpushLastComplete' - last_error: - $ref: '#/components/schemas/logpushLastError' - logpull_options: - $ref: '#/components/schemas/logpushLogpullOptions' - max_upload_bytes: - $ref: '#/components/schemas/logpushMaxUploadBytes' - max_upload_interval_seconds: - $ref: '#/components/schemas/logpushMaxUploadIntervalSeconds' - max_upload_records: - $ref: '#/components/schemas/logpushMaxUploadRecords' - name: - $ref: '#/components/schemas/logpushName' - output_options: - $ref: '#/components/schemas/logpushOutputOptions' - type: object - logpushLogpushJobResponseCollection: - properties: - errors: - $ref: '#/components/schemas/logpushMessages' - messages: - $ref: '#/components/schemas/logpushMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - items: - $ref: '#/components/schemas/logpushLogpushJob' - type: array - required: - - success - - errors - - messages - type: object - logpushLogpushJobResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/logpushMessages' - messages: - $ref: '#/components/schemas/logpushMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/logpushLogpushJob' - required: - - success - - errors - - messages - logpushMaxUploadBytes: - description: >- - The maximum uncompressed file size of a batch of logs. This setting - value must be between `5 MB` and `1 GB`, or `0` to disable it. Note that - you cannot set a minimum file size; this means that log files may be - much smaller than this batch size. - example: 5000000 - nullable: true - type: integer - x-auditable: true - enum: - - 0 - logpushMaxUploadIntervalSeconds: - description: >- - The maximum interval in seconds for log batches. This setting must be - between 30 and 300 seconds (5 minutes), or `0` to disable it. Note that - you cannot specify a minimum interval for log batches; this means that - log files may be sent in shorter intervals than this. - example: 30 - nullable: true - type: integer - x-auditable: true - enum: - - 0 - logpushMaxUploadRecords: - description: >- - The maximum number of log lines per batch. This setting must be between - 1000 and 1,000,000 lines, or `0` to disable it. Note that you cannot - specify a minimum number of log lines per batch; this means that log - files may contain many fewer lines than this. - example: 1000 - nullable: true - type: integer - x-auditable: true - enum: - - 0 - logpushMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - logpushName: - description: >- - Optional human readable job name. Not unique. Cloudflare suggests. that - you set this to a meaningful string, like the domain name, to make it - easier to identify your job. - example: example.com - maxLength: 512 - nullable: true - type: string - x-auditable: true - logpushOutputOptions: - description: >- - The structured replacement for `logpull_options`. When including this - field, the `logpull_option` field will be ignored. - nullable: true - properties: - CVE-2021-44228: - description: >- - If set to true, will cause all occurrences of `${` in the generated - files to be replaced with `x{`. - nullable: true - type: boolean - x-auditable: true - batch_prefix: - description: String to be prepended before each batch. - nullable: true - type: string - x-auditable: true - batch_suffix: - description: String to be appended after each batch. - nullable: true - type: string - x-auditable: true - field_delimiter: - description: >- - String to join fields. This field be ignored when `record_template` - is set. - nullable: true - type: string - x-auditable: true - field_names: - description: >- - List of field names to be included in the Logpush output. For the - moment, there is no option to add all fields at once, so you must - specify all the fields names you are interested in. - example: - - ClientIP - - EdgeStartTimestamp - - RayID - items: - type: string - x-auditable: true - type: array - merge_subrequests: - description: >- - If set to true, subrequests will be merged into the parent request. - Only supported for the `http_requests` dataset. - nullable: true - type: boolean - x-auditable: true - output_type: - description: >- - Specifies the output type, such as `ndjson` or `csv`. This sets - default values for the rest of the settings, depending on the chosen - output type. Some formatting rules, like string quoting, are - different between output types. - enum: - - ndjson - - csv - example: ndjson - type: string - x-auditable: true - record_delimiter: - description: String to be inserted in-between the records as separator. - nullable: true - type: string - x-auditable: true - record_prefix: - description: String to be prepended before each record. - nullable: true - type: string - x-auditable: true - record_suffix: - description: String to be appended after each record. - nullable: true - type: string - x-auditable: true - record_template: - description: >- - String to use as template for each record instead of the default - json key value mapping. All fields used in the template must be - present in `field_names` as well, otherwise they will end up as - null. Format as a Go `text/template` without any standard functions, - like conditionals, loops, sub-templates, etc. - nullable: true - type: string - x-auditable: true - sample_rate: - description: >- - Floating number to specify sampling rate. Sampling is applied on top - of filtering, and regardless of the current `sample_interval` of the - data. - format: float - maximum: 1 - minimum: 0 - nullable: true - type: number - x-auditable: true - timestamp_format: - description: >- - String to specify the format for timestamps, such as `unixnano`, - `unix`, `rfc3339`, `rfc3339ms` or `rfc3339ns`. - enum: - - unixnano - - unix - - rfc3339 - - rfc3339ms - - rfc3339ns - type: string - x-auditable: true - type: object - logpushOwnershipChallenge: - description: Ownership challenge token to prove destination ownership. - example: '00000000000000000000' - maxLength: 4096 - type: string - x-sensitive: true - logpushSample: - description: >- - The sample parameter is the sample rate of the records set by the - client: "sample": 1 is 100% of records "sample": 10 is 10% and so on. - example: 1 - type: integer - x-auditable: true - logpushSchemasDestinationConf: - description: >- - Unique WebSocket address that will receive messages from Cloudflare’s - edge. - example: >- - wss://logs.cloudflare.com/instant-logs/ws/sessions/99d471b1ca3c23cc8e30b6acec5db987 - format: uri - maxLength: 4096 - type: string - x-auditable: true - logpushSchemasFilter: - description: Filters to drill down into specific events. - example: >- - {"where":{"and":[{"key":"ClientCountry","operator":"neq","value":"ca"}]}} - type: string - x-auditable: true - logpushSessionId: - description: Unique session id of the job. - example: 99d471b1ca3c23cc8e30b6acec5db987 - type: string - x-auditable: true - logpushValidateOwnership: - nullable: true - properties: - valid: - example: true - type: boolean - x-auditable: true - type: object - logpushValidateOwnershipResponse: - properties: - errors: - $ref: '#/components/schemas/logpushMessages' - messages: - $ref: '#/components/schemas/logpushMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/logpushValidateOwnership' - required: - - success - - errors - - messages - type: object - logpushValidateResponse: - properties: - errors: - $ref: '#/components/schemas/logpushMessages' - messages: - $ref: '#/components/schemas/logpushMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - nullable: true - properties: - message: - example: '' - type: string - x-auditable: true - valid: - example: true - type: boolean - x-auditable: true - type: object - required: - - success - - errors - - messages - type: object - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - edge: - id: cloudflare.logpush.edge - name: edge - title: Edge - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1logpush~1edge~1jobs/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1logpush~1edge~1jobs/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/edge/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/edge/methods/create' - update: [] - delete: [] - replace: [] - fields: - id: cloudflare.logpush.fields - name: fields - title: Fields - methods: - list_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1logpush~1datasets~1{dataset_id}~1fields/get - response: - mediaType: application/json - openAPIDocKey: '200' - list_by_zone: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1logpush~1datasets~1{dataset_id}~1fields/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/fields/methods/list_by_account' - - $ref: '#/components/x-stackQL-resources/fields/methods/list_by_zone' - insert: [] - update: [] - delete: [] - replace: [] - datasets_jobs: - id: cloudflare.logpush.datasets_jobs - name: datasets_jobs - title: Datasets Jobs - methods: - list_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1logpush~1datasets~1{dataset_id}~1jobs/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - list_by_zone: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1logpush~1datasets~1{dataset_id}~1jobs/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/datasets_jobs/methods/list_by_account - - $ref: >- - #/components/x-stackQL-resources/datasets_jobs/methods/list_by_zone - insert: [] - update: [] - delete: [] - replace: [] - logpush_jobs: - id: cloudflare.logpush.logpush_jobs - name: logpush_jobs - title: Logpush Jobs - methods: - list_by_account: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1logpush~1jobs/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - list_by_zone: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1logpush~1jobs/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/logpush_jobs/methods/list_by_account - - $ref: '#/components/x-stackQL-resources/logpush_jobs/methods/list_by_zone' - insert: [] - update: [] - delete: [] - replace: [] - jobs: - id: cloudflare.logpush.jobs - name: jobs - title: Jobs - methods: - create_by_account: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1logpush~1jobs/post' - response: - mediaType: application/json - openAPIDocKey: '200' - create_by_zone: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1logpush~1jobs/post' - response: - mediaType: application/json - openAPIDocKey: '200' - get_by_account: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1logpush~1jobs~1{job_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update_by_account: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1logpush~1jobs~1{job_id}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_by_account: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1logpush~1jobs~1{job_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - get_by_zone: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1logpush~1jobs~1{job_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update_by_zone: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1logpush~1jobs~1{job_id}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_by_zone: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1logpush~1jobs~1{job_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/jobs/methods/get_by_account' - - $ref: '#/components/x-stackQL-resources/jobs/methods/get_by_zone' - insert: - - $ref: '#/components/x-stackQL-resources/jobs/methods/create_by_account' - - $ref: '#/components/x-stackQL-resources/jobs/methods/create_by_zone' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/jobs/methods/delete_by_account' - - $ref: '#/components/x-stackQL-resources/jobs/methods/delete_by_zone' - replace: - - $ref: '#/components/x-stackQL-resources/jobs/methods/update_by_account' - - $ref: '#/components/x-stackQL-resources/jobs/methods/update_by_zone' - logpush_ownership: - id: cloudflare.logpush.logpush_ownership - name: logpush_ownership - title: Logpush Ownership - methods: - create_by_account: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1logpush~1ownership/post' - response: - mediaType: application/json - openAPIDocKey: '200' - create_by_zone: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1logpush~1ownership/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/logpush_ownership/methods/create_by_account - - $ref: >- - #/components/x-stackQL-resources/logpush_ownership/methods/create_by_zone - update: [] - delete: [] - replace: [] - ownership_validate: - id: cloudflare.logpush.ownership_validate - name: ownership_validate - title: Ownership Validate - methods: - validate_by_account: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1logpush~1ownership~1validate/post - response: - mediaType: application/json - openAPIDocKey: '200' - validate_by_zone: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1logpush~1ownership~1validate/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/ownership_validate/methods/validate_by_account - - $ref: >- - #/components/x-stackQL-resources/ownership_validate/methods/validate_by_zone - update: [] - delete: [] - replace: [] - validate_destination: - id: cloudflare.logpush.validate_destination - name: validate_destination - title: Validate Destination - methods: - destination_by_account: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1logpush~1validate~1destination/post - response: - mediaType: application/json - openAPIDocKey: '200' - destination_by_zone: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1logpush~1validate~1destination/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/validate_destination/methods/destination_by_account - - $ref: >- - #/components/x-stackQL-resources/validate_destination/methods/destination_by_zone - update: [] - delete: [] - replace: [] - destination_exists: - id: cloudflare.logpush.destination_exists - name: destination_exists - title: Destination Exists - methods: - destination_exists_by_account: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1logpush~1validate~1destination~1exists/post - response: - mediaType: application/json - openAPIDocKey: '200' - destination_exists_by_zone: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1logpush~1validate~1destination~1exists/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/destination_exists/methods/destination_exists_by_account - - $ref: >- - #/components/x-stackQL-resources/destination_exists/methods/destination_exists_by_zone - update: [] - delete: [] - replace: [] - validate_origin: - id: cloudflare.logpush.validate_origin - name: validate_origin - title: Validate Origin - methods: - origin_by_account: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1logpush~1validate~1origin/post' - response: - mediaType: application/json - openAPIDocKey: '200' - origin_by_zone: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1logpush~1validate~1origin/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/validate_origin/methods/origin_by_account - - $ref: >- - #/components/x-stackQL-resources/validate_origin/methods/origin_by_zone - update: [] - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: logpush API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /zones/{zone_id}/logpush/edge/jobs: + get: + description: Lists Instant Logs jobs for a zone. + operationId: get-zones-zone_id-logpush-edge-jobs + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logpushInstantLogsJobResponseCollection' + description: List Instant Logs jobs response. + 4XX: + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/logpushMessages' + messages: + $ref: '#/components/schemas/logpushMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + items: + $ref: '#/components/schemas/logpushInstantLogsJob' + type: array + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + type: object + description: List Instant Logs jobs response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Instant Logs jobs + tags: + - Instant Logs jobs for a zone + x-api-token-group: + - Logs Read + x-cfPermissionsRequired: + enum: + - '#logs:read' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logpush + resource_chain: + - edge + method: get + post: + description: Creates a new Instant Logs job for a zone. + operationId: post-zones-zone_id-logpush-edge-jobs + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + fields: + $ref: '#/components/schemas/logpushFields' + filter: + $ref: '#/components/schemas/logpushSchemasFilter' + sample: + $ref: '#/components/schemas/logpushSample' + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logpushInstantLogsJobResponseSingle' + description: Create Instant Logs job response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/logpushMessages' + messages: + $ref: '#/components/schemas/logpushMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + nullable: true + properties: + destination_conf: + $ref: '#/components/schemas/logpushSchemasDestinationConf' + fields: + $ref: '#/components/schemas/logpushFields' + filter: + $ref: '#/components/schemas/logpushSchemasFilter' + sample: + $ref: '#/components/schemas/logpushSample' + session_id: + $ref: '#/components/schemas/logpushSessionId' + type: object + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Create Instant Logs job response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Instant Logs job + tags: + - Instant Logs jobs for a zone + x-api-token-group: + - Logs Read + x-cfPermissionsRequired: + enum: + - '#logs:read' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logpush + resource_chain: + - edge + method: create + /accounts/{account_id}/logpush/datasets/{dataset_id}/fields: + get: + description: Lists all fields available for a dataset. The response result is. an object with key-value pairs, where keys are field names, and values are descriptions. + parameters: + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logpushLogpushFieldResponseCollection' + description: List fields response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logpushApiResponseCommonFailure' + description: List fields response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List fields + tags: [] + x-api-token-group: + - Logs Read + x-cfPermissionsRequired: + enum: + - '#logs:read' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logpush + resource_chain: + - datasets + - fields + method: get + operationId: get_accounts_account_id_logpush_datasets_dataset_id_fields + /zones/{zone_id}/logpush/datasets/{dataset_id}/fields: + get: + description: Lists all fields available for a dataset. The response result is. an object with key-value pairs, where keys are field names, and values are descriptions. + parameters: + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logpushLogpushFieldResponseCollection' + description: List fields response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logpushApiResponseCommonFailure' + description: List fields response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List fields + tags: [] + x-api-token-group: + - Logs Read + x-cfPermissionsRequired: + enum: + - '#logs:read' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logpush + resource_chain: + - datasets + - fields + method: get + operationId: get_zones_zone_id_logpush_datasets_dataset_id_fields + /accounts/{account_id}/logpush/datasets/{dataset_id}/jobs: + get: + description: Lists Logpush jobs for an account or zone for a dataset. + parameters: + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logpushLogpushJobResponseCollection' + description: List Logpush jobs for a dataset response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logpushApiResponseCommonFailure' + description: List Logpush jobs for a dataset response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Logpush jobs for a dataset + tags: [] + x-api-token-group: + - Logs Write + x-cfPermissionsRequired: + enum: + - '#logs:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logpush + resource_chain: + - datasets + - jobs + method: get + operationId: get_accounts_account_id_logpush_datasets_dataset_id_jobs + /zones/{zone_id}/logpush/datasets/{dataset_id}/jobs: + get: + description: Lists Logpush jobs for an account or zone for a dataset. + parameters: + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logpushLogpushJobResponseCollection' + description: List Logpush jobs for a dataset response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logpushApiResponseCommonFailure' + description: List Logpush jobs for a dataset response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Logpush jobs for a dataset + tags: [] + x-api-token-group: + - Logs Write + x-cfPermissionsRequired: + enum: + - '#logs:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logpush + resource_chain: + - datasets + - jobs + method: get + operationId: get_zones_zone_id_logpush_datasets_dataset_id_jobs + /accounts/{account_id}/logpush/jobs: + get: + description: Lists Logpush jobs for an account or zone. + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logpushLogpushJobResponseCollection' + description: List Logpush jobs response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logpushApiResponseCommonFailure' + description: List Logpush jobs response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Logpush jobs + tags: [] + x-api-token-group: + - Logs Write + x-cfPermissionsRequired: + enum: + - '#logs:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logpush + resource_chain: + - jobs + method: list + operationId: get_accounts_account_id_logpush_jobs + post: + description: Creates a new Logpush job for an account or zone. + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + dataset: + $ref: '#/components/schemas/logpushDataset' + destination_conf: + $ref: '#/components/schemas/logpushDestinationConf' + enabled: + $ref: '#/components/schemas/logpushEnabled' + filter: + $ref: '#/components/schemas/logpushFilter' + frequency: + $ref: '#/components/schemas/logpushFrequency' + kind: + $ref: '#/components/schemas/logpushKind' + logpull_options: + $ref: '#/components/schemas/logpushLogpullOptions' + max_upload_bytes: + $ref: '#/components/schemas/logpushMaxUploadBytes' + max_upload_interval_seconds: + $ref: '#/components/schemas/logpushMaxUploadIntervalSeconds' + max_upload_records: + $ref: '#/components/schemas/logpushMaxUploadRecords' + name: + $ref: '#/components/schemas/logpushName' + output_options: + $ref: '#/components/schemas/logpushOutputOptions' + ownership_challenge: + $ref: '#/components/schemas/logpushOwnershipChallenge' + required: + - destination_conf + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logpushLogpushJobResponseSingle' + description: Create Logpush job response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logpushApiResponseCommonFailure' + description: Create Logpush job response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Logpush job + tags: [] + x-api-token-group: + - Logs Write + x-cfPermissionsRequired: + enum: + - '#logs:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logpush + resource_chain: + - jobs + method: create + operationId: post_accounts_account_id_logpush_jobs + /zones/{zone_id}/logpush/jobs: + get: + description: Lists Logpush jobs for an account or zone. + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logpushLogpushJobResponseCollection' + description: List Logpush jobs response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logpushApiResponseCommonFailure' + description: List Logpush jobs response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Logpush jobs + tags: [] + x-api-token-group: + - Logs Write + x-cfPermissionsRequired: + enum: + - '#logs:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logpush + resource_chain: + - jobs + method: list + operationId: get_zones_zone_id_logpush_jobs + post: + description: Creates a new Logpush job for an account or zone. + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + dataset: + $ref: '#/components/schemas/logpushDataset' + destination_conf: + $ref: '#/components/schemas/logpushDestinationConf' + enabled: + $ref: '#/components/schemas/logpushEnabled' + filter: + $ref: '#/components/schemas/logpushFilter' + frequency: + $ref: '#/components/schemas/logpushFrequency' + kind: + $ref: '#/components/schemas/logpushKind' + logpull_options: + $ref: '#/components/schemas/logpushLogpullOptions' + max_upload_bytes: + $ref: '#/components/schemas/logpushMaxUploadBytes' + max_upload_interval_seconds: + $ref: '#/components/schemas/logpushMaxUploadIntervalSeconds' + max_upload_records: + $ref: '#/components/schemas/logpushMaxUploadRecords' + name: + $ref: '#/components/schemas/logpushName' + output_options: + $ref: '#/components/schemas/logpushOutputOptions' + ownership_challenge: + $ref: '#/components/schemas/logpushOwnershipChallenge' + required: + - destination_conf + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logpushLogpushJobResponseSingle' + description: Create Logpush job response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logpushApiResponseCommonFailure' + description: Create Logpush job response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Logpush job + tags: [] + x-api-token-group: + - Logs Write + x-cfPermissionsRequired: + enum: + - '#logs:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logpush + resource_chain: + - jobs + method: create + operationId: post_zones_zone_id_logpush_jobs + /accounts/{account_id}/logpush/jobs/{job_id}: + get: + description: Gets the details of a Logpush job. + parameters: + - name: job_id + in: path + required: true + description: The job ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logpushLogpushJobResponseSingle' + description: Get Logpush job details response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logpushApiResponseCommonFailure' + description: Get Logpush job details response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Logpush job details + tags: [] + x-api-token-group: + - Logs Write + x-cfPermissionsRequired: + enum: + - '#logs:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logpush + resource_chain: + - jobs + method: get + operationId: get_accounts_account_id_logpush_jobs_job_id + put: + description: Updates a Logpush job. + parameters: + - name: job_id + in: path + required: true + description: The job ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + destination_conf: + $ref: '#/components/schemas/logpushDestinationConf' + enabled: + $ref: '#/components/schemas/logpushEnabled' + filter: + $ref: '#/components/schemas/logpushFilter' + frequency: + $ref: '#/components/schemas/logpushFrequency' + kind: + $ref: '#/components/schemas/logpushKind' + logpull_options: + $ref: '#/components/schemas/logpushLogpullOptions' + max_upload_bytes: + $ref: '#/components/schemas/logpushMaxUploadBytes' + max_upload_interval_seconds: + $ref: '#/components/schemas/logpushMaxUploadIntervalSeconds' + max_upload_records: + $ref: '#/components/schemas/logpushMaxUploadRecords' + name: + $ref: '#/components/schemas/logpushName' + output_options: + $ref: '#/components/schemas/logpushOutputOptions' + ownership_challenge: + $ref: '#/components/schemas/logpushOwnershipChallenge' + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logpushLogpushJobResponseSingle' + description: Update Logpush job response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logpushApiResponseCommonFailure' + description: Update Logpush job response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Logpush job + tags: [] + x-api-token-group: + - Logs Write + x-cfPermissionsRequired: + enum: + - '#logs:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logpush + resource_chain: + - jobs + method: update + operationId: put_accounts_account_id_logpush_jobs_job_id + delete: + description: Deletes a Logpush job. + parameters: + - name: job_id + in: path + required: true + description: The job ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/logpushMessages' + messages: + $ref: '#/components/schemas/logpushMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + properties: + id: + $ref: '#/components/schemas/logpushId' + type: object + required: + - success + - errors + - messages + type: object + description: Delete Logpush job response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logpushApiResponseCommonFailure' + description: Delete Logpush job response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Logpush job + tags: [] + x-api-token-group: + - Logs Write + x-cfPermissionsRequired: + enum: + - '#logs:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logpush + resource_chain: + - jobs + method: delete + operationId: delete_accounts_account_id_logpush_jobs_job_id + /zones/{zone_id}/logpush/jobs/{job_id}: + get: + description: Gets the details of a Logpush job. + parameters: + - name: job_id + in: path + required: true + description: The job ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logpushLogpushJobResponseSingle' + description: Get Logpush job details response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logpushApiResponseCommonFailure' + description: Get Logpush job details response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Logpush job details + tags: [] + x-api-token-group: + - Logs Write + x-cfPermissionsRequired: + enum: + - '#logs:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logpush + resource_chain: + - jobs + method: get + operationId: get_zones_zone_id_logpush_jobs_job_id + put: + description: Updates a Logpush job. + parameters: + - name: job_id + in: path + required: true + description: The job ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + destination_conf: + $ref: '#/components/schemas/logpushDestinationConf' + enabled: + $ref: '#/components/schemas/logpushEnabled' + filter: + $ref: '#/components/schemas/logpushFilter' + frequency: + $ref: '#/components/schemas/logpushFrequency' + kind: + $ref: '#/components/schemas/logpushKind' + logpull_options: + $ref: '#/components/schemas/logpushLogpullOptions' + max_upload_bytes: + $ref: '#/components/schemas/logpushMaxUploadBytes' + max_upload_interval_seconds: + $ref: '#/components/schemas/logpushMaxUploadIntervalSeconds' + max_upload_records: + $ref: '#/components/schemas/logpushMaxUploadRecords' + name: + $ref: '#/components/schemas/logpushName' + output_options: + $ref: '#/components/schemas/logpushOutputOptions' + ownership_challenge: + $ref: '#/components/schemas/logpushOwnershipChallenge' + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logpushLogpushJobResponseSingle' + description: Update Logpush job response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logpushApiResponseCommonFailure' + description: Update Logpush job response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Logpush job + tags: [] + x-api-token-group: + - Logs Write + x-cfPermissionsRequired: + enum: + - '#logs:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logpush + resource_chain: + - jobs + method: update + operationId: put_zones_zone_id_logpush_jobs_job_id + delete: + description: Deletes a Logpush job. + parameters: + - name: job_id + in: path + required: true + description: The job ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/logpushMessages' + messages: + $ref: '#/components/schemas/logpushMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + properties: + id: + $ref: '#/components/schemas/logpushId' + type: object + required: + - success + - errors + - messages + type: object + description: Delete Logpush job response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logpushApiResponseCommonFailure' + description: Delete Logpush job response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Logpush job + tags: [] + x-api-token-group: + - Logs Write + x-cfPermissionsRequired: + enum: + - '#logs:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logpush + resource_chain: + - jobs + method: delete + operationId: delete_zones_zone_id_logpush_jobs_job_id + /accounts/{account_id}/logpush/ownership: + post: + description: Gets a new ownership challenge sent to your destination. + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + destination_conf: + $ref: '#/components/schemas/logpushDestinationConf' + required: + - destination_conf + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logpushGetOwnershipResponse' + description: Get ownership challenge response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logpushApiResponseCommonFailure' + description: Get ownership challenge response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get ownership challenge + tags: [] + x-api-token-group: + - Logs Write + x-cfPermissionsRequired: + enum: + - '#logs:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logpush + resource_chain: + - ownership + method: create + operationId: post_accounts_account_id_logpush_ownership + /zones/{zone_id}/logpush/ownership: + post: + description: Gets a new ownership challenge sent to your destination. + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + destination_conf: + $ref: '#/components/schemas/logpushDestinationConf' + required: + - destination_conf + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logpushGetOwnershipResponse' + description: Get ownership challenge response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logpushApiResponseCommonFailure' + description: Get ownership challenge response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get ownership challenge + tags: [] + x-api-token-group: + - Logs Write + x-cfPermissionsRequired: + enum: + - '#logs:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logpush + resource_chain: + - ownership + method: create + operationId: post_zones_zone_id_logpush_ownership + /accounts/{account_id}/logpush/ownership/validate: + post: + description: Validates ownership challenge of the destination. + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + destination_conf: + $ref: '#/components/schemas/logpushDestinationConf' + ownership_challenge: + $ref: '#/components/schemas/logpushOwnershipChallenge' + required: + - destination_conf + - ownership_challenge + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logpushValidateOwnershipResponse' + description: Validate ownership challenge response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logpushApiResponseCommonFailure' + description: Validate ownership challenge response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Validate ownership challenge + tags: [] + x-api-token-group: + - Logs Write + x-cfPermissionsRequired: + enum: + - '#logs:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logpush + resource_chain: + - ownership + method: validate + operationId: post_accounts_account_id_logpush_ownership_validate + /zones/{zone_id}/logpush/ownership/validate: + post: + description: Validates ownership challenge of the destination. + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + destination_conf: + $ref: '#/components/schemas/logpushDestinationConf' + ownership_challenge: + $ref: '#/components/schemas/logpushOwnershipChallenge' + required: + - destination_conf + - ownership_challenge + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logpushValidateOwnershipResponse' + description: Validate ownership challenge response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logpushApiResponseCommonFailure' + description: Validate ownership challenge response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Validate ownership challenge + tags: [] + x-api-token-group: + - Logs Write + x-cfPermissionsRequired: + enum: + - '#logs:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logpush + resource_chain: + - ownership + method: validate + operationId: post_zones_zone_id_logpush_ownership_validate + /accounts/{account_id}/logpush/validate/destination: + post: + description: Validates destination. + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + destination_conf: + $ref: '#/components/schemas/logpushDestinationConf' + required: + - destination_conf + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logpushValidateResponse' + description: Validate destination response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logpushApiResponseCommonFailure' + description: Validate destination response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Validate destination + tags: [] + x-api-token-group: + - Logs Write + x-cfPermissionsRequired: + enum: + - '#logs:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logpush + resource_chain: + - validate + method: destination + operationId: post_accounts_account_id_logpush_validate_destination + /zones/{zone_id}/logpush/validate/destination: + post: + description: Validates destination. + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + destination_conf: + $ref: '#/components/schemas/logpushDestinationConf' + required: + - destination_conf + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logpushValidateResponse' + description: Validate destination response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logpushApiResponseCommonFailure' + description: Validate destination response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Validate destination + tags: [] + x-api-token-group: + - Logs Write + x-cfPermissionsRequired: + enum: + - '#logs:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logpush + resource_chain: + - validate + method: destination + operationId: post_zones_zone_id_logpush_validate_destination + /accounts/{account_id}/logpush/validate/destination/exists: + post: + description: Checks if there is an existing job with a destination. + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + destination_conf: + $ref: '#/components/schemas/logpushDestinationConf' + required: + - destination_conf + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logpushDestinationExistsResponse' + description: Check destination exists response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logpushApiResponseCommonFailure' + description: Check destination exists response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Check destination exists + tags: [] + x-api-token-group: + - Logs Write + x-cfPermissionsRequired: + enum: + - '#logs:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logpush + resource_chain: + - validate + method: destination_exists + operationId: post_accounts_account_id_logpush_validate_destination_exists + /zones/{zone_id}/logpush/validate/destination/exists: + post: + description: Checks if there is an existing job with a destination. + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + destination_conf: + $ref: '#/components/schemas/logpushDestinationConf' + required: + - destination_conf + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logpushDestinationExistsResponse' + description: Check destination exists response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logpushApiResponseCommonFailure' + description: Check destination exists response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Check destination exists + tags: [] + x-api-token-group: + - Logs Write + x-cfPermissionsRequired: + enum: + - '#logs:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logpush + resource_chain: + - validate + method: destination_exists + operationId: post_zones_zone_id_logpush_validate_destination_exists + /accounts/{account_id}/logpush/validate/origin: + post: + description: Validates logpull origin with logpull_options. + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + logpull_options: + $ref: '#/components/schemas/logpushLogpullOptions' + required: + - logpull_options + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logpushValidateResponse' + description: Validate origin response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logpushApiResponseCommonFailure' + description: Validate origin response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Validate origin + tags: [] + x-api-token-group: + - Logs Write + x-cfPermissionsRequired: + enum: + - '#logs:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logpush + resource_chain: + - validate + method: origin + operationId: post_accounts_account_id_logpush_validate_origin + /zones/{zone_id}/logpush/validate/origin: + post: + description: Validates logpull origin with logpull_options. + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + logpull_options: + $ref: '#/components/schemas/logpushLogpullOptions' + required: + - logpull_options + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logpushValidateResponse' + description: Validate origin response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logpushApiResponseCommonFailure' + description: Validate origin response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Validate origin + tags: [] + x-api-token-group: + - Logs Write + x-cfPermissionsRequired: + enum: + - '#logs:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logpush + resource_chain: + - validate + method: origin + operationId: post_zones_zone_id_logpush_validate_origin +components: + schemas: + logpushApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/logpushMessages' + messages: + example: [] + $ref: '#/components/schemas/logpushMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + logpushDataset: + default: http_requests + description: Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/). + enum: + - access_requests + - audit_logs + - audit_logs_v2 + - biso_user_actions + - casb_findings + - device_posture_results + - dex_application_tests + - dex_device_state_events + - dlp_forensic_copies + - dns_firewall_logs + - dns_logs + - email_security_alerts + - email_security_post_delivery_events + - firewall_events + - gateway_dns + - gateway_http + - gateway_network + - http_requests + - ipsec_logs + - magic_ids_detections + - mcp_portal_logs + - nel_reports + - network_analytics_logs + - page_shield_events + - sinkhole_http_logs + - spectrum_events + - ssh_logs + - warp_config_changes + - warp_toggle_changes + - workers_trace_events + - zaraz_events + - zero_trust_network_sessions + example: http_requests + nullable: true + type: string + x-auditable: true + logpushDestinationConf: + description: Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included. + example: s3://mybucket/logs?region=us-west-2 + format: uri + maxLength: 4096 + type: string + x-sensitive: true + logpushDestinationExistsResponse: + properties: + errors: + $ref: '#/components/schemas/logpushMessages' + messages: + $ref: '#/components/schemas/logpushMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + nullable: true + properties: + exists: + example: false + type: boolean + x-auditable: true + type: object + required: + - success + - errors + - messages + type: object + logpushEnabled: + default: false + description: Flag that indicates if the job is enabled. + example: false + type: boolean + x-auditable: true + logpushErrorMessage: + description: 'If not null, the job is currently failing. Failures are usually. repetitive (example: no permissions to write to destination bucket). Only the last failure is recorded. On successful execution of a job the error_message and last_error are set to null.' + nullable: true + type: string + x-auditable: true + logpushFields: + description: Comma-separated list of fields. + example: ClientIP,ClientRequestHost,ClientRequestMethod,ClientRequestURI,EdgeEndTimestamp,EdgeResponseBytes,EdgeResponseStatus,EdgeStartTimestamp,RayID + type: string + x-auditable: true + logpushFilter: + description: The filters to select the events to include and/or remove from your logs. For more information, refer to [Filters](https://developers.cloudflare.com/logs/reference/filters/). + example: '{"where":{"and":[{"key":"ClientRequestPath","operator":"contains","value":"/static"},{"key":"ClientRequestHost","operator":"eq","value":"example.com"}]}}' + nullable: true + type: string + logpushFrequency: + default: high + deprecated: true + description: This field is deprecated. Please use `max_upload_*` parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files. + enum: + - high + - low + example: high + nullable: true + type: string + x-auditable: true + logpushGetOwnershipResponse: + properties: + errors: + $ref: '#/components/schemas/logpushMessages' + messages: + $ref: '#/components/schemas/logpushMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + nullable: true + properties: + filename: + example: logs/challenge-filename.txt + type: string + x-auditable: true + message: + example: '' + type: string + x-auditable: true + valid: + example: true + type: boolean + x-auditable: true + type: object + required: + - success + - errors + - messages + type: object + logpushId: + description: Unique id of the job. + minimum: 1 + type: integer + x-auditable: true + logpushInstantLogsJob: + nullable: true + properties: + destination_conf: + $ref: '#/components/schemas/logpushSchemasDestinationConf' + fields: + $ref: '#/components/schemas/logpushFields' + filter: + $ref: '#/components/schemas/logpushSchemasFilter' + sample: + $ref: '#/components/schemas/logpushSample' + session_id: + $ref: '#/components/schemas/logpushSessionId' + type: object + logpushInstantLogsJobResponseCollection: + properties: + errors: + $ref: '#/components/schemas/logpushMessages' + messages: + $ref: '#/components/schemas/logpushMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + items: + $ref: '#/components/schemas/logpushInstantLogsJob' + type: array + required: + - success + - errors + - messages + type: object + logpushInstantLogsJobResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/logpushMessages' + messages: + $ref: '#/components/schemas/logpushMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/logpushInstantLogsJob' + required: + - success + - errors + - messages + logpushKind: + default: '' + description: The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset). + enum: + - '' + - edge + example: '' + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + logpushLastComplete: + description: Records the last time for which logs have been successfully pushed. If the last successful push was for logs range 2018-07-23T10:00:00Z to 2018-07-23T10:01:00Z then the value of this field will be 2018-07-23T10:01:00Z. If the job has never run or has just been enabled and hasn't run yet then the field will be empty. + format: date-time + nullable: true + type: string + x-auditable: true + logpushLastError: + description: Records the last time the job failed. If not null, the job is currently. failing. If null, the job has either never failed or has run successfully at least once since last failure. See also the error_message field. + format: date-time + nullable: true + type: string + x-auditable: true + logpushLogpullOptions: + deprecated: true + description: This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately. + example: fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339 + format: uri-reference + maxLength: 4096 + nullable: true + type: string + x-auditable: true + logpushLogpushFieldResponseCollection: + properties: + errors: + $ref: '#/components/schemas/logpushMessages' + messages: + $ref: '#/components/schemas/logpushMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + items: + $ref: '#/components/schemas/logpushLogpushFieldResponseCollection_result_item' + type: object + required: + - success + - errors + - messages + type: object + logpushLogpushFieldResponseCollection_result_item: + nullable: true + properties: + key: + example: value + type: string + x-auditable: true + type: object + logpushLogpushJob: + nullable: true + properties: + dataset: + $ref: '#/components/schemas/logpushDataset' + destination_conf: + $ref: '#/components/schemas/logpushDestinationConf' + enabled: + $ref: '#/components/schemas/logpushEnabled' + error_message: + $ref: '#/components/schemas/logpushErrorMessage' + frequency: + $ref: '#/components/schemas/logpushFrequency' + id: + $ref: '#/components/schemas/logpushId' + kind: + $ref: '#/components/schemas/logpushKind' + last_complete: + $ref: '#/components/schemas/logpushLastComplete' + last_error: + $ref: '#/components/schemas/logpushLastError' + logpull_options: + $ref: '#/components/schemas/logpushLogpullOptions' + max_upload_bytes: + $ref: '#/components/schemas/logpushMaxUploadBytes' + max_upload_interval_seconds: + $ref: '#/components/schemas/logpushMaxUploadIntervalSeconds' + max_upload_records: + $ref: '#/components/schemas/logpushMaxUploadRecords' + name: + $ref: '#/components/schemas/logpushName' + output_options: + $ref: '#/components/schemas/logpushOutputOptions' + type: object + logpushLogpushJobResponseCollection: + properties: + errors: + $ref: '#/components/schemas/logpushMessages' + messages: + $ref: '#/components/schemas/logpushMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + items: + $ref: '#/components/schemas/logpushLogpushJob' + type: array + required: + - success + - errors + - messages + type: object + logpushLogpushJobResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/logpushMessages' + messages: + $ref: '#/components/schemas/logpushMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/logpushLogpushJob' + required: + - success + - errors + - messages + logpushMaxUploadBytes: + description: The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a minimum file size; this means that log files may be much smaller than this batch size. + example: 5000000 + nullable: true + type: integer + x-auditable: true + enum: + - 0 + logpushMaxUploadIntervalSeconds: + description: The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify a minimum interval for log batches; this means that log files may be sent in shorter intervals than this. + example: 30 + nullable: true + type: integer + x-auditable: true + enum: + - 0 + logpushMaxUploadRecords: + description: The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum number of log lines per batch; this means that log files may contain many fewer lines than this. + example: 1000 + nullable: true + type: integer + x-auditable: true + enum: + - 0 + logpushMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + logpushName: + description: Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job. + example: example.com + maxLength: 512 + nullable: true + type: string + x-auditable: true + logpushOutputOptions: + description: The structured replacement for `logpull_options`. When including this field, the `logpull_option` field will be ignored. + nullable: true + properties: + CVE-2021-44228: + description: If set to true, will cause all occurrences of `${` in the generated files to be replaced with `x{`. + nullable: true + type: boolean + x-auditable: true + batch_prefix: + description: String to be prepended before each batch. + nullable: true + type: string + x-auditable: true + batch_suffix: + description: String to be appended after each batch. + nullable: true + type: string + x-auditable: true + field_delimiter: + description: String to join fields. This field be ignored when `record_template` is set. + nullable: true + type: string + x-auditable: true + field_names: + description: List of field names to be included in the Logpush output. For the moment, there is no option to add all fields at once, so you must specify all the fields names you are interested in. + example: + - ClientIP + - EdgeStartTimestamp + - RayID + items: + type: string + x-auditable: true + type: array + merge_subrequests: + description: If set to true, subrequests will be merged into the parent request. Only supported for the `http_requests` dataset. + nullable: true + type: boolean + x-auditable: true + output_type: + description: Specifies the output type, such as `ndjson` or `csv`. This sets default values for the rest of the settings, depending on the chosen output type. Some formatting rules, like string quoting, are different between output types. + enum: + - ndjson + - csv + example: ndjson + type: string + x-auditable: true + record_delimiter: + description: String to be inserted in-between the records as separator. + nullable: true + type: string + x-auditable: true + record_prefix: + description: String to be prepended before each record. + nullable: true + type: string + x-auditable: true + record_suffix: + description: String to be appended after each record. + nullable: true + type: string + x-auditable: true + record_template: + description: String to use as template for each record instead of the default json key value mapping. All fields used in the template must be present in `field_names` as well, otherwise they will end up as null. Format as a Go `text/template` without any standard functions, like conditionals, loops, sub-templates, etc. + nullable: true + type: string + x-auditable: true + sample_rate: + description: Floating number to specify sampling rate. Sampling is applied on top of filtering, and regardless of the current `sample_interval` of the data. + format: float + maximum: 1 + minimum: 0 + nullable: true + type: number + x-auditable: true + timestamp_format: + description: String to specify the format for timestamps, such as `unixnano`, `unix`, `rfc3339`, `rfc3339ms` or `rfc3339ns`. + enum: + - unixnano + - unix + - rfc3339 + - rfc3339ms + - rfc3339ns + type: string + x-auditable: true + type: object + logpushOwnershipChallenge: + description: Ownership challenge token to prove destination ownership. + example: '00000000000000000000' + maxLength: 4096 + type: string + x-sensitive: true + logpushSample: + description: 'The sample parameter is the sample rate of the records set by the client: "sample": 1 is 100% of records "sample": 10 is 10% and so on.' + example: 1 + type: integer + x-auditable: true + logpushSchemasDestinationConf: + description: "Unique WebSocket address that will receive messages from Cloudflare\u2019s edge." + example: wss://logs.cloudflare.com/instant-logs/ws/sessions/99d471b1ca3c23cc8e30b6acec5db987 + format: uri + maxLength: 4096 + type: string + x-auditable: true + logpushSchemasFilter: + description: Filters to drill down into specific events. + example: '{"where":{"and":[{"key":"ClientCountry","operator":"neq","value":"ca"}]}}' + type: string + x-auditable: true + logpushSessionId: + description: Unique session id of the job. + example: 99d471b1ca3c23cc8e30b6acec5db987 + type: string + x-auditable: true + logpushValidateOwnership: + nullable: true + properties: + valid: + example: true + type: boolean + x-auditable: true + type: object + logpushValidateOwnershipResponse: + properties: + errors: + $ref: '#/components/schemas/logpushMessages' + messages: + $ref: '#/components/schemas/logpushMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/logpushValidateOwnership' + required: + - success + - errors + - messages + type: object + logpushValidateResponse: + properties: + errors: + $ref: '#/components/schemas/logpushMessages' + messages: + $ref: '#/components/schemas/logpushMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + nullable: true + properties: + message: + example: '' + type: string + x-auditable: true + valid: + example: true + type: boolean + x-auditable: true + type: object + required: + - success + - errors + - messages + type: object + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + edge: + id: cloudflare.logpush.edge + name: edge + title: Edge + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1logpush~1edge~1jobs/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1logpush~1edge~1jobs/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/edge/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/edge/methods/create' + update: [] + delete: [] + replace: [] + fields: + id: cloudflare.logpush.fields + name: fields + title: Fields + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1logpush~1datasets~1{dataset_id}~1fields/get' + response: + mediaType: application/json + openAPIDocKey: '200' + list_by_zone: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1logpush~1datasets~1{dataset_id}~1fields/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/fields/methods/list_by_account' + - $ref: '#/components/x-stackQL-resources/fields/methods/list_by_zone' + insert: [] + update: [] + delete: [] + replace: [] + datasets_jobs: + id: cloudflare.logpush.datasets_jobs + name: datasets_jobs + title: Datasets Jobs + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1logpush~1datasets~1{dataset_id}~1jobs/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + list_by_zone: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1logpush~1datasets~1{dataset_id}~1jobs/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/datasets_jobs/methods/list_by_account' + - $ref: '#/components/x-stackQL-resources/datasets_jobs/methods/list_by_zone' + insert: [] + update: [] + delete: [] + replace: [] + logpush_jobs: + id: cloudflare.logpush.logpush_jobs + name: logpush_jobs + title: Logpush Jobs + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1logpush~1jobs/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + list_by_zone: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1logpush~1jobs/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/logpush_jobs/methods/list_by_account' + - $ref: '#/components/x-stackQL-resources/logpush_jobs/methods/list_by_zone' + insert: [] + update: [] + delete: [] + replace: [] + jobs: + id: cloudflare.logpush.jobs + name: jobs + title: Jobs + methods: + create_by_account: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1logpush~1jobs/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .dataset }}{{ $sep }}"dataset": {{ toJson .dataset }}{{- $sep = "," -}}{{ end }} + + {{- if .destination_conf }}{{ $sep }}"destination_conf": {{ toJson .destination_conf }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .filter }}{{ $sep }}"filter": {{ toJson .filter }}{{- $sep = "," -}}{{ end }} + + {{- if .frequency }}{{ $sep }}"frequency": {{ toJson .frequency }}{{- $sep = "," -}}{{ end }} + + {{- if .kind }}{{ $sep }}"kind": {{ toJson .kind }}{{- $sep = "," -}}{{ end }} + + {{- if .logpull_options }}{{ $sep }}"logpull_options": {{ toJson .logpull_options }}{{- $sep = "," -}}{{ end }} + + {{- if .max_upload_bytes }}{{ $sep }}"max_upload_bytes": {{ toJson .max_upload_bytes }}{{- $sep = "," -}}{{ end }} + + {{- if .max_upload_interval_seconds }}{{ $sep }}"max_upload_interval_seconds": {{ toJson .max_upload_interval_seconds }}{{- $sep = "," -}}{{ end }} + + {{- if .max_upload_records }}{{ $sep }}"max_upload_records": {{ toJson .max_upload_records }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .output_options }}{{ $sep }}"output_options": {{ if eq (kindOf .output_options) "string" }}{{ .output_options }}{{ else }}{{ toJson .output_options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ownership_challenge }}{{ $sep }}"ownership_challenge": {{ toJson .ownership_challenge }}{{- $sep = "," -}}{{ end }} + + } + + ' + create_by_zone: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1logpush~1jobs/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .dataset }}{{ $sep }}"dataset": {{ toJson .dataset }}{{- $sep = "," -}}{{ end }} + + {{- if .destination_conf }}{{ $sep }}"destination_conf": {{ toJson .destination_conf }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .filter }}{{ $sep }}"filter": {{ toJson .filter }}{{- $sep = "," -}}{{ end }} + + {{- if .frequency }}{{ $sep }}"frequency": {{ toJson .frequency }}{{- $sep = "," -}}{{ end }} + + {{- if .kind }}{{ $sep }}"kind": {{ toJson .kind }}{{- $sep = "," -}}{{ end }} + + {{- if .logpull_options }}{{ $sep }}"logpull_options": {{ toJson .logpull_options }}{{- $sep = "," -}}{{ end }} + + {{- if .max_upload_bytes }}{{ $sep }}"max_upload_bytes": {{ toJson .max_upload_bytes }}{{- $sep = "," -}}{{ end }} + + {{- if .max_upload_interval_seconds }}{{ $sep }}"max_upload_interval_seconds": {{ toJson .max_upload_interval_seconds }}{{- $sep = "," -}}{{ end }} + + {{- if .max_upload_records }}{{ $sep }}"max_upload_records": {{ toJson .max_upload_records }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .output_options }}{{ $sep }}"output_options": {{ if eq (kindOf .output_options) "string" }}{{ .output_options }}{{ else }}{{ toJson .output_options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ownership_challenge }}{{ $sep }}"ownership_challenge": {{ toJson .ownership_challenge }}{{- $sep = "," -}}{{ end }} + + } + + ' + get_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1logpush~1jobs~1{job_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update_by_account: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1logpush~1jobs~1{job_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .destination_conf }}{{ $sep }}"destination_conf": {{ toJson .destination_conf }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .filter }}{{ $sep }}"filter": {{ toJson .filter }}{{- $sep = "," -}}{{ end }} + + {{- if .frequency }}{{ $sep }}"frequency": {{ toJson .frequency }}{{- $sep = "," -}}{{ end }} + + {{- if .kind }}{{ $sep }}"kind": {{ toJson .kind }}{{- $sep = "," -}}{{ end }} + + {{- if .logpull_options }}{{ $sep }}"logpull_options": {{ toJson .logpull_options }}{{- $sep = "," -}}{{ end }} + + {{- if .max_upload_bytes }}{{ $sep }}"max_upload_bytes": {{ toJson .max_upload_bytes }}{{- $sep = "," -}}{{ end }} + + {{- if .max_upload_interval_seconds }}{{ $sep }}"max_upload_interval_seconds": {{ toJson .max_upload_interval_seconds }}{{- $sep = "," -}}{{ end }} + + {{- if .max_upload_records }}{{ $sep }}"max_upload_records": {{ toJson .max_upload_records }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .output_options }}{{ $sep }}"output_options": {{ if eq (kindOf .output_options) "string" }}{{ .output_options }}{{ else }}{{ toJson .output_options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ownership_challenge }}{{ $sep }}"ownership_challenge": {{ toJson .ownership_challenge }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1logpush~1jobs~1{job_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get_by_zone: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1logpush~1jobs~1{job_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update_by_zone: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1logpush~1jobs~1{job_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .destination_conf }}{{ $sep }}"destination_conf": {{ toJson .destination_conf }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .filter }}{{ $sep }}"filter": {{ toJson .filter }}{{- $sep = "," -}}{{ end }} + + {{- if .frequency }}{{ $sep }}"frequency": {{ toJson .frequency }}{{- $sep = "," -}}{{ end }} + + {{- if .kind }}{{ $sep }}"kind": {{ toJson .kind }}{{- $sep = "," -}}{{ end }} + + {{- if .logpull_options }}{{ $sep }}"logpull_options": {{ toJson .logpull_options }}{{- $sep = "," -}}{{ end }} + + {{- if .max_upload_bytes }}{{ $sep }}"max_upload_bytes": {{ toJson .max_upload_bytes }}{{- $sep = "," -}}{{ end }} + + {{- if .max_upload_interval_seconds }}{{ $sep }}"max_upload_interval_seconds": {{ toJson .max_upload_interval_seconds }}{{- $sep = "," -}}{{ end }} + + {{- if .max_upload_records }}{{ $sep }}"max_upload_records": {{ toJson .max_upload_records }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .output_options }}{{ $sep }}"output_options": {{ if eq (kindOf .output_options) "string" }}{{ .output_options }}{{ else }}{{ toJson .output_options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ownership_challenge }}{{ $sep }}"ownership_challenge": {{ toJson .ownership_challenge }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete_by_zone: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1logpush~1jobs~1{job_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/jobs/methods/get_by_account' + - $ref: '#/components/x-stackQL-resources/jobs/methods/get_by_zone' + insert: + - $ref: '#/components/x-stackQL-resources/jobs/methods/create_by_account' + - $ref: '#/components/x-stackQL-resources/jobs/methods/create_by_zone' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/jobs/methods/delete_by_account' + - $ref: '#/components/x-stackQL-resources/jobs/methods/delete_by_zone' + replace: + - $ref: '#/components/x-stackQL-resources/jobs/methods/update_by_account' + - $ref: '#/components/x-stackQL-resources/jobs/methods/update_by_zone' + logpush_ownership: + id: cloudflare.logpush.logpush_ownership + name: logpush_ownership + title: Logpush Ownership + methods: + create_by_account: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1logpush~1ownership/post' + response: + mediaType: application/json + openAPIDocKey: '200' + create_by_zone: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1logpush~1ownership/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/logpush_ownership/methods/create_by_account' + - $ref: '#/components/x-stackQL-resources/logpush_ownership/methods/create_by_zone' + update: [] + delete: [] + replace: [] + ownership_validate: + id: cloudflare.logpush.ownership_validate + name: ownership_validate + title: Ownership Validate + methods: + validate_by_account: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1logpush~1ownership~1validate/post' + response: + mediaType: application/json + openAPIDocKey: '200' + validate_by_zone: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1logpush~1ownership~1validate/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/ownership_validate/methods/validate_by_account' + - $ref: '#/components/x-stackQL-resources/ownership_validate/methods/validate_by_zone' + update: [] + delete: [] + replace: [] + validate_destination: + id: cloudflare.logpush.validate_destination + name: validate_destination + title: Validate Destination + methods: + destination_by_account: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1logpush~1validate~1destination/post' + response: + mediaType: application/json + openAPIDocKey: '200' + destination_by_zone: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1logpush~1validate~1destination/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/validate_destination/methods/destination_by_account' + - $ref: '#/components/x-stackQL-resources/validate_destination/methods/destination_by_zone' + update: [] + delete: [] + replace: [] + destination_exists: + id: cloudflare.logpush.destination_exists + name: destination_exists + title: Destination Exists + methods: + destination_exists_by_account: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1logpush~1validate~1destination~1exists/post' + response: + mediaType: application/json + openAPIDocKey: '200' + destination_exists_by_zone: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1logpush~1validate~1destination~1exists/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/destination_exists/methods/destination_exists_by_account' + - $ref: '#/components/x-stackQL-resources/destination_exists/methods/destination_exists_by_zone' + update: [] + delete: [] + replace: [] + validate_origin: + id: cloudflare.logpush.validate_origin + name: validate_origin + title: Validate Origin + methods: + origin_by_account: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1logpush~1validate~1origin/post' + response: + mediaType: application/json + openAPIDocKey: '200' + origin_by_zone: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1logpush~1validate~1origin/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/validate_origin/methods/origin_by_account' + - $ref: '#/components/x-stackQL-resources/validate_origin/methods/origin_by_zone' + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/logs.yaml b/providers/src/cloudflare/v00.00.00000/services/logs.yaml index 5c0dbdde..399011ee 100644 --- a/providers/src/cloudflare/v00.00.00000/services/logs.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/logs.yaml @@ -1,2084 +1,1970 @@ -openapi: 3.0.3 -info: - title: logs API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/logs/control/cmb/config: - delete: - description: Deletes CMB config. - operationId: delete-accounts-account_id-logs-control-cmb-config - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/logcontrolMessages' - messages: - $ref: '#/components/schemas/logcontrolMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - enum: - - null - nullable: true - type: object - required: - - success - - errors - - messages - type: object - description: Delete CMB config response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logcontrolApiResponseCommonFailure' - description: Delete CMB config response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete CMB config - tags: - - Logcontrol CMB config for an account - x-api-token-group: - - Logs Write - x-cfPermissionsRequired: - enum: - - '#logs:edit' - x-stackql-sdk: - service: logs - resource_chain: - - control - - cmb - - config - method: delete - get: - description: Gets CMB config. - operationId: get-accounts-account_id-logs-control-cmb-config - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logcontrolCmbConfigResponseSingle' - description: Get CMB config response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logcontrolApiResponseCommonFailure' - description: Get CMB config response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get CMB config - tags: - - Logcontrol CMB config for an account - x-api-token-group: - - Logs Write - - Logs Read - x-cfPermissionsRequired: - enum: - - '#logs:read' - - '#analytics:read' - x-stackql-sdk: - service: logs - resource_chain: - - control - - cmb - - config - method: get - post: - description: Updates CMB config. - operationId: post-accounts-account_id-logs-control-cmb-config - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/logcontrolCmbConfig' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logcontrolCmbConfigResponseSingle' - description: Update CMB config response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logcontrolApiResponseCommonFailure' - description: Update CMB config response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update CMB config - tags: - - Logcontrol CMB config for an account - x-api-token-group: - - Logs Write - x-cfPermissionsRequired: - enum: - - '#logs:edit' - x-stackql-sdk: - service: logs - resource_chain: - - control - - cmb - - config - method: create - /zones/{zone_id}/logs/control/retention/flag: - get: - description: Gets log retention flag for Logpull API. - operationId: get-zones-zone_id-logs-control-retention-flag - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logcontrolRetentionFlagResponseSingle' - description: Get log retention flag response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logcontrolApiResponseCommonFailure' - description: Get log retention flag response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get log retention flag - tags: - - Logs Received - x-api-token-group: - - Logs Write - - Logs Read - x-cfPermissionsRequired: - enum: - - '#logs:read' - - '#analytics:read' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logs - resource_chain: - - control - - retention - method: get - post: - description: Updates log retention flag for Logpull API. - operationId: post-zones-zone_id-logs-control-retention-flag - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/logcontrolRetentionFlag' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logcontrolRetentionFlagResponseSingle' - description: Update log retention flag response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logcontrolApiResponseCommonFailure' - description: Update log retention flag response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update log retention flag - tags: - - Logs Received - x-api-token-group: - - Logs Write - x-cfPermissionsRequired: - enum: - - '#logs:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logs - resource_chain: - - control - - retention - method: create - /zones/{zone_id}/logs/rayids/{ray_id}: - get: - description: >- - The `/rayids` api route allows lookups by specific rayid. The rayids - route will return zero, one, or more records (ray ids are not unique). - operationId: get-zones-zone_id-logs-rayids-ray_id - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: path - name: ray_id - schema: - $ref: '#/components/schemas/logshareRayIdentifier' - required: true - - in: query - name: fields - schema: - $ref: '#/components/schemas/logshareFields' - - in: query - name: timestamps - schema: - $ref: '#/components/schemas/logshareTimestamps' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logshareLogsResponseJsonLines' - description: Get logs RayIDs response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logshareApiResponseCommonFailure' - description: Get logs RayIDs response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get logs RayIDs - tags: - - Logs Received - x-api-token-group: - - Logs Write - - Logs Read - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - /zones/{zone_id}/logs/received: - get: - description: >- - The `/received` api route allows customers to retrieve their edge HTTP - logs. The basic access pattern is "give me all the logs for zone Z for - minute M", where the minute M refers to the time records were received - at Cloudflare's central data center. `start` is inclusive, and `end` is - exclusive. Because of that, to get all data, at minutely cadence, - starting at 10AM, the proper values are: - `start=2018-05-20T10:00:00Z&end=2018-05-20T10:01:00Z`, then - `start=2018-05-20T10:01:00Z&end=2018-05-20T10:02:00Z` and so on; the - overlap will be handled properly. - operationId: get-zones-zone_id-logs-received - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: query - name: start - schema: - $ref: '#/components/schemas/logshareStart' - - in: query - name: end - schema: - $ref: '#/components/schemas/logshareEnd' - - in: query - name: fields - schema: - $ref: '#/components/schemas/logshareFields' - - in: query - name: sample - schema: - $ref: '#/components/schemas/logshareSample' - - in: query - name: count - schema: - $ref: '#/components/schemas/logshareCount' - - in: query - name: timestamps - schema: - $ref: '#/components/schemas/logshareTimestamps' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logshareLogsResponseJsonLines' - description: Get logs received response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logshareApiResponseCommonFailure' - description: Get logs received response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get logs received - tags: - - Logs Received - x-api-token-group: - - Logs Write - - Logs Read - x-cfPermissionsRequired: - enum: - - '#logs:read' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logs - resource_chain: - - received - method: get - /zones/{zone_id}/logs/received/fields: - get: - description: >- - Lists all fields available. The response is json object with key-value - pairs, where keys are field names, and values are descriptions. - operationId: get-zones-zone_id-logs-received-fields - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/logshareFieldsResponse' - description: List fields response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/logshareApiResponseCommonFailure' - description: List fields response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List fields - tags: - - Logs Received - x-api-token-group: - - Logs Write - - Logs Read - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: logs - resource_chain: - - received - - fields - method: get - /accounts/{account_id}/logs/explorer/datasets: - get: - description: >- - Returns all Log Explorer datasets configured for the account or zone. - Pass `include_zones=true` to also include zone-level datasets that - belong to this account or zone. List responses omit the `fields` - property; use the single-dataset endpoint to retrieve field - configuration. - parameters: - - description: >- - Set to true to include zone-scoped datasets belonging to this - account. - in: query - name: include_zones - schema: - type: boolean - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/lexDatasetSummaryListResponse' - description: The datasets the account or zone has configured. - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: >- - Invalid request, unsupported dataset, or invalid field - configuration. - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: The caller lacks permission or entitlement to access this resource. - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: The requested resource does not exist. - security: - - api_token: [] - summary: List account or zone datasets - tags: [] - x-api-token-group: - - Logs Write - - Logs Read - operationId: get_accounts_account_id_logs_explorer_datasets - post: - description: >- - Create a new Log Explorer dataset for the account or zone. Use the - `/account or zones/{account or - zone_id}/logs/explorer/datasets/available` endpoint to list dataset - types you can create along with their available fields. The `fields` - property is optional. If not specified, all available fields will be - enabled. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/lexCreateDatasetRequest' - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/lexDatasetDetailResponse' - description: Dataset created successfully. - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: >- - Invalid request, unsupported dataset, or invalid field - configuration. - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: The caller lacks permission or entitlement to access this resource. - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: The requested resource does not exist. - '409': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: A dataset of this type already exists for this account or zone. - security: - - api_token: [] - summary: Create an account or zone dataset - tags: [] - x-api-token-group: - - Logs Write - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - operationId: post_accounts_account_id_logs_explorer_datasets - /zones/{zone_id}/logs/explorer/datasets: - get: - description: >- - Returns all Log Explorer datasets configured for the account or zone. - Pass `include_zones=true` to also include zone-level datasets that - belong to this account or zone. List responses omit the `fields` - property; use the single-dataset endpoint to retrieve field - configuration. - parameters: - - description: >- - Set to true to include zone-scoped datasets belonging to this - account. - in: query - name: include_zones - schema: - type: boolean - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/lexDatasetSummaryListResponse' - description: The datasets the account or zone has configured. - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: >- - Invalid request, unsupported dataset, or invalid field - configuration. - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: The caller lacks permission or entitlement to access this resource. - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: The requested resource does not exist. - security: - - api_token: [] - summary: List account or zone datasets - tags: [] - x-api-token-group: - - Logs Write - - Logs Read - operationId: get_zones_zone_id_logs_explorer_datasets - post: - description: >- - Create a new Log Explorer dataset for the account or zone. Use the - `/account or zones/{account or - zone_id}/logs/explorer/datasets/available` endpoint to list dataset - types you can create along with their available fields. The `fields` - property is optional. If not specified, all available fields will be - enabled. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/lexCreateDatasetRequest' - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/lexDatasetDetailResponse' - description: Dataset created successfully. - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: >- - Invalid request, unsupported dataset, or invalid field - configuration. - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: The caller lacks permission or entitlement to access this resource. - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: The requested resource does not exist. - '409': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: A dataset of this type already exists for this account or zone. - security: - - api_token: [] - summary: Create an account or zone dataset - tags: [] - x-api-token-group: - - Logs Write - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - operationId: post_zones_zone_id_logs_explorer_datasets - /accounts/{account_id}/logs/explorer/datasets/available: - get: - description: >- - Returns all dataset types that this account or zone can create. Each - entry includes the dataset schema and timestamp field. The schema shows - all possible fields for a dataset. However, not all fields may be - available for your account or zone. When creating or updating a dataset, - only fields available to your account or zone can be enabled. If you - request a field that is not available, you will receive an error. - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/lexAvailableDestinationListResponse' - description: List of dataset types available to create. - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: >- - Invalid request, unsupported dataset, or invalid field - configuration. - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: The caller lacks permission or entitlement to access this resource. - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: The requested resource does not exist. - security: - - api_token: [] - summary: List available account or zone datasets - tags: [] - x-api-token-group: - - Logs Write - - Logs Read - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - operationId: get_accounts_account_id_logs_explorer_datasets_available - /zones/{zone_id}/logs/explorer/datasets/available: - get: - description: >- - Returns all dataset types that this account or zone can create. Each - entry includes the dataset schema and timestamp field. The schema shows - all possible fields for a dataset. However, not all fields may be - available for your account or zone. When creating or updating a dataset, - only fields available to your account or zone can be enabled. If you - request a field that is not available, you will receive an error. - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/lexAvailableDestinationListResponse' - description: List of dataset types available to create. - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: >- - Invalid request, unsupported dataset, or invalid field - configuration. - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: The caller lacks permission or entitlement to access this resource. - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: The requested resource does not exist. - security: - - api_token: [] - summary: List available account or zone datasets - tags: [] - x-api-token-group: - - Logs Write - - Logs Read - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - operationId: get_zones_zone_id_logs_explorer_datasets_available - /accounts/{account_id}/logs/explorer/datasets/{dataset_id}: - get: - description: Retrieve a single Log Explorer dataset by ID for the account or zone. - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/lexDatasetDetailResponse' - description: Dataset details, including the fields active for ingestion. - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: >- - Invalid request, unsupported dataset, or invalid field - configuration. - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: The caller lacks permission or entitlement to access this resource. - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: The requested resource does not exist. - security: - - api_token: [] - summary: Get an account or zone dataset - tags: [] - x-api-token-group: - - Logs Write - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - operationId: get_accounts_account_id_logs_explorer_datasets_dataset_id - put: - description: >- - Updates the enabled state and/or field configuration of an account or - zone dataset. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/lexUpdateDatasetRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/lexDatasetDetailResponse' - description: The dataset after the update. - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: >- - Invalid request, unsupported dataset, or invalid field - configuration. - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: The caller lacks permission or entitlement to access this resource. - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: The requested resource does not exist. - security: - - api_token: [] - summary: Update an account or zone dataset - tags: [] - x-api-token-group: - - Logs Write - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - operationId: put_accounts_account_id_logs_explorer_datasets_dataset_id - /zones/{zone_id}/logs/explorer/datasets/{dataset_id}: - get: - description: Retrieve a single Log Explorer dataset by ID for the account or zone. - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/lexDatasetDetailResponse' - description: Dataset details, including the fields active for ingestion. - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: >- - Invalid request, unsupported dataset, or invalid field - configuration. - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: The caller lacks permission or entitlement to access this resource. - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: The requested resource does not exist. - security: - - api_token: [] - summary: Get an account or zone dataset - tags: [] - x-api-token-group: - - Logs Write - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - operationId: get_zones_zone_id_logs_explorer_datasets_dataset_id - put: - description: >- - Updates the enabled state and/or field configuration of an account or - zone dataset. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/lexUpdateDatasetRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/lexDatasetDetailResponse' - description: The dataset after the update. - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: >- - Invalid request, unsupported dataset, or invalid field - configuration. - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: The caller lacks permission or entitlement to access this resource. - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/lexSchemasErrorResponse' - description: The requested resource does not exist. - security: - - api_token: [] - summary: Update an account or zone dataset - tags: [] - x-api-token-group: - - Logs Write - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: dataset_id - in: path - required: true - description: The dataset ID. - schema: - type: string - operationId: put_zones_zone_id_logs_explorer_datasets_dataset_id - /accounts/{account_id}/logs/explorer/query/sql: - post: - description: Run a SQL query against account or zone-level datasets. - requestBody: - content: - text/plain: - schema: - description: SQL query to execute. - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/lexQueryResponse' - description: Query results. - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/lexErrorResponse' - description: Invalid request or unsupported query. - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/lexErrorResponse' - description: Missing permission to access the requested resource. - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/lexErrorResponse' - description: Requested resource not found. - '507': - content: - application/json: - schema: - $ref: '#/components/schemas/lexErrorResponse' - description: Query exceeded internal memory or resource limits. - security: - - api_token: [] - summary: Run a log query - tags: [] - x-api-token-group: - - Logs Write - - Logs Read - x-auditable: false - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - operationId: post_accounts_account_id_logs_explorer_query_sql - /zones/{zone_id}/logs/explorer/query/sql: - post: - description: Run a SQL query against account or zone-level datasets. - requestBody: - content: - text/plain: - schema: - description: SQL query to execute. - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/lexQueryResponse' - description: Query results. - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/lexErrorResponse' - description: Invalid request or unsupported query. - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/lexErrorResponse' - description: Missing permission to access the requested resource. - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/lexErrorResponse' - description: Requested resource not found. - '507': - content: - application/json: - schema: - $ref: '#/components/schemas/lexErrorResponse' - description: Query exceeded internal memory or resource limits. - security: - - api_token: [] - summary: Run a log query - tags: [] - x-api-token-group: - - Logs Write - - Logs Read - x-auditable: false - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - operationId: post_zones_zone_id_logs_explorer_query_sql -components: - schemas: - lexAvailableDestination: - description: A dataset type that the account or zone can create. - properties: - dataset: - description: Dataset type name (e.g. `http_requests`). - type: string - object_type: - description: Whether this dataset type is account-scoped or zone-scoped. - enum: - - account - - zone - type: string - schema: - description: JSON Schema that describes the fields this dataset exposes. - properties: - properties: - type: object - required: - items: - type: string - type: array - type: - enum: - - object - type: string - type: object - timestamp_field: - description: The primary timestamp field name for this dataset. - type: string - required: - - dataset - - timestamp_field - - schema - - object_type - type: object - lexAvailableDestinationListResponse: - properties: - errors: - items: - $ref: '#/components/schemas/lexSchemasV4Error' - type: array - messages: - items: - type: string - type: array - result: - items: - $ref: '#/components/schemas/lexAvailableDestination' - nullable: true - type: array - success: - type: boolean - required: - - success - - errors - - messages - type: object - lexCreateDatasetRequest: - properties: - dataset: - description: Dataset type name to create (e.g. `http_requests`). - type: string - x-auditable: true - fields: - description: >- - Controls which fields the API ingests. Defaults to all available - fields when absent. - items: - $ref: '#/components/schemas/lexLogField' - type: array - required: - - dataset - type: object - lexDatasetDetailResponse: - properties: - errors: - items: - $ref: '#/components/schemas/lexSchemasV4Error' - type: array - messages: - items: - type: string - x-auditable: true - type: array - result: - $ref: '#/components/schemas/lexDatasetResponse' - success: - type: boolean - x-auditable: true - required: - - success - - errors - - messages - type: object - lexDatasetResponse: - description: >- - A Log Explorer dataset summary. List endpoints return this type and omit - field configuration; use the single-dataset endpoint to retrieve it. - properties: - created_at: - description: RFC3339 timestamp recording when the API created this dataset. - format: date-time - type: string - x-auditable: true - readOnly: true - dataset: - description: Dataset type name (e.g. `http_requests`). - type: string - x-auditable: true - dataset_id: - description: Unique dataset ID. - type: string - x-auditable: true - enabled: - description: Whether log ingest is currently active for this dataset. - type: boolean - x-auditable: true - object_id: - description: Public ID of the account or zone that owns this dataset. - type: string - x-auditable: true - object_type: - description: Whether this dataset belongs to an account or a zone. - enum: - - account - - zone - type: string - x-auditable: true - updated_at: - description: RFC3339 timestamp recording when the API last updated this dataset. - format: date-time - type: string - x-auditable: true - readOnly: true - fields: - description: The field configuration for this dataset. - items: - $ref: '#/components/schemas/lexLogField' - type: array - required: - - dataset - - object_type - - object_id - - created_at - - updated_at - - dataset_id - - enabled - type: object - lexDatasetSummary: - description: >- - A Log Explorer dataset summary. List endpoints return this type and omit - field configuration; use the single-dataset endpoint to retrieve it. - properties: - created_at: - description: RFC3339 timestamp recording when the API created this dataset. - format: date-time - type: string - x-auditable: true - readOnly: true - dataset: - description: Dataset type name (e.g. `http_requests`). - type: string - x-auditable: true - dataset_id: - description: Unique dataset ID. - type: string - x-auditable: true - enabled: - description: Whether log ingest is currently active for this dataset. - type: boolean - x-auditable: true - object_id: - description: Public ID of the account or zone that owns this dataset. - type: string - x-auditable: true - object_type: - description: Whether this dataset belongs to an account or a zone. - enum: - - account - - zone - type: string - x-auditable: true - updated_at: - description: RFC3339 timestamp recording when the API last updated this dataset. - format: date-time - type: string - x-auditable: true - readOnly: true - required: - - dataset - - object_type - - object_id - - created_at - - updated_at - - dataset_id - - enabled - type: object - lexDatasetSummaryListResponse: - properties: - errors: - items: - $ref: '#/components/schemas/lexSchemasV4Error' - type: array - messages: - items: - type: string - type: array - result: - items: - $ref: '#/components/schemas/lexDatasetSummary' - nullable: true - type: array - success: - type: boolean - required: - - success - - errors - - messages - type: object - lexErrorResponse: - properties: - errors: - items: - $ref: '#/components/schemas/lexV4Error' - type: array - messages: - items: - type: string - type: array - result: - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - result - - success - - errors - - messages - type: object - lexLogField: - properties: - enabled: - description: Whether the API includes this field in log ingest. - type: boolean - x-auditable: true - name: - description: Field name in lowercase. - type: string - x-auditable: true - required: - - name - - enabled - type: object - lexQueryResponse: - properties: - errors: - items: - $ref: '#/components/schemas/lexV4Error' - type: array - messages: - items: - type: string - type: array - result: - items: - $ref: '#/components/schemas/lexQueryRow' - nullable: true - type: array - success: - type: boolean - required: - - success - - errors - - messages - type: object - lexQueryRow: - type: object - lexSchemasErrorResponse: - properties: - errors: - items: - $ref: '#/components/schemas/lexSchemasV4Error' - type: array - messages: - items: - type: string - x-auditable: true - type: array - result: - nullable: true - type: object - x-auditable: true - success: - enum: - - false - type: boolean - x-auditable: true - required: - - result - - success - - errors - - messages - type: object - lexSchemasV4Error: - $ref: '#/components/schemas/responseInfo' - lexUpdateDatasetRequest: - properties: - enabled: - description: Whether to enable or disable log ingest for this dataset. - type: boolean - x-auditable: true - fields: - description: >- - Controls which fields the API ingests after the update. Defaults to - all available fields when absent. - items: - $ref: '#/components/schemas/lexLogField' - type: array - required: - - enabled - type: object - lexV4Error: - $ref: '#/components/schemas/responseInfo' - logcontrolAllowOutOfRegionAccess: - description: Allow out of region access - example: false - type: boolean - x-auditable: true - logcontrolApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/logcontrolMessages' - messages: - example: [] - $ref: '#/components/schemas/logcontrolMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - logcontrolCmbConfig: - nullable: true - properties: - allow_out_of_region_access: - $ref: '#/components/schemas/logcontrolAllowOutOfRegionAccess' - regions: - $ref: '#/components/schemas/logcontrolRegions' - type: object - logcontrolCmbConfigResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/logcontrolMessages' - messages: - $ref: '#/components/schemas/logcontrolMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/logcontrolCmbConfig' - required: - - success - - errors - - messages - logcontrolFlag: - description: The log retention flag for Logpull API. - example: true - type: boolean - x-auditable: true - logcontrolMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - logcontrolRegions: - description: Name of the region. - example: eu - maxLength: 256 - type: string - x-auditable: true - logcontrolRetentionFlag: - nullable: true - properties: - flag: - $ref: '#/components/schemas/logcontrolFlag' - type: object - logcontrolRetentionFlagResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/logcontrolMessages' - messages: - $ref: '#/components/schemas/logcontrolMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/logcontrolRetentionFlag' - required: - - success - - errors - - messages - logshareApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/logshareMessages' - messages: - example: [] - $ref: '#/components/schemas/logshareMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - logshareCount: - description: >- - When `?count=` is provided, the response will contain up to `count` - results. Since results are not sorted, you are likely to get different - data for repeated requests. `count` must be an integer > 0. - minimum: 1 - type: integer - x-auditable: true - logshareEnd: - description: >- - Sets the (exclusive) end of the requested time frame. This can be a unix - timestamp (in seconds or nanoseconds), or an absolute timestamp that - conforms to RFC 3339. `end` must be at least five minutes earlier than - now and must be later than `start`. Difference between `start` and `end` - must be not greater than one hour. - example: '2018-05-20T10:01:00Z' - x-auditable: true - type: string - logshareFields: - description: >- - The `/received` route by default returns a limited set of fields, and - allows customers to override the default field set by specifying - individual fields. The reasons for this are: 1. Most customers require - only a small subset of fields, but that subset varies from customer to - customer; 2. Flat schema is much easier to work with downstream - (importing into BigTable etc); 3. Performance (time to process, file - size). If `?fields=` is not specified, default field set is returned. - This default field set may change at any time. When `?fields=` is - provided, each record is returned with the specified fields. `fields` - must be specified as a comma separated list without any whitespaces, and - all fields must exist. The order in which fields are specified does not - matter, and the order of fields in the response is not specified. - example: ClientIP,RayID,EdgeStartTimestamp - type: string - x-auditable: true - logshareFieldsResponse: - properties: - key: - example: value - type: string - x-auditable: true - type: object - logshareLogsResponseJsonLines: - example: >- - {"ClientIP":"192.0.2.1","RayID":"41ddf1740f67442d","EdgeStartTimestamp":1526810289280000000} - - {"ClientIP":"192.0.2.1","RayID":"41ddf1740f67442d","EdgeStartTimestamp":1526810289280000000} - - {"ClientIP":"192.0.2.1","RayID":"41ddf1740f67442d","EdgeStartTimestamp":1526810289280000000} - type: string - logshareMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - logshareRayIdentifier: - description: Ray identifier. - example: 41ddf1740f67442d - maxLength: 16 - readOnly: true - type: string - x-auditable: true - logshareSample: - description: >- - When `?sample=` is provided, a sample of matching records is returned. - If `sample=0.1` then 10% of records will be returned. Sampling is - random: repeated calls will not only return different records, but - likely will also vary slightly in number of returned records. When - `?count=` is also specified, `count` is applied to the number of - returned records, not the sampled records. So, with `sample=0.05` and - `count=7`, when there is a total of 100 records available, approximately - five will be returned. When there are 1000 records, seven will be - returned. When there are 10,000 records, seven will be returned. - example: 0.1 - maximum: 1 - minimum: 0 - type: number - x-auditable: true - logshareStart: - description: >- - Sets the (inclusive) beginning of the requested time frame. This can be - a unix timestamp (in seconds or nanoseconds), or an absolute timestamp - that conforms to RFC 3339. At this point in time, it cannot exceed a - time in the past greater than seven days. - example: '2018-05-20T10:00:00Z' - x-auditable: true - type: string - logshareTimestamps: - default: unixnano - description: >- - By default, timestamps in responses are returned as Unix nanosecond - integers. The `?timestamps=` argument can be set to change the format in - which response timestamps are returned. Possible values are: `unix`, - `unixnano`, `rfc3339`. Note that `unix` and `unixnano` return timestamps - as integers; `rfc3339` returns timestamps as strings. - enum: - - unix - - unixnano - - rfc3339 - example: unixnano - type: string - x-auditable: true - responseInfo: - properties: - code: - minimum: 1000 - type: integer - message: - type: string - documentation_url: - type: string - source: - type: object - properties: - pointer: - type: string - required: - - code - - message - type: object - uniqueItems: true - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - config: - id: cloudflare.logs.config - name: config - title: Config - methods: - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1logs~1control~1cmb~1config/delete - response: - mediaType: application/json - openAPIDocKey: '200' - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1logs~1control~1cmb~1config/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1logs~1control~1cmb~1config/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/config/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/config/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/config/methods/delete' - replace: [] - retention: - id: cloudflare.logs.retention - name: retention - title: Retention - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1logs~1control~1retention~1flag/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1logs~1control~1retention~1flag/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/retention/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/retention/methods/create' - update: [] - delete: [] - replace: [] - rayids: - id: cloudflare.logs.rayids - name: rayids - title: Rayids - methods: - get: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1logs~1rayids~1{ray_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/rayids/methods/get' - insert: [] - update: [] - delete: [] - replace: [] - received: - id: cloudflare.logs.received - name: received - title: Received - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1logs~1received/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/received/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - fields: - id: cloudflare.logs.fields - name: fields - title: Fields - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1logs~1received~1fields/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/fields/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - accounts_logs_explorer_datasets: - id: cloudflare.logs.accounts_logs_explorer_datasets - name: accounts_logs_explorer_datasets - title: Accounts Logs Explorer Datasets - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1logs~1explorer~1datasets/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - post_accounts_account_id_logs_explorer_datasets: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1logs~1explorer~1datasets/post' - response: - mediaType: application/json - openAPIDocKey: '201' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1logs~1explorer~1datasets~1{dataset_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - put_accounts_account_id_logs_explorer_datasets_dataset_id: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1logs~1explorer~1datasets~1{dataset_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/accounts_logs_explorer_datasets/methods/get - - $ref: >- - #/components/x-stackQL-resources/accounts_logs_explorer_datasets/methods/list - insert: - - $ref: >- - #/components/x-stackQL-resources/accounts_logs_explorer_datasets/methods/post_accounts_account_id_logs_explorer_datasets - update: [] - delete: [] - replace: - - $ref: >- - #/components/x-stackQL-resources/accounts_logs_explorer_datasets/methods/put_accounts_account_id_logs_explorer_datasets_dataset_id - zones_logs_explorer_datasets: - id: cloudflare.logs.zones_logs_explorer_datasets - name: zones_logs_explorer_datasets - title: Zones Logs Explorer Datasets - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1logs~1explorer~1datasets/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - post_zones_zone_id_logs_explorer_datasets: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1logs~1explorer~1datasets/post' - response: - mediaType: application/json - openAPIDocKey: '201' - get: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1logs~1explorer~1datasets~1{dataset_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - put_zones_zone_id_logs_explorer_datasets_dataset_id: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1logs~1explorer~1datasets~1{dataset_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/zones_logs_explorer_datasets/methods/get - - $ref: >- - #/components/x-stackQL-resources/zones_logs_explorer_datasets/methods/list - insert: - - $ref: >- - #/components/x-stackQL-resources/zones_logs_explorer_datasets/methods/post_zones_zone_id_logs_explorer_datasets - update: [] - delete: [] - replace: - - $ref: >- - #/components/x-stackQL-resources/zones_logs_explorer_datasets/methods/put_zones_zone_id_logs_explorer_datasets_dataset_id - accounts_logs_explorer_datasets_available: - id: cloudflare.logs.accounts_logs_explorer_datasets_available - name: accounts_logs_explorer_datasets_available - title: Accounts Logs Explorer Datasets Available - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1logs~1explorer~1datasets~1available/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/accounts_logs_explorer_datasets_available/methods/list - insert: [] - update: [] - delete: [] - replace: [] - zones_logs_explorer_datasets_available: - id: cloudflare.logs.zones_logs_explorer_datasets_available - name: zones_logs_explorer_datasets_available - title: Zones Logs Explorer Datasets Available - methods: - list: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1logs~1explorer~1datasets~1available/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/zones_logs_explorer_datasets_available/methods/list - insert: [] - update: [] - delete: [] - replace: [] - accounts_logs_explorer_query_sql: - id: cloudflare.logs.accounts_logs_explorer_query_sql - name: accounts_logs_explorer_query_sql - title: Accounts Logs Explorer Query Sql - methods: - create_sql: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1logs~1explorer~1query~1sql/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] - zones_logs_explorer_query_sql: - id: cloudflare.logs.zones_logs_explorer_query_sql - name: zones_logs_explorer_query_sql - title: Zones Logs Explorer Query Sql - methods: - create_sql: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1logs~1explorer~1query~1sql/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: logs API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/logs/control/cmb/config: + delete: + description: Deletes CMB config. + operationId: delete-accounts-account_id-logs-control-cmb-config + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/logcontrolMessages' + messages: + $ref: '#/components/schemas/logcontrolMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + enum: + - null + nullable: true + type: object + required: + - success + - errors + - messages + type: object + description: Delete CMB config response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logcontrolApiResponseCommonFailure' + description: Delete CMB config response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete CMB config + tags: + - Logcontrol CMB config for an account + x-api-token-group: + - Logs Write + x-cfPermissionsRequired: + enum: + - '#logs:edit' + x-stackql-sdk: + service: logs + resource_chain: + - control + - cmb + - config + method: delete + get: + description: Gets CMB config. + operationId: get-accounts-account_id-logs-control-cmb-config + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logcontrolCmbConfigResponseSingle' + description: Get CMB config response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logcontrolApiResponseCommonFailure' + description: Get CMB config response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get CMB config + tags: + - Logcontrol CMB config for an account + x-api-token-group: + - Logs Write + - Logs Read + x-cfPermissionsRequired: + enum: + - '#logs:read' + - '#analytics:read' + x-stackql-sdk: + service: logs + resource_chain: + - control + - cmb + - config + method: get + post: + description: Updates CMB config. + operationId: post-accounts-account_id-logs-control-cmb-config + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/logcontrolCmbConfig' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logcontrolCmbConfigResponseSingle' + description: Update CMB config response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logcontrolApiResponseCommonFailure' + description: Update CMB config response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update CMB config + tags: + - Logcontrol CMB config for an account + x-api-token-group: + - Logs Write + x-cfPermissionsRequired: + enum: + - '#logs:edit' + x-stackql-sdk: + service: logs + resource_chain: + - control + - cmb + - config + method: create + /zones/{zone_id}/logs/control/retention/flag: + get: + description: Gets log retention flag for Logpull API. + operationId: get-zones-zone_id-logs-control-retention-flag + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logcontrolRetentionFlagResponseSingle' + description: Get log retention flag response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logcontrolApiResponseCommonFailure' + description: Get log retention flag response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get log retention flag + tags: + - Logs Received + x-api-token-group: + - Logs Write + - Logs Read + x-cfPermissionsRequired: + enum: + - '#logs:read' + - '#analytics:read' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logs + resource_chain: + - control + - retention + method: get + post: + description: Updates log retention flag for Logpull API. + operationId: post-zones-zone_id-logs-control-retention-flag + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/logcontrolRetentionFlag' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logcontrolRetentionFlagResponseSingle' + description: Update log retention flag response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logcontrolApiResponseCommonFailure' + description: Update log retention flag response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update log retention flag + tags: + - Logs Received + x-api-token-group: + - Logs Write + x-cfPermissionsRequired: + enum: + - '#logs:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logs + resource_chain: + - control + - retention + method: create + /zones/{zone_id}/logs/rayids/{ray_id}: + get: + description: The `/rayids` api route allows lookups by specific rayid. The rayids route will return zero, one, or more records (ray ids are not unique). + operationId: get-zones-zone_id-logs-rayids-ray_id + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: path + name: ray_id + schema: + $ref: '#/components/schemas/logshareRayIdentifier' + required: true + - in: query + name: fields + schema: + $ref: '#/components/schemas/logshareFields' + - in: query + name: timestamps + schema: + $ref: '#/components/schemas/logshareTimestamps' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logshareLogsResponseJsonLines' + description: Get logs RayIDs response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logshareApiResponseCommonFailure' + description: Get logs RayIDs response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get logs RayIDs + tags: + - Logs Received + x-api-token-group: + - Logs Write + - Logs Read + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + /zones/{zone_id}/logs/received: + get: + description: 'The `/received` api route allows customers to retrieve their edge HTTP logs. The basic access pattern is "give me all the logs for zone Z for minute M", where the minute M refers to the time records were received at Cloudflare''s central data center. `start` is inclusive, and `end` is exclusive. Because of that, to get all data, at minutely cadence, starting at 10AM, the proper values are: `start=2018-05-20T10:00:00Z&end=2018-05-20T10:01:00Z`, then `start=2018-05-20T10:01:00Z&end=2018-05-20T10:02:00Z` and so on; the overlap will be handled properly.' + operationId: get-zones-zone_id-logs-received + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: query + name: start + schema: + $ref: '#/components/schemas/logshareStart' + - in: query + name: end + schema: + $ref: '#/components/schemas/logshareEnd' + - in: query + name: fields + schema: + $ref: '#/components/schemas/logshareFields' + - in: query + name: sample + schema: + $ref: '#/components/schemas/logshareSample' + - in: query + name: count + schema: + $ref: '#/components/schemas/logshareCount' + - in: query + name: timestamps + schema: + $ref: '#/components/schemas/logshareTimestamps' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logshareLogsResponseJsonLines' + description: Get logs received response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logshareApiResponseCommonFailure' + description: Get logs received response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get logs received + tags: + - Logs Received + x-api-token-group: + - Logs Write + - Logs Read + x-cfPermissionsRequired: + enum: + - '#logs:read' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logs + resource_chain: + - received + method: get + /zones/{zone_id}/logs/received/fields: + get: + description: Lists all fields available. The response is json object with key-value pairs, where keys are field names, and values are descriptions. + operationId: get-zones-zone_id-logs-received-fields + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/logshareFieldsResponse' + description: List fields response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/logshareApiResponseCommonFailure' + description: List fields response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List fields + tags: + - Logs Received + x-api-token-group: + - Logs Write + - Logs Read + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: logs + resource_chain: + - received + - fields + method: get + /accounts/{account_id}/logs/explorer/datasets: + get: + description: Returns all Log Explorer datasets configured for the account or zone. Pass `include_zones=true` to also include zone-level datasets that belong to this account or zone. List responses omit the `fields` property; use the single-dataset endpoint to retrieve field configuration. + parameters: + - description: Set to true to include zone-scoped datasets belonging to this account. + in: query + name: include_zones + schema: + type: boolean + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/lexDatasetSummaryListResponse' + description: The datasets the account or zone has configured. + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: Invalid request, unsupported dataset, or invalid field configuration. + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: The caller lacks permission or entitlement to access this resource. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: The requested resource does not exist. + security: + - api_token: [] + summary: List account or zone datasets + tags: [] + x-api-token-group: + - Logs Write + - Logs Read + operationId: get_accounts_account_id_logs_explorer_datasets + post: + description: Create a new Log Explorer dataset for the account or zone. Use the `/account or zones/{account or zone_id}/logs/explorer/datasets/available` endpoint to list dataset types you can create along with their available fields. The `fields` property is optional. If not specified, all available fields will be enabled. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/lexCreateDatasetRequest' + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/lexDatasetDetailResponse' + description: Dataset created successfully. + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: Invalid request, unsupported dataset, or invalid field configuration. + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: The caller lacks permission or entitlement to access this resource. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: The requested resource does not exist. + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: A dataset of this type already exists for this account or zone. + security: + - api_token: [] + summary: Create an account or zone dataset + tags: [] + x-api-token-group: + - Logs Write + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + operationId: post_accounts_account_id_logs_explorer_datasets + /zones/{zone_id}/logs/explorer/datasets: + get: + description: Returns all Log Explorer datasets configured for the account or zone. Pass `include_zones=true` to also include zone-level datasets that belong to this account or zone. List responses omit the `fields` property; use the single-dataset endpoint to retrieve field configuration. + parameters: + - description: Set to true to include zone-scoped datasets belonging to this account. + in: query + name: include_zones + schema: + type: boolean + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/lexDatasetSummaryListResponse' + description: The datasets the account or zone has configured. + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: Invalid request, unsupported dataset, or invalid field configuration. + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: The caller lacks permission or entitlement to access this resource. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: The requested resource does not exist. + security: + - api_token: [] + summary: List account or zone datasets + tags: [] + x-api-token-group: + - Logs Write + - Logs Read + operationId: get_zones_zone_id_logs_explorer_datasets + post: + description: Create a new Log Explorer dataset for the account or zone. Use the `/account or zones/{account or zone_id}/logs/explorer/datasets/available` endpoint to list dataset types you can create along with their available fields. The `fields` property is optional. If not specified, all available fields will be enabled. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/lexCreateDatasetRequest' + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/lexDatasetDetailResponse' + description: Dataset created successfully. + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: Invalid request, unsupported dataset, or invalid field configuration. + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: The caller lacks permission or entitlement to access this resource. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: The requested resource does not exist. + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: A dataset of this type already exists for this account or zone. + security: + - api_token: [] + summary: Create an account or zone dataset + tags: [] + x-api-token-group: + - Logs Write + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + operationId: post_zones_zone_id_logs_explorer_datasets + /accounts/{account_id}/logs/explorer/datasets/available: + get: + description: Returns all dataset types that this account or zone can create. Each entry includes the dataset schema and timestamp field. The schema shows all possible fields for a dataset. However, not all fields may be available for your account or zone. When creating or updating a dataset, only fields available to your account or zone can be enabled. If you request a field that is not available, you will receive an error. + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/lexAvailableDestinationListResponse' + description: List of dataset types available to create. + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: Invalid request, unsupported dataset, or invalid field configuration. + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: The caller lacks permission or entitlement to access this resource. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: The requested resource does not exist. + security: + - api_token: [] + summary: List available account or zone datasets + tags: [] + x-api-token-group: + - Logs Write + - Logs Read + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + operationId: get_accounts_account_id_logs_explorer_datasets_available + /zones/{zone_id}/logs/explorer/datasets/available: + get: + description: Returns all dataset types that this account or zone can create. Each entry includes the dataset schema and timestamp field. The schema shows all possible fields for a dataset. However, not all fields may be available for your account or zone. When creating or updating a dataset, only fields available to your account or zone can be enabled. If you request a field that is not available, you will receive an error. + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/lexAvailableDestinationListResponse' + description: List of dataset types available to create. + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: Invalid request, unsupported dataset, or invalid field configuration. + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: The caller lacks permission or entitlement to access this resource. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: The requested resource does not exist. + security: + - api_token: [] + summary: List available account or zone datasets + tags: [] + x-api-token-group: + - Logs Write + - Logs Read + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + operationId: get_zones_zone_id_logs_explorer_datasets_available + /accounts/{account_id}/logs/explorer/datasets/{dataset_id}: + get: + description: Retrieve a single Log Explorer dataset by ID for the account or zone. + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/lexDatasetDetailResponse' + description: Dataset details, including the fields active for ingestion. + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: Invalid request, unsupported dataset, or invalid field configuration. + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: The caller lacks permission or entitlement to access this resource. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: The requested resource does not exist. + security: + - api_token: [] + summary: Get an account or zone dataset + tags: [] + x-api-token-group: + - Logs Write + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + operationId: get_accounts_account_id_logs_explorer_datasets_dataset_id + put: + description: Updates the enabled state and/or field configuration of an account or zone dataset. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/lexUpdateDatasetRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/lexDatasetDetailResponse' + description: The dataset after the update. + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: Invalid request, unsupported dataset, or invalid field configuration. + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: The caller lacks permission or entitlement to access this resource. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: The requested resource does not exist. + security: + - api_token: [] + summary: Update an account or zone dataset + tags: [] + x-api-token-group: + - Logs Write + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + operationId: put_accounts_account_id_logs_explorer_datasets_dataset_id + /zones/{zone_id}/logs/explorer/datasets/{dataset_id}: + get: + description: Retrieve a single Log Explorer dataset by ID for the account or zone. + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/lexDatasetDetailResponse' + description: Dataset details, including the fields active for ingestion. + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: Invalid request, unsupported dataset, or invalid field configuration. + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: The caller lacks permission or entitlement to access this resource. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: The requested resource does not exist. + security: + - api_token: [] + summary: Get an account or zone dataset + tags: [] + x-api-token-group: + - Logs Write + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + operationId: get_zones_zone_id_logs_explorer_datasets_dataset_id + put: + description: Updates the enabled state and/or field configuration of an account or zone dataset. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/lexUpdateDatasetRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/lexDatasetDetailResponse' + description: The dataset after the update. + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: Invalid request, unsupported dataset, or invalid field configuration. + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: The caller lacks permission or entitlement to access this resource. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/lexSchemasErrorResponse' + description: The requested resource does not exist. + security: + - api_token: [] + summary: Update an account or zone dataset + tags: [] + x-api-token-group: + - Logs Write + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: dataset_id + in: path + required: true + description: The dataset ID. + schema: + type: string + operationId: put_zones_zone_id_logs_explorer_datasets_dataset_id + /accounts/{account_id}/logs/explorer/query/sql: + post: + description: Run a SQL query against account or zone-level datasets. + requestBody: + content: + text/plain: + schema: + description: SQL query to execute. + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/lexQueryResponse' + description: Query results. + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/lexErrorResponse' + description: Invalid request or unsupported query. + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/lexErrorResponse' + description: Missing permission to access the requested resource. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/lexErrorResponse' + description: Requested resource not found. + '507': + content: + application/json: + schema: + $ref: '#/components/schemas/lexErrorResponse' + description: Query exceeded internal memory or resource limits. + security: + - api_token: [] + summary: Run a log query + tags: [] + x-api-token-group: + - Logs Write + - Logs Read + x-auditable: false + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + operationId: post_accounts_account_id_logs_explorer_query_sql + /zones/{zone_id}/logs/explorer/query/sql: + post: + description: Run a SQL query against account or zone-level datasets. + requestBody: + content: + text/plain: + schema: + description: SQL query to execute. + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/lexQueryResponse' + description: Query results. + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/lexErrorResponse' + description: Invalid request or unsupported query. + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/lexErrorResponse' + description: Missing permission to access the requested resource. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/lexErrorResponse' + description: Requested resource not found. + '507': + content: + application/json: + schema: + $ref: '#/components/schemas/lexErrorResponse' + description: Query exceeded internal memory or resource limits. + security: + - api_token: [] + summary: Run a log query + tags: [] + x-api-token-group: + - Logs Write + - Logs Read + x-auditable: false + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + operationId: post_zones_zone_id_logs_explorer_query_sql +components: + schemas: + lexAvailableDestination: + description: A dataset type that the account or zone can create. + properties: + dataset: + description: Dataset type name (e.g. `http_requests`). + type: string + object_type: + description: Whether this dataset type is account-scoped or zone-scoped. + enum: + - account + - zone + type: string + schema: + description: JSON Schema that describes the fields this dataset exposes. + properties: + properties: + type: object + required: + items: + type: string + type: array + type: + enum: + - object + type: string + type: object + timestamp_field: + description: The primary timestamp field name for this dataset. + type: string + required: + - dataset + - timestamp_field + - schema + - object_type + type: object + lexAvailableDestinationListResponse: + properties: + errors: + items: + $ref: '#/components/schemas/lexSchemasV4Error' + type: array + messages: + items: + type: string + type: array + result: + items: + $ref: '#/components/schemas/lexAvailableDestination' + nullable: true + type: array + success: + type: boolean + required: + - success + - errors + - messages + type: object + lexCreateDatasetRequest: + properties: + dataset: + description: Dataset type name to create (e.g. `http_requests`). + type: string + x-auditable: true + fields: + description: Controls which fields the API ingests. Defaults to all available fields when absent. + items: + $ref: '#/components/schemas/lexLogField' + type: array + required: + - dataset + type: object + lexDatasetDetailResponse: + properties: + errors: + items: + $ref: '#/components/schemas/lexSchemasV4Error' + type: array + messages: + items: + type: string + x-auditable: true + type: array + result: + $ref: '#/components/schemas/lexDatasetResponse' + success: + type: boolean + x-auditable: true + required: + - success + - errors + - messages + type: object + lexDatasetResponse: + description: A Log Explorer dataset summary. List endpoints return this type and omit field configuration; use the single-dataset endpoint to retrieve it. + properties: + created_at: + description: RFC3339 timestamp recording when the API created this dataset. + format: date-time + type: string + x-auditable: true + readOnly: true + dataset: + description: Dataset type name (e.g. `http_requests`). + type: string + x-auditable: true + dataset_id: + description: Unique dataset ID. + type: string + x-auditable: true + enabled: + description: Whether log ingest is currently active for this dataset. + type: boolean + x-auditable: true + object_id: + description: Public ID of the account or zone that owns this dataset. + type: string + x-auditable: true + object_type: + description: Whether this dataset belongs to an account or a zone. + enum: + - account + - zone + type: string + x-auditable: true + updated_at: + description: RFC3339 timestamp recording when the API last updated this dataset. + format: date-time + type: string + x-auditable: true + readOnly: true + fields: + description: The field configuration for this dataset. + items: + $ref: '#/components/schemas/lexLogField' + type: array + required: + - dataset + - object_type + - object_id + - created_at + - updated_at + - dataset_id + - enabled + type: object + lexDatasetSummary: + description: A Log Explorer dataset summary. List endpoints return this type and omit field configuration; use the single-dataset endpoint to retrieve it. + properties: + created_at: + description: RFC3339 timestamp recording when the API created this dataset. + format: date-time + type: string + x-auditable: true + readOnly: true + dataset: + description: Dataset type name (e.g. `http_requests`). + type: string + x-auditable: true + dataset_id: + description: Unique dataset ID. + type: string + x-auditable: true + enabled: + description: Whether log ingest is currently active for this dataset. + type: boolean + x-auditable: true + object_id: + description: Public ID of the account or zone that owns this dataset. + type: string + x-auditable: true + object_type: + description: Whether this dataset belongs to an account or a zone. + enum: + - account + - zone + type: string + x-auditable: true + updated_at: + description: RFC3339 timestamp recording when the API last updated this dataset. + format: date-time + type: string + x-auditable: true + readOnly: true + required: + - dataset + - object_type + - object_id + - created_at + - updated_at + - dataset_id + - enabled + type: object + lexDatasetSummaryListResponse: + properties: + errors: + items: + $ref: '#/components/schemas/lexSchemasV4Error' + type: array + messages: + items: + type: string + type: array + result: + items: + $ref: '#/components/schemas/lexDatasetSummary' + nullable: true + type: array + success: + type: boolean + required: + - success + - errors + - messages + type: object + lexErrorResponse: + properties: + errors: + items: + $ref: '#/components/schemas/lexV4Error' + type: array + messages: + items: + type: string + type: array + result: + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - result + - success + - errors + - messages + type: object + lexLogField: + properties: + enabled: + description: Whether the API includes this field in log ingest. + type: boolean + x-auditable: true + name: + description: Field name in lowercase. + type: string + x-auditable: true + required: + - name + - enabled + type: object + lexQueryResponse: + properties: + errors: + items: + $ref: '#/components/schemas/lexV4Error' + type: array + messages: + items: + type: string + type: array + result: + items: + $ref: '#/components/schemas/lexQueryRow' + nullable: true + type: array + success: + type: boolean + required: + - success + - errors + - messages + type: object + lexQueryRow: + type: object + lexSchemasErrorResponse: + properties: + errors: + items: + $ref: '#/components/schemas/lexSchemasV4Error' + type: array + messages: + items: + type: string + x-auditable: true + type: array + result: + nullable: true + type: object + x-auditable: true + success: + enum: + - false + type: boolean + x-auditable: true + required: + - result + - success + - errors + - messages + type: object + lexSchemasV4Error: + $ref: '#/components/schemas/responseInfo' + lexUpdateDatasetRequest: + properties: + enabled: + description: Whether to enable or disable log ingest for this dataset. + type: boolean + x-auditable: true + fields: + description: Controls which fields the API ingests after the update. Defaults to all available fields when absent. + items: + $ref: '#/components/schemas/lexLogField' + type: array + required: + - enabled + type: object + lexV4Error: + $ref: '#/components/schemas/responseInfo' + logcontrolAllowOutOfRegionAccess: + description: Allow out of region access + example: false + type: boolean + x-auditable: true + logcontrolApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/logcontrolMessages' + messages: + example: [] + $ref: '#/components/schemas/logcontrolMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + logcontrolCmbConfig: + nullable: true + properties: + allow_out_of_region_access: + $ref: '#/components/schemas/logcontrolAllowOutOfRegionAccess' + regions: + $ref: '#/components/schemas/logcontrolRegions' + type: object + logcontrolCmbConfigResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/logcontrolMessages' + messages: + $ref: '#/components/schemas/logcontrolMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/logcontrolCmbConfig' + required: + - success + - errors + - messages + logcontrolFlag: + description: The log retention flag for Logpull API. + example: true + type: boolean + x-auditable: true + logcontrolMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + logcontrolRegions: + description: Name of the region. + example: eu + maxLength: 256 + type: string + x-auditable: true + logcontrolRetentionFlag: + nullable: true + properties: + flag: + $ref: '#/components/schemas/logcontrolFlag' + type: object + logcontrolRetentionFlagResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/logcontrolMessages' + messages: + $ref: '#/components/schemas/logcontrolMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/logcontrolRetentionFlag' + required: + - success + - errors + - messages + logshareApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/logshareMessages' + messages: + example: [] + $ref: '#/components/schemas/logshareMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + logshareCount: + description: When `?count=` is provided, the response will contain up to `count` results. Since results are not sorted, you are likely to get different data for repeated requests. `count` must be an integer > 0. + minimum: 1 + type: integer + x-auditable: true + logshareEnd: + description: Sets the (exclusive) end of the requested time frame. This can be a unix timestamp (in seconds or nanoseconds), or an absolute timestamp that conforms to RFC 3339. `end` must be at least five minutes earlier than now and must be later than `start`. Difference between `start` and `end` must be not greater than one hour. + example: '2018-05-20T10:01:00Z' + x-auditable: true + type: string + logshareFields: + description: 'The `/received` route by default returns a limited set of fields, and allows customers to override the default field set by specifying individual fields. The reasons for this are: 1. Most customers require only a small subset of fields, but that subset varies from customer to customer; 2. Flat schema is much easier to work with downstream (importing into BigTable etc); 3. Performance (time to process, file size). If `?fields=` is not specified, default field set is returned. This default field set may change at any time. When `?fields=` is provided, each record is returned with the specified fields. `fields` must be specified as a comma separated list without any whitespaces, and all fields must exist. The order in which fields are specified does not matter, and the order of fields in the response is not specified.' + example: ClientIP,RayID,EdgeStartTimestamp + type: string + x-auditable: true + logshareFieldsResponse: + properties: + key: + example: value + type: string + x-auditable: true + type: object + logshareLogsResponseJsonLines: + example: '{"ClientIP":"192.0.2.1","RayID":"41ddf1740f67442d","EdgeStartTimestamp":1526810289280000000} + + {"ClientIP":"192.0.2.1","RayID":"41ddf1740f67442d","EdgeStartTimestamp":1526810289280000000} + + {"ClientIP":"192.0.2.1","RayID":"41ddf1740f67442d","EdgeStartTimestamp":1526810289280000000}' + type: string + logshareMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + logshareRayIdentifier: + description: Ray identifier. + example: 41ddf1740f67442d + maxLength: 16 + readOnly: true + type: string + x-auditable: true + logshareSample: + description: 'When `?sample=` is provided, a sample of matching records is returned. If `sample=0.1` then 10% of records will be returned. Sampling is random: repeated calls will not only return different records, but likely will also vary slightly in number of returned records. When `?count=` is also specified, `count` is applied to the number of returned records, not the sampled records. So, with `sample=0.05` and `count=7`, when there is a total of 100 records available, approximately five will be returned. When there are 1000 records, seven will be returned. When there are 10,000 records, seven will be returned.' + example: 0.1 + maximum: 1 + minimum: 0 + type: number + x-auditable: true + logshareStart: + description: Sets the (inclusive) beginning of the requested time frame. This can be a unix timestamp (in seconds or nanoseconds), or an absolute timestamp that conforms to RFC 3339. At this point in time, it cannot exceed a time in the past greater than seven days. + example: '2018-05-20T10:00:00Z' + x-auditable: true + type: string + logshareTimestamps: + default: unixnano + description: 'By default, timestamps in responses are returned as Unix nanosecond integers. The `?timestamps=` argument can be set to change the format in which response timestamps are returned. Possible values are: `unix`, `unixnano`, `rfc3339`. Note that `unix` and `unixnano` return timestamps as integers; `rfc3339` returns timestamps as strings.' + enum: + - unix + - unixnano + - rfc3339 + example: unixnano + type: string + x-auditable: true + responseInfo: + properties: + code: + minimum: 1000 + type: integer + message: + type: string + documentation_url: + type: string + source: + type: object + properties: + pointer: + type: string + required: + - code + - message + type: object + uniqueItems: true + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + config: + id: cloudflare.logs.config + name: config + title: Config + methods: + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1logs~1control~1cmb~1config/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1logs~1control~1cmb~1config/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1logs~1control~1cmb~1config/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/config/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/config/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/config/methods/delete' + replace: [] + retention: + id: cloudflare.logs.retention + name: retention + title: Retention + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1logs~1control~1retention~1flag/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1logs~1control~1retention~1flag/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/retention/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/retention/methods/create' + update: [] + delete: [] + replace: [] + rayids: + id: cloudflare.logs.rayids + name: rayids + title: Rayids + methods: + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1logs~1rayids~1{ray_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/rayids/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + received: + id: cloudflare.logs.received + name: received + title: Received + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1logs~1received/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/received/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + fields: + id: cloudflare.logs.fields + name: fields + title: Fields + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1logs~1received~1fields/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/fields/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + accounts_logs_explorer_datasets: + id: cloudflare.logs.accounts_logs_explorer_datasets + name: accounts_logs_explorer_datasets + title: Accounts Logs Explorer Datasets + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1logs~1explorer~1datasets/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + post_accounts_account_id_logs_explorer_datasets: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1logs~1explorer~1datasets/post' + response: + mediaType: application/json + openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .dataset }}{{ $sep }}"dataset": {{ toJson .dataset }}{{- $sep = "," -}}{{ end }} + + {{- if .fields }}{{ $sep }}"fields": {{ if eq (kindOf .fields) "string" }}{{ .fields }}{{ else }}{{ toJson .fields }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1logs~1explorer~1datasets~1{dataset_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + put_accounts_account_id_logs_explorer_datasets_dataset_id: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1logs~1explorer~1datasets~1{dataset_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .fields }}{{ $sep }}"fields": {{ if eq (kindOf .fields) "string" }}{{ .fields }}{{ else }}{{ toJson .fields }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/accounts_logs_explorer_datasets/methods/get' + - $ref: '#/components/x-stackQL-resources/accounts_logs_explorer_datasets/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/accounts_logs_explorer_datasets/methods/post_accounts_account_id_logs_explorer_datasets' + update: [] + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/accounts_logs_explorer_datasets/methods/put_accounts_account_id_logs_explorer_datasets_dataset_id' + zones_logs_explorer_datasets: + id: cloudflare.logs.zones_logs_explorer_datasets + name: zones_logs_explorer_datasets + title: Zones Logs Explorer Datasets + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1logs~1explorer~1datasets/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + post_zones_zone_id_logs_explorer_datasets: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1logs~1explorer~1datasets/post' + response: + mediaType: application/json + openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .dataset }}{{ $sep }}"dataset": {{ toJson .dataset }}{{- $sep = "," -}}{{ end }} + + {{- if .fields }}{{ $sep }}"fields": {{ if eq (kindOf .fields) "string" }}{{ .fields }}{{ else }}{{ toJson .fields }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1logs~1explorer~1datasets~1{dataset_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + put_zones_zone_id_logs_explorer_datasets_dataset_id: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1logs~1explorer~1datasets~1{dataset_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .fields }}{{ $sep }}"fields": {{ if eq (kindOf .fields) "string" }}{{ .fields }}{{ else }}{{ toJson .fields }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/zones_logs_explorer_datasets/methods/get' + - $ref: '#/components/x-stackQL-resources/zones_logs_explorer_datasets/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/zones_logs_explorer_datasets/methods/post_zones_zone_id_logs_explorer_datasets' + update: [] + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/zones_logs_explorer_datasets/methods/put_zones_zone_id_logs_explorer_datasets_dataset_id' + accounts_logs_explorer_datasets_available: + id: cloudflare.logs.accounts_logs_explorer_datasets_available + name: accounts_logs_explorer_datasets_available + title: Accounts Logs Explorer Datasets Available + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1logs~1explorer~1datasets~1available/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/accounts_logs_explorer_datasets_available/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + zones_logs_explorer_datasets_available: + id: cloudflare.logs.zones_logs_explorer_datasets_available + name: zones_logs_explorer_datasets_available + title: Zones Logs Explorer Datasets Available + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1logs~1explorer~1datasets~1available/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/zones_logs_explorer_datasets_available/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + accounts_logs_explorer_query_sql: + id: cloudflare.logs.accounts_logs_explorer_query_sql + name: accounts_logs_explorer_query_sql + title: Accounts Logs Explorer Query Sql + methods: + create_sql: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1logs~1explorer~1query~1sql/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + zones_logs_explorer_query_sql: + id: cloudflare.logs.zones_logs_explorer_query_sql + name: zones_logs_explorer_query_sql + title: Zones Logs Explorer Query Sql + methods: + create_sql: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1logs~1explorer~1query~1sql/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/magic_cloud_networking.yaml b/providers/src/cloudflare/v00.00.00000/services/magic_cloud_networking.yaml index 6c04b338..8f99fd6b 100644 --- a/providers/src/cloudflare/v00.00.00000/services/magic_cloud_networking.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/magic_cloud_networking.yaml @@ -4444,6 +4444,49 @@ components: response: mediaType: application/json openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .adopted_hub_id }}{{ $sep }}"adopted_hub_id": {{ toJson .adopted_hub_id }}{{- $sep = "," -}}{{ end }} + + {{- if .attached_hubs }}{{ $sep }}"attached_hubs": {{ if eq (kindOf .attached_hubs) "string" }}{{ .attached_hubs }}{{ else }}{{ toJson .attached_hubs }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .attached_vpcs }}{{ $sep }}"attached_vpcs": {{ if eq (kindOf .attached_vpcs) "string" }}{{ .attached_vpcs }}{{ else }}{{ toJson .attached_vpcs }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .cloud_asn }}{{ $sep }}"cloud_asn": {{ toJson .cloud_asn }}{{- $sep = "," -}}{{ end }} + + {{- if .cloud_type }}{{ $sep }}"cloud_type": {{ toJson .cloud_type }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .dynamic_routing }}{{ $sep }}"dynamic_routing": {{ toJson .dynamic_routing }}{{- $sep = "," -}}{{ end }} + + {{- if .hub_provider_id }}{{ $sep }}"hub_provider_id": {{ toJson .hub_provider_id }}{{- $sep = "," -}}{{ end }} + + {{- if .install_routes_in_cloud }}{{ $sep }}"install_routes_in_cloud": {{ toJson .install_routes_in_cloud }}{{- $sep = "," -}}{{ end }} + + {{- if .install_routes_in_magic_wan }}{{ $sep }}"install_routes_in_magic_wan": {{ toJson .install_routes_in_magic_wan }}{{- $sep = "," -}}{{ end }} + + {{- if .manage_hub_to_hub_attachments }}{{ $sep }}"manage_hub_to_hub_attachments": {{ toJson .manage_hub_to_hub_attachments }}{{- $sep = "," -}}{{ end }} + + {{- if .manage_vpc_to_hub_attachments }}{{ $sep }}"manage_vpc_to_hub_attachments": {{ toJson .manage_vpc_to_hub_attachments }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .region }}{{ $sep }}"region": {{ toJson .region }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + {{- if .vpc }}{{ $sep }}"vpc": {{ toJson .vpc }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1magic~1cloud~1onramps~1{onramp_id}/delete' @@ -4466,6 +4509,35 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .attached_hubs }}{{ $sep }}"attached_hubs": {{ if eq (kindOf .attached_hubs) "string" }}{{ .attached_hubs }}{{ else }}{{ toJson .attached_hubs }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .attached_vpcs }}{{ $sep }}"attached_vpcs": {{ if eq (kindOf .attached_vpcs) "string" }}{{ .attached_vpcs }}{{ else }}{{ toJson .attached_vpcs }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .install_routes_in_cloud }}{{ $sep }}"install_routes_in_cloud": {{ toJson .install_routes_in_cloud }}{{- $sep = "," -}}{{ end }} + + {{- if .install_routes_in_magic_wan }}{{ $sep }}"install_routes_in_magic_wan": {{ toJson .install_routes_in_magic_wan }}{{- $sep = "," -}}{{ end }} + + {{- if .manage_hub_to_hub_attachments }}{{ $sep }}"manage_hub_to_hub_attachments": {{ toJson .manage_hub_to_hub_attachments }}{{- $sep = "," -}}{{ end }} + + {{- if .manage_vpc_to_hub_attachments }}{{ $sep }}"manage_vpc_to_hub_attachments": {{ toJson .manage_vpc_to_hub_attachments }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .vpc }}{{ $sep }}"vpc": {{ toJson .vpc }}{{- $sep = "," -}}{{ end }} + + } + + ' update: config: requestBodyTranslate: @@ -4475,6 +4547,35 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .attached_hubs }}{{ $sep }}"attached_hubs": {{ if eq (kindOf .attached_hubs) "string" }}{{ .attached_hubs }}{{ else }}{{ toJson .attached_hubs }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .attached_vpcs }}{{ $sep }}"attached_vpcs": {{ if eq (kindOf .attached_vpcs) "string" }}{{ .attached_vpcs }}{{ else }}{{ toJson .attached_vpcs }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .install_routes_in_cloud }}{{ $sep }}"install_routes_in_cloud": {{ toJson .install_routes_in_cloud }}{{- $sep = "," -}}{{ end }} + + {{- if .install_routes_in_magic_wan }}{{ $sep }}"install_routes_in_magic_wan": {{ toJson .install_routes_in_magic_wan }}{{- $sep = "," -}}{{ end }} + + {{- if .manage_hub_to_hub_attachments }}{{ $sep }}"manage_hub_to_hub_attachments": {{ toJson .manage_hub_to_hub_attachments }}{{- $sep = "," -}}{{ end }} + + {{- if .manage_vpc_to_hub_attachments }}{{ $sep }}"manage_vpc_to_hub_attachments": {{ toJson .manage_vpc_to_hub_attachments }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .vpc }}{{ $sep }}"vpc": {{ toJson .vpc }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/on_ramps/methods/get' @@ -4508,6 +4609,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .prefixes }}{{ $sep }}"prefixes": {{ if eq (kindOf .prefixes) "string" }}{{ .prefixes }}{{ else }}{{ toJson .prefixes }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' update: config: requestBodyTranslate: @@ -4517,6 +4631,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .prefixes }}{{ $sep }}"prefixes": {{ if eq (kindOf .prefixes) "string" }}{{ .prefixes }}{{ else }}{{ toJson .prefixes }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/address_spaces/methods/list' diff --git a/providers/src/cloudflare/v00.00.00000/services/magic_network_monitoring.yaml b/providers/src/cloudflare/v00.00.00000/services/magic_network_monitoring.yaml index c2cb95e6..459358f5 100644 --- a/providers/src/cloudflare/v00.00.00000/services/magic_network_monitoring.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/magic_network_monitoring.yaml @@ -1,1659 +1,1720 @@ -openapi: 3.0.3 -info: - title: magic_network_monitoring API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/mnm/config: - delete: - description: Delete an existing network monitoring configuration. - operationId: magic-network-monitoring-configuration-delete-account-configuration - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/magicVisibilityMnmMnmConfigSingleResponse' - description: Delete account configuration response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - messages: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - result: - $ref: >- - #/components/schemas/unnamedSchemaRef621ca3f6ea9a96427c902b0d14279ff8 - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Delete account configuration response failure - security: - - api_email: [] - api_key: [] - summary: Delete account configuration - tags: - - Magic Network Monitoring Configuration - x-api-token-group: - - Magic Network Monitoring Admin - x-stackql-sdk: - service: magic_network_monitoring - resource_chain: - - configs - method: delete - get: - description: Lists default sampling, router IPs and warp devices for account. - operationId: magic-network-monitoring-configuration-list-account-configuration - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/magicVisibilityMnmMnmConfigSingleResponse' - description: List account configuration response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - messages: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - result: - $ref: >- - #/components/schemas/unnamedSchemaRef621ca3f6ea9a96427c902b0d14279ff8 - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: List account configuration response failure - security: - - api_email: [] - api_key: [] - summary: List account configuration - tags: - - Magic Network Monitoring Configuration - x-api-token-group: - - Magic Network Monitoring Admin - - Magic Network Monitoring Config Write - - Magic Network Monitoring Config Read - x-stackql-sdk: - service: magic_network_monitoring - resource_chain: - - configs - method: get - patch: - description: Update fields in an existing network monitoring configuration. - operationId: >- - magic-network-monitoring-configuration-update-account-configuration-fields - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - default_sampling: - $ref: >- - #/components/schemas/magicVisibilityMnmMnmConfigDefaultSampling - name: - $ref: '#/components/schemas/magicVisibilityMnmMnmConfigName' - router_ips: - $ref: '#/components/schemas/magicVisibilityMnmMnmConfigRouterIps' - warp_devices: - $ref: '#/components/schemas/magicVisibilityMnmMnmConfigWarpDevices' - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/magicVisibilityMnmMnmConfigSingleResponse' - description: Update account configuration fields response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - messages: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - result: - $ref: >- - #/components/schemas/unnamedSchemaRef621ca3f6ea9a96427c902b0d14279ff8 - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Update account configuration fields response failure - security: - - api_email: [] - api_key: [] - summary: Update account configuration fields - tags: - - Magic Network Monitoring Configuration - x-api-token-group: - - Magic Network Monitoring Admin - - Magic Network Monitoring Config Write - x-stackql-sdk: - service: magic_network_monitoring - resource_chain: - - configs - method: edit - post: - description: Create a new network monitoring configuration. - operationId: magic-network-monitoring-configuration-create-account-configuration - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - default_sampling: - $ref: >- - #/components/schemas/magicVisibilityMnmMnmConfigDefaultSampling - name: - $ref: '#/components/schemas/magicVisibilityMnmMnmConfigName' - router_ips: - $ref: '#/components/schemas/magicVisibilityMnmMnmConfigRouterIps' - warp_devices: - $ref: '#/components/schemas/magicVisibilityMnmMnmConfigWarpDevices' - required: - - name - - default_sampling - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/magicVisibilityMnmMnmConfigSingleResponse' - description: Create account configuration response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - messages: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - result: - $ref: >- - #/components/schemas/unnamedSchemaRef621ca3f6ea9a96427c902b0d14279ff8 - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Create account configuration response failure - security: - - api_email: [] - api_key: [] - summary: Create account configuration - tags: - - Magic Network Monitoring Configuration - x-api-token-group: - - Magic Network Monitoring Admin - x-stackql-sdk: - service: magic_network_monitoring - resource_chain: - - configs - method: create - put: - description: >- - Update an existing network monitoring configuration, requires the entire - configuration to be updated at once. - operationId: >- - magic-network-monitoring-configuration-update-an-entire-account-configuration - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - default_sampling: - $ref: >- - #/components/schemas/magicVisibilityMnmMnmConfigDefaultSampling - name: - $ref: '#/components/schemas/magicVisibilityMnmMnmConfigName' - router_ips: - $ref: '#/components/schemas/magicVisibilityMnmMnmConfigRouterIps' - warp_devices: - $ref: '#/components/schemas/magicVisibilityMnmMnmConfigWarpDevices' - required: - - name - - default_sampling - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/magicVisibilityMnmMnmConfigSingleResponse' - description: Update an entire account configuration response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - messages: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - result: - $ref: >- - #/components/schemas/unnamedSchemaRef621ca3f6ea9a96427c902b0d14279ff8 - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Update an entire account configuration response failure - security: - - api_email: [] - api_key: [] - summary: Update an entire account configuration - tags: - - Magic Network Monitoring Configuration - x-api-token-group: - - Magic Network Monitoring Admin - - Magic Network Monitoring Config Write - x-stackql-sdk: - service: magic_network_monitoring - resource_chain: - - configs - method: update - /accounts/{account_id}/mnm/config/full: - get: - description: Lists default sampling, router IPs, warp devices, and rules for account. - operationId: >- - magic-network-monitoring-configuration-list-rules-and-account-configuration - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/magicVisibilityMnmMnmConfigSingleResponse' - description: List rules and account configuration response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - messages: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - result: - $ref: >- - #/components/schemas/unnamedSchemaRef621ca3f6ea9a96427c902b0d14279ff8 - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: List rules and account configuration response failure - security: - - api_email: [] - api_key: [] - summary: List rules and account configuration - tags: - - Magic Network Monitoring Configuration - x-api-token-group: - - Magic Network Monitoring Admin - - Magic Network Monitoring Config Write - - Magic Network Monitoring Config Read - x-stackql-sdk: - service: magic_network_monitoring - resource_chain: - - configs - - full - method: get - /accounts/{account_id}/mnm/rules: - get: - description: Lists network monitoring rules for account. - operationId: magic-network-monitoring-rules-list-rules - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/magicVisibilityMnmMnmRulesCollectionResponse - description: List rules response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - messages: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - result: - items: - $ref: '#/components/schemas/magicVisibilityMnmMnmRule' - nullable: true - type: array - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/magicVisibilityMnmResultInfo' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: List rules response failure - security: - - api_email: [] - api_key: [] - summary: List rules - tags: - - Magic Network Monitoring Rules - x-api-token-group: - - Magic Network Monitoring Admin - - Magic Network Monitoring Config Write - - Magic Network Monitoring Config Read - x-stackql-sdk: - service: magic_network_monitoring - resource_chain: - - rules - method: list - post: - description: >- - Create network monitoring rules for account. Currently only supports - creating a single rule per API request. - operationId: magic-network-monitoring-rules-create-rules - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleCreate' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/magicVisibilityMnmMnmRulesSingleResponse' - description: Create rules response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - messages: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - result: - $ref: >- - #/components/schemas/unnamedSchemaRef99ba74ba6027c3c87ca03d4e81cfc16d - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Create rules response failure - security: - - api_email: [] - api_key: [] - summary: Create rules - tags: - - Magic Network Monitoring Rules - x-api-token-group: - - Magic Network Monitoring Admin - x-stackql-sdk: - service: magic_network_monitoring - resource_chain: - - rules - method: create - put: - description: Update network monitoring rules for account. - operationId: magic-network-monitoring-rules-update-rules - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleCreate' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/magicVisibilityMnmMnmRulesSingleResponse' - description: Update rules response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - messages: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - result: - $ref: >- - #/components/schemas/unnamedSchemaRef99ba74ba6027c3c87ca03d4e81cfc16d - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Update rules response failure - security: - - api_email: [] - api_key: [] - summary: Update rules - tags: - - Magic Network Monitoring Rules - x-api-token-group: - - Magic Network Monitoring Admin - - Magic Network Monitoring Config Write - x-stackql-sdk: - service: magic_network_monitoring - resource_chain: - - rules - method: update - /accounts/{account_id}/mnm/rules/{rule_id}: - delete: - description: Delete a network monitoring rule for account. - operationId: magic-network-monitoring-rules-delete-rule - parameters: - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/magicVisibilityMnmMnmRulesSingleResponse' - description: Delete rule response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - messages: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - result: - $ref: >- - #/components/schemas/unnamedSchemaRef99ba74ba6027c3c87ca03d4e81cfc16d - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Delete rule response failure - security: - - api_email: [] - api_key: [] - summary: Delete rule - tags: - - Magic Network Monitoring Rules - x-api-token-group: - - Magic Network Monitoring Admin - x-stackql-sdk: - service: magic_network_monitoring - resource_chain: - - rules - method: delete - get: - description: List a single network monitoring rule for account. - operationId: magic-network-monitoring-rules-get-rule - parameters: - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/magicVisibilityMnmMnmRulesSingleResponse' - description: Get rule response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - messages: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - result: - $ref: >- - #/components/schemas/unnamedSchemaRef99ba74ba6027c3c87ca03d4e81cfc16d - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Get rule response failure - security: - - api_email: [] - api_key: [] - summary: Get rule - tags: - - Magic Network Monitoring Rules - x-api-token-group: - - Magic Network Monitoring Admin - - Magic Network Monitoring Config Write - - Magic Network Monitoring Config Read - x-stackql-sdk: - service: magic_network_monitoring - resource_chain: - - rules - method: get - patch: - description: Update a network monitoring rule for account. - operationId: magic-network-monitoring-rules-update-rule - parameters: - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleCreate' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/magicVisibilityMnmMnmRulesSingleResponse' - description: Update rule response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - messages: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - result: - $ref: >- - #/components/schemas/unnamedSchemaRef99ba74ba6027c3c87ca03d4e81cfc16d - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Update rule response failure - security: - - api_email: [] - api_key: [] - summary: Update rule - tags: - - Magic Network Monitoring Rules - x-api-token-group: - - Magic Network Monitoring Admin - - Magic Network Monitoring Config Write - x-stackql-sdk: - service: magic_network_monitoring - resource_chain: - - rules - method: edit - /accounts/{account_id}/mnm/rules/{rule_id}/advertisement: - patch: - description: Update advertisement for rule. - operationId: magic-network-monitoring-rules-update-advertisement-for-rule - parameters: - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: {} - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/magicVisibilityMnmMnmRuleAdvertisementSingleResponse - description: Update advertisement for rule response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - messages: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - result: - nullable: true - properties: - automatic_advertisement: - $ref: >- - #/components/schemas/magicVisibilityMnmMnmRuleAutomaticAdvertisement - required: - - automatic_advertisement - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Update advertisement for rule response failure - security: - - api_email: [] - api_key: [] - summary: Update advertisement for rule - tags: - - Magic Network Monitoring Rules - x-api-token-group: - - Magic Network Monitoring Admin - - Magic Network Monitoring Config Write - x-stackql-sdk: - service: magic_network_monitoring - resource_chain: - - rules - - advertisements - method: edit - /accounts/{account_id}/mnm/vpc-flows/token: - post: - description: Generate authentication token for VPC flow logs export. - operationId: magic-network-monitoring-vpc-flows-generate-authentication-token - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/magicVisibilityMnmMnmVpcFlowsSingleResponse - description: Generate authentication token for VPC flow logs export response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - messages: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - result: - description: >- - Authentication token to be used for VPC Flows export - authentication. - type: string - x-sensitive: true - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Generate authentication token for VPC flow logs export failure. - security: - - api_email: [] - api_key: [] - summary: Generate authentication token for VPC flow logs export. - tags: - - Magic Network Monitoring VPC Flow logs - x-api-token-group: - - Magic Network Monitoring Admin - x-stackql-sdk: - service: magic_network_monitoring - resource_chain: - - vpc_flows - - tokens - method: create -components: - schemas: - magicVisibilityMnmMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - magicVisibilityMnmMnmConfig: - properties: - default_sampling: - $ref: '#/components/schemas/magicVisibilityMnmMnmConfigDefaultSampling' - name: - $ref: '#/components/schemas/magicVisibilityMnmMnmConfigName' - router_ips: - $ref: '#/components/schemas/magicVisibilityMnmMnmConfigRouterIps' - warp_devices: - $ref: '#/components/schemas/magicVisibilityMnmMnmConfigWarpDevices' - required: - - name - - default_sampling - - router_ips - - warp_devices - type: object - magicVisibilityMnmMnmConfigDefaultSampling: - default: 1 - description: >- - Fallback sampling rate of flow messages being sent in packets per - second. This should match the packet sampling rate configured on the - router. - minimum: 1 - type: number - x-auditable: true - magicVisibilityMnmMnmConfigName: - description: The account name. - example: cloudflare user's account - type: string - x-auditable: true - magicVisibilityMnmMnmConfigRouterIp: - description: >- - IPv4 CIDR of the router sourcing flow data. Only /32 addresses are - currently supported. - example: 203.0.113.1 - type: string - x-auditable: true - magicVisibilityMnmMnmConfigRouterIps: - items: - $ref: '#/components/schemas/magicVisibilityMnmMnmConfigRouterIp' - type: array - magicVisibilityMnmMnmConfigSingleResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - messages: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - result: - $ref: '#/components/schemas/magicVisibilityMnmMnmConfig' - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - magicVisibilityMnmMnmConfigWarpDevice: - description: Object representing a warp device with an ID and name. - properties: - id: - description: Unique identifier for the warp device. - example: 5360368d-b351-4791-abe1-93550dabd351 - type: string - x-auditable: true - name: - description: Name of the warp device. - example: My warp device - type: string - x-auditable: true - router_ip: - description: >- - IPv4 CIDR of the router sourcing flow data associated with this warp - device. Only /32 addresses are currently supported. - example: 203.0.113.1 - type: string - x-auditable: true - required: - - id - - name - - router_ip - type: object - magicVisibilityMnmMnmConfigWarpDevices: - items: - $ref: '#/components/schemas/magicVisibilityMnmMnmConfigWarpDevice' - type: array - magicVisibilityMnmMnmRule: - nullable: true - properties: - automatic_advertisement: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleAutomaticAdvertisement' - bandwidth_threshold: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleBandwidthThreshold' - duration: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleDuration' - id: - $ref: '#/components/schemas/magicVisibilityMnmRuleIdentifier' - name: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleName' - packet_threshold: - $ref: '#/components/schemas/magicVisibilityMnmMnmRulePacketThreshold' - prefix_match: - $ref: '#/components/schemas/magicVisibilityMnmMnmRulePrefixMatch' - prefixes: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleIpPrefixes' - type: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleType' - zscore_sensitivity: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleZscoreSensitivity' - zscore_target: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleZscoreTarget' - required: - - id - - name - - prefixes - - automatic_advertisement - - type - type: object - magicVisibilityMnmMnmRuleAdvertisableResponse: - nullable: true - properties: - automatic_advertisement: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleAutomaticAdvertisement' - required: - - automatic_advertisement - type: object - magicVisibilityMnmMnmRuleAdvertisementSingleResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - messages: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - result: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleAdvertisableResponse' - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - magicVisibilityMnmMnmRuleAutomaticAdvertisement: - description: >- - Toggle on if you would like Cloudflare to automatically advertise the IP - Prefixes within the rule via Magic Transit when the rule is triggered. - Only available for users of Magic Transit. - nullable: true - type: boolean - x-auditable: true - magicVisibilityMnmMnmRuleBandwidthThreshold: - description: >- - The number of bits per second for the rule. When this value is exceeded - for the set duration, an alert notification is sent. Minimum of 1 and no - maximum. - example: 1000 - minimum: 1 - type: number - x-auditable: true - magicVisibilityMnmMnmRuleCreate: - nullable: true - properties: - automatic_advertisement: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleAutomaticAdvertisement' - bandwidth_threshold: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleBandwidthThreshold' - duration: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleDuration' - name: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleName' - packet_threshold: - $ref: '#/components/schemas/magicVisibilityMnmMnmRulePacketThreshold' - prefix_match: - $ref: '#/components/schemas/magicVisibilityMnmMnmRulePrefixMatch' - prefixes: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleIpPrefixes' - type: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleType' - zscore_sensitivity: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleZscoreSensitivity' - zscore_target: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleZscoreTarget' - required: - - name - - prefixes - - automatic_advertisement - - type - type: object - magicVisibilityMnmMnmRuleDuration: - default: 1m - description: >- - The amount of time that the rule threshold must be exceeded to send an - alert notification. The final value must be equivalent to one of the - following 8 values ["1m","5m","10m","15m","20m","30m","45m","60m"]. - enum: - - 1m - - 5m - - 10m - - 15m - - 20m - - 30m - - 45m - - 60m - type: string - x-auditable: true - magicVisibilityMnmMnmRuleIpPrefix: - description: >- - The IP prefixes that are monitored for this rule. Must be a CIDR range - like 203.0.113.0/24. Max 5000 different CIDR ranges. - example: 203.0.113.1/32 - type: string - x-auditable: true - magicVisibilityMnmMnmRuleIpPrefixes: - items: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleIpPrefix' - type: array - magicVisibilityMnmMnmRuleName: - description: >- - The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, - underscore (_), dash (-), period (.), and tilde (~). You can’t have a - space in the rule name. Max 256 characters. - example: my_rule_1 - type: string - x-auditable: true - magicVisibilityMnmMnmRulePacketThreshold: - description: >- - The number of packets per second for the rule. When this value is - exceeded for the set duration, an alert notification is sent. Minimum of - 1 and no maximum. - example: 10000 - minimum: 1 - type: number - x-auditable: true - magicVisibilityMnmMnmRulePrefixMatch: - description: >- - Prefix match type to be applied for a prefix auto advertisement when - using an advanced_ddos rule. - enum: - - exact - - subnet - - supernet - example: exact - nullable: true - type: string - x-auditable: true - magicVisibilityMnmMnmRuleType: - description: MNM rule type. - enum: - - threshold - - zscore - - advanced_ddos - example: zscore - type: string - x-auditable: true - magicVisibilityMnmMnmRuleZscoreSensitivity: - description: Level of sensitivity set for zscore rules. - enum: - - low - - medium - - high - example: high - nullable: true - type: string - x-auditable: true - magicVisibilityMnmMnmRuleZscoreTarget: - description: Target of the zscore rule analysis. - enum: - - bits - - packets - example: bits - nullable: true - type: string - x-auditable: true - magicVisibilityMnmMnmRulesCollectionResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - messages: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - result: - items: - $ref: '#/components/schemas/magicVisibilityMnmMnmRule' - nullable: true - type: array - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/magicVisibilityMnmResultInfo' - required: - - success - - errors - - messages - - result - magicVisibilityMnmMnmRulesSingleResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - messages: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - result: - $ref: '#/components/schemas/magicVisibilityMnmMnmRule' - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - magicVisibilityMnmMnmVpcFlowsSingleResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - messages: - $ref: '#/components/schemas/magicVisibilityMnmMessages' - result: - $ref: '#/components/schemas/magicVisibilityMnmMnmVpcFlowsToken' - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - magicVisibilityMnmMnmVpcFlowsToken: - description: Authentication token to be used for VPC Flows export authentication. - example: JWE/JWT auth token - type: string - x-sensitive: true - magicVisibilityMnmResultInfo: - properties: - count: - description: Total number of results for the requested service - example: 1 - type: number - page: - description: Current page within paginated list of results - example: 1 - type: number - per_page: - description: Number of results per page of results - example: 20 - type: number - total_count: - description: Total results available without any search parameters - example: 2000 - type: number - type: object - magicVisibilityMnmRuleIdentifier: - description: The id of the rule. Must be unique. - example: 2890e6fa406311ed9b5a23f70f6fb8cf - type: string - x-auditable: true - responseInfo: - properties: - code: - minimum: 1000 - type: integer - message: - type: string - documentation_url: - type: string - source: - type: object - properties: - pointer: - type: string - required: - - code - - message - type: object - uniqueItems: true - unnamedSchemaRef621ca3f6ea9a96427c902b0d14279ff8: - properties: - default_sampling: - $ref: '#/components/schemas/magicVisibilityMnmMnmConfigDefaultSampling' - name: - $ref: '#/components/schemas/magicVisibilityMnmMnmConfigName' - router_ips: - $ref: '#/components/schemas/magicVisibilityMnmMnmConfigRouterIps' - warp_devices: - $ref: '#/components/schemas/magicVisibilityMnmMnmConfigWarpDevices' - required: - - name - - default_sampling - - router_ips - - warp_devices - type: object - enum: - - null - unnamedSchemaRef99ba74ba6027c3c87ca03d4e81cfc16d: - nullable: true - properties: - automatic_advertisement: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleAutomaticAdvertisement' - bandwidth_threshold: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleBandwidthThreshold' - duration: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleDuration' - id: - $ref: '#/components/schemas/magicVisibilityMnmRuleIdentifier' - name: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleName' - packet_threshold: - $ref: '#/components/schemas/magicVisibilityMnmMnmRulePacketThreshold' - prefix_match: - $ref: '#/components/schemas/magicVisibilityMnmMnmRulePrefixMatch' - prefixes: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleIpPrefixes' - type: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleType' - zscore_sensitivity: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleZscoreSensitivity' - zscore_target: - $ref: '#/components/schemas/magicVisibilityMnmMnmRuleZscoreTarget' - required: - - id - - name - - prefixes - - automatic_advertisement - - type - type: object - enum: - - null - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - configs: - id: cloudflare.magic_network_monitoring.configs - name: configs - title: Configs - methods: - delete: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1mnm~1config/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1mnm~1config/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1mnm~1config/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1mnm~1config/post' - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1mnm~1config/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/configs/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/configs/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/configs/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/configs/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/configs/methods/update' - fulls: - id: cloudflare.magic_network_monitoring.fulls - name: fulls - title: Fulls - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1mnm~1config~1full/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/fulls/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - rules: - id: cloudflare.magic_network_monitoring.rules - name: rules - title: Rules - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1mnm~1rules/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1mnm~1rules/post' - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1mnm~1rules/put' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1mnm~1rules~1{rule_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1mnm~1rules~1{rule_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1mnm~1rules~1{rule_id}/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - update_advertisement: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1mnm~1rules~1{rule_id}~1advertisement/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/rules/methods/get' - - $ref: '#/components/x-stackQL-resources/rules/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/rules/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/rules/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/rules/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/rules/methods/update' - mnm: - id: cloudflare.magic_network_monitoring.mnm - name: mnm - title: Mnm - methods: - create_token: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1mnm~1vpc-flows~1token/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: magic_network_monitoring API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/mnm/config: + delete: + description: Delete an existing network monitoring configuration. + operationId: magic-network-monitoring-configuration-delete-account-configuration + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigSingleResponse' + description: Delete account configuration response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + messages: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + result: + $ref: '#/components/schemas/unnamedSchemaRef621ca3f6ea9a96427c902b0d14279ff8' + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Delete account configuration response failure + security: + - api_email: [] + api_key: [] + summary: Delete account configuration + tags: + - Magic Network Monitoring Configuration + x-api-token-group: + - Magic Network Monitoring Admin + x-stackql-sdk: + service: magic_network_monitoring + resource_chain: + - configs + method: delete + get: + description: Lists default sampling, router IPs and warp devices for account. + operationId: magic-network-monitoring-configuration-list-account-configuration + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigSingleResponse' + description: List account configuration response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + messages: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + result: + $ref: '#/components/schemas/unnamedSchemaRef621ca3f6ea9a96427c902b0d14279ff8' + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: List account configuration response failure + security: + - api_email: [] + api_key: [] + summary: List account configuration + tags: + - Magic Network Monitoring Configuration + x-api-token-group: + - Magic Network Monitoring Admin + - Magic Network Monitoring Config Write + - Magic Network Monitoring Config Read + x-stackql-sdk: + service: magic_network_monitoring + resource_chain: + - configs + method: get + patch: + description: Update fields in an existing network monitoring configuration. + operationId: magic-network-monitoring-configuration-update-account-configuration-fields + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + default_sampling: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigDefaultSampling' + name: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigName' + router_ips: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigRouterIps' + warp_devices: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigWarpDevices' + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigSingleResponse' + description: Update account configuration fields response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + messages: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + result: + $ref: '#/components/schemas/unnamedSchemaRef621ca3f6ea9a96427c902b0d14279ff8' + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Update account configuration fields response failure + security: + - api_email: [] + api_key: [] + summary: Update account configuration fields + tags: + - Magic Network Monitoring Configuration + x-api-token-group: + - Magic Network Monitoring Admin + - Magic Network Monitoring Config Write + x-stackql-sdk: + service: magic_network_monitoring + resource_chain: + - configs + method: edit + post: + description: Create a new network monitoring configuration. + operationId: magic-network-monitoring-configuration-create-account-configuration + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + default_sampling: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigDefaultSampling' + name: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigName' + router_ips: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigRouterIps' + warp_devices: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigWarpDevices' + required: + - name + - default_sampling + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigSingleResponse' + description: Create account configuration response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + messages: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + result: + $ref: '#/components/schemas/unnamedSchemaRef621ca3f6ea9a96427c902b0d14279ff8' + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Create account configuration response failure + security: + - api_email: [] + api_key: [] + summary: Create account configuration + tags: + - Magic Network Monitoring Configuration + x-api-token-group: + - Magic Network Monitoring Admin + x-stackql-sdk: + service: magic_network_monitoring + resource_chain: + - configs + method: create + put: + description: Update an existing network monitoring configuration, requires the entire configuration to be updated at once. + operationId: magic-network-monitoring-configuration-update-an-entire-account-configuration + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + default_sampling: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigDefaultSampling' + name: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigName' + router_ips: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigRouterIps' + warp_devices: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigWarpDevices' + required: + - name + - default_sampling + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigSingleResponse' + description: Update an entire account configuration response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + messages: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + result: + $ref: '#/components/schemas/unnamedSchemaRef621ca3f6ea9a96427c902b0d14279ff8' + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Update an entire account configuration response failure + security: + - api_email: [] + api_key: [] + summary: Update an entire account configuration + tags: + - Magic Network Monitoring Configuration + x-api-token-group: + - Magic Network Monitoring Admin + - Magic Network Monitoring Config Write + x-stackql-sdk: + service: magic_network_monitoring + resource_chain: + - configs + method: update + /accounts/{account_id}/mnm/config/full: + get: + description: Lists default sampling, router IPs, warp devices, and rules for account. + operationId: magic-network-monitoring-configuration-list-rules-and-account-configuration + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigSingleResponse' + description: List rules and account configuration response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + messages: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + result: + $ref: '#/components/schemas/unnamedSchemaRef621ca3f6ea9a96427c902b0d14279ff8' + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: List rules and account configuration response failure + security: + - api_email: [] + api_key: [] + summary: List rules and account configuration + tags: + - Magic Network Monitoring Configuration + x-api-token-group: + - Magic Network Monitoring Admin + - Magic Network Monitoring Config Write + - Magic Network Monitoring Config Read + x-stackql-sdk: + service: magic_network_monitoring + resource_chain: + - configs + - full + method: get + /accounts/{account_id}/mnm/rules: + get: + description: Lists network monitoring rules for account. + operationId: magic-network-monitoring-rules-list-rules + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/magicVisibilityMnmMnmRulesCollectionResponse' + description: List rules response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + messages: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + result: + items: + $ref: '#/components/schemas/magicVisibilityMnmMnmRule' + nullable: true + type: array + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/magicVisibilityMnmResultInfo' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: List rules response failure + security: + - api_email: [] + api_key: [] + summary: List rules + tags: + - Magic Network Monitoring Rules + x-api-token-group: + - Magic Network Monitoring Admin + - Magic Network Monitoring Config Write + - Magic Network Monitoring Config Read + x-stackql-sdk: + service: magic_network_monitoring + resource_chain: + - rules + method: list + post: + description: Create network monitoring rules for account. Currently only supports creating a single rule per API request. + operationId: magic-network-monitoring-rules-create-rules + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleCreate' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/magicVisibilityMnmMnmRulesSingleResponse' + description: Create rules response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + messages: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + result: + $ref: '#/components/schemas/unnamedSchemaRef99ba74ba6027c3c87ca03d4e81cfc16d' + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Create rules response failure + security: + - api_email: [] + api_key: [] + summary: Create rules + tags: + - Magic Network Monitoring Rules + x-api-token-group: + - Magic Network Monitoring Admin + x-stackql-sdk: + service: magic_network_monitoring + resource_chain: + - rules + method: create + put: + description: Update network monitoring rules for account. + operationId: magic-network-monitoring-rules-update-rules + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleCreate' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/magicVisibilityMnmMnmRulesSingleResponse' + description: Update rules response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + messages: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + result: + $ref: '#/components/schemas/unnamedSchemaRef99ba74ba6027c3c87ca03d4e81cfc16d' + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Update rules response failure + security: + - api_email: [] + api_key: [] + summary: Update rules + tags: + - Magic Network Monitoring Rules + x-api-token-group: + - Magic Network Monitoring Admin + - Magic Network Monitoring Config Write + x-stackql-sdk: + service: magic_network_monitoring + resource_chain: + - rules + method: update + /accounts/{account_id}/mnm/rules/{rule_id}: + delete: + description: Delete a network monitoring rule for account. + operationId: magic-network-monitoring-rules-delete-rule + parameters: + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/magicVisibilityMnmMnmRulesSingleResponse' + description: Delete rule response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + messages: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + result: + $ref: '#/components/schemas/unnamedSchemaRef99ba74ba6027c3c87ca03d4e81cfc16d' + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Delete rule response failure + security: + - api_email: [] + api_key: [] + summary: Delete rule + tags: + - Magic Network Monitoring Rules + x-api-token-group: + - Magic Network Monitoring Admin + x-stackql-sdk: + service: magic_network_monitoring + resource_chain: + - rules + method: delete + get: + description: List a single network monitoring rule for account. + operationId: magic-network-monitoring-rules-get-rule + parameters: + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/magicVisibilityMnmMnmRulesSingleResponse' + description: Get rule response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + messages: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + result: + $ref: '#/components/schemas/unnamedSchemaRef99ba74ba6027c3c87ca03d4e81cfc16d' + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Get rule response failure + security: + - api_email: [] + api_key: [] + summary: Get rule + tags: + - Magic Network Monitoring Rules + x-api-token-group: + - Magic Network Monitoring Admin + - Magic Network Monitoring Config Write + - Magic Network Monitoring Config Read + x-stackql-sdk: + service: magic_network_monitoring + resource_chain: + - rules + method: get + patch: + description: Update a network monitoring rule for account. + operationId: magic-network-monitoring-rules-update-rule + parameters: + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleCreate' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/magicVisibilityMnmMnmRulesSingleResponse' + description: Update rule response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + messages: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + result: + $ref: '#/components/schemas/unnamedSchemaRef99ba74ba6027c3c87ca03d4e81cfc16d' + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Update rule response failure + security: + - api_email: [] + api_key: [] + summary: Update rule + tags: + - Magic Network Monitoring Rules + x-api-token-group: + - Magic Network Monitoring Admin + - Magic Network Monitoring Config Write + x-stackql-sdk: + service: magic_network_monitoring + resource_chain: + - rules + method: edit + /accounts/{account_id}/mnm/rules/{rule_id}/advertisement: + patch: + description: Update advertisement for rule. + operationId: magic-network-monitoring-rules-update-advertisement-for-rule + parameters: + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: {} + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleAdvertisementSingleResponse' + description: Update advertisement for rule response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + messages: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + result: + nullable: true + properties: + automatic_advertisement: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleAutomaticAdvertisement' + required: + - automatic_advertisement + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Update advertisement for rule response failure + security: + - api_email: [] + api_key: [] + summary: Update advertisement for rule + tags: + - Magic Network Monitoring Rules + x-api-token-group: + - Magic Network Monitoring Admin + - Magic Network Monitoring Config Write + x-stackql-sdk: + service: magic_network_monitoring + resource_chain: + - rules + - advertisements + method: edit + /accounts/{account_id}/mnm/vpc-flows/token: + post: + description: Generate authentication token for VPC flow logs export. + operationId: magic-network-monitoring-vpc-flows-generate-authentication-token + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/magicVisibilityMnmMnmVpcFlowsSingleResponse' + description: Generate authentication token for VPC flow logs export response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + messages: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + result: + description: Authentication token to be used for VPC Flows export authentication. + type: string + x-sensitive: true + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Generate authentication token for VPC flow logs export failure. + security: + - api_email: [] + api_key: [] + summary: Generate authentication token for VPC flow logs export. + tags: + - Magic Network Monitoring VPC Flow logs + x-api-token-group: + - Magic Network Monitoring Admin + x-stackql-sdk: + service: magic_network_monitoring + resource_chain: + - vpc_flows + - tokens + method: create +components: + schemas: + magicVisibilityMnmMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + magicVisibilityMnmMnmConfig: + properties: + default_sampling: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigDefaultSampling' + name: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigName' + router_ips: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigRouterIps' + warp_devices: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigWarpDevices' + required: + - name + - default_sampling + - router_ips + - warp_devices + type: object + magicVisibilityMnmMnmConfigDefaultSampling: + default: 1 + description: Fallback sampling rate of flow messages being sent in packets per second. This should match the packet sampling rate configured on the router. + minimum: 1 + type: number + x-auditable: true + magicVisibilityMnmMnmConfigName: + description: The account name. + example: cloudflare user's account + type: string + x-auditable: true + magicVisibilityMnmMnmConfigRouterIp: + description: IPv4 CIDR of the router sourcing flow data. Only /32 addresses are currently supported. + example: 203.0.113.1 + type: string + x-auditable: true + magicVisibilityMnmMnmConfigRouterIps: + items: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigRouterIp' + type: array + magicVisibilityMnmMnmConfigSingleResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + messages: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + result: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfig' + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + magicVisibilityMnmMnmConfigWarpDevice: + description: Object representing a warp device with an ID and name. + properties: + id: + description: Unique identifier for the warp device. + example: 5360368d-b351-4791-abe1-93550dabd351 + type: string + x-auditable: true + name: + description: Name of the warp device. + example: My warp device + type: string + x-auditable: true + router_ip: + description: IPv4 CIDR of the router sourcing flow data associated with this warp device. Only /32 addresses are currently supported. + example: 203.0.113.1 + type: string + x-auditable: true + required: + - id + - name + - router_ip + type: object + magicVisibilityMnmMnmConfigWarpDevices: + items: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigWarpDevice' + type: array + magicVisibilityMnmMnmRule: + nullable: true + properties: + automatic_advertisement: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleAutomaticAdvertisement' + bandwidth_threshold: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleBandwidthThreshold' + duration: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleDuration' + id: + $ref: '#/components/schemas/magicVisibilityMnmRuleIdentifier' + name: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleName' + packet_threshold: + $ref: '#/components/schemas/magicVisibilityMnmMnmRulePacketThreshold' + prefix_match: + $ref: '#/components/schemas/magicVisibilityMnmMnmRulePrefixMatch' + prefixes: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleIpPrefixes' + type: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleType' + zscore_sensitivity: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleZscoreSensitivity' + zscore_target: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleZscoreTarget' + required: + - id + - name + - prefixes + - automatic_advertisement + - type + type: object + magicVisibilityMnmMnmRuleAdvertisableResponse: + nullable: true + properties: + automatic_advertisement: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleAutomaticAdvertisement' + required: + - automatic_advertisement + type: object + magicVisibilityMnmMnmRuleAdvertisementSingleResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + messages: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + result: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleAdvertisableResponse' + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + magicVisibilityMnmMnmRuleAutomaticAdvertisement: + description: Toggle on if you would like Cloudflare to automatically advertise the IP Prefixes within the rule via Magic Transit when the rule is triggered. Only available for users of Magic Transit. + nullable: true + type: boolean + x-auditable: true + magicVisibilityMnmMnmRuleBandwidthThreshold: + description: The number of bits per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum. + example: 1000 + minimum: 1 + type: number + x-auditable: true + magicVisibilityMnmMnmRuleCreate: + nullable: true + properties: + automatic_advertisement: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleAutomaticAdvertisement' + bandwidth_threshold: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleBandwidthThreshold' + duration: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleDuration' + name: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleName' + packet_threshold: + $ref: '#/components/schemas/magicVisibilityMnmMnmRulePacketThreshold' + prefix_match: + $ref: '#/components/schemas/magicVisibilityMnmMnmRulePrefixMatch' + prefixes: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleIpPrefixes' + type: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleType' + zscore_sensitivity: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleZscoreSensitivity' + zscore_target: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleZscoreTarget' + required: + - name + - prefixes + - automatic_advertisement + - type + type: object + magicVisibilityMnmMnmRuleDuration: + default: 1m + description: The amount of time that the rule threshold must be exceeded to send an alert notification. The final value must be equivalent to one of the following 8 values ["1m","5m","10m","15m","20m","30m","45m","60m"]. + enum: + - 1m + - 5m + - 10m + - 15m + - 20m + - 30m + - 45m + - 60m + type: string + x-auditable: true + magicVisibilityMnmMnmRuleIpPrefix: + description: The IP prefixes that are monitored for this rule. Must be a CIDR range like 203.0.113.0/24. Max 5000 different CIDR ranges. + example: 203.0.113.1/32 + type: string + x-auditable: true + magicVisibilityMnmMnmRuleIpPrefixes: + items: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleIpPrefix' + type: array + magicVisibilityMnmMnmRuleName: + description: "The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can\u2019t have a space in the rule name. Max 256 characters." + example: my_rule_1 + type: string + x-auditable: true + magicVisibilityMnmMnmRulePacketThreshold: + description: The number of packets per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum. + example: 10000 + minimum: 1 + type: number + x-auditable: true + magicVisibilityMnmMnmRulePrefixMatch: + description: Prefix match type to be applied for a prefix auto advertisement when using an advanced_ddos rule. + enum: + - exact + - subnet + - supernet + example: exact + nullable: true + type: string + x-auditable: true + magicVisibilityMnmMnmRuleType: + description: MNM rule type. + enum: + - threshold + - zscore + - advanced_ddos + example: zscore + type: string + x-auditable: true + magicVisibilityMnmMnmRuleZscoreSensitivity: + description: Level of sensitivity set for zscore rules. + enum: + - low + - medium + - high + example: high + nullable: true + type: string + x-auditable: true + magicVisibilityMnmMnmRuleZscoreTarget: + description: Target of the zscore rule analysis. + enum: + - bits + - packets + example: bits + nullable: true + type: string + x-auditable: true + magicVisibilityMnmMnmRulesCollectionResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + messages: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + result: + items: + $ref: '#/components/schemas/magicVisibilityMnmMnmRule' + nullable: true + type: array + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/magicVisibilityMnmResultInfo' + required: + - success + - errors + - messages + - result + magicVisibilityMnmMnmRulesSingleResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + messages: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + result: + $ref: '#/components/schemas/magicVisibilityMnmMnmRule' + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + magicVisibilityMnmMnmVpcFlowsSingleResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + messages: + $ref: '#/components/schemas/magicVisibilityMnmMessages' + result: + $ref: '#/components/schemas/magicVisibilityMnmMnmVpcFlowsToken' + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + magicVisibilityMnmMnmVpcFlowsToken: + description: Authentication token to be used for VPC Flows export authentication. + example: JWE/JWT auth token + type: string + x-sensitive: true + magicVisibilityMnmResultInfo: + properties: + count: + description: Total number of results for the requested service + example: 1 + type: number + page: + description: Current page within paginated list of results + example: 1 + type: number + per_page: + description: Number of results per page of results + example: 20 + type: number + total_count: + description: Total results available without any search parameters + example: 2000 + type: number + type: object + magicVisibilityMnmRuleIdentifier: + description: The id of the rule. Must be unique. + example: 2890e6fa406311ed9b5a23f70f6fb8cf + type: string + x-auditable: true + responseInfo: + properties: + code: + minimum: 1000 + type: integer + message: + type: string + documentation_url: + type: string + source: + type: object + properties: + pointer: + type: string + required: + - code + - message + type: object + uniqueItems: true + unnamedSchemaRef621ca3f6ea9a96427c902b0d14279ff8: + properties: + default_sampling: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigDefaultSampling' + name: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigName' + router_ips: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigRouterIps' + warp_devices: + $ref: '#/components/schemas/magicVisibilityMnmMnmConfigWarpDevices' + required: + - name + - default_sampling + - router_ips + - warp_devices + type: object + enum: + - null + unnamedSchemaRef99ba74ba6027c3c87ca03d4e81cfc16d: + nullable: true + properties: + automatic_advertisement: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleAutomaticAdvertisement' + bandwidth_threshold: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleBandwidthThreshold' + duration: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleDuration' + id: + $ref: '#/components/schemas/magicVisibilityMnmRuleIdentifier' + name: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleName' + packet_threshold: + $ref: '#/components/schemas/magicVisibilityMnmMnmRulePacketThreshold' + prefix_match: + $ref: '#/components/schemas/magicVisibilityMnmMnmRulePrefixMatch' + prefixes: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleIpPrefixes' + type: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleType' + zscore_sensitivity: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleZscoreSensitivity' + zscore_target: + $ref: '#/components/schemas/magicVisibilityMnmMnmRuleZscoreTarget' + required: + - id + - name + - prefixes + - automatic_advertisement + - type + type: object + enum: + - null + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + configs: + id: cloudflare.magic_network_monitoring.configs + name: configs + title: Configs + methods: + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1mnm~1config/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1mnm~1config/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1mnm~1config/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .default_sampling }}{{ $sep }}"default_sampling": {{ toJson .default_sampling }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .router_ips }}{{ $sep }}"router_ips": {{ if eq (kindOf .router_ips) "string" }}{{ .router_ips }}{{ else }}{{ toJson .router_ips }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .warp_devices }}{{ $sep }}"warp_devices": {{ if eq (kindOf .warp_devices) "string" }}{{ .warp_devices }}{{ else }}{{ toJson .warp_devices }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1mnm~1config/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .default_sampling }}{{ $sep }}"default_sampling": {{ toJson .default_sampling }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .router_ips }}{{ $sep }}"router_ips": {{ if eq (kindOf .router_ips) "string" }}{{ .router_ips }}{{ else }}{{ toJson .router_ips }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .warp_devices }}{{ $sep }}"warp_devices": {{ if eq (kindOf .warp_devices) "string" }}{{ .warp_devices }}{{ else }}{{ toJson .warp_devices }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1mnm~1config/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .default_sampling }}{{ $sep }}"default_sampling": {{ toJson .default_sampling }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .router_ips }}{{ $sep }}"router_ips": {{ if eq (kindOf .router_ips) "string" }}{{ .router_ips }}{{ else }}{{ toJson .router_ips }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .warp_devices }}{{ $sep }}"warp_devices": {{ if eq (kindOf .warp_devices) "string" }}{{ .warp_devices }}{{ else }}{{ toJson .warp_devices }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/configs/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/configs/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/configs/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/configs/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/configs/methods/update' + fulls: + id: cloudflare.magic_network_monitoring.fulls + name: fulls + title: Fulls + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1mnm~1config~1full/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/fulls/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + rules: + id: cloudflare.magic_network_monitoring.rules + name: rules + title: Rules + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1mnm~1rules/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1mnm~1rules/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .automatic_advertisement }}{{ $sep }}"automatic_advertisement": {{ toJson .automatic_advertisement }}{{- $sep = "," -}}{{ end }} + + {{- if .bandwidth_threshold }}{{ $sep }}"bandwidth_threshold": {{ toJson .bandwidth_threshold }}{{- $sep = "," -}}{{ end }} + + {{- if .duration }}{{ $sep }}"duration": {{ toJson .duration }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .packet_threshold }}{{ $sep }}"packet_threshold": {{ toJson .packet_threshold }}{{- $sep = "," -}}{{ end }} + + {{- if .prefix_match }}{{ $sep }}"prefix_match": {{ toJson .prefix_match }}{{- $sep = "," -}}{{ end }} + + {{- if .prefixes }}{{ $sep }}"prefixes": {{ if eq (kindOf .prefixes) "string" }}{{ .prefixes }}{{ else }}{{ toJson .prefixes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + {{- if .zscore_sensitivity }}{{ $sep }}"zscore_sensitivity": {{ toJson .zscore_sensitivity }}{{- $sep = "," -}}{{ end }} + + {{- if .zscore_target }}{{ $sep }}"zscore_target": {{ toJson .zscore_target }}{{- $sep = "," -}}{{ end }} + + } + + ' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1mnm~1rules/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .automatic_advertisement }}{{ $sep }}"automatic_advertisement": {{ toJson .automatic_advertisement }}{{- $sep = "," -}}{{ end }} + + {{- if .bandwidth_threshold }}{{ $sep }}"bandwidth_threshold": {{ toJson .bandwidth_threshold }}{{- $sep = "," -}}{{ end }} + + {{- if .duration }}{{ $sep }}"duration": {{ toJson .duration }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .packet_threshold }}{{ $sep }}"packet_threshold": {{ toJson .packet_threshold }}{{- $sep = "," -}}{{ end }} + + {{- if .prefix_match }}{{ $sep }}"prefix_match": {{ toJson .prefix_match }}{{- $sep = "," -}}{{ end }} + + {{- if .prefixes }}{{ $sep }}"prefixes": {{ if eq (kindOf .prefixes) "string" }}{{ .prefixes }}{{ else }}{{ toJson .prefixes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + {{- if .zscore_sensitivity }}{{ $sep }}"zscore_sensitivity": {{ toJson .zscore_sensitivity }}{{- $sep = "," -}}{{ end }} + + {{- if .zscore_target }}{{ $sep }}"zscore_target": {{ toJson .zscore_target }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1mnm~1rules~1{rule_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1mnm~1rules~1{rule_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1mnm~1rules~1{rule_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .automatic_advertisement }}{{ $sep }}"automatic_advertisement": {{ toJson .automatic_advertisement }}{{- $sep = "," -}}{{ end }} + + {{- if .bandwidth_threshold }}{{ $sep }}"bandwidth_threshold": {{ toJson .bandwidth_threshold }}{{- $sep = "," -}}{{ end }} + + {{- if .duration }}{{ $sep }}"duration": {{ toJson .duration }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .packet_threshold }}{{ $sep }}"packet_threshold": {{ toJson .packet_threshold }}{{- $sep = "," -}}{{ end }} + + {{- if .prefix_match }}{{ $sep }}"prefix_match": {{ toJson .prefix_match }}{{- $sep = "," -}}{{ end }} + + {{- if .prefixes }}{{ $sep }}"prefixes": {{ if eq (kindOf .prefixes) "string" }}{{ .prefixes }}{{ else }}{{ toJson .prefixes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + {{- if .zscore_sensitivity }}{{ $sep }}"zscore_sensitivity": {{ toJson .zscore_sensitivity }}{{- $sep = "," -}}{{ end }} + + {{- if .zscore_target }}{{ $sep }}"zscore_target": {{ toJson .zscore_target }}{{- $sep = "," -}}{{ end }} + + } + + ' + update_advertisement: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1mnm~1rules~1{rule_id}~1advertisement/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/rules/methods/get' + - $ref: '#/components/x-stackQL-resources/rules/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/rules/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/rules/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/rules/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/rules/methods/update' + mnm: + id: cloudflare.magic_network_monitoring.mnm + name: mnm + title: Mnm + methods: + create_token: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1mnm~1vpc-flows~1token/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/magic_transit.yaml b/providers/src/cloudflare/v00.00.00000/services/magic_transit.yaml index dc3b08e0..c4d9f640 100644 --- a/providers/src/cloudflare/v00.00.00000/services/magic_transit.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/magic_transit.yaml @@ -10586,6 +10586,27 @@ components: response: mediaType: application/json openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .hostnames }}{{ $sep }}"hostnames": {{ if eq (kindOf .hostnames) "string" }}{{ .hostnames }}{{ else }}{{ toJson .hostnames }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ip_subnets }}{{ $sep }}"ip_subnets": {{ if eq (kindOf .ip_subnets) "string" }}{{ .ip_subnets }}{{ else }}{{ toJson .ip_subnets }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .source_subnets }}{{ $sep }}"source_subnets": {{ if eq (kindOf .source_subnets) "string" }}{{ .source_subnets }}{{ else }}{{ toJson .source_subnets }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1magic~1apps~1{account_app_id}/delete' @@ -10601,6 +10622,27 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .hostnames }}{{ $sep }}"hostnames": {{ if eq (kindOf .hostnames) "string" }}{{ .hostnames }}{{ else }}{{ toJson .hostnames }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ip_subnets }}{{ $sep }}"ip_subnets": {{ if eq (kindOf .ip_subnets) "string" }}{{ .ip_subnets }}{{ else }}{{ toJson .ip_subnets }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .source_subnets }}{{ $sep }}"source_subnets": {{ if eq (kindOf .source_subnets) "string" }}{{ .source_subnets }}{{ else }}{{ toJson .source_subnets }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' update: config: requestBodyTranslate: @@ -10610,6 +10652,27 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .hostnames }}{{ $sep }}"hostnames": {{ if eq (kindOf .hostnames) "string" }}{{ .hostnames }}{{ else }}{{ toJson .hostnames }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ip_subnets }}{{ $sep }}"ip_subnets": {{ if eq (kindOf .ip_subnets) "string" }}{{ .ip_subnets }}{{ else }}{{ toJson .ip_subnets }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .source_subnets }}{{ $sep }}"source_subnets": {{ if eq (kindOf .source_subnets) "string" }}{{ .source_subnets }}{{ else }}{{ toJson .source_subnets }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/apps/methods/list' @@ -10658,6 +10721,33 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .automatic_return_routing }}{{ $sep }}"automatic_return_routing": {{ toJson .automatic_return_routing }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .gre }}{{ $sep }}"gre": {{ if eq (kindOf .gre) "string" }}{{ .gre }}{{ else }}{{ toJson .gre }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .health_check }}{{ $sep }}"health_check": {{ if eq (kindOf .health_check) "string" }}{{ .health_check }}{{ else }}{{ toJson .health_check }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interface_address }}{{ $sep }}"interface_address": {{ toJson .interface_address }}{{- $sep = "," -}}{{ end }} + + {{- if .interface_address6 }}{{ $sep }}"interface_address6": {{ toJson .interface_address6 }}{{- $sep = "," -}}{{ end }} + + {{- if .mtu }}{{ $sep }}"mtu": {{ toJson .mtu }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/cf_interconnects/methods/get' @@ -10689,6 +10779,33 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .device }}{{ $sep }}"device": {{ if eq (kindOf .device) "string" }}{{ .device }}{{ else }}{{ toJson .device }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .activated }}{{ $sep }}"activated": {{ toJson .activated }}{{- $sep = "," -}}{{ end }} + + {{- if .interrupt_window_days_of_week }}{{ $sep }}"interrupt_window_days_of_week": {{ if eq (kindOf .interrupt_window_days_of_week) "string" }}{{ .interrupt_window_days_of_week }}{{ else }}{{ toJson .interrupt_window_days_of_week }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interrupt_window_duration_hours }}{{ $sep }}"interrupt_window_duration_hours": {{ toJson .interrupt_window_duration_hours }}{{- $sep = "," -}}{{ end }} + + {{- if .interrupt_window_embargo_dates }}{{ $sep }}"interrupt_window_embargo_dates": {{ if eq (kindOf .interrupt_window_embargo_dates) "string" }}{{ .interrupt_window_embargo_dates }}{{ else }}{{ toJson .interrupt_window_embargo_dates }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interrupt_window_hour_of_day }}{{ $sep }}"interrupt_window_hour_of_day": {{ toJson .interrupt_window_hour_of_day }}{{- $sep = "," -}}{{ end }} + + {{- if .notes }}{{ $sep }}"notes": {{ toJson .notes }}{{- $sep = "," -}}{{ end }} + + {{- if .timezone }}{{ $sep }}"timezone": {{ toJson .timezone }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1magic~1connectors~1{connector_id}/delete' @@ -10711,6 +10828,33 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .activated }}{{ $sep }}"activated": {{ toJson .activated }}{{- $sep = "," -}}{{ end }} + + {{- if .interrupt_window_days_of_week }}{{ $sep }}"interrupt_window_days_of_week": {{ if eq (kindOf .interrupt_window_days_of_week) "string" }}{{ .interrupt_window_days_of_week }}{{ else }}{{ toJson .interrupt_window_days_of_week }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interrupt_window_duration_hours }}{{ $sep }}"interrupt_window_duration_hours": {{ toJson .interrupt_window_duration_hours }}{{- $sep = "," -}}{{ end }} + + {{- if .interrupt_window_embargo_dates }}{{ $sep }}"interrupt_window_embargo_dates": {{ if eq (kindOf .interrupt_window_embargo_dates) "string" }}{{ .interrupt_window_embargo_dates }}{{ else }}{{ toJson .interrupt_window_embargo_dates }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interrupt_window_hour_of_day }}{{ $sep }}"interrupt_window_hour_of_day": {{ toJson .interrupt_window_hour_of_day }}{{- $sep = "," -}}{{ end }} + + {{- if .notes }}{{ $sep }}"notes": {{ toJson .notes }}{{- $sep = "," -}}{{ end }} + + {{- if .timezone }}{{ $sep }}"timezone": {{ toJson .timezone }}{{- $sep = "," -}}{{ end }} + + {{- if .provision_license }}{{ $sep }}"provision_license": {{ toJson .provision_license }}{{- $sep = "," -}}{{ end }} + + } + + ' update: config: requestBodyTranslate: @@ -10720,6 +10864,33 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .activated }}{{ $sep }}"activated": {{ toJson .activated }}{{- $sep = "," -}}{{ end }} + + {{- if .interrupt_window_days_of_week }}{{ $sep }}"interrupt_window_days_of_week": {{ if eq (kindOf .interrupt_window_days_of_week) "string" }}{{ .interrupt_window_days_of_week }}{{ else }}{{ toJson .interrupt_window_days_of_week }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interrupt_window_duration_hours }}{{ $sep }}"interrupt_window_duration_hours": {{ toJson .interrupt_window_duration_hours }}{{- $sep = "," -}}{{ end }} + + {{- if .interrupt_window_embargo_dates }}{{ $sep }}"interrupt_window_embargo_dates": {{ if eq (kindOf .interrupt_window_embargo_dates) "string" }}{{ .interrupt_window_embargo_dates }}{{ else }}{{ toJson .interrupt_window_embargo_dates }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interrupt_window_hour_of_day }}{{ $sep }}"interrupt_window_hour_of_day": {{ toJson .interrupt_window_hour_of_day }}{{- $sep = "," -}}{{ end }} + + {{- if .notes }}{{ $sep }}"notes": {{ toJson .notes }}{{- $sep = "," -}}{{ end }} + + {{- if .timezone }}{{ $sep }}"timezone": {{ toJson .timezone }}{{- $sep = "," -}}{{ end }} + + {{- if .provision_license }}{{ $sep }}"provision_license": {{ toJson .provision_license }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/connectors/methods/get' @@ -10845,6 +11016,39 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .automatic_return_routing }}{{ $sep }}"automatic_return_routing": {{ toJson .automatic_return_routing }}{{- $sep = "," -}}{{ end }} + + {{- if .bgp }}{{ $sep }}"bgp": {{ if eq (kindOf .bgp) "string" }}{{ .bgp }}{{ else }}{{ toJson .bgp }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .cloudflare_gre_endpoint }}{{ $sep }}"cloudflare_gre_endpoint": {{ toJson .cloudflare_gre_endpoint }}{{- $sep = "," -}}{{ end }} + + {{- if .customer_gre_endpoint }}{{ $sep }}"customer_gre_endpoint": {{ toJson .customer_gre_endpoint }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .health_check }}{{ $sep }}"health_check": {{ if eq (kindOf .health_check) "string" }}{{ .health_check }}{{ else }}{{ toJson .health_check }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interface_address }}{{ $sep }}"interface_address": {{ toJson .interface_address }}{{- $sep = "," -}}{{ end }} + + {{- if .interface_address6 }}{{ $sep }}"interface_address6": {{ toJson .interface_address6 }}{{- $sep = "," -}}{{ end }} + + {{- if .mtu }}{{ $sep }}"mtu": {{ toJson .mtu }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .ttl }}{{ $sep }}"ttl": {{ toJson .ttl }}{{- $sep = "," -}}{{ end }} + + } + + ' bulk_update: config: requestBodyTranslate: @@ -10940,6 +11144,41 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .automatic_return_routing }}{{ $sep }}"automatic_return_routing": {{ toJson .automatic_return_routing }}{{- $sep = "," -}}{{ end }} + + {{- if .bgp }}{{ $sep }}"bgp": {{ if eq (kindOf .bgp) "string" }}{{ .bgp }}{{ else }}{{ toJson .bgp }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .cloudflare_endpoint }}{{ $sep }}"cloudflare_endpoint": {{ toJson .cloudflare_endpoint }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_remote_identities }}{{ $sep }}"custom_remote_identities": {{ if eq (kindOf .custom_remote_identities) "string" }}{{ .custom_remote_identities }}{{ else }}{{ toJson .custom_remote_identities }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .customer_endpoint }}{{ $sep }}"customer_endpoint": {{ toJson .customer_endpoint }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .health_check }}{{ $sep }}"health_check": {{ if eq (kindOf .health_check) "string" }}{{ .health_check }}{{ else }}{{ toJson .health_check }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interface_address }}{{ $sep }}"interface_address": {{ toJson .interface_address }}{{- $sep = "," -}}{{ end }} + + {{- if .interface_address6 }}{{ $sep }}"interface_address6": {{ toJson .interface_address6 }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .psk }}{{ $sep }}"psk": {{ toJson .psk }}{{- $sep = "," -}}{{ end }} + + {{- if .replay_protection }}{{ $sep }}"replay_protection": {{ toJson .replay_protection }}{{- $sep = "," -}}{{ end }} + + } + + ' psk_generate: config: requestBodyTranslate: @@ -10989,6 +11228,29 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .nexthop }}{{ $sep }}"nexthop": {{ toJson .nexthop }}{{- $sep = "," -}}{{ end }} + + {{- if .prefix }}{{ $sep }}"prefix": {{ toJson .prefix }}{{- $sep = "," -}}{{ end }} + + {{- if .priority }}{{ $sep }}"priority": {{ toJson .priority }}{{- $sep = "," -}}{{ end }} + + {{- if .scope }}{{ $sep }}"scope": {{ if eq (kindOf .scope) "string" }}{{ .scope }}{{ else }}{{ toJson .scope }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .weight }}{{ $sep }}"weight": {{ toJson .weight }}{{- $sep = "," -}}{{ end }} + + } + + ' bulk_update: config: requestBodyTranslate: @@ -10998,6 +11260,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .routes }}{{ $sep }}"routes": {{ if eq (kindOf .routes) "string" }}{{ .routes }}{{ else }}{{ toJson .routes }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1magic~1routes~1{route_id}/delete' @@ -11054,6 +11329,29 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .connector_id }}{{ $sep }}"connector_id": {{ toJson .connector_id }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .ha_mode }}{{ $sep }}"ha_mode": {{ toJson .ha_mode }}{{- $sep = "," -}}{{ end }} + + {{- if .location }}{{ $sep }}"location": {{ if eq (kindOf .location) "string" }}{{ .location }}{{ else }}{{ toJson .location }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .secondary_connector_id }}{{ $sep }}"secondary_connector_id": {{ toJson .secondary_connector_id }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1magic~1sites~1{site_id}/delete' @@ -11076,6 +11374,27 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .connector_id }}{{ $sep }}"connector_id": {{ toJson .connector_id }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .location }}{{ $sep }}"location": {{ if eq (kindOf .location) "string" }}{{ .location }}{{ else }}{{ toJson .location }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .secondary_connector_id }}{{ $sep }}"secondary_connector_id": {{ toJson .secondary_connector_id }}{{- $sep = "," -}}{{ end }} + + } + + ' update: config: requestBodyTranslate: @@ -11085,6 +11404,27 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .connector_id }}{{ $sep }}"connector_id": {{ toJson .connector_id }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .location }}{{ $sep }}"location": {{ if eq (kindOf .location) "string" }}{{ .location }}{{ else }}{{ toJson .location }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .secondary_connector_id }}{{ $sep }}"secondary_connector_id": {{ toJson .secondary_connector_id }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/sites/methods/get' @@ -11118,6 +11458,31 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .forward_locally }}{{ $sep }}"forward_locally": {{ toJson .forward_locally }}{{- $sep = "," -}}{{ end }} + + {{- if .lan_1 }}{{ $sep }}"lan_1": {{ if eq (kindOf .lan_1) "string" }}{{ .lan_1 }}{{ else }}{{ toJson .lan_1 }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .lan_2 }}{{ $sep }}"lan_2": {{ if eq (kindOf .lan_2) "string" }}{{ .lan_2 }}{{ else }}{{ toJson .lan_2 }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .protocols }}{{ $sep }}"protocols": {{ if eq (kindOf .protocols) "string" }}{{ .protocols }}{{ else }}{{ toJson .protocols }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .unidirectional }}{{ $sep }}"unidirectional": {{ toJson .unidirectional }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1magic~1sites~1{site_id}~1acls~1{acl_id}/delete' @@ -11140,6 +11505,31 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .forward_locally }}{{ $sep }}"forward_locally": {{ toJson .forward_locally }}{{- $sep = "," -}}{{ end }} + + {{- if .lan_1 }}{{ $sep }}"lan_1": {{ if eq (kindOf .lan_1) "string" }}{{ .lan_1 }}{{ else }}{{ toJson .lan_1 }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .lan_2 }}{{ $sep }}"lan_2": {{ if eq (kindOf .lan_2) "string" }}{{ .lan_2 }}{{ else }}{{ toJson .lan_2 }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .protocols }}{{ $sep }}"protocols": {{ if eq (kindOf .protocols) "string" }}{{ .protocols }}{{ else }}{{ toJson .protocols }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .unidirectional }}{{ $sep }}"unidirectional": {{ toJson .unidirectional }}{{- $sep = "," -}}{{ end }} + + } + + ' update: config: requestBodyTranslate: @@ -11149,6 +11539,31 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .forward_locally }}{{ $sep }}"forward_locally": {{ toJson .forward_locally }}{{- $sep = "," -}}{{ end }} + + {{- if .lan_1 }}{{ $sep }}"lan_1": {{ if eq (kindOf .lan_1) "string" }}{{ .lan_1 }}{{ else }}{{ toJson .lan_1 }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .lan_2 }}{{ $sep }}"lan_2": {{ if eq (kindOf .lan_2) "string" }}{{ .lan_2 }}{{ else }}{{ toJson .lan_2 }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .protocols }}{{ $sep }}"protocols": {{ if eq (kindOf .protocols) "string" }}{{ .protocols }}{{ else }}{{ toJson .protocols }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .unidirectional }}{{ $sep }}"unidirectional": {{ toJson .unidirectional }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/acls/methods/get' @@ -11182,6 +11597,27 @@ components: response: mediaType: application/json openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .breakout }}{{ $sep }}"breakout": {{ toJson .breakout }}{{- $sep = "," -}}{{ end }} + + {{- if .preferred_wans }}{{ $sep }}"preferred_wans": {{ if eq (kindOf .preferred_wans) "string" }}{{ .preferred_wans }}{{ else }}{{ toJson .preferred_wans }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .priority }}{{ $sep }}"priority": {{ toJson .priority }}{{- $sep = "," -}}{{ end }} + + {{- if .account_app_id }}{{ $sep }}"account_app_id": {{ toJson .account_app_id }}{{- $sep = "," -}}{{ end }} + + {{- if .managed_app_id }}{{ $sep }}"managed_app_id": {{ toJson .managed_app_id }}{{- $sep = "," -}}{{ end }} + + } + + ' magic_site_app_configs_delete_app_config: operation: $ref: '#/paths/~1accounts~1{account_id}~1magic~1sites~1{site_id}~1app_configs~1{app_config_id}/delete' @@ -11197,6 +11633,27 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .account_app_id }}{{ $sep }}"account_app_id": {{ toJson .account_app_id }}{{- $sep = "," -}}{{ end }} + + {{- if .breakout }}{{ $sep }}"breakout": {{ toJson .breakout }}{{- $sep = "," -}}{{ end }} + + {{- if .managed_app_id }}{{ $sep }}"managed_app_id": {{ toJson .managed_app_id }}{{- $sep = "," -}}{{ end }} + + {{- if .preferred_wans }}{{ $sep }}"preferred_wans": {{ if eq (kindOf .preferred_wans) "string" }}{{ .preferred_wans }}{{ else }}{{ toJson .preferred_wans }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .priority }}{{ $sep }}"priority": {{ toJson .priority }}{{- $sep = "," -}}{{ end }} + + } + + ' magic_site_app_configs_update_app_config: config: requestBodyTranslate: @@ -11206,6 +11663,27 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .account_app_id }}{{ $sep }}"account_app_id": {{ toJson .account_app_id }}{{- $sep = "," -}}{{ end }} + + {{- if .breakout }}{{ $sep }}"breakout": {{ toJson .breakout }}{{- $sep = "," -}}{{ end }} + + {{- if .managed_app_id }}{{ $sep }}"managed_app_id": {{ toJson .managed_app_id }}{{- $sep = "," -}}{{ end }} + + {{- if .preferred_wans }}{{ $sep }}"preferred_wans": {{ if eq (kindOf .preferred_wans) "string" }}{{ .preferred_wans }}{{ else }}{{ toJson .preferred_wans }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .priority }}{{ $sep }}"priority": {{ toJson .priority }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/app_configs/methods/list' @@ -11238,6 +11716,37 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .bond_id }}{{ $sep }}"bond_id": {{ toJson .bond_id }}{{- $sep = "," -}}{{ end }} + + {{- if .ha_link }}{{ $sep }}"ha_link": {{ toJson .ha_link }}{{- $sep = "," -}}{{ end }} + + {{- if .is_breakout }}{{ $sep }}"is_breakout": {{ toJson .is_breakout }}{{- $sep = "," -}}{{ end }} + + {{- if .is_prioritized }}{{ $sep }}"is_prioritized": {{ toJson .is_prioritized }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .nat }}{{ $sep }}"nat": {{ if eq (kindOf .nat) "string" }}{{ .nat }}{{ else }}{{ toJson .nat }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .physport }}{{ $sep }}"physport": {{ toJson .physport }}{{- $sep = "," -}}{{ end }} + + {{- if .routed_subnets }}{{ $sep }}"routed_subnets": {{ if eq (kindOf .routed_subnets) "string" }}{{ .routed_subnets }}{{ else }}{{ toJson .routed_subnets }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .static_addressing }}{{ $sep }}"static_addressing": {{ if eq (kindOf .static_addressing) "string" }}{{ .static_addressing }}{{ else }}{{ toJson .static_addressing }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .vlan_tag }}{{ $sep }}"vlan_tag": {{ toJson .vlan_tag }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1magic~1sites~1{site_id}~1lans~1{lan_id}/delete' @@ -11260,6 +11769,35 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .bond_id }}{{ $sep }}"bond_id": {{ toJson .bond_id }}{{- $sep = "," -}}{{ end }} + + {{- if .is_breakout }}{{ $sep }}"is_breakout": {{ toJson .is_breakout }}{{- $sep = "," -}}{{ end }} + + {{- if .is_prioritized }}{{ $sep }}"is_prioritized": {{ toJson .is_prioritized }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .nat }}{{ $sep }}"nat": {{ if eq (kindOf .nat) "string" }}{{ .nat }}{{ else }}{{ toJson .nat }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .physport }}{{ $sep }}"physport": {{ toJson .physport }}{{- $sep = "," -}}{{ end }} + + {{- if .routed_subnets }}{{ $sep }}"routed_subnets": {{ if eq (kindOf .routed_subnets) "string" }}{{ .routed_subnets }}{{ else }}{{ toJson .routed_subnets }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .static_addressing }}{{ $sep }}"static_addressing": {{ if eq (kindOf .static_addressing) "string" }}{{ .static_addressing }}{{ else }}{{ toJson .static_addressing }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .vlan_tag }}{{ $sep }}"vlan_tag": {{ toJson .vlan_tag }}{{- $sep = "," -}}{{ end }} + + } + + ' update: config: requestBodyTranslate: @@ -11269,6 +11807,35 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .bond_id }}{{ $sep }}"bond_id": {{ toJson .bond_id }}{{- $sep = "," -}}{{ end }} + + {{- if .is_breakout }}{{ $sep }}"is_breakout": {{ toJson .is_breakout }}{{- $sep = "," -}}{{ end }} + + {{- if .is_prioritized }}{{ $sep }}"is_prioritized": {{ toJson .is_prioritized }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .nat }}{{ $sep }}"nat": {{ if eq (kindOf .nat) "string" }}{{ .nat }}{{ else }}{{ toJson .nat }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .physport }}{{ $sep }}"physport": {{ toJson .physport }}{{- $sep = "," -}}{{ end }} + + {{- if .routed_subnets }}{{ $sep }}"routed_subnets": {{ if eq (kindOf .routed_subnets) "string" }}{{ .routed_subnets }}{{ else }}{{ toJson .routed_subnets }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .static_addressing }}{{ $sep }}"static_addressing": {{ if eq (kindOf .static_addressing) "string" }}{{ .static_addressing }}{{ else }}{{ toJson .static_addressing }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .vlan_tag }}{{ $sep }}"vlan_tag": {{ toJson .vlan_tag }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/lans/methods/get' @@ -11358,6 +11925,27 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .physport }}{{ $sep }}"physport": {{ toJson .physport }}{{- $sep = "," -}}{{ end }} + + {{- if .priority }}{{ $sep }}"priority": {{ toJson .priority }}{{- $sep = "," -}}{{ end }} + + {{- if .static_addressing }}{{ $sep }}"static_addressing": {{ if eq (kindOf .static_addressing) "string" }}{{ .static_addressing }}{{ else }}{{ toJson .static_addressing }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .vlan_tag }}{{ $sep }}"vlan_tag": {{ toJson .vlan_tag }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1magic~1sites~1{site_id}~1wans~1{wan_id}/delete' @@ -11380,6 +11968,27 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .physport }}{{ $sep }}"physport": {{ toJson .physport }}{{- $sep = "," -}}{{ end }} + + {{- if .priority }}{{ $sep }}"priority": {{ toJson .priority }}{{- $sep = "," -}}{{ end }} + + {{- if .static_addressing }}{{ $sep }}"static_addressing": {{ if eq (kindOf .static_addressing) "string" }}{{ .static_addressing }}{{ else }}{{ toJson .static_addressing }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .vlan_tag }}{{ $sep }}"vlan_tag": {{ toJson .vlan_tag }}{{- $sep = "," -}}{{ end }} + + } + + ' update: config: requestBodyTranslate: @@ -11389,6 +11998,27 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .physport }}{{ $sep }}"physport": {{ toJson .physport }}{{- $sep = "," -}}{{ end }} + + {{- if .priority }}{{ $sep }}"priority": {{ toJson .priority }}{{- $sep = "," -}}{{ end }} + + {{- if .static_addressing }}{{ $sep }}"static_addressing": {{ if eq (kindOf .static_addressing) "string" }}{{ .static_addressing }}{{ else }}{{ toJson .static_addressing }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .vlan_tag }}{{ $sep }}"vlan_tag": {{ toJson .vlan_tag }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/wans/methods/get' @@ -11422,6 +12052,35 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .filter_v1 }}{{ $sep }}"filter_v1": {{ if eq (kindOf .filter_v1) "string" }}{{ .filter_v1 }}{{ else }}{{ toJson .filter_v1 }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .offset_time }}{{ $sep }}"offset_time": {{ toJson .offset_time }}{{- $sep = "," -}}{{ end }} + + {{- if .packet_limit }}{{ $sep }}"packet_limit": {{ toJson .packet_limit }}{{- $sep = "," -}}{{ end }} + + {{- if .system }}{{ $sep }}"system": {{ toJson .system }}{{- $sep = "," -}}{{ end }} + + {{- if .time_limit }}{{ $sep }}"time_limit": {{ toJson .time_limit }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + {{- if .byte_limit }}{{ $sep }}"byte_limit": {{ toJson .byte_limit }}{{- $sep = "," -}}{{ end }} + + {{- if .colo_name }}{{ $sep }}"colo_name": {{ toJson .colo_name }}{{- $sep = "," -}}{{ end }} + + {{- if .destination_conf }}{{ $sep }}"destination_conf": {{ toJson .destination_conf }}{{- $sep = "," -}}{{ end }} + + } + + ' create_ownership: config: requestBodyTranslate: diff --git a/providers/src/cloudflare/v00.00.00000/services/managed_transforms.yaml b/providers/src/cloudflare/v00.00.00000/services/managed_transforms.yaml index 65507f04..60cf82a3 100644 --- a/providers/src/cloudflare/v00.00.00000/services/managed_transforms.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/managed_transforms.yaml @@ -1,598 +1,654 @@ -openapi: 3.0.3 -info: - title: managed_transforms API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /zones/{zone_id}/managed_headers: - delete: - description: Disables all Managed Transforms. - operationId: deleteManagedTransforms - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '204': - description: An empty response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Managed Transforms - tags: - - Managed Transforms - x-api-token-group: - - Response Compression Write - - Config Settings Write - - Dynamic URL Redirects Write - - Cache Settings Write - - Custom Errors Write - - Origin Write - - Managed headers Write - - Zone Transform Rules Write - - Mass URL Redirects Write - - Magic Firewall Write - - L4 DDoS Managed Ruleset Write - - HTTP DDoS Managed Ruleset Write - - Sanitize Write - - Transform Rules Write - - Select Configuration Write - - Bot Management Write - - Zone WAF Write - - Account WAF Write - - Account Rulesets Write - - Logs Write - - Logs Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: managed_transforms - resource_chain: [] - method: delete - get: - description: Fetches a list of all Managed Transforms. - operationId: listManagedTransforms - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - $ref: '#/components/schemas/rulesetsManagedTransforms' - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A Managed Transforms response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Managed Transforms - tags: - - Managed Transforms - x-api-token-group: - - Response Compression Write - - Response Compression Read - - Config Settings Write - - Config Settings Read - - Dynamic URL Redirects Write - - Dynamic URL Redirects Read - - Cache Settings Write - - Cache Settings Read - - Custom Errors Write - - Custom Errors Read - - Origin Write - - Origin Read - - Managed headers Write - - Managed headers Read - - Zone Transform Rules Write - - Zone Transform Rules Read - - Mass URL Redirects Write - - Mass URL Redirects Read - - Magic Firewall Write - - Magic Firewall Read - - L4 DDoS Managed Ruleset Write - - L4 DDoS Managed Ruleset Read - - HTTP DDoS Managed Ruleset Write - - HTTP DDoS Managed Ruleset Read - - Sanitize Write - - Sanitize Read - - Transform Rules Write - - Transform Rules Read - - Select Configuration Write - - Select Configuration Read - - Bot Management Write - - Bot Management Read - - Zone WAF Write - - Zone WAF Read - - Account WAF Write - - Account WAF Read - - Account Rulesets Read - - Account Rulesets Write - - Logs Write - - Logs Read - - Logs Write - - Logs Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: managed_transforms - resource_chain: [] - method: list - patch: - description: Updates the status of one or more Managed Transforms. - operationId: updateManagedTransforms - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/rulesetsManagedTransforms' - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - $ref: '#/components/schemas/rulesetsManagedTransforms' - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A Managed Transforms response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Managed Transforms - tags: - - Managed Transforms - x-api-token-group: - - Response Compression Write - - Config Settings Write - - Dynamic URL Redirects Write - - Cache Settings Write - - Custom Errors Write - - Origin Write - - Managed headers Write - - Zone Transform Rules Write - - Mass URL Redirects Write - - Magic Firewall Write - - L4 DDoS Managed Ruleset Write - - HTTP DDoS Managed Ruleset Write - - Sanitize Write - - Transform Rules Write - - Select Configuration Write - - Bot Management Write - - Zone WAF Write - - Account WAF Write - - Account Rulesets Write - - Logs Write - - Logs Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: managed_transforms - resource_chain: [] - method: edit -components: - schemas: - rulesetsErrors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - rulesetsManagedTransformId: - description: The human-readable identifier of the Managed Transform. - minLength: 1 - title: Transform ID - type: string - rulesetsManagedTransforms: - description: A Managed Transforms object. - properties: - managed_request_headers: - description: The list of Managed Request Transforms. - items: - description: A Managed Transform object. - properties: - conflicts_with: - description: >- - The Managed Transforms that this Managed Transform conflicts - with. - items: - type: string - title: Transform ID - description: The human-readable identifier of the Managed Transform. - example: add_true_client_ip_headers - minItems: 1 - readOnly: true - title: Conflicts With - type: array - uniqueItems: true - x-stainless-skip: - - terraform - enabled: - description: Whether the Managed Transform is enabled. - example: true - title: Enabled - type: boolean - has_conflict: - description: >- - Whether the Managed Transform conflicts with the - currently-enabled Managed Transforms. - example: false - readOnly: true - title: Has Conflict - type: boolean - x-stainless-skip: - - terraform - id: - $ref: '#/components/schemas/rulesetsManagedTransformId' - example: add_bot_protection_headers - required: - - id - - enabled - - has_conflict - title: Managed Transform - type: object - title: Managed Request Transforms - type: array - uniqueItems: true - managed_response_headers: - description: The list of Managed Response Transforms. - items: - description: A Managed Transform object. - properties: - conflicts_with: - description: >- - The Managed Transforms that this Managed Transform conflicts - with. - items: - type: string - title: Transform ID - description: The human-readable identifier of the Managed Transform. - example: add_true_client_ip_headers - minItems: 1 - readOnly: true - title: Conflicts With - type: array - uniqueItems: true - x-stainless-skip: - - terraform - enabled: - description: Whether the Managed Transform is enabled. - example: true - title: Enabled - type: boolean - has_conflict: - description: >- - Whether the Managed Transform conflicts with the - currently-enabled Managed Transforms. - example: false - readOnly: true - title: Has Conflict - type: boolean - x-stainless-skip: - - terraform - id: - $ref: '#/components/schemas/rulesetsManagedTransformId' - example: add_security_headers - required: - - id - - enabled - - has_conflict - title: Managed Transform - type: object - title: Managed Response Transforms - type: array - uniqueItems: true - required: - - managed_request_headers - - managed_response_headers - title: Managed Transforms - type: object - rulesetsMessage: - description: A message. - properties: - code: - description: A unique code for this message. - example: 10000 - title: Code - type: integer - message: - description: A text description of this message. - example: something bad happened - minLength: 1 - title: Description - type: string - source: - description: The source of this message. - properties: - pointer: - description: A JSON pointer to the field that is the source of the message. - example: /rules/0/action - minLength: 1 - title: Pointer - type: string - required: - - pointer - title: Source - type: object - required: - - message - title: Message - type: object - rulesetsMessages: - description: A list of warning messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Messages - type: array - uniqueItems: true - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - managed_headers: - id: cloudflare.managed_transforms.managed_headers - name: managed_headers - title: Managed Headers - methods: - delete: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1managed_headers/delete' - response: - mediaType: application/json - openAPIDocKey: '204' - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1managed_headers/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1managed_headers/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/managed_headers/methods/list' - insert: [] - update: - - $ref: '#/components/x-stackQL-resources/managed_headers/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/managed_headers/methods/delete' - replace: [] +openapi: 3.0.3 +info: + title: managed_transforms API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /zones/{zone_id}/managed_headers: + delete: + description: Disables all Managed Transforms. + operationId: deleteManagedTransforms + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '204': + description: An empty response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Managed Transforms + tags: + - Managed Transforms + x-api-token-group: + - Response Compression Write + - Config Settings Write + - Dynamic URL Redirects Write + - Cache Settings Write + - Custom Errors Write + - Origin Write + - Managed headers Write + - Zone Transform Rules Write + - Mass URL Redirects Write + - Magic Firewall Write + - L4 DDoS Managed Ruleset Write + - HTTP DDoS Managed Ruleset Write + - Sanitize Write + - Transform Rules Write + - Select Configuration Write + - Bot Management Write + - Zone WAF Write + - Account WAF Write + - Account Rulesets Write + - Logs Write + - Logs Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: managed_transforms + resource_chain: [] + method: delete + get: + description: Fetches a list of all Managed Transforms. + operationId: listManagedTransforms + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + $ref: '#/components/schemas/rulesetsManagedTransforms' + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A Managed Transforms response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Managed Transforms + tags: + - Managed Transforms + x-api-token-group: + - Response Compression Write + - Response Compression Read + - Config Settings Write + - Config Settings Read + - Dynamic URL Redirects Write + - Dynamic URL Redirects Read + - Cache Settings Write + - Cache Settings Read + - Custom Errors Write + - Custom Errors Read + - Origin Write + - Origin Read + - Managed headers Write + - Managed headers Read + - Zone Transform Rules Write + - Zone Transform Rules Read + - Mass URL Redirects Write + - Mass URL Redirects Read + - Magic Firewall Write + - Magic Firewall Read + - L4 DDoS Managed Ruleset Write + - L4 DDoS Managed Ruleset Read + - HTTP DDoS Managed Ruleset Write + - HTTP DDoS Managed Ruleset Read + - Sanitize Write + - Sanitize Read + - Transform Rules Write + - Transform Rules Read + - Select Configuration Write + - Select Configuration Read + - Bot Management Write + - Bot Management Read + - Zone WAF Write + - Zone WAF Read + - Account WAF Write + - Account WAF Read + - Account Rulesets Read + - Account Rulesets Write + - Logs Write + - Logs Read + - Logs Write + - Logs Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: managed_transforms + resource_chain: [] + method: list + patch: + description: Updates the status of one or more Managed Transforms. + operationId: updateManagedTransforms + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + description: A Managed Transforms object. + properties: + managed_request_headers: + description: The list of Managed Request Transforms. + items: + description: A Managed Transform object. + properties: + conflicts_with: + description: The Managed Transforms that this Managed Transform conflicts with. + items: + type: string + title: Transform ID + description: The human-readable identifier of the Managed Transform. + minItems: 1 + readOnly: true + title: Conflicts With + type: array + uniqueItems: true + x-stainless-skip: + - terraform + enabled: + description: Whether the Managed Transform is enabled. + title: Enabled + type: boolean + has_conflict: + description: Whether the Managed Transform conflicts with the currently-enabled Managed Transforms. + readOnly: true + title: Has Conflict + type: boolean + x-stainless-skip: + - terraform + id: + $ref: '#/components/schemas/rulesetsManagedTransformId' + required: + - id + - enabled + title: Managed Transform + type: object + title: Managed Request Transforms + type: array + uniqueItems: true + managed_response_headers: + description: The list of Managed Response Transforms. + items: + description: A Managed Transform object. + properties: + conflicts_with: + description: The Managed Transforms that this Managed Transform conflicts with. + items: + type: string + title: Transform ID + description: The human-readable identifier of the Managed Transform. + minItems: 1 + readOnly: true + title: Conflicts With + type: array + uniqueItems: true + x-stainless-skip: + - terraform + enabled: + description: Whether the Managed Transform is enabled. + title: Enabled + type: boolean + has_conflict: + description: Whether the Managed Transform conflicts with the currently-enabled Managed Transforms. + readOnly: true + title: Has Conflict + type: boolean + x-stainless-skip: + - terraform + id: + $ref: '#/components/schemas/rulesetsManagedTransformId' + required: + - id + - enabled + title: Managed Transform + type: object + title: Managed Response Transforms + type: array + uniqueItems: true + required: + - managed_request_headers + - managed_response_headers + title: Managed Transforms + type: object + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + $ref: '#/components/schemas/rulesetsManagedTransforms' + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A Managed Transforms response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Managed Transforms + tags: + - Managed Transforms + x-api-token-group: + - Response Compression Write + - Config Settings Write + - Dynamic URL Redirects Write + - Cache Settings Write + - Custom Errors Write + - Origin Write + - Managed headers Write + - Zone Transform Rules Write + - Mass URL Redirects Write + - Magic Firewall Write + - L4 DDoS Managed Ruleset Write + - HTTP DDoS Managed Ruleset Write + - Sanitize Write + - Transform Rules Write + - Select Configuration Write + - Bot Management Write + - Zone WAF Write + - Account WAF Write + - Account Rulesets Write + - Logs Write + - Logs Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: managed_transforms + resource_chain: [] + method: edit +components: + schemas: + rulesetsErrors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + rulesetsManagedTransformId: + description: The human-readable identifier of the Managed Transform. + minLength: 1 + title: Transform ID + type: string + rulesetsManagedTransforms: + description: A Managed Transforms object. + properties: + managed_request_headers: + description: The list of Managed Request Transforms. + items: + description: A Managed Transform object. + properties: + conflicts_with: + description: The Managed Transforms that this Managed Transform conflicts with. + items: + type: string + title: Transform ID + description: The human-readable identifier of the Managed Transform. + example: add_true_client_ip_headers + minItems: 1 + readOnly: true + title: Conflicts With + type: array + uniqueItems: true + x-stainless-skip: + - terraform + enabled: + description: Whether the Managed Transform is enabled. + example: true + title: Enabled + type: boolean + has_conflict: + description: Whether the Managed Transform conflicts with the currently-enabled Managed Transforms. + example: false + readOnly: true + title: Has Conflict + type: boolean + x-stainless-skip: + - terraform + id: + $ref: '#/components/schemas/rulesetsManagedTransformId' + example: add_bot_protection_headers + required: + - id + - enabled + - has_conflict + title: Managed Transform + type: object + title: Managed Request Transforms + type: array + uniqueItems: true + managed_response_headers: + description: The list of Managed Response Transforms. + items: + description: A Managed Transform object. + properties: + conflicts_with: + description: The Managed Transforms that this Managed Transform conflicts with. + items: + type: string + title: Transform ID + description: The human-readable identifier of the Managed Transform. + example: add_true_client_ip_headers + minItems: 1 + readOnly: true + title: Conflicts With + type: array + uniqueItems: true + x-stainless-skip: + - terraform + enabled: + description: Whether the Managed Transform is enabled. + example: true + title: Enabled + type: boolean + has_conflict: + description: Whether the Managed Transform conflicts with the currently-enabled Managed Transforms. + example: false + readOnly: true + title: Has Conflict + type: boolean + x-stainless-skip: + - terraform + id: + $ref: '#/components/schemas/rulesetsManagedTransformId' + example: add_security_headers + required: + - id + - enabled + - has_conflict + title: Managed Transform + type: object + title: Managed Response Transforms + type: array + uniqueItems: true + required: + - managed_request_headers + - managed_response_headers + title: Managed Transforms + type: object + rulesetsMessage: + description: A message. + properties: + code: + description: A unique code for this message. + example: 10000 + title: Code + type: integer + message: + description: A text description of this message. + example: something bad happened + minLength: 1 + title: Description + type: string + source: + description: The source of this message. + properties: + pointer: + description: A JSON pointer to the field that is the source of the message. + example: /rules/0/action + minLength: 1 + title: Pointer + type: string + required: + - pointer + title: Source + type: object + required: + - message + title: Message + type: object + rulesetsMessages: + description: A list of warning messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Messages + type: array + uniqueItems: true + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + managed_headers: + id: cloudflare.managed_transforms.managed_headers + name: managed_headers + title: Managed Headers + methods: + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1managed_headers/delete' + response: + mediaType: application/json + openAPIDocKey: '204' + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1managed_headers/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1managed_headers/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .managed_request_headers }}{{ $sep }}"managed_request_headers": {{ if eq (kindOf .managed_request_headers) "string" }}{{ .managed_request_headers }}{{ else }}{{ toJson .managed_request_headers }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .managed_response_headers }}{{ $sep }}"managed_response_headers": {{ if eq (kindOf .managed_response_headers) "string" }}{{ .managed_response_headers }}{{ else }}{{ toJson .managed_response_headers }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/managed_headers/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/managed_headers/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/managed_headers/methods/delete' + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/memberships.yaml b/providers/src/cloudflare/v00.00.00000/services/memberships.yaml index 1c91ee61..c6bf9479 100644 --- a/providers/src/cloudflare/v00.00.00000/services/memberships.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/memberships.yaml @@ -1,1245 +1,1178 @@ -openapi: 3.0.3 -info: - title: memberships API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /memberships: - get: - description: List memberships of accounts the user can access. - operationId: user'-s-account-memberships-list-memberships - parameters: - - in: query - name: account.name - schema: - $ref: '#/components/schemas/iamPropertiesName' - - in: query - name: page - schema: - default: 1 - description: Page number of paginated results. - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 20 - description: Number of memberships per page. - maximum: 50 - minimum: 5 - type: number - - in: query - name: order - schema: - description: Field to order memberships by. - enum: - - id - - account.name - - status - type: string - - in: query - name: direction - schema: - description: Direction to order memberships. - enum: - - asc - - desc - type: string - - in: query - name: name - schema: - $ref: '#/components/schemas/iamPropertiesName' - - in: query - name: status - schema: - description: Status of this membership. - enum: - - accepted - - pending - - rejected - type: string - responses: - '200': - content: - application/json: - schema: - type: object - title: memberships_with_roles - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - $ref: '#/components/schemas/iamResultInfo' - result: - items: - $ref: '#/components/schemas/iamMembership' - type: array - required: - - errors - - messages - - success - description: List Memberships response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: List Memberships response failure - security: - - api_email: [] - api_key: [] - summary: List Memberships - tags: - - User's Account Memberships - x-api-token-group: - - Memberships Write - - Memberships Read - x-stackql-sdk: - service: memberships - resource_chain: [] - method: list - /memberships/{membership_id}: - delete: - description: Remove the associated member from an account. - operationId: user'-s-account-memberships-delete-membership - parameters: - - name: membership_id - in: path - required: true - description: The membership ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - properties: - id: - $ref: >- - #/components/schemas/iamMembershipComponentsSchemasIdentifier - type: object - required: - - success - - errors - - messages - description: Delete Membership response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Delete Membership response failure - security: - - api_email: [] - api_key: [] - summary: Delete Membership - tags: - - User's Account Memberships - x-api-token-group: - - Memberships Write - x-stackql-sdk: - service: memberships - resource_chain: [] - method: delete - get: - description: Get a specific membership. - operationId: user'-s-account-memberships-membership-details - parameters: - - name: membership_id - in: path - required: true - description: The membership ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamSingleMembershipResponseWithPolicies' - description: Membership Details response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Membership Details response failure - security: - - api_email: [] - api_key: [] - summary: Membership Details - tags: - - User's Account Memberships - x-api-token-group: - - Memberships Write - - Memberships Read - x-stackql-sdk: - service: memberships - resource_chain: [] - method: get - put: - description: Accept or reject this account invitation. - operationId: user'-s-account-memberships-update-membership - parameters: - - name: membership_id - in: path - required: true - description: The membership ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - status: - description: Whether to accept or reject this account invitation. - enum: - - accepted - - rejected - type: string - required: - - status - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamSingleMembershipResponseWithPolicies' - description: Update Membership response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Update Membership response failure - security: - - api_email: [] - api_key: [] - summary: Update Membership - tags: - - User's Account Memberships - x-api-token-group: - - Memberships Write - x-stackql-sdk: - service: memberships - resource_chain: [] - method: update - /organizations/{organization_id}/members: - get: - description: >- - List memberships for an Organization. (Currently in Closed Beta - see - https://developers.cloudflare.com/fundamentals/organizations/) - operationId: Members_list - parameters: - - name: organization_id - in: path - required: true - description: The organization ID. - schema: - type: string - - description: Filter the list of memberships by membership status. - in: query - name: status - schema: - items: - enum: - - active - - canceled - type: string - type: array - explode: true - - description: Filter the list of memberships for a specific email. - explode: false - in: query - name: user.email - schema: - type: string - - description: >- - Filter the list of memberships for a specific email that contains a - substring. - explode: false - in: query - name: user.email.contains - schema: - type: string - - description: >- - Filter the list of memberships for a specific email that starts with - a substring. - explode: false - in: query - name: user.email.startsWith - schema: - type: string - - description: >- - Filter the list of memberships for a specific email that ends with a - substring. - explode: false - in: query - name: user.email.endsWith - schema: - type: string - - description: >- - An opaque token returned from the last list response that when - provided will retrieve the next page. Parameters used to filter the - retrieved list must remain in subsequent requests with a page token. - explode: false - in: query - name: page_token - schema: - type: string - - description: The amount of items to return. Defaults to 10. - explode: false - in: query - name: page_size - schema: - maximum: 1000 - minimum: 0 - type: integer - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - type: object - maxItems: 0 - type: array - messages: - items: - $ref: '#/components/schemas/organizationsApiV4Message' - type: array - result: - items: - $ref: '#/components/schemas/organizationsApiMember' - type: array - result_info: - $ref: '#/components/schemas/organizationsApiPageTokenResultInfo' - success: - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - - result_info - type: object - description: The request has succeeded. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/organizationsApiV4ErrorResponse' - description: An unexpected error response. - security: - - api_email: [] - api_key: [] - summary: List organization members - tags: - - OrganizationMembers - post: - description: >- - Create a membership that grants access to a specific Organization. - (Currently in Closed Beta - see - https://developers.cloudflare.com/fundamentals/organizations/) - operationId: Members_create - parameters: - - name: organization_id - in: path - required: true - description: The organization ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/organizationsApiCreateMemberRequest' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - type: object - maxItems: 0 - type: array - messages: - items: - $ref: '#/components/schemas/organizationsApiV4Message' - type: array - result: - $ref: '#/components/schemas/organizationsApiMember' - success: - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: The request has succeeded. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/organizationsApiV4ErrorResponse' - description: An unexpected error response. - security: - - api_email: [] - api_key: [] - summary: Create organization member - tags: - - OrganizationMembers - /organizations/{organization_id}/members/{member_id}: - delete: - description: >- - Delete a membership to a particular Organization. (Currently in Closed - Beta - see - https://developers.cloudflare.com/fundamentals/organizations/) - operationId: Members_delete - parameters: - - name: organization_id - in: path - required: true - description: The organization ID. - schema: - type: string - - name: member_id - in: path - required: true - description: The account member ID. - schema: - type: string - responses: - '204': - description: >- - There is no content to send for this request, but the headers may be - useful. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/organizationsApiV4ErrorResponse' - description: An unexpected error response. - security: - - api_email: [] - api_key: [] - summary: Delete organization member - tags: - - OrganizationMembers - get: - description: >- - Retrieve a single membership from an Organization. (Currently in Closed - Beta - see - https://developers.cloudflare.com/fundamentals/organizations/) - operationId: Members_retrieve - parameters: - - name: organization_id - in: path - required: true - description: The organization ID. - schema: - type: string - - name: member_id - in: path - required: true - description: The account member ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - type: object - maxItems: 0 - type: array - messages: - items: - $ref: '#/components/schemas/organizationsApiV4Message' - type: array - result: - $ref: '#/components/schemas/organizationsApiMember' - success: - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: The request has succeeded. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/organizationsApiV4ErrorResponse' - description: An unexpected error response. - security: - - api_email: [] - api_key: [] - summary: Get organization member - tags: - - OrganizationMembers -components: - schemas: - iamAccess: - description: Allow or deny operations against the resources. - enum: - - allow - - deny - example: allow - type: string - x-auditable: true - iamAccount: - properties: - created_on: - description: Timestamp for the creation of the account - example: '2014-03-01T12:21:02.0000Z' - format: date-time - readOnly: true - type: string - x-auditable: true - id: - $ref: '#/components/schemas/iamCommonComponentsSchemasIdentifier' - managed_by: - description: Parent container details - properties: - parent_org_id: - description: ID of the parent Organization, if one exists - example: 4536bcfad5faccb111b47003c79917fa - maxLength: 32 - readOnly: true - type: string - x-auditable: true - parent_org_name: - description: Name of the parent Organization, if one exists - example: Demo Parent Organization - readOnly: true - type: string - x-auditable: true - type: object - name: - description: Account name - example: Demo Account - maxLength: 100 - type: string - x-auditable: true - settings: - description: Account settings - properties: - abuse_contact_email: - description: Sets an abuse contact email to notify for abuse reports. - type: string - x-auditable: true - enforce_twofactor: - default: false - description: >- - Indicates whether membership in this account requires that - Two-Factor Authentication is enabled - type: boolean - x-auditable: true - x-stainless-terraform-configurability: computed_optional - type: object - type: - $ref: '#/components/schemas/iamAccountType' - required: - - id - - name - - type - type: object - iamAccountType: - enum: - - standard - - enterprise - type: string - iamApiAccessEnabled: - description: >- - Enterprise only. Indicates whether or not API access is enabled - specifically for this user on a given account. - example: true - nullable: true - type: boolean - x-auditable: true - iamApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/iamSchemasMessages' - messages: - example: [] - $ref: '#/components/schemas/iamSchemasMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - iamCommonComponentsSchemasIdentifier: - description: Identifier - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - minLength: 32 - type: string - x-auditable: true - iamGrants: - example: - read: true - write: false - properties: - read: - example: true - type: boolean - x-auditable: true - write: - example: true - type: boolean - x-auditable: true - type: object - iamListMemberPolicy: - properties: - access: - $ref: '#/components/schemas/iamAccess' - id: - $ref: '#/components/schemas/iamPolicyIdentifier' - permission_groups: - $ref: '#/components/schemas/iamPermissionGroups' - resource_groups: - $ref: '#/components/schemas/iamResourceGroups' - title: list_member_policy - type: object - iamMembership: - properties: - account: - $ref: '#/components/schemas/iamSchemasAccount' - api_access_enabled: - $ref: '#/components/schemas/iamApiAccessEnabled' - id: - $ref: '#/components/schemas/iamMembershipComponentsSchemasIdentifier' - permissions: - description: All access permissions for the user at the account. - readOnly: true - $ref: '#/components/schemas/iamPermissions' - roles: - $ref: '#/components/schemas/iamRoleNames' - status: - $ref: '#/components/schemas/iamSchemasStatus' - type: object - iamMembershipComponentsSchemasIdentifier: - description: Membership identifier tag. - example: 4536bcfad5faccb111b47003c79917fa - maxLength: 32 - readOnly: true - type: string - x-auditable: true - iamMembershipWithPolicies: - properties: - account: - $ref: '#/components/schemas/iamSchemasAccount' - api_access_enabled: - $ref: '#/components/schemas/iamApiAccessEnabled' - id: - $ref: '#/components/schemas/iamMembershipComponentsSchemasIdentifier' - permissions: - description: All access permissions for the user at the account. - readOnly: true - $ref: '#/components/schemas/iamPermissions' - policies: - description: Access policy for the membership - items: - $ref: '#/components/schemas/iamListMemberPolicy' - type: array - roles: - $ref: '#/components/schemas/iamRoleNames' - status: - $ref: '#/components/schemas/iamSchemasStatus' - type: object - iamPermissionGroup: - description: >- - A named group of permissions that map to a group of operations against - resources. - properties: - id: - description: Identifier of the permission group. - example: 6d7f2f5f5b1d4a0e9081fdc98d432fd1 - type: string - x-auditable: true - meta: - description: Attributes associated to the permission group. - example: - label: load_balancer_admin - scopes: com.cloudflare.api.account - properties: - key: - type: string - x-auditable: true - value: - type: string - x-auditable: true - type: object - name: - description: Name of the permission group. - example: Load Balancer - readOnly: true - type: string - x-auditable: true - required: - - id - type: object - iamPermissionGroups: - description: A set of permission groups that are specified to the policy. - example: - - id: c8fed203ed3043cba015a93ad1616f1f - meta: - label: load_balancer_admin - scopes: com.cloudflare.api.account - name: Zone Read - - id: 82e64a83756745bbbb1c9c2701bf816b - meta: - label: fbm_user - scopes: com.cloudflare.api.account - name: Magic Network Monitoring - items: - $ref: '#/components/schemas/iamPermissionGroup' - type: array - iamPermissions: - example: - analytics: - read: true - write: false - zones: - read: true - write: true - properties: - analytics: - $ref: '#/components/schemas/iamGrants' - billing: - $ref: '#/components/schemas/iamGrants' - cache_purge: - $ref: '#/components/schemas/iamGrants' - dns: - $ref: '#/components/schemas/iamGrants' - dns_records: - $ref: '#/components/schemas/iamGrants' - lb: - $ref: '#/components/schemas/iamGrants' - logs: - $ref: '#/components/schemas/iamGrants' - organization: - $ref: '#/components/schemas/iamGrants' - ssl: - $ref: '#/components/schemas/iamGrants' - waf: - $ref: '#/components/schemas/iamGrants' - zone_settings: - $ref: '#/components/schemas/iamGrants' - zones: - $ref: '#/components/schemas/iamGrants' - type: object - iamPolicyIdentifier: - description: Policy identifier. - example: f267e341f3dd4697bd3b9f71dd96247f - readOnly: true - type: string - x-auditable: true - x-stainless-terraform-always-send: true - iamPropertiesName: - description: Account name - example: Demo Account - maxLength: 100 - type: string - x-auditable: true - iamResourceGroup: - description: A group of scoped resources. - properties: - id: - description: Identifier of the resource group. - example: 6d7f2f5f5b1d4a0e9081fdc98d432fd1 - readOnly: true - type: string - x-auditable: true - meta: - description: Attributes associated to the resource group. - example: - editable: 'false' - properties: - key: - type: string - value: - type: string - type: object - name: - description: Name of the resource group. - example: com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4 - readOnly: true - type: string - x-auditable: true - scope: - description: The scope associated to the resource group - items: - $ref: '#/components/schemas/iamScope' - type: array - required: - - id - - scope - type: object - iamResourceGroups: - description: A list of resource groups that the policy applies to. - items: - $ref: '#/components/schemas/iamResourceGroup' - type: array - iamResultInfo: - properties: - count: - description: Total number of results for the requested service - example: 1 - type: number - page: - description: Current page within paginated list of results - example: 1 - type: number - per_page: - description: Number of results per page of results - example: 20 - type: number - total_count: - description: Total results available without any search parameters - example: 2000 - type: number - type: object - iamRoleNames: - description: List of role names the membership has for this account. - items: - example: Account Administrator - maxLength: 120 - type: string - x-auditable: true - readOnly: true - type: array - iamSchemasAccount: - readOnly: true - $ref: '#/components/schemas/iamAccount' - iamSchemasMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - iamSchemasStatus: - description: Status of this membership. - enum: - - accepted - - pending - - rejected - example: accepted - type: string - x-auditable: true - iamScope: - description: >- - A scope is a combination of scope objects which provides additional - context. - properties: - key: - $ref: '#/components/schemas/iamScopeKey' - objects: - description: A list of scope objects for additional context. - items: - $ref: '#/components/schemas/iamScopeObject' - type: array - required: - - key - - objects - type: object - iamScopeKey: - description: >- - This is a combination of pre-defined resource name and identifier (like - Account ID etc.) - example: com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4 - readOnly: true - x-auditable: true - type: string - iamScopeObject: - description: >- - A scope object represents any resource that can have actions applied - against invite. - properties: - key: - $ref: '#/components/schemas/iamScopeObjectKey' - required: - - key - type: object - iamScopeObjectKey: - description: >- - This is a combination of pre-defined resource name and identifier (like - Zone ID etc.) - example: com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5 - readOnly: true - x-auditable: true - type: string - iamSingleMembershipResponseWithPolicies: - title: response_with_policies - type: object - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/iamMembershipWithPolicies' - required: - - success - - errors - - messages - organizationsApiCreateMemberRequest: - properties: - member: - $ref: '#/components/schemas/organizationsApiCreateSingleMember' - required: - - member - type: object - organizationsApiCreateSingleMember: - properties: - status: - enum: - - active - - canceled - type: string - user: - properties: - email: - type: string - required: - - email - type: object - required: - - user - type: object - organizationsApiMember: - properties: - create_time: - format: date-time - type: string - id: - $ref: '#/components/schemas/organizationsApiMemberID' - meta: - type: object - status: - enum: - - active - - canceled - type: string - update_time: - format: date-time - type: string - user: - $ref: '#/components/schemas/organizationsApiMemberSubjectUser' - required: - - id - - status - - user - - meta - - create_time - - update_time - type: object - organizationsApiMemberID: - description: Organization Member ID - example: a7b9c3d2e8f4g1h5i6j0k9l2m3n7o4p8 - type: string - organizationsApiMemberSubjectUser: - properties: - email: - type: string - id: - type: string - name: - type: string - two_factor_authentication_enabled: - type: boolean - required: - - id - - email - - name - - two_factor_authentication_enabled - type: object - organizationsApiPageTokenResultInfo: - properties: - next_page_token: - description: >- - Use this opaque token in the next request to retrieve the next page. - Parameters used to filter the retrieved list must remain in - subsequent requests with a page token. - type: string - total_size: - description: >- - Counts the total amount of items in a list with the applied filters. - The API omits next_page_token to indicate no more items in a - particular list. - type: integer - type: object - organizationsApiV4ErrorResponse: - properties: - errors: - items: - $ref: '#/components/schemas/organizationsApiV4Message' - type: array - messages: - items: - $ref: '#/components/schemas/organizationsApiV4Message' - type: array - result: - type: object - success: - enum: - - false - type: boolean - required: - - success - - errors - - messages - type: object - organizationsApiV4Message: - $ref: '#/components/schemas/responseInfo' - responseInfo: - properties: - code: - minimum: 1000 - type: integer - message: - type: string - documentation_url: - type: string - source: - type: object - properties: - pointer: - type: string - required: - - code - - message - type: object - uniqueItems: true - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - memberships: - id: cloudflare.memberships.memberships - name: memberships - title: Memberships - methods: - list: - operation: - $ref: '#/paths/~1memberships/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - delete: - operation: - $ref: '#/paths/~1memberships~1{membership_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1memberships~1{membership_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1memberships~1{membership_id}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/memberships/methods/get' - - $ref: '#/components/x-stackQL-resources/memberships/methods/list' - insert: [] - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/memberships/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/memberships/methods/update' - members: - id: cloudflare.memberships.members - name: members - title: Members - methods: - list: - operation: - $ref: '#/paths/~1organizations~1{organization_id}~1members/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - members_create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1organizations~1{organization_id}~1members/post' - response: - mediaType: application/json - openAPIDocKey: '200' - members_delete: - operation: - $ref: >- - #/paths/~1organizations~1{organization_id}~1members~1{member_id}/delete - response: - mediaType: application/json - openAPIDocKey: '204' - get: - operation: - $ref: >- - #/paths/~1organizations~1{organization_id}~1members~1{member_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/members/methods/get' - - $ref: '#/components/x-stackQL-resources/members/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/members/methods/members_create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/members/methods/members_delete' - replace: [] +openapi: 3.0.3 +info: + title: memberships API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /memberships: + get: + description: List memberships of accounts the user can access. + operationId: user'-s-account-memberships-list-memberships + parameters: + - in: query + name: account.name + schema: + $ref: '#/components/schemas/iamPropertiesName' + - in: query + name: page + schema: + default: 1 + description: Page number of paginated results. + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 20 + description: Number of memberships per page. + maximum: 50 + minimum: 5 + type: number + - in: query + name: order + schema: + description: Field to order memberships by. + enum: + - id + - account.name + - status + type: string + - in: query + name: direction + schema: + description: Direction to order memberships. + enum: + - asc + - desc + type: string + - in: query + name: name + schema: + $ref: '#/components/schemas/iamPropertiesName' + - in: query + name: status + schema: + description: Status of this membership. + enum: + - accepted + - pending + - rejected + type: string + responses: + '200': + content: + application/json: + schema: + type: object + title: memberships_with_roles + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + $ref: '#/components/schemas/iamResultInfo' + result: + items: + $ref: '#/components/schemas/iamMembership' + type: array + required: + - errors + - messages + - success + description: List Memberships response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: List Memberships response failure + security: + - api_email: [] + api_key: [] + summary: List Memberships + tags: + - User's Account Memberships + x-api-token-group: + - Memberships Write + - Memberships Read + x-stackql-sdk: + service: memberships + resource_chain: [] + method: list + /memberships/{membership_id}: + delete: + description: Remove the associated member from an account. + operationId: user'-s-account-memberships-delete-membership + parameters: + - name: membership_id + in: path + required: true + description: The membership ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + properties: + id: + $ref: '#/components/schemas/iamMembershipComponentsSchemasIdentifier' + type: object + required: + - success + - errors + - messages + description: Delete Membership response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Delete Membership response failure + security: + - api_email: [] + api_key: [] + summary: Delete Membership + tags: + - User's Account Memberships + x-api-token-group: + - Memberships Write + x-stackql-sdk: + service: memberships + resource_chain: [] + method: delete + get: + description: Get a specific membership. + operationId: user'-s-account-memberships-membership-details + parameters: + - name: membership_id + in: path + required: true + description: The membership ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamSingleMembershipResponseWithPolicies' + description: Membership Details response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Membership Details response failure + security: + - api_email: [] + api_key: [] + summary: Membership Details + tags: + - User's Account Memberships + x-api-token-group: + - Memberships Write + - Memberships Read + x-stackql-sdk: + service: memberships + resource_chain: [] + method: get + put: + description: Accept or reject this account invitation. + operationId: user'-s-account-memberships-update-membership + parameters: + - name: membership_id + in: path + required: true + description: The membership ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + status: + description: Whether to accept or reject this account invitation. + enum: + - accepted + - rejected + type: string + required: + - status + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamSingleMembershipResponseWithPolicies' + description: Update Membership response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Update Membership response failure + security: + - api_email: [] + api_key: [] + summary: Update Membership + tags: + - User's Account Memberships + x-api-token-group: + - Memberships Write + x-stackql-sdk: + service: memberships + resource_chain: [] + method: update + /organizations/{organization_id}/members: + get: + description: List memberships for an Organization. (Currently in Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/) + operationId: Members_list + parameters: + - name: organization_id + in: path + required: true + description: The organization ID. + schema: + type: string + - description: Filter the list of memberships by membership status. + in: query + name: status + schema: + items: + enum: + - active + - canceled + type: string + type: array + explode: true + - description: Filter the list of memberships for a specific email. + explode: false + in: query + name: user.email + schema: + type: string + - description: Filter the list of memberships for a specific email that contains a substring. + explode: false + in: query + name: user.email.contains + schema: + type: string + - description: Filter the list of memberships for a specific email that starts with a substring. + explode: false + in: query + name: user.email.startsWith + schema: + type: string + - description: Filter the list of memberships for a specific email that ends with a substring. + explode: false + in: query + name: user.email.endsWith + schema: + type: string + - description: An opaque token returned from the last list response that when provided will retrieve the next page. Parameters used to filter the retrieved list must remain in subsequent requests with a page token. + explode: false + in: query + name: page_token + schema: + type: string + - description: The amount of items to return. Defaults to 10. + explode: false + in: query + name: page_size + schema: + maximum: 1000 + minimum: 0 + type: integer + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + type: object + maxItems: 0 + type: array + messages: + items: + $ref: '#/components/schemas/organizationsApiV4Message' + type: array + result: + items: + $ref: '#/components/schemas/organizationsApiMember' + type: array + result_info: + $ref: '#/components/schemas/organizationsApiPageTokenResultInfo' + success: + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + - result_info + type: object + description: The request has succeeded. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/organizationsApiV4ErrorResponse' + description: An unexpected error response. + security: + - api_email: [] + api_key: [] + summary: List organization members + tags: + - OrganizationMembers + post: + description: Create a membership that grants access to a specific Organization. (Currently in Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/) + operationId: Members_create + parameters: + - name: organization_id + in: path + required: true + description: The organization ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/organizationsApiCreateMemberRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + type: object + maxItems: 0 + type: array + messages: + items: + $ref: '#/components/schemas/organizationsApiV4Message' + type: array + result: + $ref: '#/components/schemas/organizationsApiMember' + success: + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: The request has succeeded. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/organizationsApiV4ErrorResponse' + description: An unexpected error response. + security: + - api_email: [] + api_key: [] + summary: Create organization member + tags: + - OrganizationMembers + /organizations/{organization_id}/members/{member_id}: + delete: + description: Delete a membership to a particular Organization. (Currently in Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/) + operationId: Members_delete + parameters: + - name: organization_id + in: path + required: true + description: The organization ID. + schema: + type: string + - name: member_id + in: path + required: true + description: The account member ID. + schema: + type: string + responses: + '204': + description: There is no content to send for this request, but the headers may be useful. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/organizationsApiV4ErrorResponse' + description: An unexpected error response. + security: + - api_email: [] + api_key: [] + summary: Delete organization member + tags: + - OrganizationMembers + get: + description: Retrieve a single membership from an Organization. (Currently in Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/) + operationId: Members_retrieve + parameters: + - name: organization_id + in: path + required: true + description: The organization ID. + schema: + type: string + - name: member_id + in: path + required: true + description: The account member ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + type: object + maxItems: 0 + type: array + messages: + items: + $ref: '#/components/schemas/organizationsApiV4Message' + type: array + result: + $ref: '#/components/schemas/organizationsApiMember' + success: + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: The request has succeeded. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/organizationsApiV4ErrorResponse' + description: An unexpected error response. + security: + - api_email: [] + api_key: [] + summary: Get organization member + tags: + - OrganizationMembers +components: + schemas: + iamAccess: + description: Allow or deny operations against the resources. + enum: + - allow + - deny + example: allow + type: string + x-auditable: true + iamAccount: + properties: + created_on: + description: Timestamp for the creation of the account + example: '2014-03-01T12:21:02.0000Z' + format: date-time + readOnly: true + type: string + x-auditable: true + id: + $ref: '#/components/schemas/iamCommonComponentsSchemasIdentifier' + managed_by: + description: Parent container details + properties: + parent_org_id: + description: ID of the parent Organization, if one exists + example: 4536bcfad5faccb111b47003c79917fa + maxLength: 32 + readOnly: true + type: string + x-auditable: true + parent_org_name: + description: Name of the parent Organization, if one exists + example: Demo Parent Organization + readOnly: true + type: string + x-auditable: true + type: object + name: + description: Account name + example: Demo Account + maxLength: 100 + type: string + x-auditable: true + settings: + description: Account settings + properties: + abuse_contact_email: + description: Sets an abuse contact email to notify for abuse reports. + type: string + x-auditable: true + enforce_twofactor: + default: false + description: Indicates whether membership in this account requires that Two-Factor Authentication is enabled + type: boolean + x-auditable: true + x-stainless-terraform-configurability: computed_optional + type: object + type: + $ref: '#/components/schemas/iamAccountType' + required: + - id + - name + - type + type: object + iamAccountType: + enum: + - standard + - enterprise + type: string + iamApiAccessEnabled: + description: Enterprise only. Indicates whether or not API access is enabled specifically for this user on a given account. + example: true + nullable: true + type: boolean + x-auditable: true + iamApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/iamSchemasMessages' + messages: + example: [] + $ref: '#/components/schemas/iamSchemasMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + iamCommonComponentsSchemasIdentifier: + description: Identifier + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + minLength: 32 + type: string + x-auditable: true + iamGrants: + example: + read: true + write: false + properties: + read: + example: true + type: boolean + x-auditable: true + write: + example: true + type: boolean + x-auditable: true + type: object + iamListMemberPolicy: + properties: + access: + $ref: '#/components/schemas/iamAccess' + id: + $ref: '#/components/schemas/iamPolicyIdentifier' + permission_groups: + $ref: '#/components/schemas/iamPermissionGroups' + resource_groups: + $ref: '#/components/schemas/iamResourceGroups' + title: list_member_policy + type: object + iamMembership: + properties: + account: + $ref: '#/components/schemas/iamSchemasAccount' + api_access_enabled: + $ref: '#/components/schemas/iamApiAccessEnabled' + id: + $ref: '#/components/schemas/iamMembershipComponentsSchemasIdentifier' + permissions: + description: All access permissions for the user at the account. + readOnly: true + $ref: '#/components/schemas/iamPermissions' + roles: + $ref: '#/components/schemas/iamRoleNames' + status: + $ref: '#/components/schemas/iamSchemasStatus' + type: object + iamMembershipComponentsSchemasIdentifier: + description: Membership identifier tag. + example: 4536bcfad5faccb111b47003c79917fa + maxLength: 32 + readOnly: true + type: string + x-auditable: true + iamMembershipWithPolicies: + properties: + account: + $ref: '#/components/schemas/iamSchemasAccount' + api_access_enabled: + $ref: '#/components/schemas/iamApiAccessEnabled' + id: + $ref: '#/components/schemas/iamMembershipComponentsSchemasIdentifier' + permissions: + description: All access permissions for the user at the account. + readOnly: true + $ref: '#/components/schemas/iamPermissions' + policies: + description: Access policy for the membership + items: + $ref: '#/components/schemas/iamListMemberPolicy' + type: array + roles: + $ref: '#/components/schemas/iamRoleNames' + status: + $ref: '#/components/schemas/iamSchemasStatus' + type: object + iamPermissionGroup: + description: A named group of permissions that map to a group of operations against resources. + properties: + id: + description: Identifier of the permission group. + example: 6d7f2f5f5b1d4a0e9081fdc98d432fd1 + type: string + x-auditable: true + meta: + description: Attributes associated to the permission group. + example: + label: load_balancer_admin + scopes: com.cloudflare.api.account + properties: + key: + type: string + x-auditable: true + value: + type: string + x-auditable: true + type: object + name: + description: Name of the permission group. + example: Load Balancer + readOnly: true + type: string + x-auditable: true + required: + - id + type: object + iamPermissionGroups: + description: A set of permission groups that are specified to the policy. + example: + - id: c8fed203ed3043cba015a93ad1616f1f + meta: + label: load_balancer_admin + scopes: com.cloudflare.api.account + name: Zone Read + - id: 82e64a83756745bbbb1c9c2701bf816b + meta: + label: fbm_user + scopes: com.cloudflare.api.account + name: Magic Network Monitoring + items: + $ref: '#/components/schemas/iamPermissionGroup' + type: array + iamPermissions: + example: + analytics: + read: true + write: false + zones: + read: true + write: true + properties: + analytics: + $ref: '#/components/schemas/iamGrants' + billing: + $ref: '#/components/schemas/iamGrants' + cache_purge: + $ref: '#/components/schemas/iamGrants' + dns: + $ref: '#/components/schemas/iamGrants' + dns_records: + $ref: '#/components/schemas/iamGrants' + lb: + $ref: '#/components/schemas/iamGrants' + logs: + $ref: '#/components/schemas/iamGrants' + organization: + $ref: '#/components/schemas/iamGrants' + ssl: + $ref: '#/components/schemas/iamGrants' + waf: + $ref: '#/components/schemas/iamGrants' + zone_settings: + $ref: '#/components/schemas/iamGrants' + zones: + $ref: '#/components/schemas/iamGrants' + type: object + iamPolicyIdentifier: + description: Policy identifier. + example: f267e341f3dd4697bd3b9f71dd96247f + readOnly: true + type: string + x-auditable: true + x-stainless-terraform-always-send: true + iamPropertiesName: + description: Account name + example: Demo Account + maxLength: 100 + type: string + x-auditable: true + iamResourceGroup: + description: A group of scoped resources. + properties: + id: + description: Identifier of the resource group. + example: 6d7f2f5f5b1d4a0e9081fdc98d432fd1 + readOnly: true + type: string + x-auditable: true + meta: + description: Attributes associated to the resource group. + example: + editable: 'false' + properties: + key: + type: string + value: + type: string + type: object + name: + description: Name of the resource group. + example: com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4 + readOnly: true + type: string + x-auditable: true + scope: + description: The scope associated to the resource group + items: + $ref: '#/components/schemas/iamScope' + type: array + required: + - id + - scope + type: object + iamResourceGroups: + description: A list of resource groups that the policy applies to. + items: + $ref: '#/components/schemas/iamResourceGroup' + type: array + iamResultInfo: + properties: + count: + description: Total number of results for the requested service + example: 1 + type: number + page: + description: Current page within paginated list of results + example: 1 + type: number + per_page: + description: Number of results per page of results + example: 20 + type: number + total_count: + description: Total results available without any search parameters + example: 2000 + type: number + type: object + iamRoleNames: + description: List of role names the membership has for this account. + items: + example: Account Administrator + maxLength: 120 + type: string + x-auditable: true + readOnly: true + type: array + iamSchemasAccount: + readOnly: true + $ref: '#/components/schemas/iamAccount' + iamSchemasMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + iamSchemasStatus: + description: Status of this membership. + enum: + - accepted + - pending + - rejected + example: accepted + type: string + x-auditable: true + iamScope: + description: A scope is a combination of scope objects which provides additional context. + properties: + key: + $ref: '#/components/schemas/iamScopeKey' + objects: + description: A list of scope objects for additional context. + items: + $ref: '#/components/schemas/iamScopeObject' + type: array + required: + - key + - objects + type: object + iamScopeKey: + description: This is a combination of pre-defined resource name and identifier (like Account ID etc.) + example: com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4 + readOnly: true + x-auditable: true + type: string + iamScopeObject: + description: A scope object represents any resource that can have actions applied against invite. + properties: + key: + $ref: '#/components/schemas/iamScopeObjectKey' + required: + - key + type: object + iamScopeObjectKey: + description: This is a combination of pre-defined resource name and identifier (like Zone ID etc.) + example: com.cloudflare.api.account.zone.23f8d65290b24279ba6f44721b3eaad5 + readOnly: true + x-auditable: true + type: string + iamSingleMembershipResponseWithPolicies: + title: response_with_policies + type: object + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/iamMembershipWithPolicies' + required: + - success + - errors + - messages + organizationsApiCreateMemberRequest: + properties: + member: + $ref: '#/components/schemas/organizationsApiCreateSingleMember' + required: + - member + type: object + organizationsApiCreateSingleMember: + properties: + status: + enum: + - active + - canceled + type: string + user: + properties: + email: + type: string + required: + - email + type: object + required: + - user + type: object + organizationsApiMember: + properties: + create_time: + format: date-time + type: string + id: + $ref: '#/components/schemas/organizationsApiMemberID' + meta: + type: object + status: + enum: + - active + - canceled + type: string + update_time: + format: date-time + type: string + user: + $ref: '#/components/schemas/organizationsApiMemberSubjectUser' + required: + - id + - status + - user + - meta + - create_time + - update_time + type: object + organizationsApiMemberID: + description: Organization Member ID + example: a7b9c3d2e8f4g1h5i6j0k9l2m3n7o4p8 + type: string + organizationsApiMemberSubjectUser: + properties: + email: + type: string + id: + type: string + name: + type: string + two_factor_authentication_enabled: + type: boolean + required: + - id + - email + - name + - two_factor_authentication_enabled + type: object + organizationsApiPageTokenResultInfo: + properties: + next_page_token: + description: Use this opaque token in the next request to retrieve the next page. Parameters used to filter the retrieved list must remain in subsequent requests with a page token. + type: string + total_size: + description: Counts the total amount of items in a list with the applied filters. The API omits next_page_token to indicate no more items in a particular list. + type: integer + type: object + organizationsApiV4ErrorResponse: + properties: + errors: + items: + $ref: '#/components/schemas/organizationsApiV4Message' + type: array + messages: + items: + $ref: '#/components/schemas/organizationsApiV4Message' + type: array + result: + type: object + success: + enum: + - false + type: boolean + required: + - success + - errors + - messages + type: object + organizationsApiV4Message: + $ref: '#/components/schemas/responseInfo' + responseInfo: + properties: + code: + minimum: 1000 + type: integer + message: + type: string + documentation_url: + type: string + source: + type: object + properties: + pointer: + type: string + required: + - code + - message + type: object + uniqueItems: true + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + memberships: + id: cloudflare.memberships.memberships + name: memberships + title: Memberships + methods: + list: + operation: + $ref: '#/paths/~1memberships/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + delete: + operation: + $ref: '#/paths/~1memberships~1{membership_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1memberships~1{membership_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1memberships~1{membership_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/memberships/methods/get' + - $ref: '#/components/x-stackQL-resources/memberships/methods/list' + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/memberships/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/memberships/methods/update' + members: + id: cloudflare.memberships.members + name: members + title: Members + methods: + list: + operation: + $ref: '#/paths/~1organizations~1{organization_id}~1members/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + members_create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1organizations~1{organization_id}~1members/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .member }}{{ $sep }}"member": {{ if eq (kindOf .member) "string" }}{{ .member }}{{ else }}{{ toJson .member }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + members_delete: + operation: + $ref: '#/paths/~1organizations~1{organization_id}~1members~1{member_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '204' + get: + operation: + $ref: '#/paths/~1organizations~1{organization_id}~1members~1{member_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/members/methods/get' + - $ref: '#/components/x-stackQL-resources/members/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/members/methods/members_create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/members/methods/members_delete' + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/network_interconnects.yaml b/providers/src/cloudflare/v00.00.00000/services/network_interconnects.yaml index e0df22c5..e068c932 100644 --- a/providers/src/cloudflare/v00.00.00000/services/network_interconnects.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/network_interconnects.yaml @@ -1,1258 +1,1243 @@ -openapi: 3.0.3 -info: - title: network_interconnects API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/cni/cnis: - get: - operationId: list_cnis - parameters: - - description: If specified, only show CNIs associated with the specified slot - in: query - name: slot - schema: - nullable: true - type: string - - description: If specified, only show cnis associated with the specified tunnel id - in: query - name: tunnel_id - schema: - nullable: true - type: string - - in: query - name: cursor - schema: - format: int32 - nullable: true - type: integer - - in: query - name: limit - schema: - minimum: 0 - nullable: true - type: integer - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/nscCniList' - description: List of matching CNI objects - '400': - description: Bad request - '500': - description: Internal server error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List existing CNI objects - tags: - - CNIs - x-api-token-group: - - Magic WAN Write - - Magic WAN Read - - Magic Transit Read - - Magic Transit Write - x-stackql-sdk: - service: network_interconnects - resource_chain: - - cnis - method: list - post: - operationId: create_cni - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/nscCniCreate' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/nscCni' - description: CNI was successfully created - '400': - description: Bad request - '409': - description: Name Conflict - '500': - description: Internal server error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a new CNI object - tags: - - CNIs - x-api-token-group: - - Magic WAN Write - - Magic Transit Write - x-stackql-sdk: - service: network_interconnects - resource_chain: - - cnis - method: create - /accounts/{account_id}/cni/cnis/{cni}: - delete: - operationId: delete_cni - parameters: - - description: CNI ID to retrieve information about - in: path - name: cni - schema: - format: uuid - type: string - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - description: CNI has been successfully deleted - '400': - description: Bad request - '404': - description: CNI not found - '500': - description: Internal server error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete a specified CNI object - tags: - - CNIs - x-api-token-group: - - Magic WAN Write - - Magic Transit Write - x-stackql-sdk: - service: network_interconnects - resource_chain: - - cnis - method: delete - get: - operationId: get_cni - parameters: - - description: CNI ID to retrieve information about - in: path - name: cni - schema: - format: uuid - type: string - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/nscCni' - description: CNI's associated data - '400': - description: Bad request - '404': - description: CNI not found - '500': - description: Internal server error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get information about a CNI object - tags: - - CNIs - x-api-token-group: - - Magic WAN Write - - Magic WAN Read - - Magic Transit Read - - Magic Transit Write - x-stackql-sdk: - service: network_interconnects - resource_chain: - - cnis - method: get - put: - operationId: update_cni - parameters: - - description: CNI ID to retrieve information about - in: path - name: cni - schema: - format: uuid - type: string - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/nscCni' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/nscCni' - description: CNI has been successfully modified - '400': - description: Bad request - '404': - description: CNI not found - '500': - description: Internal server error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Modify stored information about a CNI object - tags: - - CNIs - x-api-token-group: - - Magic WAN Write - - Magic Transit Write - x-stackql-sdk: - service: network_interconnects - resource_chain: - - cnis - method: update - /accounts/{account_id}/cni/interconnects: - get: - operationId: list_interconnects - parameters: - - description: If specified, only show interconnects located at the given site - in: query - name: site - schema: - nullable: true - type: string - - description: If specified, only show interconnects of the given type - in: query - name: type - schema: - nullable: true - type: string - - in: query - name: cursor - schema: - format: int32 - nullable: true - type: integer - - in: query - name: limit - schema: - minimum: 0 - nullable: true - type: integer - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/nscInterconnectList' - description: List of matching interconnect objects - '400': - description: Bad request - '500': - description: Internal server error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List existing interconnects - tags: - - Interconnects - x-api-token-group: - - Magic WAN Write - - Magic WAN Read - - Magic Transit Read - - Magic Transit Write - x-stackql-sdk: - service: network_interconnects - resource_chain: - - interconnects - method: list - post: - operationId: create_interconnect - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/nscInterconnectCreate' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/nscInterconnect' - description: Information about the new interconnect - '400': - description: Bad request - '500': - description: Internal server error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a new interconnect - tags: - - Interconnects - x-api-token-group: - - Magic WAN Write - - Magic Transit Write - x-stackql-sdk: - service: network_interconnects - resource_chain: - - interconnects - method: create - /accounts/{account_id}/cni/interconnects/{icon}: - delete: - operationId: delete_interconnect - parameters: - - description: Interconnect name to retrieve information about - in: path - name: icon - schema: - type: string - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - description: Successfully deleted interconnect - '400': - description: Bad request - '404': - description: Interconnect not found - '500': - description: Internal server error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete an interconnect object - tags: - - Interconnects - x-api-token-group: - - Magic WAN Write - - Magic Transit Write - x-stackql-sdk: - service: network_interconnects - resource_chain: - - interconnects - method: delete - get: - operationId: get_interconnect - parameters: - - description: Interconnect name to retrieve information about - in: path - name: icon - schema: - type: string - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/nscInterconnect' - description: Information about the specified interconnect - '400': - description: Bad request - '404': - description: Interconnect not found - '500': - description: Internal server error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get information about an interconnect object - tags: - - Interconnects - x-api-token-group: - - Magic WAN Write - - Magic WAN Read - - Magic Transit Read - - Magic Transit Write - x-stackql-sdk: - service: network_interconnects - resource_chain: - - interconnects - method: get - /accounts/{account_id}/cni/interconnects/{icon}/loa: - get: - operationId: get_interconnect_loa - parameters: - - description: Interconnect name to retrieve information about - in: path - name: icon - schema: - type: string - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - description: Generated LOA in PDF format - '400': - description: Bad request - '404': - description: Interconnect not found - '500': - description: Internal server error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Generate the Letter of Authorization (LOA) for a given interconnect - tags: - - Interconnects - x-api-token-group: - - Magic WAN Write - - Magic WAN Read - - Magic Transit Read - - Magic Transit Write - x-stackql-sdk: - service: network_interconnects - resource_chain: - - interconnects - method: loa - /accounts/{account_id}/cni/interconnects/{icon}/status: - get: - operationId: get_interconnect_status - parameters: - - description: Interconnect name to retrieve information about - in: path - name: icon - schema: - type: string - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/nscStatusInfo' - description: Current interconnect status - '400': - description: Bad request - '404': - description: Interconnect not found - '500': - description: Internal server error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get the current status of an interconnect object - tags: - - Interconnects - x-api-token-group: - - Magic WAN Write - - Magic WAN Read - - Magic Transit Read - - Magic Transit Write - x-stackql-sdk: - service: network_interconnects - resource_chain: - - interconnects - method: status - /accounts/{account_id}/cni/settings: - get: - operationId: get_settings - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/nscSettings' - description: The active account settings values - '400': - description: Bad request - '404': - description: Account not found - '500': - description: Internal server error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get the current settings for the active account - tags: - - Settings - x-api-token-group: - - Magic WAN Write - - Magic WAN Read - - Magic Transit Read - - Magic Transit Write - x-stackql-sdk: - service: network_interconnects - resource_chain: - - settings - method: get - put: - operationId: update_settings - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/nscSettingsRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/nscSettings' - description: The active account settings values - '400': - description: Bad request - '404': - description: Account not found - '500': - description: Internal server error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update the current settings for the active account - tags: - - Settings - x-api-token-group: - - Magic WAN Write - - Magic Transit Write - x-stackql-sdk: - service: network_interconnects - resource_chain: - - settings - method: update - /accounts/{account_id}/cni/slots: - get: - operationId: list_slots - parameters: - - description: >- - If specified, only show slots with the given text in their address - field - in: query - name: address_contains - schema: - nullable: true - type: string - - description: If specified, only show slots located at the given site - in: query - name: site - schema: - nullable: true - type: string - - description: If specified, only show slots that support the given speed - in: query - name: speed - schema: - nullable: true - type: string - - description: >- - If specified, only show slots with a specific occupied/unoccupied - state - in: query - name: occupied - schema: - nullable: true - type: boolean - - in: query - name: cursor - schema: - format: int32 - nullable: true - type: integer - - in: query - name: limit - schema: - minimum: 0 - nullable: true - type: integer - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/nscSlotList' - description: List of matching slots - '400': - description: Bad request - '500': - description: Internal server error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Retrieve a list of all slots matching the specified parameters - tags: - - Slots - x-api-token-group: - - Magic WAN Write - - Magic WAN Read - - Magic Transit Read - - Magic Transit Write - x-stackql-sdk: - service: network_interconnects - resource_chain: - - slots - method: list - /accounts/{account_id}/cni/slots/{slot}: - get: - operationId: get_slot - parameters: - - in: path - name: slot - schema: - format: uuid - type: string - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/nscSlotInfo' - description: Information about the specified slot - '400': - description: Bad request - '404': - description: Slot not found - '500': - description: Internal server error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get information about the specified slot - tags: - - Slots - x-api-token-group: - - Magic WAN Write - - Magic WAN Read - - Magic Transit Read - - Magic Transit Write - x-stackql-sdk: - service: network_interconnects - resource_chain: - - slots - method: get -components: - schemas: - nscAccountTag: - description: Customer account tag - type: string - nscApiBandwidth: - description: Bandwidth structure as visible through the customer-facing API. - enum: - - 50M - - 100M - - 200M - - 300M - - 400M - - 500M - - 1G - - 2G - - 5G - - 10G - - 20G - - 50G - type: string - nscBgpControl: - properties: - customer_asn: - description: ASN used on the customer end of the BGP session - format: int32 - minimum: 0 - type: integer - extra_prefixes: - description: >- - Extra set of static prefixes to advertise to the customer's end of - the session - items: - format: A.B.C.D/N - type: string - type: array - md5_key: - description: >- - MD5 key to use for session authentication. Note that *this is not a - security measure*. MD5 is not a valid security mechanism, and the - key is not treated as a secret value. This is *only* supported for - preventing misconfiguration, not for defending against malicious - attacks. The MD5 key, if set, must be of non-zero length and consist - only of the following types of character: * ASCII alphanumerics: - `[a-zA-Z0-9]` * Special characters in the set - `'!@#$%^&*()+[]{}<>/.,;:_-~`= \|` In other words, MD5 keys may - contain any printable ASCII character aside from newline (0x0A), - quotation mark (`"`), vertical tab (0x0B), carriage return (0x0D), - tab (0x09), form feed (0x0C), and the question mark (`?`). Requests - specifying an MD5 key with one or more of these disallowed - characters will be rejected. - nullable: true - type: string - required: - - customer_asn - - extra_prefixes - type: object - nscCloudflareSite: - description: A Cloudflare site name. - type: string - nscCni: - properties: - account: - $ref: '#/components/schemas/nscAccountTag' - bgp: - $ref: '#/components/schemas/nscBgpControl' - cust_ip: - description: >- - Customer end of the point-to-point link This should always be inside - the same prefix as `p2p_ip`. - example: 192.168.3.4/31 - format: A.B.C.D/N - type: string - id: - format: uuid - type: string - interconnect: - description: Interconnect identifier hosting this CNI - type: string - magic: - $ref: '#/components/schemas/nscMagicSettings' - p2p_ip: - description: Cloudflare end of the point-to-point link - example: 192.168.3.4/31 - format: A.B.C.D/N - type: string - required: - - id - - interconnect - - account - - p2p_ip - - cust_ip - - magic - type: object - nscCniCreate: - properties: - account: - $ref: '#/components/schemas/nscAccountTag' - bgp: - $ref: '#/components/schemas/nscBgpControl' - interconnect: - type: string - magic: - $ref: '#/components/schemas/nscMagicSettings' - required: - - interconnect - - account - - magic - type: object - nscCniList: - properties: - items: - items: - $ref: '#/components/schemas/nscCni' - type: array - next: - format: int32 - nullable: true - type: integer - required: - - items - type: object - nscFacilityInfo: - properties: - address: - items: - type: string - type: array - name: - type: string - required: - - name - - address - type: object - nscInterconnect: - type: object - title: Physical - properties: - account: - type: string - name: - type: string - owner: - type: string - type: - type: string - facility: - $ref: '#/components/schemas/nscFacilityInfo' - site: - $ref: '#/components/schemas/nscCloudflareSite' - slot_id: - format: uuid - type: string - speed: - type: string - region: - type: string - required: - - account - - name - - type - nscInterconnectCreate: - type: object - title: Physical - properties: - account: - type: string - type: - type: string - slot_id: - format: uuid - type: string - speed: - nullable: true - type: string - bandwidth: - $ref: '#/components/schemas/nscApiBandwidth' - pairing_key: - description: Pairing key provided by GCP - type: string - required: - - account - - type - nscInterconnectList: - properties: - items: - items: - $ref: '#/components/schemas/nscInterconnect' - type: array - next: - format: int32 - nullable: true - type: integer - required: - - items - type: object - nscMagicSettings: - properties: - conduit_name: - type: string - description: - type: string - mtu: - format: int32 - minimum: 0 - type: integer - required: - - conduit_name - - description - - mtu - type: object - nscSettings: - properties: - default_asn: - format: int32 - minimum: 0 - type: integer - required: - - default_asn - type: object - nscSettingsRequest: - properties: - default_asn: - format: int32 - minimum: 0 - nullable: true - type: integer - type: object - nscSlotInfo: - properties: - account: - $ref: '#/components/schemas/nscAccountTag' - facility: - $ref: '#/components/schemas/nscFacilityInfo' - id: - description: Slot ID - format: uuid - type: string - occupied: - description: Whether the slot is occupied or not - type: boolean - site: - type: string - speed: - type: string - required: - - id - - occupied - - site - - speed - - facility - type: object - nscSlotList: - properties: - items: - items: - $ref: '#/components/schemas/nscSlotInfo' - type: array - next: - format: int32 - nullable: true - type: integer - required: - - items - type: object - nscStatusInfo: - type: object - properties: - state: - enum: - - Pending - type: string - reason: - description: Diagnostic information, if available - nullable: true - type: string - required: - - state - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - cnis: - id: cloudflare.network_interconnects.cnis - name: cnis - title: Cnis - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1cni~1cnis/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.items - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1cni~1cnis/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1cni~1cnis~1{cni}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1cni~1cnis~1{cni}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1cni~1cnis~1{cni}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/cnis/methods/get' - - $ref: '#/components/x-stackQL-resources/cnis/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/cnis/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/cnis/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/cnis/methods/update' - interconnects: - id: cloudflare.network_interconnects.interconnects - name: interconnects - title: Interconnects - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1cni~1interconnects/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.items - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1cni~1interconnects/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cni~1interconnects~1{icon}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1cni~1interconnects~1{icon}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/interconnects/methods/get' - - $ref: '#/components/x-stackQL-resources/interconnects/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/interconnects/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/interconnects/methods/delete' - replace: [] - loas: - id: cloudflare.network_interconnects.loas - name: loas - title: Loas - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cni~1interconnects~1{icon}~1loa/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/loas/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - interconnects_status: - id: cloudflare.network_interconnects.interconnects_status - name: interconnects_status - title: Interconnects Status - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1cni~1interconnects~1{icon}~1status/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/interconnects_status/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - settings: - id: cloudflare.network_interconnects.settings - name: settings - title: Settings - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1cni~1settings/get' - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1cni~1settings/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/settings/methods/list' - insert: [] - update: [] - delete: [] - replace: - - $ref: '#/components/x-stackQL-resources/settings/methods/update' - slots: - id: cloudflare.network_interconnects.slots - name: slots - title: Slots - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1cni~1slots/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.items - get: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1cni~1slots~1{slot}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/slots/methods/get' - - $ref: '#/components/x-stackQL-resources/slots/methods/list' - insert: [] - update: [] - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: network_interconnects API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/cni/cnis: + get: + operationId: list_cnis + parameters: + - description: If specified, only show CNIs associated with the specified slot + in: query + name: slot + schema: + nullable: true + type: string + - description: If specified, only show cnis associated with the specified tunnel id + in: query + name: tunnel_id + schema: + nullable: true + type: string + - in: query + name: cursor + schema: + format: int32 + nullable: true + type: integer + - in: query + name: limit + schema: + minimum: 0 + nullable: true + type: integer + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/nscCniList' + description: List of matching CNI objects + '400': + description: Bad request + '500': + description: Internal server error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List existing CNI objects + tags: + - CNIs + x-api-token-group: + - Magic WAN Write + - Magic WAN Read + - Magic Transit Read + - Magic Transit Write + x-stackql-sdk: + service: network_interconnects + resource_chain: + - cnis + method: list + post: + operationId: create_cni + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/nscCniCreate' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/nscCni' + description: CNI was successfully created + '400': + description: Bad request + '409': + description: Name Conflict + '500': + description: Internal server error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a new CNI object + tags: + - CNIs + x-api-token-group: + - Magic WAN Write + - Magic Transit Write + x-stackql-sdk: + service: network_interconnects + resource_chain: + - cnis + method: create + /accounts/{account_id}/cni/cnis/{cni}: + delete: + operationId: delete_cni + parameters: + - description: CNI ID to retrieve information about + in: path + name: cni + schema: + format: uuid + type: string + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + description: CNI has been successfully deleted + '400': + description: Bad request + '404': + description: CNI not found + '500': + description: Internal server error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete a specified CNI object + tags: + - CNIs + x-api-token-group: + - Magic WAN Write + - Magic Transit Write + x-stackql-sdk: + service: network_interconnects + resource_chain: + - cnis + method: delete + get: + operationId: get_cni + parameters: + - description: CNI ID to retrieve information about + in: path + name: cni + schema: + format: uuid + type: string + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/nscCni' + description: CNI's associated data + '400': + description: Bad request + '404': + description: CNI not found + '500': + description: Internal server error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get information about a CNI object + tags: + - CNIs + x-api-token-group: + - Magic WAN Write + - Magic WAN Read + - Magic Transit Read + - Magic Transit Write + x-stackql-sdk: + service: network_interconnects + resource_chain: + - cnis + method: get + put: + operationId: update_cni + parameters: + - description: CNI ID to retrieve information about + in: path + name: cni + schema: + format: uuid + type: string + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/nscCni' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/nscCni' + description: CNI has been successfully modified + '400': + description: Bad request + '404': + description: CNI not found + '500': + description: Internal server error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Modify stored information about a CNI object + tags: + - CNIs + x-api-token-group: + - Magic WAN Write + - Magic Transit Write + x-stackql-sdk: + service: network_interconnects + resource_chain: + - cnis + method: update + /accounts/{account_id}/cni/interconnects: + get: + operationId: list_interconnects + parameters: + - description: If specified, only show interconnects located at the given site + in: query + name: site + schema: + nullable: true + type: string + - description: If specified, only show interconnects of the given type + in: query + name: type + schema: + nullable: true + type: string + - in: query + name: cursor + schema: + format: int32 + nullable: true + type: integer + - in: query + name: limit + schema: + minimum: 0 + nullable: true + type: integer + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/nscInterconnectList' + description: List of matching interconnect objects + '400': + description: Bad request + '500': + description: Internal server error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List existing interconnects + tags: + - Interconnects + x-api-token-group: + - Magic WAN Write + - Magic WAN Read + - Magic Transit Read + - Magic Transit Write + x-stackql-sdk: + service: network_interconnects + resource_chain: + - interconnects + method: list + post: + operationId: create_interconnect + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/nscInterconnectCreate' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/nscInterconnect' + description: Information about the new interconnect + '400': + description: Bad request + '500': + description: Internal server error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a new interconnect + tags: + - Interconnects + x-api-token-group: + - Magic WAN Write + - Magic Transit Write + x-stackql-sdk: + service: network_interconnects + resource_chain: + - interconnects + method: create + /accounts/{account_id}/cni/interconnects/{icon}: + delete: + operationId: delete_interconnect + parameters: + - description: Interconnect name to retrieve information about + in: path + name: icon + schema: + type: string + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + description: Successfully deleted interconnect + '400': + description: Bad request + '404': + description: Interconnect not found + '500': + description: Internal server error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete an interconnect object + tags: + - Interconnects + x-api-token-group: + - Magic WAN Write + - Magic Transit Write + x-stackql-sdk: + service: network_interconnects + resource_chain: + - interconnects + method: delete + get: + operationId: get_interconnect + parameters: + - description: Interconnect name to retrieve information about + in: path + name: icon + schema: + type: string + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/nscInterconnect' + description: Information about the specified interconnect + '400': + description: Bad request + '404': + description: Interconnect not found + '500': + description: Internal server error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get information about an interconnect object + tags: + - Interconnects + x-api-token-group: + - Magic WAN Write + - Magic WAN Read + - Magic Transit Read + - Magic Transit Write + x-stackql-sdk: + service: network_interconnects + resource_chain: + - interconnects + method: get + /accounts/{account_id}/cni/interconnects/{icon}/loa: + get: + operationId: get_interconnect_loa + parameters: + - description: Interconnect name to retrieve information about + in: path + name: icon + schema: + type: string + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + description: Generated LOA in PDF format + '400': + description: Bad request + '404': + description: Interconnect not found + '500': + description: Internal server error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Generate the Letter of Authorization (LOA) for a given interconnect + tags: + - Interconnects + x-api-token-group: + - Magic WAN Write + - Magic WAN Read + - Magic Transit Read + - Magic Transit Write + x-stackql-sdk: + service: network_interconnects + resource_chain: + - interconnects + method: loa + /accounts/{account_id}/cni/interconnects/{icon}/status: + get: + operationId: get_interconnect_status + parameters: + - description: Interconnect name to retrieve information about + in: path + name: icon + schema: + type: string + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/nscStatusInfo' + description: Current interconnect status + '400': + description: Bad request + '404': + description: Interconnect not found + '500': + description: Internal server error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get the current status of an interconnect object + tags: + - Interconnects + x-api-token-group: + - Magic WAN Write + - Magic WAN Read + - Magic Transit Read + - Magic Transit Write + x-stackql-sdk: + service: network_interconnects + resource_chain: + - interconnects + method: status + /accounts/{account_id}/cni/settings: + get: + operationId: get_settings + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/nscSettings' + description: The active account settings values + '400': + description: Bad request + '404': + description: Account not found + '500': + description: Internal server error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get the current settings for the active account + tags: + - Settings + x-api-token-group: + - Magic WAN Write + - Magic WAN Read + - Magic Transit Read + - Magic Transit Write + x-stackql-sdk: + service: network_interconnects + resource_chain: + - settings + method: get + put: + operationId: update_settings + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/nscSettingsRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/nscSettings' + description: The active account settings values + '400': + description: Bad request + '404': + description: Account not found + '500': + description: Internal server error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update the current settings for the active account + tags: + - Settings + x-api-token-group: + - Magic WAN Write + - Magic Transit Write + x-stackql-sdk: + service: network_interconnects + resource_chain: + - settings + method: update + /accounts/{account_id}/cni/slots: + get: + operationId: list_slots + parameters: + - description: If specified, only show slots with the given text in their address field + in: query + name: address_contains + schema: + nullable: true + type: string + - description: If specified, only show slots located at the given site + in: query + name: site + schema: + nullable: true + type: string + - description: If specified, only show slots that support the given speed + in: query + name: speed + schema: + nullable: true + type: string + - description: If specified, only show slots with a specific occupied/unoccupied state + in: query + name: occupied + schema: + nullable: true + type: boolean + - in: query + name: cursor + schema: + format: int32 + nullable: true + type: integer + - in: query + name: limit + schema: + minimum: 0 + nullable: true + type: integer + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/nscSlotList' + description: List of matching slots + '400': + description: Bad request + '500': + description: Internal server error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Retrieve a list of all slots matching the specified parameters + tags: + - Slots + x-api-token-group: + - Magic WAN Write + - Magic WAN Read + - Magic Transit Read + - Magic Transit Write + x-stackql-sdk: + service: network_interconnects + resource_chain: + - slots + method: list + /accounts/{account_id}/cni/slots/{slot}: + get: + operationId: get_slot + parameters: + - in: path + name: slot + schema: + format: uuid + type: string + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/nscSlotInfo' + description: Information about the specified slot + '400': + description: Bad request + '404': + description: Slot not found + '500': + description: Internal server error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get information about the specified slot + tags: + - Slots + x-api-token-group: + - Magic WAN Write + - Magic WAN Read + - Magic Transit Read + - Magic Transit Write + x-stackql-sdk: + service: network_interconnects + resource_chain: + - slots + method: get +components: + schemas: + nscAccountTag: + description: Customer account tag + type: string + nscApiBandwidth: + description: Bandwidth structure as visible through the customer-facing API. + enum: + - 50M + - 100M + - 200M + - 300M + - 400M + - 500M + - 1G + - 2G + - 5G + - 10G + - 20G + - 50G + type: string + nscBgpControl: + properties: + customer_asn: + description: ASN used on the customer end of the BGP session + format: int32 + minimum: 0 + type: integer + extra_prefixes: + description: Extra set of static prefixes to advertise to the customer's end of the session + items: + format: A.B.C.D/N + type: string + type: array + md5_key: + description: 'MD5 key to use for session authentication. Note that *this is not a security measure*. MD5 is not a valid security mechanism, and the key is not treated as a secret value. This is *only* supported for preventing misconfiguration, not for defending against malicious attacks. The MD5 key, if set, must be of non-zero length and consist only of the following types of character: * ASCII alphanumerics: `[a-zA-Z0-9]` * Special characters in the set `''!@#$%^&*()+[]{}<>/.,;:_-~`= \|` In other words, MD5 keys may contain any printable ASCII character aside from newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests specifying an MD5 key with one or more of these disallowed characters will be rejected.' + nullable: true + type: string + required: + - customer_asn + - extra_prefixes + type: object + nscCloudflareSite: + description: A Cloudflare site name. + type: string + nscCni: + properties: + account: + $ref: '#/components/schemas/nscAccountTag' + bgp: + $ref: '#/components/schemas/nscBgpControl' + cust_ip: + description: Customer end of the point-to-point link This should always be inside the same prefix as `p2p_ip`. + example: 192.168.3.4/31 + format: A.B.C.D/N + type: string + id: + format: uuid + type: string + interconnect: + description: Interconnect identifier hosting this CNI + type: string + magic: + $ref: '#/components/schemas/nscMagicSettings' + p2p_ip: + description: Cloudflare end of the point-to-point link + example: 192.168.3.4/31 + format: A.B.C.D/N + type: string + required: + - id + - interconnect + - account + - p2p_ip + - cust_ip + - magic + type: object + nscCniCreate: + properties: + account: + $ref: '#/components/schemas/nscAccountTag' + bgp: + $ref: '#/components/schemas/nscBgpControl' + interconnect: + type: string + magic: + $ref: '#/components/schemas/nscMagicSettings' + required: + - interconnect + - account + - magic + type: object + nscCniList: + properties: + items: + items: + $ref: '#/components/schemas/nscCni' + type: array + next: + format: int32 + nullable: true + type: integer + required: + - items + type: object + nscFacilityInfo: + properties: + address: + items: + type: string + type: array + name: + type: string + required: + - name + - address + type: object + nscInterconnect: + type: object + title: Physical + properties: + account: + type: string + name: + type: string + owner: + type: string + type: + type: string + facility: + $ref: '#/components/schemas/nscFacilityInfo' + site: + $ref: '#/components/schemas/nscCloudflareSite' + slot_id: + format: uuid + type: string + speed: + type: string + region: + type: string + required: + - account + - name + - type + nscInterconnectCreate: + type: object + title: Physical + properties: + account: + type: string + type: + type: string + slot_id: + format: uuid + type: string + speed: + nullable: true + type: string + bandwidth: + $ref: '#/components/schemas/nscApiBandwidth' + pairing_key: + description: Pairing key provided by GCP + type: string + required: + - account + - type + nscInterconnectList: + properties: + items: + items: + $ref: '#/components/schemas/nscInterconnect' + type: array + next: + format: int32 + nullable: true + type: integer + required: + - items + type: object + nscMagicSettings: + properties: + conduit_name: + type: string + description: + type: string + mtu: + format: int32 + minimum: 0 + type: integer + required: + - conduit_name + - description + - mtu + type: object + nscSettings: + properties: + default_asn: + format: int32 + minimum: 0 + type: integer + required: + - default_asn + type: object + nscSettingsRequest: + properties: + default_asn: + format: int32 + minimum: 0 + nullable: true + type: integer + type: object + nscSlotInfo: + properties: + account: + $ref: '#/components/schemas/nscAccountTag' + facility: + $ref: '#/components/schemas/nscFacilityInfo' + id: + description: Slot ID + format: uuid + type: string + occupied: + description: Whether the slot is occupied or not + type: boolean + site: + type: string + speed: + type: string + required: + - id + - occupied + - site + - speed + - facility + type: object + nscSlotList: + properties: + items: + items: + $ref: '#/components/schemas/nscSlotInfo' + type: array + next: + format: int32 + nullable: true + type: integer + required: + - items + type: object + nscStatusInfo: + type: object + properties: + state: + enum: + - Pending + type: string + reason: + description: Diagnostic information, if available + nullable: true + type: string + required: + - state + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + cnis: + id: cloudflare.network_interconnects.cnis + name: cnis + title: Cnis + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cni~1cnis/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.items + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cni~1cnis/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .account }}{{ $sep }}"account": {{ toJson .account }}{{- $sep = "," -}}{{ end }} + + {{- if .bgp }}{{ $sep }}"bgp": {{ if eq (kindOf .bgp) "string" }}{{ .bgp }}{{ else }}{{ toJson .bgp }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interconnect }}{{ $sep }}"interconnect": {{ toJson .interconnect }}{{- $sep = "," -}}{{ end }} + + {{- if .magic }}{{ $sep }}"magic": {{ if eq (kindOf .magic) "string" }}{{ .magic }}{{ else }}{{ toJson .magic }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cni~1cnis~1{cni}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cni~1cnis~1{cni}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cni~1cnis~1{cni}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .account }}{{ $sep }}"account": {{ toJson .account }}{{- $sep = "," -}}{{ end }} + + {{- if .bgp }}{{ $sep }}"bgp": {{ if eq (kindOf .bgp) "string" }}{{ .bgp }}{{ else }}{{ toJson .bgp }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .cust_ip }}{{ $sep }}"cust_ip": {{ toJson .cust_ip }}{{- $sep = "," -}}{{ end }} + + {{- if .id }}{{ $sep }}"id": {{ toJson .id }}{{- $sep = "," -}}{{ end }} + + {{- if .interconnect }}{{ $sep }}"interconnect": {{ toJson .interconnect }}{{- $sep = "," -}}{{ end }} + + {{- if .magic }}{{ $sep }}"magic": {{ if eq (kindOf .magic) "string" }}{{ .magic }}{{ else }}{{ toJson .magic }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .p2p_ip }}{{ $sep }}"p2p_ip": {{ toJson .p2p_ip }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/cnis/methods/get' + - $ref: '#/components/x-stackQL-resources/cnis/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/cnis/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/cnis/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/cnis/methods/update' + interconnects: + id: cloudflare.network_interconnects.interconnects + name: interconnects + title: Interconnects + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cni~1interconnects/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.items + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cni~1interconnects/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cni~1interconnects~1{icon}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cni~1interconnects~1{icon}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/interconnects/methods/get' + - $ref: '#/components/x-stackQL-resources/interconnects/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/interconnects/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/interconnects/methods/delete' + replace: [] + loas: + id: cloudflare.network_interconnects.loas + name: loas + title: Loas + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cni~1interconnects~1{icon}~1loa/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/loas/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + interconnects_status: + id: cloudflare.network_interconnects.interconnects_status + name: interconnects_status + title: Interconnects Status + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cni~1interconnects~1{icon}~1status/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/interconnects_status/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + settings: + id: cloudflare.network_interconnects.settings + name: settings + title: Settings + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cni~1settings/get' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cni~1settings/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/settings/methods/list' + insert: [] + update: [] + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/settings/methods/update' + slots: + id: cloudflare.network_interconnects.slots + name: slots + title: Slots + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cni~1slots/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.items + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1cni~1slots~1{slot}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/slots/methods/get' + - $ref: '#/components/x-stackQL-resources/slots/methods/list' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/organizations.yaml b/providers/src/cloudflare/v00.00.00000/services/organizations.yaml index 7f6f6013..03cfdd9c 100644 --- a/providers/src/cloudflare/v00.00.00000/services/organizations.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/organizations.yaml @@ -1,2343 +1,2262 @@ -openapi: 3.0.3 -info: - title: organizations API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/organizations: - get: - description: >- - Retrieve a list of the organizations that "contain" this account or are - managing it. The returned list will be in order from "root" to "leaf", - where the "leaf" will be the organization that _immediately_ contains - the specified account. - operationId: Accounts_listAccountOrganizations - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - type: object - maxItems: 0 - type: array - messages: - items: - $ref: '#/components/schemas/organizationsApiV4Message' - type: array - result: - items: - $ref: '#/components/schemas/organizationsApiOrganization' - type: array - success: - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: The request has succeeded. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/organizationsApiV4ErrorResponse' - description: An unexpected error response. - security: - - api_email: [] - api_key: [] - summary: List account organizations - tags: - - Accounts - x-api-token-group: - - Trust and Safety Write - - Trust and Safety Read - - DNS View Write - - DNS View Read - - SCIM Provisioning - - Load Balancers Account Write - - Load Balancers Account Read - - 'Zero Trust: PII Read' - - DDoS Botnet Feed Write - - DDoS Botnet Feed Read - - Workers R2 Storage Write - - Workers R2 Storage Read - - DDoS Protection Write - - DDoS Protection Read - - Workers Tail Read - - Workers KV Storage Write - - Workers KV Storage Read - - Workers Scripts Write - - Workers Scripts Read - - 'Load Balancing: Monitors and Pools Write' - - 'Load Balancing: Monitors and Pools Read' - - Account Firewall Access Rules Write - - Account Firewall Access Rules Read - - DNS Firewall Write - - DNS Firewall Read - - Billing Write - - Billing Read - - Account Settings Write - - Account Settings Read - /organizations: - get: - description: >- - Retrieve a list of organizations a particular user has access to. - (Currently in Closed Beta - see - https://developers.cloudflare.com/fundamentals/organizations/) - operationId: Organization_listOrganizations - parameters: - - description: >- - Only return organizations with the specified IDs (ex. - id=foo&id=bar). Send multiple elements by repeating the query value. - explode: false - in: query - name: id - schema: - items: - $ref: '#/components/schemas/organizationsApiOrganizationID' - type: array - - description: >- - (case-sensitive) Filter the list of organizations to where the name - is equal to a particular string. - explode: false - in: query - name: name - schema: - type: string - - description: >- - (case-insensitive) Filter the list of organizations to where the - name starts with a particular string. - explode: false - in: query - name: name.startsWith - schema: - type: string - - description: >- - (case-insensitive) Filter the list of organizations to where the - name ends with a particular string. - explode: false - in: query - name: name.endsWith - schema: - type: string - - description: >- - (case-insensitive) Filter the list of organizations to where the - name contains a particular string. - explode: false - in: query - name: name.contains - schema: - type: string - - description: >- - Filter the list of organizations to the ones that contain this - particular account. - explode: false - in: query - name: containing.account - schema: - type: string - - description: >- - Filter the list of organizations to the ones that contain this - particular user. IMPORTANT: Just because an organization "contains" - a user is not a representation of any authorization or privilege to - manage any resources therein. An organization "containing" a user - simply means the user is managed by that organization. - explode: false - in: query - name: containing.user - schema: - type: string - - description: >- - Filter the list of organizations to the ones that contain this - particular organization. - explode: false - in: query - name: containing.organization - schema: - type: string - - description: >- - Filter the list of organizations to the ones that are a - sub-organization of the specified organization. "null" is a valid - value to provide for this parameter. It means "where an organization - has no parent (i.e. it is a 'root' organization)." - explode: false - in: query - name: parent.id - schema: - type: string - title: Organization ID - enum: - - 'null' - - description: >- - An opaque token returned from the last list response that when - provided will retrieve the next page. Parameters used to filter the - retrieved list must remain in subsequent requests with a page token. - explode: false - in: query - name: page_token - schema: - type: string - - description: The amount of items to return. Defaults to 10. - explode: false - in: query - name: page_size - schema: - maximum: 1000 - minimum: 0 - type: integer - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - type: object - maxItems: 0 - type: array - messages: - items: - $ref: '#/components/schemas/organizationsApiV4Message' - type: array - result: - items: - $ref: '#/components/schemas/organizationsApiOrganization' - type: array - result_info: - $ref: '#/components/schemas/organizationsApiPageTokenResultInfo' - success: - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - - result_info - type: object - description: The request has succeeded. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/organizationsApiV4ErrorResponse' - description: An unexpected error response. - security: - - api_email: [] - api_key: [] - summary: List organizations the user has access to - tags: - - Organizations - x-api-token-group: - - User Details Write - - User Details Read - x-stackql-sdk: - service: organizations - resource_chain: [] - method: list - post: - description: >- - Create a new organization for a user. (Currently in Closed Beta - see - https://developers.cloudflare.com/fundamentals/organizations/) - operationId: Organizations_createUserOrganization - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/organizationsApiOrganization' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - type: object - maxItems: 0 - type: array - messages: - items: - $ref: '#/components/schemas/organizationsApiV4Message' - type: array - result: - $ref: '#/components/schemas/organizationsApiOrganization' - success: - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: The request has succeeded. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/organizationsApiV4ErrorResponse' - description: An unexpected error response. - security: - - api_email: [] - api_key: [] - summary: Create organization - tags: - - Organizations - x-api-token-group: - - User Details Write - x-stackql-sdk: - service: organizations - resource_chain: [] - method: create - /organizations/{organization_id}: - delete: - description: >- - Delete an organization. The organization MUST be empty before deleting. - It must not contain any sub-organizations, accounts, members or users. - (Currently in Closed Beta - see - https://developers.cloudflare.com/fundamentals/organizations/) - operationId: Organizations_delete - parameters: - - name: organization_id - in: path - required: true - description: The organization ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - type: object - maxItems: 0 - type: array - messages: - items: - $ref: '#/components/schemas/organizationsApiV4Message' - type: array - result: - $ref: >- - #/components/schemas/organizationsApiDeleteOrganizationResponse - success: - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: The request has succeeded. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/organizationsApiV4ErrorResponse' - description: An unexpected error response. - security: - - api_email: [] - api_key: [] - summary: Delete organization. - tags: - - Organizations - x-stackql-sdk: - service: organizations - resource_chain: [] - method: delete - get: - description: >- - Retrieve the details of a certain organization. (Currently in Closed - Beta - see - https://developers.cloudflare.com/fundamentals/organizations/) - operationId: Organizations_retrieve - parameters: - - name: organization_id - in: path - required: true - description: The organization ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - type: object - maxItems: 0 - type: array - messages: - items: - $ref: '#/components/schemas/organizationsApiV4Message' - type: array - result: - $ref: '#/components/schemas/organizationsApiOrganization' - success: - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: The request has succeeded. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/organizationsApiV4ErrorResponse' - description: An unexpected error response. - security: - - api_email: [] - api_key: [] - summary: Get organization - tags: - - Organizations - x-stackql-sdk: - service: organizations - resource_chain: [] - method: get - put: - description: >- - Modify organization. (Currently in Closed Beta - see - https://developers.cloudflare.com/fundamentals/organizations/) - operationId: Organizations_modify - parameters: - - name: organization_id - in: path - required: true - description: The organization ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/organizationsApiOrganization' - description: >- - The new details of the organization. Only accepts updates to "name" - currently. - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - type: object - maxItems: 0 - type: array - messages: - items: - $ref: '#/components/schemas/organizationsApiV4Message' - type: array - result: - $ref: '#/components/schemas/organizationsApiOrganization' - success: - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: The request has succeeded. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/organizationsApiV4ErrorResponse' - description: An unexpected error response. - security: - - api_email: [] - api_key: [] - summary: Modify organization. - tags: - - Organizations - x-stackql-sdk: - service: organizations - resource_chain: [] - method: update - /organizations/{organization_id}/accounts: - get: - description: >- - Retrieve a list of accounts that belong to a specific organization. - (Currently in Closed Beta - see - https://developers.cloudflare.com/fundamentals/organizations/) - operationId: Organizations_getAccounts - parameters: - - name: organization_id - in: path - required: true - description: The organization ID. - schema: - type: string - - deprecated: true - description: >- - (case-insensitive) Filter the list of accounts to where the - account_pubname is equal to a particular string. - explode: false - in: query - name: account_pubname - schema: - type: string - - deprecated: true - description: >- - (case-insensitive) Filter the list of accounts to where the - account_pubname starts with a particular string. - explode: false - in: query - name: account_pubname.startsWith - schema: - type: string - - deprecated: true - description: >- - (case-insensitive) Filter the list of accounts to where the - account_pubname ends with a particular string. - explode: false - in: query - name: account_pubname.endsWith - schema: - type: string - - deprecated: true - description: >- - (case-insensitive) Filter the list of accounts to where the - account_pubname contains a particular string. - explode: false - in: query - name: account_pubname.contains - schema: - type: string - - description: >- - (case-insensitive) Filter the list of accounts to where the name is - equal to a particular string. - explode: false - in: query - name: name - schema: - type: string - - description: >- - (case-insensitive) Filter the list of accounts to where the name - starts with a particular string. - explode: false - in: query - name: name.startsWith - schema: - type: string - - description: >- - (case-insensitive) Filter the list of accounts to where the name - ends with a particular string. - explode: false - in: query - name: name.endsWith - schema: - type: string - - description: >- - (case-insensitive) Filter the list of accounts to where the name - contains a particular string. - explode: false - in: query - name: name.contains - schema: - type: string - - description: >- - Field to order results by. Currently supported values: - `account_name`. When not specified, results are ordered by internal - account ID. - explode: false - in: query - name: order_by - schema: - enum: - - account_name - type: string - - description: >- - Sort direction for the order_by field. Valid values: `asc`, `desc`. - Defaults to `asc` when order_by is specified. - explode: false - in: query - name: direction - schema: - enum: - - asc - - desc - type: string - - description: >- - An opaque token returned from the last list response that when - provided will retrieve the next page. Parameters used to filter the - retrieved list must remain in subsequent requests with a page token. - explode: false - in: query - name: page_token - schema: - type: string - - description: The amount of items to return. Defaults to 10. - explode: false - in: query - name: page_size - schema: - maximum: 1000 - minimum: 0 - type: integer - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - type: object - maxItems: 0 - type: array - messages: - items: - $ref: '#/components/schemas/organizationsApiV4Message' - type: array - result: - items: - $ref: '#/components/schemas/organizationsApiAccount' - type: array - result_info: - $ref: '#/components/schemas/organizationsApiPageTokenResultInfo' - success: - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - - result_info - type: object - description: The request has succeeded. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/organizationsApiV4ErrorResponse' - description: An unexpected error response. - security: - - api_email: [] - api_key: [] - summary: Get organization accounts - tags: - - Organizations - /organizations/{organization_id}/logs/audit: - get: - description: Gets a list of audit logs for an organization. - operationId: audit-logs-v2-get-organization-audit-logs - parameters: - - name: organization_id - in: path - required: true - description: The organization ID. - schema: - type: string - - in: query - name: action_result - schema: - description: Filters by whether the action was successful or not. - items: - enum: - - success - - failure - type: string - type: array - explode: true - - in: query - name: action_type - schema: - description: Filters by the action type. - items: - enum: - - create - - delete - - view - - update - type: string - type: array - explode: true - - in: query - name: actor_context - schema: - description: Filters by the actor context. - items: - enum: - - api_key - - api_token - - dash - - oauth - - origin_ca_key - type: string - type: array - explode: true - - in: query - name: actor_email - schema: - description: Filters by the actor's email address. - items: - format: email - type: string - type: array - explode: true - - in: query - name: actor_id - schema: - description: Filters by the actor's user ID. - items: - type: string - type: array - explode: true - - in: query - name: actor_ip_address - schema: - description: The IP address where the action was initiated. - items: - type: string - type: array - explode: true - - in: query - name: actor_token_id - schema: - description: >- - Filters by the API token ID when the actor context is an api_token - or oauth. - items: - type: string - type: array - explode: true - - in: query - name: actor_token_name - schema: - description: >- - Filters by the API token name when the actor context is an - api_token or oauth. - items: - type: string - type: array - explode: true - - in: query - name: actor_type - schema: - description: Filters by the actor type. - items: - enum: - - cloudflare_admin - - system - - user - type: string - type: array - explode: true - - in: query - name: id - schema: - description: Finds a specific log by its ID. - items: - type: string - type: array - explode: true - - in: query - name: raw_cf_ray_id - schema: - description: Filters by the response CF Ray ID. - items: - type: string - type: array - explode: true - - in: query - name: raw_method - schema: - description: The HTTP method for the API call. - items: - type: string - type: array - explode: true - - in: query - name: raw_status_code - schema: - description: The response status code that was returned. - items: - type: integer - type: array - explode: true - - in: query - name: raw_uri - schema: - description: Filters by the request URI. - items: - type: string - type: array - explode: true - - in: query - name: resource_id - schema: - description: Filters by the resource ID. - items: - type: string - type: array - explode: true - - in: query - name: resource_product - schema: - description: >- - Filters audit logs by the Cloudflare product associated with the - changed resource. - items: - type: string - type: array - explode: true - - in: query - name: resource_type - schema: - description: >- - Filters audit logs based on the unique type of resource changed by - the action. - items: - type: string - type: array - explode: true - - in: query - name: resource_scope - schema: - description: >- - Filters by the resource scope, specifying whether the resource is - associated with an organization. - items: - enum: - - organizations - type: string - type: array - explode: true - - in: query - name: action_result.not - schema: - description: >- - Filters out audit logs by whether the action was successful or - not. - items: - enum: - - success - - failure - type: string - type: array - explode: true - - in: query - name: action_type.not - schema: - description: Filters out audit logs by the action type. - items: - enum: - - create - - delete - - view - - update - type: string - type: array - explode: true - - in: query - name: actor_context.not - schema: - description: Filters out audit logs by the actor context. - items: - enum: - - api_key - - api_token - - dash - - oauth - - origin_ca_key - type: string - type: array - explode: true - - in: query - name: actor_email.not - schema: - description: Filters out audit logs by the actor's email address. - items: - format: email - type: string - type: array - explode: true - - in: query - name: actor_id.not - schema: - description: Filters out audit logs by the actor's user ID. - items: - type: string - type: array - explode: true - - in: query - name: actor_ip_address.not - schema: - description: Filters out audit logs IP address where the action was initiated. - items: - type: string - type: array - explode: true - - in: query - name: actor_token_id.not - schema: - description: >- - Filters out audit logs by the API token ID when the actor context - is an api_token or oauth. - items: - type: string - type: array - explode: true - - in: query - name: actor_token_name.not - schema: - description: >- - Filters out audit logs by the API token name when the actor - context is an api_token or oauth. - items: - type: string - type: array - explode: true - - in: query - name: actor_type.not - schema: - description: Filters out audit logs by the actor type. - items: - enum: - - cloudflare_admin - - system - - user - type: string - type: array - explode: true - - in: query - name: id.not - schema: - description: Filters out audit logs by their IDs. - items: - type: string - type: array - explode: true - - in: query - name: raw_cf_ray_id.not - schema: - description: Filters out audit logs by the response CF Ray ID. - items: - type: string - type: array - explode: true - - in: query - name: raw_method.not - schema: - description: Filters out audit logs by the HTTP method for the API call. - items: - type: string - type: array - explode: true - - in: query - name: raw_status_code.not - schema: - description: >- - Filters out audit logs by the response status code that was - returned. - items: - type: integer - type: array - explode: true - - in: query - name: raw_uri.not - schema: - description: Filters out audit logs by the request URI. - items: - type: string - type: array - explode: true - - in: query - name: resource_id.not - schema: - description: Filters out audit logs by the resource ID. - items: - type: string - type: array - explode: true - - in: query - name: resource_product.not - schema: - description: >- - Filters out audit logs by the Cloudflare product associated with - the changed resource. - items: - type: string - type: array - explode: true - - in: query - name: resource_type.not - schema: - description: >- - Filters out audit logs based on the unique type of resource - changed by the action. - items: - type: string - type: array - explode: true - - in: query - name: resource_scope.not - schema: - description: >- - Filters out audit logs by the resource scope, specifying whether - the resource is associated with an organization. - items: - enum: - - organizations - type: string - type: array - explode: true - - description: >- - Limits the returned results to logs newer than the specified date. - This can be a date string 2019-04-30 (interpreted in UTC) or an - absolute timestamp that conforms to RFC3339. - in: query - name: since - schema: - format: date - type: string - - description: >- - Limits the returned results to logs older than the specified date. - This can be a date string 2019-04-30 (interpreted in UTC) or an - absolute timestamp that conforms to RFC3339. - in: query - name: before - schema: - format: date - type: string - - in: query - name: direction - schema: - default: desc - description: Sets sorting order. - enum: - - desc - - asc - type: string - - in: query - name: limit - schema: - default: 100 - description: >- - The number limits the objects to return. The cursor attribute may - be used to iterate over the next batch of objects if there are - more than the limit. - maximum: 1000 - minimum: 1 - type: number - - in: query - name: cursor - schema: - description: >- - The cursor is an opaque token used to paginate through large sets - of records. It indicates the position from which to continue when - requesting the next set of records. A valid cursor value can be - obtained from the cursor object in the result_info structure of a - previous response. - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/aaaAuditLogsV2OrgResponseCollection' - description: Get organization audit logs successful response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/aaaSchemasApiResponseCommonFailure' - description: Get organization audit logs failed response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get organization audit logs (Version 2, Beta release) - tags: - - Audit Logs - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: organizations - resource_chain: - - logs - - audit - method: list - /organizations/{organization_id}/members:batchCreate: - post: - description: >- - Batch create multiple memberships that grant access to a specific - Organization. - operationId: Members_batchCreate - parameters: - - name: organization_id - in: path - required: true - description: The organization ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/organizationsApiBatchCreateMembersRequest' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - type: object - maxItems: 0 - type: array - messages: - items: - $ref: '#/components/schemas/organizationsApiV4Message' - type: array - result: - items: - $ref: '#/components/schemas/organizationsApiMember' - type: array - success: - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: The request has succeeded. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/organizationsApiV4ErrorResponse' - description: An unexpected error response. - security: - - api_email: [] - api_key: [] - summary: Batch create organization members - tags: - - OrganizationMembers - /organizations/{organization_id}/profile: - get: - description: >- - Get an organizations profile if it exists. (Currently in Closed Beta - - see https://developers.cloudflare.com/fundamentals/organizations/) - operationId: Organizations_getProfile - parameters: - - name: organization_id - in: path - required: true - description: The organization ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/organizationsApiProfileResponse' - description: The request has succeeded. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/organizationsApiV4ErrorResponse' - description: An unexpected error response. - security: - - api_email: [] - api_key: [] - summary: Get organization profile - tags: - - Organizations - x-stackql-sdk: - service: organizations - resource_chain: - - organization_profile - method: get - put: - description: >- - Modify organization profile. (Currently in Closed Beta - see - https://developers.cloudflare.com/fundamentals/organizations/) - operationId: Organizations_modifyProfile - parameters: - - name: organization_id - in: path - required: true - description: The organization ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/organizationsApiProfile' - responses: - '204': - description: >- - There is no content to send for this request, but the headers may be - useful. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/organizationsApiV4ErrorResponse' - description: An unexpected error response. - security: - - api_email: [] - api_key: [] - summary: Modify organization profile. - tags: - - Organizations - x-stackql-sdk: - service: organizations - resource_chain: - - organization_profile - method: update - /organizations/{organization_id}/shares: - get: - description: Lists all organization shares. - operationId: organization-shares-list - parameters: - - name: organization_id - in: path - required: true - description: The organization ID. - schema: - type: string - - description: Filter shares by status. - in: query - name: status - schema: - $ref: '#/components/schemas/resourceSharingShareStatus' - - description: Filter shares by kind. - in: query - name: kind - schema: - $ref: '#/components/schemas/resourceSharingShareKind' - - description: Filter shares by target_type. - in: query - name: target_type - schema: - $ref: '#/components/schemas/resourceSharingShareTargetType' - - description: Filter share resources by resource_types. - in: query - name: resource_types - schema: - items: - $ref: '#/components/schemas/resourceSharingResourceType' - type: array - explode: true - - description: Order shares by values in the given field. - in: query - name: order - schema: - default: created - enum: - - name - - created - type: string - - description: Direction to sort objects. - in: query - name: direction - schema: - default: asc - enum: - - asc - - desc - type: string - - description: Page number. - in: query - name: page - schema: - minimum: 0 - multipleOf: 1 - type: integer - - description: Number of objects to return per page. - in: query - name: per_page - schema: - maximum: 100 - minimum: 0 - multipleOf: 1 - type: integer - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingShareResponseCollection' - description: List organization shares response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: List organization shares response failure. - 5XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: List organization shares response failure. - security: - - api_email: [] - api_key: [] - summary: List organization shares - tags: - - Resource Sharing - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false -components: - schemas: - aaaAuditLogAction: - description: Provides information about the action performed. - properties: - description: - description: A short description of the action performed. - example: Add Member - type: string - result: - description: The result of the action, indicating success or failure. - example: success - type: string - time: - description: A timestamp indicating when the action was logged. - example: '2024-04-26T17:31:07Z' - format: date-time - type: string - type: - description: A short string that describes the action that was performed. - example: create - type: string - type: object - aaaAuditLogRaw: - description: Provides raw information about the request and response. - properties: - cf_ray_id: - description: The Cloudflare Ray ID for the request. - example: 8e9b1c60ef9e1c9a - type: string - method: - description: The HTTP method of the request. - example: POST - type: string - status_code: - description: The HTTP response status code returned by the API. - example: 200 - type: integer - uri: - description: The URI of the request. - example: /accounts/4bb334f7c94c4a29a045f03944f072e5/members - type: string - user_agent: - description: The client's user agent string sent with the request. - example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) Safari/605.1.15 - type: string - type: object - aaaAuditLogsV2Org: - properties: - action: - $ref: '#/components/schemas/aaaAuditLogAction' - actor: - description: Provides details about the actor who performed the action. - properties: - context: - enum: - - api_key - - api_token - - dash - - oauth - - origin_ca_key - example: dash - type: string - email: - description: The email of the actor who performed the action. - example: alice@example.com - format: email - type: string - id: - description: >- - The ID of the actor who performed the action. If a user - performed the action, this will be their User ID. - example: f6b5de0326bb5182b8a4840ee01ec774 - type: string - ip_address: - description: The IP address of the request that performed the action. - example: 198.41.129.166 - type: string - token_id: - description: >- - The API token ID when the actor context is an api_token or - oauth. - type: string - token_name: - description: >- - The API token name when the actor context is an api_token or - oauth. - type: string - type: - description: The type of actor. - enum: - - cloudflare_admin - - system - - user - example: user - type: string - type: object - id: - $ref: '#/components/schemas/aaaSchemasIdentifier' - organization: - description: Contains organization related information. - properties: - id: - description: A unique identifier for the organization. - example: 019c4f65e7607d8c9f6f6b58aa3aff50 - type: string - type: object - raw: - $ref: '#/components/schemas/aaaAuditLogRaw' - resource: - description: Provides details about the affected resource. - properties: - id: - description: The unique identifier for the affected resource. - type: string - product: - description: The Cloudflare product associated with the resource. - example: organizations - type: string - request: - type: object - response: - type: object - scope: - description: The scope of the resource. - type: object - type: - description: The type of the resource. - type: string - type: object - type: object - aaaAuditLogsV2OrgResponseCollection: - properties: - errors: - $ref: '#/components/schemas/aaaSchemasMessages' - result_info: - $ref: '#/components/schemas/aaaResultInfo' - success: - description: Indicates whether the API call was successful - enum: - - true - example: true - type: boolean - result: - items: - $ref: '#/components/schemas/aaaAuditLogsV2Org' - type: array - type: object - aaaResultInfo: - description: >- - Provides information about the result of the request, including count - and cursor. - properties: - count: - description: The number of records returned in the response. - example: '1' - type: string - cursor: - description: The cursor token used for pagination. - example: >- - ASqdKd7dKgxh-aZ8bm0mZos1BtW4BdEqifCzNkEeGRzi_5SN_-362Y8sF-C1TRn60_6rd3z2dIajf9EAPyQ_NmIeAMkacmaJPXipqvP7PLU4t72wyqBeJfjmjdE= - type: string - type: object - aaaSchemasApiResponseCommonFailure: - properties: - errors: - description: A list of error messages. - items: - properties: - message: - description: A text description of this message. - example: No route for the URI - type: string - required: - - message - type: object - uniqueItems: true - type: array - messages: - example: [] - items: - properties: - message: - type: string - type: object - uniqueItems: true - type: array - success: - description: Indicates whether the API call was failed - enum: - - false - example: false - type: boolean - required: - - success - - errors - type: object - aaaSchemasIdentifier: - description: A unique identifier for the audit log entry. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - readOnly: true - type: string - aaaSchemasMessages: - example: [] - items: - properties: - message: - type: string - required: - - message - type: object - uniqueItems: true - type: array - organizationsApiAccount: - properties: - created_on: - format: date-time - type: string - readOnly: true - id: - type: string - name: - nullable: true - type: string - settings: - properties: - abuse_contact_email: - nullable: true - type: string - access_approval_expiry: - format: date-time - nullable: true - type: string - api_access_enabled: - nullable: true - type: boolean - default_nameservers: - deprecated: true - description: >- - Use [DNS - Settings](https://developers.cloudflare.com/api/operations/dns-settings-for-an-account-list-dns-settings) - instead. Deprecated. - nullable: true - type: string - enforce_twofactor: - nullable: true - type: boolean - use_account_custom_ns_by_default: - deprecated: true - description: >- - Use [DNS - Settings](https://developers.cloudflare.com/api/operations/dns-settings-for-an-account-list-dns-settings) - instead. Deprecated. - nullable: true - type: boolean - required: - - enforce_twofactor - - api_access_enabled - - access_approval_expiry - - abuse_contact_email - - use_account_custom_ns_by_default - - default_nameservers - type: object - type: - enum: - - standard - - enterprise - type: string - required: - - id - - name - - type - - settings - - created_on - type: object - organizationsApiBatchCreateMembersRequest: - properties: - members: - items: - $ref: '#/components/schemas/organizationsApiCreateSingleMember' - maxItems: 10 - type: array - required: - - members - type: object - organizationsApiCreateSingleMember: - properties: - status: - enum: - - active - - canceled - type: string - user: - properties: - email: - type: string - required: - - email - type: object - required: - - user - type: object - organizationsApiDeleteOrganizationResponse: - properties: - id: - type: string - required: - - id - type: object - organizationsApiMember: - properties: - create_time: - format: date-time - type: string - id: - $ref: '#/components/schemas/organizationsApiMemberID' - meta: - type: object - status: - enum: - - active - - canceled - type: string - update_time: - format: date-time - type: string - user: - $ref: '#/components/schemas/organizationsApiMemberSubjectUser' - required: - - id - - status - - user - - meta - - create_time - - update_time - type: object - organizationsApiMemberID: - description: Organization Member ID - example: a7b9c3d2e8f4g1h5i6j0k9l2m3n7o4p8 - type: string - organizationsApiMemberSubjectUser: - properties: - email: - type: string - id: - type: string - name: - type: string - two_factor_authentication_enabled: - type: boolean - required: - - id - - email - - name - - two_factor_authentication_enabled - type: object - organizationsApiOrganization: - description: References an Organization in the Cloudflare data model. - properties: - create_time: - format: date-time - readOnly: true - type: string - id: - readOnly: true - $ref: '#/components/schemas/organizationsApiOrganizationID' - meta: - properties: - flags: - $ref: '#/components/schemas/organizationsApiOrganizationFlags' - managed_by: - type: string - readOnly: true - type: object - name: - type: string - parent: - properties: - id: - $ref: '#/components/schemas/organizationsApiOrganizationID' - name: - readOnly: true - type: string - required: - - id - - name - type: object - profile: - $ref: '#/components/schemas/organizationsApiProfile' - required: - - id - - name - - create_time - - meta - type: object - organizationsApiOrganizationFlags: - description: Enable features for Organizations. - properties: - account_creation: - type: string - account_deletion: - type: string - account_migration: - type: string - account_mobility: - type: string - sub_org_creation: - type: string - required: - - account_creation - - account_deletion - - account_migration - - account_mobility - - sub_org_creation - type: object - organizationsApiOrganizationID: - example: a7b9c3d2e8f4g1h5i6j0k9l2m3n7o4p8 - title: Organization ID - type: string - organizationsApiPageTokenResultInfo: - properties: - next_page_token: - description: >- - Use this opaque token in the next request to retrieve the next page. - Parameters used to filter the retrieved list must remain in - subsequent requests with a page token. - type: string - total_size: - description: >- - Counts the total amount of items in a list with the applied filters. - The API omits next_page_token to indicate no more items in a - particular list. - type: integer - type: object - organizationsApiProfile: - properties: - business_address: - type: string - business_email: - type: string - business_name: - type: string - business_phone: - type: string - external_metadata: - type: string - required: - - business_name - - business_email - - business_phone - - business_address - - external_metadata - type: object - organizationsApiProfileResponse: - properties: - errors: - items: - type: object - maxItems: 0 - type: array - messages: - items: - $ref: '#/components/schemas/organizationsApiV4Message' - type: array - result: - $ref: '#/components/schemas/organizationsApiProfile' - success: - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - organizationsApiV4ErrorResponse: - properties: - errors: - items: - $ref: '#/components/schemas/organizationsApiV4Message' - type: array - messages: - items: - $ref: '#/components/schemas/organizationsApiV4Message' - type: array - result: - type: object - success: - enum: - - false - type: boolean - required: - - success - - errors - - messages - type: object - organizationsApiV4Message: - $ref: '#/components/schemas/responseInfo' - resourceSharingAccountId: - description: Account identifier. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - type: string - x-auditable: true - resourceSharingAccountName: - description: The display name of an account. - example: Account A - type: string - x-auditable: true - resourceSharingApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/resourceSharingV4errors' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - example: false - type: boolean - x-auditable: true - required: - - success - - errors - - result - type: object - resourceSharingCreated: - description: When the share was created. - example: '2023-09-21T18:56:32.624632Z' - format: date-time - type: string - x-auditable: true - resourceSharingModified: - description: When the share was modified. - example: '2023-09-21T18:56:32.624632Z' - format: date-time - type: string - x-auditable: true - resourceSharingOrganizationId: - description: Organization identifier. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - type: string - x-auditable: true - resourceSharingResourceId: - description: Share Resource identifier. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - type: string - x-auditable: true - resourceSharingResourceMeta: - description: Resource Metadata. - type: object - resourceSharingResourceResourceId: - description: Share Resource identifier. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - type: string - x-auditable: true - resourceSharingResourceStatus: - description: Resource Status. - enum: - - active - - deleting - - deleted - type: string - x-auditable: true - resourceSharingResourceType: - description: Resource Type. - enum: - - custom-ruleset - - gateway-policy - - gateway-destination-ip - - gateway-block-page-settings - - gateway-extended-email-matching - type: string - x-auditable: true - resourceSharingResourceVersion: - description: Resource Version. - type: integer - x-auditable: true - resourceSharingResultInfo: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 2000 - type: number - total_pages: - description: Total number of pages using the given per page. - example: 50 - type: number - type: object - resourceSharingShareId: - description: Share identifier tag. - example: 3fd85f74b32742f1bff64a85009dda07 - maxLength: 32 - type: string - x-auditable: true - resourceSharingShareKind: - enum: - - sent - - received - type: string - x-auditable: true - resourceSharingShareName: - description: The name of the share. - example: My Shared WAF Managed Rule - type: string - x-auditable: true - resourceSharingShareObject: - properties: - account_id: - $ref: '#/components/schemas/resourceSharingAccountId' - account_name: - $ref: '#/components/schemas/resourceSharingAccountName' - associated_recipient_count: - description: >- - The number of recipients in the 'associated' state. This field is - only included when requested via the 'include_recipient_counts' - parameter. - example: 10 - type: integer - associating_recipient_count: - description: >- - The number of recipients in the 'associating' state. This field is - only included when requested via the 'include_recipient_counts' - parameter. - example: 1 - type: integer - created: - $ref: '#/components/schemas/resourceSharingCreated' - disassociated_recipient_count: - description: >- - The number of recipients in the 'disassociated' state. This field is - only included when requested via the 'include_recipient_counts' - parameter. - example: 0 - type: integer - disassociating_recipient_count: - description: >- - The number of recipients in the 'disassociating' state. This field - is only included when requested via the 'include_recipient_counts' - parameter. - example: 0 - type: integer - id: - $ref: '#/components/schemas/resourceSharingShareId' - kind: - $ref: '#/components/schemas/resourceSharingShareKind' - modified: - $ref: '#/components/schemas/resourceSharingModified' - name: - $ref: '#/components/schemas/resourceSharingShareName' - organization_id: - $ref: '#/components/schemas/resourceSharingOrganizationId' - resources: - description: >- - A list of resources that are part of the share. This field is only - included when requested via the 'include_resources' parameter. - items: - $ref: '#/components/schemas/resourceSharingShareResourceObject' - type: array - status: - $ref: '#/components/schemas/resourceSharingShareStatus' - target_type: - $ref: '#/components/schemas/resourceSharingShareTargetType' - required: - - id - - name - - account_id - - account_name - - organization_id - - created - - modified - - status - - target_type - type: object - resourceSharingShareResourceObject: - properties: - created: - $ref: '#/components/schemas/resourceSharingCreated' - id: - $ref: '#/components/schemas/resourceSharingResourceId' - meta: - $ref: '#/components/schemas/resourceSharingResourceMeta' - modified: - $ref: '#/components/schemas/resourceSharingModified' - resource_account_id: - $ref: '#/components/schemas/resourceSharingAccountId' - resource_id: - $ref: '#/components/schemas/resourceSharingResourceResourceId' - resource_type: - $ref: '#/components/schemas/resourceSharingResourceType' - resource_version: - $ref: '#/components/schemas/resourceSharingResourceVersion' - status: - $ref: '#/components/schemas/resourceSharingResourceStatus' - required: - - id - - resource_id - - resource_type - - resource_account_id - - meta - - status - - created - - modified - - resource_version - type: object - resourceSharingShareResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/resourceSharingV4errors' - result: - items: - $ref: '#/components/schemas/resourceSharingShareObject' - nullable: true - type: array - success: - description: Whether the API call was successful. - example: true - type: boolean - result_info: - $ref: '#/components/schemas/resourceSharingResultInfo' - required: - - success - - errors - resourceSharingShareStatus: - enum: - - active - - deleting - - deleted - type: string - x-auditable: true - resourceSharingShareTargetType: - enum: - - account - - organization - type: string - x-auditable: true - resourceSharingV4error: - $ref: '#/components/schemas/responseInfo' - resourceSharingV4errors: - example: [] - items: - $ref: '#/components/schemas/resourceSharingV4error' - type: array - responseInfo: - properties: - code: - minimum: 1000 - type: integer - message: - type: string - documentation_url: - type: string - source: - type: object - properties: - pointer: - type: string - required: - - code - - message - type: object - uniqueItems: true - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - organizations: - id: cloudflare.organizations.organizations - name: organizations - title: Organizations - methods: - list_by_account: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1organizations/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - list_by_organization: - operation: - $ref: '#/paths/~1organizations/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1organizations/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: '#/paths/~1organizations~1{organization_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1organizations~1{organization_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1organizations~1{organization_id}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - create_members_batch_create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1organizations~1{organization_id}~1members:batchCreate/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/organizations/methods/list_by_account - - $ref: '#/components/x-stackQL-resources/organizations/methods/get' - - $ref: >- - #/components/x-stackQL-resources/organizations/methods/list_by_organization - insert: - - $ref: '#/components/x-stackQL-resources/organizations/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/organizations/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/organizations/methods/update' - accounts: - id: cloudflare.organizations.accounts - name: accounts - title: Accounts - methods: - list: - operation: - $ref: '#/paths/~1organizations~1{organization_id}~1accounts/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/accounts/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - audit: - id: cloudflare.organizations.audit - name: audit - title: Audit - methods: - list: - operation: - $ref: '#/paths/~1organizations~1{organization_id}~1logs~1audit/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/audit/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - organization_profile: - id: cloudflare.organizations.organization_profile - name: organization_profile - title: Organization Profile - methods: - list: - operation: - $ref: '#/paths/~1organizations~1{organization_id}~1profile/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1organizations~1{organization_id}~1profile/put' - response: - mediaType: application/json - openAPIDocKey: '204' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/organization_profile/methods/list' - insert: [] - update: [] - delete: [] - replace: - - $ref: >- - #/components/x-stackQL-resources/organization_profile/methods/update - shares: - id: cloudflare.organizations.shares - name: shares - title: Shares - methods: - list: - operation: - $ref: '#/paths/~1organizations~1{organization_id}~1shares/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/shares/methods/list' - insert: [] - update: [] - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: organizations API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/organizations: + get: + description: Retrieve a list of the organizations that "contain" this account or are managing it. The returned list will be in order from "root" to "leaf", where the "leaf" will be the organization that _immediately_ contains the specified account. + operationId: Accounts_listAccountOrganizations + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + type: object + maxItems: 0 + type: array + messages: + items: + $ref: '#/components/schemas/organizationsApiV4Message' + type: array + result: + items: + $ref: '#/components/schemas/organizationsApiOrganization' + type: array + success: + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: The request has succeeded. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/organizationsApiV4ErrorResponse' + description: An unexpected error response. + security: + - api_email: [] + api_key: [] + summary: List account organizations + tags: + - Accounts + x-api-token-group: + - Trust and Safety Write + - Trust and Safety Read + - DNS View Write + - DNS View Read + - SCIM Provisioning + - Load Balancers Account Write + - Load Balancers Account Read + - 'Zero Trust: PII Read' + - DDoS Botnet Feed Write + - DDoS Botnet Feed Read + - Workers R2 Storage Write + - Workers R2 Storage Read + - DDoS Protection Write + - DDoS Protection Read + - Workers Tail Read + - Workers KV Storage Write + - Workers KV Storage Read + - Workers Scripts Write + - Workers Scripts Read + - 'Load Balancing: Monitors and Pools Write' + - 'Load Balancing: Monitors and Pools Read' + - Account Firewall Access Rules Write + - Account Firewall Access Rules Read + - DNS Firewall Write + - DNS Firewall Read + - Billing Write + - Billing Read + - Account Settings Write + - Account Settings Read + /organizations: + get: + description: Retrieve a list of organizations a particular user has access to. (Currently in Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/) + operationId: Organization_listOrganizations + parameters: + - description: Only return organizations with the specified IDs (ex. id=foo&id=bar). Send multiple elements by repeating the query value. + explode: false + in: query + name: id + schema: + items: + $ref: '#/components/schemas/organizationsApiOrganizationID' + type: array + - description: (case-sensitive) Filter the list of organizations to where the name is equal to a particular string. + explode: false + in: query + name: name + schema: + type: string + - description: (case-insensitive) Filter the list of organizations to where the name starts with a particular string. + explode: false + in: query + name: name.startsWith + schema: + type: string + - description: (case-insensitive) Filter the list of organizations to where the name ends with a particular string. + explode: false + in: query + name: name.endsWith + schema: + type: string + - description: (case-insensitive) Filter the list of organizations to where the name contains a particular string. + explode: false + in: query + name: name.contains + schema: + type: string + - description: Filter the list of organizations to the ones that contain this particular account. + explode: false + in: query + name: containing.account + schema: + type: string + - description: 'Filter the list of organizations to the ones that contain this particular user. IMPORTANT: Just because an organization "contains" a user is not a representation of any authorization or privilege to manage any resources therein. An organization "containing" a user simply means the user is managed by that organization.' + explode: false + in: query + name: containing.user + schema: + type: string + - description: Filter the list of organizations to the ones that contain this particular organization. + explode: false + in: query + name: containing.organization + schema: + type: string + - description: Filter the list of organizations to the ones that are a sub-organization of the specified organization. "null" is a valid value to provide for this parameter. It means "where an organization has no parent (i.e. it is a 'root' organization)." + explode: false + in: query + name: parent.id + schema: + type: string + title: Organization ID + enum: + - 'null' + - description: An opaque token returned from the last list response that when provided will retrieve the next page. Parameters used to filter the retrieved list must remain in subsequent requests with a page token. + explode: false + in: query + name: page_token + schema: + type: string + - description: The amount of items to return. Defaults to 10. + explode: false + in: query + name: page_size + schema: + maximum: 1000 + minimum: 0 + type: integer + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + type: object + maxItems: 0 + type: array + messages: + items: + $ref: '#/components/schemas/organizationsApiV4Message' + type: array + result: + items: + $ref: '#/components/schemas/organizationsApiOrganization' + type: array + result_info: + $ref: '#/components/schemas/organizationsApiPageTokenResultInfo' + success: + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + - result_info + type: object + description: The request has succeeded. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/organizationsApiV4ErrorResponse' + description: An unexpected error response. + security: + - api_email: [] + api_key: [] + summary: List organizations the user has access to + tags: + - Organizations + x-api-token-group: + - User Details Write + - User Details Read + x-stackql-sdk: + service: organizations + resource_chain: [] + method: list + post: + description: Create a new organization for a user. (Currently in Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/) + operationId: Organizations_createUserOrganization + requestBody: + content: + application/json: + schema: + description: References an Organization in the Cloudflare data model. + properties: + create_time: + format: date-time + readOnly: true + type: string + id: + readOnly: true + $ref: '#/components/schemas/organizationsApiOrganizationID' + meta: + properties: + flags: + $ref: '#/components/schemas/organizationsApiOrganizationFlags' + managed_by: + type: string + readOnly: true + type: object + name: + type: string + parent: + properties: + id: + $ref: '#/components/schemas/organizationsApiOrganizationID' + name: + readOnly: true + type: string + required: + - id + type: object + profile: + $ref: '#/components/schemas/organizationsApiProfile' + required: + - name + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + type: object + maxItems: 0 + type: array + messages: + items: + $ref: '#/components/schemas/organizationsApiV4Message' + type: array + result: + $ref: '#/components/schemas/organizationsApiOrganization' + success: + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: The request has succeeded. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/organizationsApiV4ErrorResponse' + description: An unexpected error response. + security: + - api_email: [] + api_key: [] + summary: Create organization + tags: + - Organizations + x-api-token-group: + - User Details Write + x-stackql-sdk: + service: organizations + resource_chain: [] + method: create + /organizations/{organization_id}: + delete: + description: Delete an organization. The organization MUST be empty before deleting. It must not contain any sub-organizations, accounts, members or users. (Currently in Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/) + operationId: Organizations_delete + parameters: + - name: organization_id + in: path + required: true + description: The organization ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + type: object + maxItems: 0 + type: array + messages: + items: + $ref: '#/components/schemas/organizationsApiV4Message' + type: array + result: + $ref: '#/components/schemas/organizationsApiDeleteOrganizationResponse' + success: + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: The request has succeeded. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/organizationsApiV4ErrorResponse' + description: An unexpected error response. + security: + - api_email: [] + api_key: [] + summary: Delete organization. + tags: + - Organizations + x-stackql-sdk: + service: organizations + resource_chain: [] + method: delete + get: + description: Retrieve the details of a certain organization. (Currently in Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/) + operationId: Organizations_retrieve + parameters: + - name: organization_id + in: path + required: true + description: The organization ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + type: object + maxItems: 0 + type: array + messages: + items: + $ref: '#/components/schemas/organizationsApiV4Message' + type: array + result: + $ref: '#/components/schemas/organizationsApiOrganization' + success: + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: The request has succeeded. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/organizationsApiV4ErrorResponse' + description: An unexpected error response. + security: + - api_email: [] + api_key: [] + summary: Get organization + tags: + - Organizations + x-stackql-sdk: + service: organizations + resource_chain: [] + method: get + put: + description: Modify organization. (Currently in Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/) + operationId: Organizations_modify + parameters: + - name: organization_id + in: path + required: true + description: The organization ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + description: References an Organization in the Cloudflare data model. + properties: + create_time: + format: date-time + readOnly: true + type: string + id: + readOnly: true + $ref: '#/components/schemas/organizationsApiOrganizationID' + meta: + properties: + flags: + $ref: '#/components/schemas/organizationsApiOrganizationFlags' + managed_by: + type: string + readOnly: true + type: object + name: + type: string + parent: + properties: + id: + $ref: '#/components/schemas/organizationsApiOrganizationID' + name: + readOnly: true + type: string + required: + - id + type: object + profile: + $ref: '#/components/schemas/organizationsApiProfile' + required: + - name + type: object + description: The new details of the organization. Only accepts updates to "name" currently. + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + type: object + maxItems: 0 + type: array + messages: + items: + $ref: '#/components/schemas/organizationsApiV4Message' + type: array + result: + $ref: '#/components/schemas/organizationsApiOrganization' + success: + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: The request has succeeded. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/organizationsApiV4ErrorResponse' + description: An unexpected error response. + security: + - api_email: [] + api_key: [] + summary: Modify organization. + tags: + - Organizations + x-stackql-sdk: + service: organizations + resource_chain: [] + method: update + /organizations/{organization_id}/accounts: + get: + description: Retrieve a list of accounts that belong to a specific organization. (Currently in Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/) + operationId: Organizations_getAccounts + parameters: + - name: organization_id + in: path + required: true + description: The organization ID. + schema: + type: string + - deprecated: true + description: (case-insensitive) Filter the list of accounts to where the account_pubname is equal to a particular string. + explode: false + in: query + name: account_pubname + schema: + type: string + - deprecated: true + description: (case-insensitive) Filter the list of accounts to where the account_pubname starts with a particular string. + explode: false + in: query + name: account_pubname.startsWith + schema: + type: string + - deprecated: true + description: (case-insensitive) Filter the list of accounts to where the account_pubname ends with a particular string. + explode: false + in: query + name: account_pubname.endsWith + schema: + type: string + - deprecated: true + description: (case-insensitive) Filter the list of accounts to where the account_pubname contains a particular string. + explode: false + in: query + name: account_pubname.contains + schema: + type: string + - description: (case-insensitive) Filter the list of accounts to where the name is equal to a particular string. + explode: false + in: query + name: name + schema: + type: string + - description: (case-insensitive) Filter the list of accounts to where the name starts with a particular string. + explode: false + in: query + name: name.startsWith + schema: + type: string + - description: (case-insensitive) Filter the list of accounts to where the name ends with a particular string. + explode: false + in: query + name: name.endsWith + schema: + type: string + - description: (case-insensitive) Filter the list of accounts to where the name contains a particular string. + explode: false + in: query + name: name.contains + schema: + type: string + - description: 'Field to order results by. Currently supported values: `account_name`. When not specified, results are ordered by internal account ID.' + explode: false + in: query + name: order_by + schema: + enum: + - account_name + type: string + - description: 'Sort direction for the order_by field. Valid values: `asc`, `desc`. Defaults to `asc` when order_by is specified.' + explode: false + in: query + name: direction + schema: + enum: + - asc + - desc + type: string + - description: An opaque token returned from the last list response that when provided will retrieve the next page. Parameters used to filter the retrieved list must remain in subsequent requests with a page token. + explode: false + in: query + name: page_token + schema: + type: string + - description: The amount of items to return. Defaults to 10. + explode: false + in: query + name: page_size + schema: + maximum: 1000 + minimum: 0 + type: integer + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + type: object + maxItems: 0 + type: array + messages: + items: + $ref: '#/components/schemas/organizationsApiV4Message' + type: array + result: + items: + $ref: '#/components/schemas/organizationsApiAccount' + type: array + result_info: + $ref: '#/components/schemas/organizationsApiPageTokenResultInfo' + success: + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + - result_info + type: object + description: The request has succeeded. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/organizationsApiV4ErrorResponse' + description: An unexpected error response. + security: + - api_email: [] + api_key: [] + summary: Get organization accounts + tags: + - Organizations + /organizations/{organization_id}/logs/audit: + get: + description: Gets a list of audit logs for an organization. + operationId: audit-logs-v2-get-organization-audit-logs + parameters: + - name: organization_id + in: path + required: true + description: The organization ID. + schema: + type: string + - in: query + name: action_result + schema: + description: Filters by whether the action was successful or not. + items: + enum: + - success + - failure + type: string + type: array + explode: true + - in: query + name: action_type + schema: + description: Filters by the action type. + items: + enum: + - create + - delete + - view + - update + type: string + type: array + explode: true + - in: query + name: actor_context + schema: + description: Filters by the actor context. + items: + enum: + - api_key + - api_token + - dash + - oauth + - origin_ca_key + type: string + type: array + explode: true + - in: query + name: actor_email + schema: + description: Filters by the actor's email address. + items: + format: email + type: string + type: array + explode: true + - in: query + name: actor_id + schema: + description: Filters by the actor's user ID. + items: + type: string + type: array + explode: true + - in: query + name: actor_ip_address + schema: + description: The IP address where the action was initiated. + items: + type: string + type: array + explode: true + - in: query + name: actor_token_id + schema: + description: Filters by the API token ID when the actor context is an api_token or oauth. + items: + type: string + type: array + explode: true + - in: query + name: actor_token_name + schema: + description: Filters by the API token name when the actor context is an api_token or oauth. + items: + type: string + type: array + explode: true + - in: query + name: actor_type + schema: + description: Filters by the actor type. + items: + enum: + - cloudflare_admin + - system + - user + type: string + type: array + explode: true + - in: query + name: id + schema: + description: Finds a specific log by its ID. + items: + type: string + type: array + explode: true + - in: query + name: raw_cf_ray_id + schema: + description: Filters by the response CF Ray ID. + items: + type: string + type: array + explode: true + - in: query + name: raw_method + schema: + description: The HTTP method for the API call. + items: + type: string + type: array + explode: true + - in: query + name: raw_status_code + schema: + description: The response status code that was returned. + items: + type: integer + type: array + explode: true + - in: query + name: raw_uri + schema: + description: Filters by the request URI. + items: + type: string + type: array + explode: true + - in: query + name: resource_id + schema: + description: Filters by the resource ID. + items: + type: string + type: array + explode: true + - in: query + name: resource_product + schema: + description: Filters audit logs by the Cloudflare product associated with the changed resource. + items: + type: string + type: array + explode: true + - in: query + name: resource_type + schema: + description: Filters audit logs based on the unique type of resource changed by the action. + items: + type: string + type: array + explode: true + - in: query + name: resource_scope + schema: + description: Filters by the resource scope, specifying whether the resource is associated with an organization. + items: + enum: + - organizations + type: string + type: array + explode: true + - in: query + name: action_result.not + schema: + description: Filters out audit logs by whether the action was successful or not. + items: + enum: + - success + - failure + type: string + type: array + explode: true + - in: query + name: action_type.not + schema: + description: Filters out audit logs by the action type. + items: + enum: + - create + - delete + - view + - update + type: string + type: array + explode: true + - in: query + name: actor_context.not + schema: + description: Filters out audit logs by the actor context. + items: + enum: + - api_key + - api_token + - dash + - oauth + - origin_ca_key + type: string + type: array + explode: true + - in: query + name: actor_email.not + schema: + description: Filters out audit logs by the actor's email address. + items: + format: email + type: string + type: array + explode: true + - in: query + name: actor_id.not + schema: + description: Filters out audit logs by the actor's user ID. + items: + type: string + type: array + explode: true + - in: query + name: actor_ip_address.not + schema: + description: Filters out audit logs IP address where the action was initiated. + items: + type: string + type: array + explode: true + - in: query + name: actor_token_id.not + schema: + description: Filters out audit logs by the API token ID when the actor context is an api_token or oauth. + items: + type: string + type: array + explode: true + - in: query + name: actor_token_name.not + schema: + description: Filters out audit logs by the API token name when the actor context is an api_token or oauth. + items: + type: string + type: array + explode: true + - in: query + name: actor_type.not + schema: + description: Filters out audit logs by the actor type. + items: + enum: + - cloudflare_admin + - system + - user + type: string + type: array + explode: true + - in: query + name: id.not + schema: + description: Filters out audit logs by their IDs. + items: + type: string + type: array + explode: true + - in: query + name: raw_cf_ray_id.not + schema: + description: Filters out audit logs by the response CF Ray ID. + items: + type: string + type: array + explode: true + - in: query + name: raw_method.not + schema: + description: Filters out audit logs by the HTTP method for the API call. + items: + type: string + type: array + explode: true + - in: query + name: raw_status_code.not + schema: + description: Filters out audit logs by the response status code that was returned. + items: + type: integer + type: array + explode: true + - in: query + name: raw_uri.not + schema: + description: Filters out audit logs by the request URI. + items: + type: string + type: array + explode: true + - in: query + name: resource_id.not + schema: + description: Filters out audit logs by the resource ID. + items: + type: string + type: array + explode: true + - in: query + name: resource_product.not + schema: + description: Filters out audit logs by the Cloudflare product associated with the changed resource. + items: + type: string + type: array + explode: true + - in: query + name: resource_type.not + schema: + description: Filters out audit logs based on the unique type of resource changed by the action. + items: + type: string + type: array + explode: true + - in: query + name: resource_scope.not + schema: + description: Filters out audit logs by the resource scope, specifying whether the resource is associated with an organization. + items: + enum: + - organizations + type: string + type: array + explode: true + - description: Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339. + in: query + name: since + schema: + format: date + type: string + - description: Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339. + in: query + name: before + schema: + format: date + type: string + - in: query + name: direction + schema: + default: desc + description: Sets sorting order. + enum: + - desc + - asc + type: string + - in: query + name: limit + schema: + default: 100 + description: The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit. + maximum: 1000 + minimum: 1 + type: number + - in: query + name: cursor + schema: + description: The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result_info structure of a previous response. + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/aaaAuditLogsV2OrgResponseCollection' + description: Get organization audit logs successful response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/aaaSchemasApiResponseCommonFailure' + description: Get organization audit logs failed response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get organization audit logs (Version 2, Beta release) + tags: + - Audit Logs + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: organizations + resource_chain: + - logs + - audit + method: list + /organizations/{organization_id}/members:batchCreate: + post: + description: Batch create multiple memberships that grant access to a specific Organization. + operationId: Members_batchCreate + parameters: + - name: organization_id + in: path + required: true + description: The organization ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/organizationsApiBatchCreateMembersRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + type: object + maxItems: 0 + type: array + messages: + items: + $ref: '#/components/schemas/organizationsApiV4Message' + type: array + result: + items: + $ref: '#/components/schemas/organizationsApiMember' + type: array + success: + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: The request has succeeded. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/organizationsApiV4ErrorResponse' + description: An unexpected error response. + security: + - api_email: [] + api_key: [] + summary: Batch create organization members + tags: + - OrganizationMembers + /organizations/{organization_id}/profile: + get: + description: Get an organizations profile if it exists. (Currently in Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/) + operationId: Organizations_getProfile + parameters: + - name: organization_id + in: path + required: true + description: The organization ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/organizationsApiProfileResponse' + description: The request has succeeded. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/organizationsApiV4ErrorResponse' + description: An unexpected error response. + security: + - api_email: [] + api_key: [] + summary: Get organization profile + tags: + - Organizations + x-stackql-sdk: + service: organizations + resource_chain: + - organization_profile + method: get + put: + description: Modify organization profile. (Currently in Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/) + operationId: Organizations_modifyProfile + parameters: + - name: organization_id + in: path + required: true + description: The organization ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/organizationsApiProfile' + responses: + '204': + description: There is no content to send for this request, but the headers may be useful. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/organizationsApiV4ErrorResponse' + description: An unexpected error response. + security: + - api_email: [] + api_key: [] + summary: Modify organization profile. + tags: + - Organizations + x-stackql-sdk: + service: organizations + resource_chain: + - organization_profile + method: update + /organizations/{organization_id}/shares: + get: + description: Lists all organization shares. + operationId: organization-shares-list + parameters: + - name: organization_id + in: path + required: true + description: The organization ID. + schema: + type: string + - description: Filter shares by status. + in: query + name: status + schema: + $ref: '#/components/schemas/resourceSharingShareStatus' + - description: Filter shares by kind. + in: query + name: kind + schema: + $ref: '#/components/schemas/resourceSharingShareKind' + - description: Filter shares by target_type. + in: query + name: target_type + schema: + $ref: '#/components/schemas/resourceSharingShareTargetType' + - description: Filter share resources by resource_types. + in: query + name: resource_types + schema: + items: + $ref: '#/components/schemas/resourceSharingResourceType' + type: array + explode: true + - description: Order shares by values in the given field. + in: query + name: order + schema: + default: created + enum: + - name + - created + type: string + - description: Direction to sort objects. + in: query + name: direction + schema: + default: asc + enum: + - asc + - desc + type: string + - description: Page number. + in: query + name: page + schema: + minimum: 0 + multipleOf: 1 + type: integer + - description: Number of objects to return per page. + in: query + name: per_page + schema: + maximum: 100 + minimum: 0 + multipleOf: 1 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingShareResponseCollection' + description: List organization shares response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: List organization shares response failure. + 5XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: List organization shares response failure. + security: + - api_email: [] + api_key: [] + summary: List organization shares + tags: + - Resource Sharing + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false +components: + schemas: + aaaAuditLogAction: + description: Provides information about the action performed. + properties: + description: + description: A short description of the action performed. + example: Add Member + type: string + result: + description: The result of the action, indicating success or failure. + example: success + type: string + time: + description: A timestamp indicating when the action was logged. + example: '2024-04-26T17:31:07Z' + format: date-time + type: string + type: + description: A short string that describes the action that was performed. + example: create + type: string + type: object + aaaAuditLogRaw: + description: Provides raw information about the request and response. + properties: + cf_ray_id: + description: The Cloudflare Ray ID for the request. + example: 8e9b1c60ef9e1c9a + type: string + method: + description: The HTTP method of the request. + example: POST + type: string + status_code: + description: The HTTP response status code returned by the API. + example: 200 + type: integer + uri: + description: The URI of the request. + example: /accounts/4bb334f7c94c4a29a045f03944f072e5/members + type: string + user_agent: + description: The client's user agent string sent with the request. + example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) Safari/605.1.15 + type: string + type: object + aaaAuditLogsV2Org: + properties: + action: + $ref: '#/components/schemas/aaaAuditLogAction' + actor: + description: Provides details about the actor who performed the action. + properties: + context: + enum: + - api_key + - api_token + - dash + - oauth + - origin_ca_key + example: dash + type: string + email: + description: The email of the actor who performed the action. + example: alice@example.com + format: email + type: string + id: + description: The ID of the actor who performed the action. If a user performed the action, this will be their User ID. + example: f6b5de0326bb5182b8a4840ee01ec774 + type: string + ip_address: + description: The IP address of the request that performed the action. + example: 198.41.129.166 + type: string + token_id: + description: The API token ID when the actor context is an api_token or oauth. + type: string + token_name: + description: The API token name when the actor context is an api_token or oauth. + type: string + type: + description: The type of actor. + enum: + - cloudflare_admin + - system + - user + example: user + type: string + type: object + id: + $ref: '#/components/schemas/aaaSchemasIdentifier' + organization: + description: Contains organization related information. + properties: + id: + description: A unique identifier for the organization. + example: 019c4f65e7607d8c9f6f6b58aa3aff50 + type: string + type: object + raw: + $ref: '#/components/schemas/aaaAuditLogRaw' + resource: + description: Provides details about the affected resource. + properties: + id: + description: The unique identifier for the affected resource. + type: string + product: + description: The Cloudflare product associated with the resource. + example: organizations + type: string + request: + type: object + response: + type: object + scope: + description: The scope of the resource. + type: object + type: + description: The type of the resource. + type: string + type: object + type: object + aaaAuditLogsV2OrgResponseCollection: + properties: + errors: + $ref: '#/components/schemas/aaaSchemasMessages' + result_info: + $ref: '#/components/schemas/aaaResultInfo' + success: + description: Indicates whether the API call was successful + enum: + - true + example: true + type: boolean + result: + items: + $ref: '#/components/schemas/aaaAuditLogsV2Org' + type: array + type: object + aaaResultInfo: + description: Provides information about the result of the request, including count and cursor. + properties: + count: + description: The number of records returned in the response. + example: '1' + type: string + cursor: + description: The cursor token used for pagination. + example: ASqdKd7dKgxh-aZ8bm0mZos1BtW4BdEqifCzNkEeGRzi_5SN_-362Y8sF-C1TRn60_6rd3z2dIajf9EAPyQ_NmIeAMkacmaJPXipqvP7PLU4t72wyqBeJfjmjdE= + type: string + type: object + aaaSchemasApiResponseCommonFailure: + properties: + errors: + description: A list of error messages. + items: + properties: + message: + description: A text description of this message. + example: No route for the URI + type: string + required: + - message + type: object + uniqueItems: true + type: array + messages: + example: [] + items: + properties: + message: + type: string + type: object + uniqueItems: true + type: array + success: + description: Indicates whether the API call was failed + enum: + - false + example: false + type: boolean + required: + - success + - errors + type: object + aaaSchemasIdentifier: + description: A unique identifier for the audit log entry. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + readOnly: true + type: string + aaaSchemasMessages: + example: [] + items: + properties: + message: + type: string + required: + - message + type: object + uniqueItems: true + type: array + organizationsApiAccount: + properties: + created_on: + format: date-time + type: string + readOnly: true + id: + type: string + name: + nullable: true + type: string + settings: + properties: + abuse_contact_email: + nullable: true + type: string + access_approval_expiry: + format: date-time + nullable: true + type: string + api_access_enabled: + nullable: true + type: boolean + default_nameservers: + deprecated: true + description: Use [DNS Settings](https://developers.cloudflare.com/api/operations/dns-settings-for-an-account-list-dns-settings) instead. Deprecated. + nullable: true + type: string + enforce_twofactor: + nullable: true + type: boolean + use_account_custom_ns_by_default: + deprecated: true + description: Use [DNS Settings](https://developers.cloudflare.com/api/operations/dns-settings-for-an-account-list-dns-settings) instead. Deprecated. + nullable: true + type: boolean + required: + - enforce_twofactor + - api_access_enabled + - access_approval_expiry + - abuse_contact_email + - use_account_custom_ns_by_default + - default_nameservers + type: object + type: + enum: + - standard + - enterprise + type: string + required: + - id + - name + - type + - settings + - created_on + type: object + organizationsApiBatchCreateMembersRequest: + properties: + members: + items: + $ref: '#/components/schemas/organizationsApiCreateSingleMember' + maxItems: 10 + type: array + required: + - members + type: object + organizationsApiCreateSingleMember: + properties: + status: + enum: + - active + - canceled + type: string + user: + properties: + email: + type: string + required: + - email + type: object + required: + - user + type: object + organizationsApiDeleteOrganizationResponse: + properties: + id: + type: string + required: + - id + type: object + organizationsApiMember: + properties: + create_time: + format: date-time + type: string + id: + $ref: '#/components/schemas/organizationsApiMemberID' + meta: + type: object + status: + enum: + - active + - canceled + type: string + update_time: + format: date-time + type: string + user: + $ref: '#/components/schemas/organizationsApiMemberSubjectUser' + required: + - id + - status + - user + - meta + - create_time + - update_time + type: object + organizationsApiMemberID: + description: Organization Member ID + example: a7b9c3d2e8f4g1h5i6j0k9l2m3n7o4p8 + type: string + organizationsApiMemberSubjectUser: + properties: + email: + type: string + id: + type: string + name: + type: string + two_factor_authentication_enabled: + type: boolean + required: + - id + - email + - name + - two_factor_authentication_enabled + type: object + organizationsApiOrganization: + description: References an Organization in the Cloudflare data model. + properties: + create_time: + format: date-time + readOnly: true + type: string + id: + readOnly: true + $ref: '#/components/schemas/organizationsApiOrganizationID' + meta: + properties: + flags: + $ref: '#/components/schemas/organizationsApiOrganizationFlags' + managed_by: + type: string + readOnly: true + type: object + name: + type: string + parent: + properties: + id: + $ref: '#/components/schemas/organizationsApiOrganizationID' + name: + readOnly: true + type: string + required: + - id + - name + type: object + profile: + $ref: '#/components/schemas/organizationsApiProfile' + required: + - id + - name + - create_time + - meta + type: object + organizationsApiOrganizationFlags: + description: Enable features for Organizations. + properties: + account_creation: + type: string + account_deletion: + type: string + account_migration: + type: string + account_mobility: + type: string + sub_org_creation: + type: string + required: + - account_creation + - account_deletion + - account_migration + - account_mobility + - sub_org_creation + type: object + organizationsApiOrganizationID: + example: a7b9c3d2e8f4g1h5i6j0k9l2m3n7o4p8 + title: Organization ID + type: string + organizationsApiPageTokenResultInfo: + properties: + next_page_token: + description: Use this opaque token in the next request to retrieve the next page. Parameters used to filter the retrieved list must remain in subsequent requests with a page token. + type: string + total_size: + description: Counts the total amount of items in a list with the applied filters. The API omits next_page_token to indicate no more items in a particular list. + type: integer + type: object + organizationsApiProfile: + properties: + business_address: + type: string + business_email: + type: string + business_name: + type: string + business_phone: + type: string + external_metadata: + type: string + required: + - business_name + - business_email + - business_phone + - business_address + - external_metadata + type: object + organizationsApiProfileResponse: + properties: + errors: + items: + type: object + maxItems: 0 + type: array + messages: + items: + $ref: '#/components/schemas/organizationsApiV4Message' + type: array + result: + $ref: '#/components/schemas/organizationsApiProfile' + success: + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + organizationsApiV4ErrorResponse: + properties: + errors: + items: + $ref: '#/components/schemas/organizationsApiV4Message' + type: array + messages: + items: + $ref: '#/components/schemas/organizationsApiV4Message' + type: array + result: + type: object + success: + enum: + - false + type: boolean + required: + - success + - errors + - messages + type: object + organizationsApiV4Message: + $ref: '#/components/schemas/responseInfo' + resourceSharingAccountId: + description: Account identifier. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + type: string + x-auditable: true + resourceSharingAccountName: + description: The display name of an account. + example: Account A + type: string + x-auditable: true + resourceSharingApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/resourceSharingV4errors' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + example: false + type: boolean + x-auditable: true + required: + - success + - errors + - result + type: object + resourceSharingCreated: + description: When the share was created. + example: '2023-09-21T18:56:32.624632Z' + format: date-time + type: string + x-auditable: true + resourceSharingModified: + description: When the share was modified. + example: '2023-09-21T18:56:32.624632Z' + format: date-time + type: string + x-auditable: true + resourceSharingOrganizationId: + description: Organization identifier. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + type: string + x-auditable: true + resourceSharingResourceId: + description: Share Resource identifier. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + type: string + x-auditable: true + resourceSharingResourceMeta: + description: Resource Metadata. + type: object + resourceSharingResourceResourceId: + description: Share Resource identifier. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + type: string + x-auditable: true + resourceSharingResourceStatus: + description: Resource Status. + enum: + - active + - deleting + - deleted + type: string + x-auditable: true + resourceSharingResourceType: + description: Resource Type. + enum: + - custom-ruleset + - gateway-policy + - gateway-destination-ip + - gateway-block-page-settings + - gateway-extended-email-matching + type: string + x-auditable: true + resourceSharingResourceVersion: + description: Resource Version. + type: integer + x-auditable: true + resourceSharingResultInfo: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 2000 + type: number + total_pages: + description: Total number of pages using the given per page. + example: 50 + type: number + type: object + resourceSharingShareId: + description: Share identifier tag. + example: 3fd85f74b32742f1bff64a85009dda07 + maxLength: 32 + type: string + x-auditable: true + resourceSharingShareKind: + enum: + - sent + - received + type: string + x-auditable: true + resourceSharingShareName: + description: The name of the share. + example: My Shared WAF Managed Rule + type: string + x-auditable: true + resourceSharingShareObject: + properties: + account_id: + $ref: '#/components/schemas/resourceSharingAccountId' + account_name: + $ref: '#/components/schemas/resourceSharingAccountName' + associated_recipient_count: + description: The number of recipients in the 'associated' state. This field is only included when requested via the 'include_recipient_counts' parameter. + example: 10 + type: integer + associating_recipient_count: + description: The number of recipients in the 'associating' state. This field is only included when requested via the 'include_recipient_counts' parameter. + example: 1 + type: integer + created: + $ref: '#/components/schemas/resourceSharingCreated' + disassociated_recipient_count: + description: The number of recipients in the 'disassociated' state. This field is only included when requested via the 'include_recipient_counts' parameter. + example: 0 + type: integer + disassociating_recipient_count: + description: The number of recipients in the 'disassociating' state. This field is only included when requested via the 'include_recipient_counts' parameter. + example: 0 + type: integer + id: + $ref: '#/components/schemas/resourceSharingShareId' + kind: + $ref: '#/components/schemas/resourceSharingShareKind' + modified: + $ref: '#/components/schemas/resourceSharingModified' + name: + $ref: '#/components/schemas/resourceSharingShareName' + organization_id: + $ref: '#/components/schemas/resourceSharingOrganizationId' + resources: + description: A list of resources that are part of the share. This field is only included when requested via the 'include_resources' parameter. + items: + $ref: '#/components/schemas/resourceSharingShareResourceObject' + type: array + status: + $ref: '#/components/schemas/resourceSharingShareStatus' + target_type: + $ref: '#/components/schemas/resourceSharingShareTargetType' + required: + - id + - name + - account_id + - account_name + - organization_id + - created + - modified + - status + - target_type + type: object + resourceSharingShareResourceObject: + properties: + created: + $ref: '#/components/schemas/resourceSharingCreated' + id: + $ref: '#/components/schemas/resourceSharingResourceId' + meta: + $ref: '#/components/schemas/resourceSharingResourceMeta' + modified: + $ref: '#/components/schemas/resourceSharingModified' + resource_account_id: + $ref: '#/components/schemas/resourceSharingAccountId' + resource_id: + $ref: '#/components/schemas/resourceSharingResourceResourceId' + resource_type: + $ref: '#/components/schemas/resourceSharingResourceType' + resource_version: + $ref: '#/components/schemas/resourceSharingResourceVersion' + status: + $ref: '#/components/schemas/resourceSharingResourceStatus' + required: + - id + - resource_id + - resource_type + - resource_account_id + - meta + - status + - created + - modified + - resource_version + type: object + resourceSharingShareResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/resourceSharingV4errors' + result: + items: + $ref: '#/components/schemas/resourceSharingShareObject' + nullable: true + type: array + success: + description: Whether the API call was successful. + example: true + type: boolean + result_info: + $ref: '#/components/schemas/resourceSharingResultInfo' + required: + - success + - errors + resourceSharingShareStatus: + enum: + - active + - deleting + - deleted + type: string + x-auditable: true + resourceSharingShareTargetType: + enum: + - account + - organization + type: string + x-auditable: true + resourceSharingV4error: + $ref: '#/components/schemas/responseInfo' + resourceSharingV4errors: + example: [] + items: + $ref: '#/components/schemas/resourceSharingV4error' + type: array + responseInfo: + properties: + code: + minimum: 1000 + type: integer + message: + type: string + documentation_url: + type: string + source: + type: object + properties: + pointer: + type: string + required: + - code + - message + type: object + uniqueItems: true + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + organizations: + id: cloudflare.organizations.organizations + name: organizations + title: Organizations + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1organizations/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + list_by_organization: + operation: + $ref: '#/paths/~1organizations/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1organizations/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .parent }}{{ $sep }}"parent": {{ if eq (kindOf .parent) "string" }}{{ .parent }}{{ else }}{{ toJson .parent }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .profile }}{{ $sep }}"profile": {{ if eq (kindOf .profile) "string" }}{{ .profile }}{{ else }}{{ toJson .profile }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1organizations~1{organization_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1organizations~1{organization_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1organizations~1{organization_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .parent }}{{ $sep }}"parent": {{ if eq (kindOf .parent) "string" }}{{ .parent }}{{ else }}{{ toJson .parent }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .profile }}{{ $sep }}"profile": {{ if eq (kindOf .profile) "string" }}{{ .profile }}{{ else }}{{ toJson .profile }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + create_members_batch_create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1organizations~1{organization_id}~1members:batchCreate/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .members }}{{ $sep }}"members": {{ if eq (kindOf .members) "string" }}{{ .members }}{{ else }}{{ toJson .members }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/organizations/methods/list_by_account' + - $ref: '#/components/x-stackQL-resources/organizations/methods/get' + - $ref: '#/components/x-stackQL-resources/organizations/methods/list_by_organization' + insert: + - $ref: '#/components/x-stackQL-resources/organizations/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/organizations/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/organizations/methods/update' + accounts: + id: cloudflare.organizations.accounts + name: accounts + title: Accounts + methods: + list: + operation: + $ref: '#/paths/~1organizations~1{organization_id}~1accounts/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/accounts/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + audit: + id: cloudflare.organizations.audit + name: audit + title: Audit + methods: + list: + operation: + $ref: '#/paths/~1organizations~1{organization_id}~1logs~1audit/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/audit/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + organization_profile: + id: cloudflare.organizations.organization_profile + name: organization_profile + title: Organization Profile + methods: + list: + operation: + $ref: '#/paths/~1organizations~1{organization_id}~1profile/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1organizations~1{organization_id}~1profile/put' + response: + mediaType: application/json + openAPIDocKey: '204' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/organization_profile/methods/list' + insert: [] + update: [] + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/organization_profile/methods/update' + shares: + id: cloudflare.organizations.shares + name: shares + title: Shares + methods: + list: + operation: + $ref: '#/paths/~1organizations~1{organization_id}~1shares/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/shares/methods/list' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/origin_ca_certificates.yaml b/providers/src/cloudflare/v00.00.00000/services/origin_ca_certificates.yaml index 86fb3921..5d6a0ffe 100644 --- a/providers/src/cloudflare/v00.00.00000/services/origin_ca_certificates.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/origin_ca_certificates.yaml @@ -1,718 +1,687 @@ -openapi: 3.0.3 -info: - title: origin_ca_certificates API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /certificates: - get: - description: >- - List all existing Origin CA certificates for a given zone. You can use - an Origin CA Key as your User Service Key or an API token when calling - this endpoint ([see above](#requests)). - operationId: origin-ca-list-certificates - parameters: - - in: query - name: zone_id - schema: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - - in: query - name: page - schema: - default: 1 - description: Page number of paginated results. - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 20 - description: Number of records per page. - maximum: 50 - minimum: 5 - type: number - - in: query - name: limit - schema: - description: Limit to the number of records returned. - type: integer - - in: query - name: offset - schema: - description: Offset the results - type: integer - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasCertificateResponseCollection - description: List Certificates response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCertificates - type: array - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: List Certificates response failure - security: - - user_service_key: [] - - api_token: [] - summary: List Certificates - tags: - - Origin CA - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: origin_ca_certificates - resource_chain: [] - method: list - post: - description: >- - Create an Origin CA certificate. You can use an Origin CA Key as your - User Service Key or an API token when calling this endpoint ([see - above](#requests)). - operationId: origin-ca-create-certificate - requestBody: - content: - application/json: - schema: - properties: - csr: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCsr' - hostnames: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnames' - request_type: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesRequestType' - requested_validity: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesRequestedValidity - required: - - hostnames - - request_type - - csr - type: object - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasCertificateResponseSingle - description: Create Certificate response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - certificate: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCertificatesComponentsSchemasCertificate - csr: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCsr' - expires_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasExpiresOn - hostnames: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnames - id: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesIdentifier - request_type: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesRequestType - requested_validity: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesRequestedValidity - required: - - hostnames - - csr - - requested_validity - - request_type - type: object - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Create Certificate response failure - security: - - user_service_key: [] - - api_token: [] - summary: Create Certificate - tags: - - Origin CA - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: origin_ca_certificates - resource_chain: [] - method: create - /certificates/{certificate_id}: - delete: - description: >- - Revoke an existing Origin CA certificate by its serial number. You can - use an Origin CA Key as your User Service Key or an API token when - calling this endpoint ([see above](#requests)). - operationId: origin-ca-revoke-certificate - parameters: - - name: certificate_id - in: path - required: true - description: The certificate ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCertificateRevokeResponse - description: Revoke Certificate response - 4XX: - content: - application/json: - schema: - properties: - result: - properties: - id: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesIdentifier - revoked_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesRevokedAt - type: object - enum: - - null - errors: - minLength: 1 - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - false - type: boolean - type: object - required: - - success - - errors - - messages - - result - description: Revoke Certificate response failure - security: - - user_service_key: [] - - api_token: [] - summary: Revoke Certificate - tags: - - Origin CA - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: origin_ca_certificates - resource_chain: [] - method: delete - get: - description: >- - Get an existing Origin CA certificate by its serial number. You can use - an Origin CA Key as your User Service Key or an API token when calling - this endpoint ([see above](#requests)). - operationId: origin-ca-get-certificate - parameters: - - name: certificate_id - in: path - required: true - description: The certificate ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasCertificateResponseSingle - description: Get Certificate response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - certificate: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCertificatesComponentsSchemasCertificate - csr: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCsr' - expires_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasExpiresOn - hostnames: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnames - id: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesIdentifier - request_type: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesRequestType - requested_validity: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesRequestedValidity - required: - - hostnames - - csr - - requested_validity - - request_type - type: object - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Get Certificate response failure - security: - - user_service_key: [] - - api_token: [] - summary: Get Certificate - tags: - - Origin CA - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: origin_ca_certificates - resource_chain: [] - method: get -components: - schemas: - tlsCertificatesAndHostnamesCertificateRevokeResponse: - properties: - result: - properties: - id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - revoked_at: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesRevokedAt' - type: object - type: object - tlsCertificatesAndHostnamesCertificates: - properties: - certificate: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCertificatesComponentsSchemasCertificate - csr: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCsr' - expires_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasExpiresOn - hostnames: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnames' - id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - request_type: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesRequestType' - requested_validity: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesRequestedValidity' - required: - - hostnames - - csr - - requested_validity - - request_type - type: object - tlsCertificatesAndHostnamesCertificatesComponentsSchemasCertificate: - description: The Origin CA certificate. Will be newline-encoded. - example: |- - -----BEGIN CERTIFICATE----- - MIICvDCCAaQCAQAwdzELMAkGA1UEBhMCVVMxDTALBgNVBAgMBFV0YWgxDzANBgNV - BAcMBkxpbmRvbjEWMBQGA1UECgwNRGlnaUNlcnQgSW5jLjERMA8GA1UECwwIRGln - aUNlcnQxHTAbBgNVBAMMFGV4YW1wbGUuZGlnaWNlcnQuY29tMIIBIjANBgkqhkiG - 9w0BAQEFAAOCAQ8AMIIBCgKCAQEA8+To7d+2kPWeBv/orU3LVbJwDrSQbeKamCmo - wp5bqDxIwV20zqRb7APUOKYoVEFFOEQs6T6gImnIolhbiH6m4zgZ/CPvWBOkZc+c - 1Po2EmvBz+AD5sBdT5kzGQA6NbWyZGldxRthNLOs1efOhdnWFuhI162qmcflgpiI - WDuwq4C9f+YkeJhNn9dF5+owm8cOQmDrV8NNdiTqin8q3qYAHHJRW28glJUCZkTZ - wIaSR6crBQ8TbYNE0dc+Caa3DOIkz1EOsHWzTx+n0zKfqcbgXi4DJx+C1bjptYPR - BPZL8DAeWuA8ebudVT44yEp82G96/Ggcf7F33xMxe0yc+Xa6owIDAQABoAAwDQYJ - KoZIhvcNAQEFBQADggEBAB0kcrFccSmFDmxox0Ne01UIqSsDqHgL+XmHTXJwre6D - hJSZwbvEtOK0G3+dr4Fs11WuUNt5qcLsx5a8uk4G6AKHMzuhLsJ7XZjgmQXGECpY - Q4mC3yT3ZoCGpIXbw+iP3lmEEXgaQL0Tx5LFl/okKbKYwIqNiyKWOMj7ZR/wxWg/ - ZDGRs55xuoeLDJ/ZRFf9bI+IaCUd1YrfYcHIl3G87Av+r49YVwqRDT0VDV7uLgqn - 29XI1PpVUNCPQGn9p/eX6Qo7vpDaPybRtA2R7XLKjQaF9oXWeCUqy1hvJac9QFO2 - 97Ob1alpHPoZ7mWiEuJwjBPii6a9M9G30nUo39lBi1w= - -----END CERTIFICATE----- - readOnly: true - type: string - tlsCertificatesAndHostnamesComponentsSchemasExpiresOn: - description: When the certificate will expire. - example: 2014-01-01 05:20:00 +0000 UTC - readOnly: true - type: string - x-auditable: true - tlsCertificatesAndHostnamesCsr: - description: The Certificate Signing Request (CSR). Must be newline-encoded. - example: |- - -----BEGIN CERTIFICATE REQUEST----- - MIICxzCCAa8CAQAwSDELMAkGA1UEBhMCVVMxFjAUBgNVBAgTDVNhbiBGcmFuY2lz - Y28xCzAJBgNVBAcTAkNBMRQwEgYDVQQDEwtleGFtcGxlLm5ldDCCASIwDQYJKoZI - hvcNAQEBBQADggEPADCCAQoCggEBALxejtu4b+jPdFeFi6OUsye8TYJQBm3WfCvL - Hu5EvijMO/4Z2TImwASbwUF7Ir8OLgH+mGlQZeqyNvGoSOMEaZVXcYfpR1hlVak8 - 4GGVr+04IGfOCqaBokaBFIwzclGZbzKmLGwIQioNxGfqFm6RGYGA3be2Je2iseBc - N8GV1wYmvYE0RR+yWweJCTJ157exyRzu7sVxaEW9F87zBQLyOnwXc64rflXslRqi - g7F7w5IaQYOl8yvmk/jEPCAha7fkiUfEpj4N12+oPRiMvleJF98chxjD4MH39c5I - uOslULhrWunfh7GB1jwWNA9y44H0snrf+xvoy2TcHmxvma9Eln8CAwEAAaA6MDgG - CSqGSIb3DQEJDjErMCkwJwYDVR0RBCAwHoILZXhhbXBsZS5uZXSCD3d3dy5leGFt - cGxlLm5ldDANBgkqhkiG9w0BAQsFAAOCAQEAcBaX6dOnI8ncARrI9ZSF2AJX+8mx - pTHY2+Y2C0VvrVDGMtbBRH8R9yMbqWtlxeeNGf//LeMkSKSFa4kbpdx226lfui8/ - auRDBTJGx2R1ccUxmLZXx4my0W5iIMxunu+kez+BDlu7bTT2io0uXMRHue4i6quH - yc5ibxvbJMjR7dqbcanVE10/34oprzXQsJ/VmSuZNXtjbtSKDlmcpw6To/eeAJ+J - hXykcUihvHyG4A1m2R6qpANBjnA0pHexfwM/SgfzvpbvUg0T1ubmer8BgTwCKIWs - dcWYTthM51JIqRBfNqy4QcBnX+GY05yltEEswQI55wdiS3CjTTA67sdbcQ== - -----END CERTIFICATE REQUEST----- - type: string - tlsCertificatesAndHostnamesHostnames: - description: >- - Array of hostnames or wildcard names bound to the certificate. Hostnames - must be fully qualified domain names (FQDNs) belonging to zones on your - account (e.g., `example.com` or `sub.example.com`). Wildcards are - supported only as a `*.` prefix for a single level (e.g., - `*.example.com`). Double wildcards (`*.*.example.com`) and interior - wildcards (`foo.*.example.com`) are not allowed. The wildcard suffix - must be a multi-label domain (`*.example.com` is valid, but `*.com` is - not). Unicode/IDN hostnames are accepted and automatically converted to - punycode. - example: - - example.com - - '*.example.com' - - sub.example.com - items: - minLength: 1 - type: string - x-auditable: true - maxItems: 100 - minItems: 1 - type: array - tlsCertificatesAndHostnamesIdentifier: - description: Identifier. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - type: string - x-auditable: true - tlsCertificatesAndHostnamesMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - tlsCertificatesAndHostnamesRequestType: - description: >- - Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" - (ecdsa), or "keyless-certificate" (for Keyless SSL servers). - enum: - - origin-rsa - - origin-ecc - - keyless-certificate - example: origin-rsa - type: string - x-auditable: true - tlsCertificatesAndHostnamesRequestedValidity: - default: 5475 - description: The number of days for which the certificate should be valid. - enum: - - 7 - - 30 - - 90 - - 365 - - 730 - - 1095 - - 5475 - example: 5475 - type: number - x-auditable: true - tlsCertificatesAndHostnamesRevokedAt: - description: When the certificate was revoked. - example: '2024-09-06T18:43:47.928893Z' - format: date-time - readOnly: true - type: string - x-auditable: true - tlsCertificatesAndHostnamesSchemasCertificateResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 2000 - type: number - total_pages: - description: The number of total pages in the entire result set. - example: 100 - type: number - type: object - result: - items: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificates' - type: array - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesSchemasCertificateResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificates' - required: - - success - - errors - - messages - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - certificates: - id: cloudflare.origin_ca_certificates.certificates - name: certificates - title: Certificates - methods: - list: - operation: - $ref: '#/paths/~1certificates/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1certificates/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: '#/paths/~1certificates~1{certificate_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1certificates~1{certificate_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/certificates/methods/get' - - $ref: '#/components/x-stackQL-resources/certificates/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/certificates/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/certificates/methods/delete' - replace: [] +openapi: 3.0.3 +info: + title: origin_ca_certificates API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /certificates: + get: + description: List all existing Origin CA certificates for a given zone. You can use an Origin CA Key as your User Service Key or an API token when calling this endpoint ([see above](#requests)). + operationId: origin-ca-list-certificates + parameters: + - in: query + name: zone_id + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + - in: query + name: page + schema: + default: 1 + description: Page number of paginated results. + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 20 + description: Number of records per page. + maximum: 50 + minimum: 5 + type: number + - in: query + name: limit + schema: + description: Limit to the number of records returned. + type: integer + - in: query + name: offset + schema: + description: Offset the results + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasCertificateResponseCollection' + description: List Certificates response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificates' + type: array + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: List Certificates response failure + security: + - user_service_key: [] + - api_token: [] + summary: List Certificates + tags: + - Origin CA + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: origin_ca_certificates + resource_chain: [] + method: list + post: + description: Create an Origin CA certificate. You can use an Origin CA Key as your User Service Key or an API token when calling this endpoint ([see above](#requests)). + operationId: origin-ca-create-certificate + requestBody: + content: + application/json: + schema: + properties: + csr: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCsr' + hostnames: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnames' + request_type: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesRequestType' + requested_validity: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesRequestedValidity' + required: + - hostnames + - request_type + - csr + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasCertificateResponseSingle' + description: Create Certificate response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + certificate: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificatesComponentsSchemasCertificate' + csr: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCsr' + expires_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasExpiresOn' + hostnames: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnames' + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + request_type: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesRequestType' + requested_validity: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesRequestedValidity' + required: + - hostnames + - csr + - requested_validity + - request_type + type: object + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Create Certificate response failure + security: + - user_service_key: [] + - api_token: [] + summary: Create Certificate + tags: + - Origin CA + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: origin_ca_certificates + resource_chain: [] + method: create + /certificates/{certificate_id}: + delete: + description: Revoke an existing Origin CA certificate by its serial number. You can use an Origin CA Key as your User Service Key or an API token when calling this endpoint ([see above](#requests)). + operationId: origin-ca-revoke-certificate + parameters: + - name: certificate_id + in: path + required: true + description: The certificate ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificateRevokeResponse' + description: Revoke Certificate response + 4XX: + content: + application/json: + schema: + properties: + result: + properties: + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + revoked_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesRevokedAt' + type: object + enum: + - null + errors: + minLength: 1 + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - false + type: boolean + type: object + required: + - success + - errors + - messages + - result + description: Revoke Certificate response failure + security: + - user_service_key: [] + - api_token: [] + summary: Revoke Certificate + tags: + - Origin CA + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: origin_ca_certificates + resource_chain: [] + method: delete + get: + description: Get an existing Origin CA certificate by its serial number. You can use an Origin CA Key as your User Service Key or an API token when calling this endpoint ([see above](#requests)). + operationId: origin-ca-get-certificate + parameters: + - name: certificate_id + in: path + required: true + description: The certificate ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasCertificateResponseSingle' + description: Get Certificate response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + certificate: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificatesComponentsSchemasCertificate' + csr: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCsr' + expires_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasExpiresOn' + hostnames: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnames' + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + request_type: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesRequestType' + requested_validity: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesRequestedValidity' + required: + - hostnames + - csr + - requested_validity + - request_type + type: object + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Get Certificate response failure + security: + - user_service_key: [] + - api_token: [] + summary: Get Certificate + tags: + - Origin CA + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: origin_ca_certificates + resource_chain: [] + method: get +components: + schemas: + tlsCertificatesAndHostnamesCertificateRevokeResponse: + properties: + result: + properties: + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + revoked_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesRevokedAt' + type: object + type: object + tlsCertificatesAndHostnamesCertificates: + properties: + certificate: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificatesComponentsSchemasCertificate' + csr: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCsr' + expires_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasExpiresOn' + hostnames: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnames' + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + request_type: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesRequestType' + requested_validity: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesRequestedValidity' + required: + - hostnames + - csr + - requested_validity + - request_type + type: object + tlsCertificatesAndHostnamesCertificatesComponentsSchemasCertificate: + description: The Origin CA certificate. Will be newline-encoded. + example: '-----BEGIN CERTIFICATE----- + + MIICvDCCAaQCAQAwdzELMAkGA1UEBhMCVVMxDTALBgNVBAgMBFV0YWgxDzANBgNV + + BAcMBkxpbmRvbjEWMBQGA1UECgwNRGlnaUNlcnQgSW5jLjERMA8GA1UECwwIRGln + + aUNlcnQxHTAbBgNVBAMMFGV4YW1wbGUuZGlnaWNlcnQuY29tMIIBIjANBgkqhkiG + + 9w0BAQEFAAOCAQ8AMIIBCgKCAQEA8+To7d+2kPWeBv/orU3LVbJwDrSQbeKamCmo + + wp5bqDxIwV20zqRb7APUOKYoVEFFOEQs6T6gImnIolhbiH6m4zgZ/CPvWBOkZc+c + + 1Po2EmvBz+AD5sBdT5kzGQA6NbWyZGldxRthNLOs1efOhdnWFuhI162qmcflgpiI + + WDuwq4C9f+YkeJhNn9dF5+owm8cOQmDrV8NNdiTqin8q3qYAHHJRW28glJUCZkTZ + + wIaSR6crBQ8TbYNE0dc+Caa3DOIkz1EOsHWzTx+n0zKfqcbgXi4DJx+C1bjptYPR + + BPZL8DAeWuA8ebudVT44yEp82G96/Ggcf7F33xMxe0yc+Xa6owIDAQABoAAwDQYJ + + KoZIhvcNAQEFBQADggEBAB0kcrFccSmFDmxox0Ne01UIqSsDqHgL+XmHTXJwre6D + + hJSZwbvEtOK0G3+dr4Fs11WuUNt5qcLsx5a8uk4G6AKHMzuhLsJ7XZjgmQXGECpY + + Q4mC3yT3ZoCGpIXbw+iP3lmEEXgaQL0Tx5LFl/okKbKYwIqNiyKWOMj7ZR/wxWg/ + + ZDGRs55xuoeLDJ/ZRFf9bI+IaCUd1YrfYcHIl3G87Av+r49YVwqRDT0VDV7uLgqn + + 29XI1PpVUNCPQGn9p/eX6Qo7vpDaPybRtA2R7XLKjQaF9oXWeCUqy1hvJac9QFO2 + + 97Ob1alpHPoZ7mWiEuJwjBPii6a9M9G30nUo39lBi1w= + + -----END CERTIFICATE-----' + readOnly: true + type: string + tlsCertificatesAndHostnamesComponentsSchemasExpiresOn: + description: When the certificate will expire. + example: 2014-01-01 05:20:00 +0000 UTC + readOnly: true + type: string + x-auditable: true + tlsCertificatesAndHostnamesCsr: + description: The Certificate Signing Request (CSR). Must be newline-encoded. + example: '-----BEGIN CERTIFICATE REQUEST----- + + MIICxzCCAa8CAQAwSDELMAkGA1UEBhMCVVMxFjAUBgNVBAgTDVNhbiBGcmFuY2lz + + Y28xCzAJBgNVBAcTAkNBMRQwEgYDVQQDEwtleGFtcGxlLm5ldDCCASIwDQYJKoZI + + hvcNAQEBBQADggEPADCCAQoCggEBALxejtu4b+jPdFeFi6OUsye8TYJQBm3WfCvL + + Hu5EvijMO/4Z2TImwASbwUF7Ir8OLgH+mGlQZeqyNvGoSOMEaZVXcYfpR1hlVak8 + + 4GGVr+04IGfOCqaBokaBFIwzclGZbzKmLGwIQioNxGfqFm6RGYGA3be2Je2iseBc + + N8GV1wYmvYE0RR+yWweJCTJ157exyRzu7sVxaEW9F87zBQLyOnwXc64rflXslRqi + + g7F7w5IaQYOl8yvmk/jEPCAha7fkiUfEpj4N12+oPRiMvleJF98chxjD4MH39c5I + + uOslULhrWunfh7GB1jwWNA9y44H0snrf+xvoy2TcHmxvma9Eln8CAwEAAaA6MDgG + + CSqGSIb3DQEJDjErMCkwJwYDVR0RBCAwHoILZXhhbXBsZS5uZXSCD3d3dy5leGFt + + cGxlLm5ldDANBgkqhkiG9w0BAQsFAAOCAQEAcBaX6dOnI8ncARrI9ZSF2AJX+8mx + + pTHY2+Y2C0VvrVDGMtbBRH8R9yMbqWtlxeeNGf//LeMkSKSFa4kbpdx226lfui8/ + + auRDBTJGx2R1ccUxmLZXx4my0W5iIMxunu+kez+BDlu7bTT2io0uXMRHue4i6quH + + yc5ibxvbJMjR7dqbcanVE10/34oprzXQsJ/VmSuZNXtjbtSKDlmcpw6To/eeAJ+J + + hXykcUihvHyG4A1m2R6qpANBjnA0pHexfwM/SgfzvpbvUg0T1ubmer8BgTwCKIWs + + dcWYTthM51JIqRBfNqy4QcBnX+GY05yltEEswQI55wdiS3CjTTA67sdbcQ== + + -----END CERTIFICATE REQUEST-----' + type: string + tlsCertificatesAndHostnamesHostnames: + description: Array of hostnames or wildcard names bound to the certificate. Hostnames must be fully qualified domain names (FQDNs) belonging to zones on your account (e.g., `example.com` or `sub.example.com`). Wildcards are supported only as a `*.` prefix for a single level (e.g., `*.example.com`). Double wildcards (`*.*.example.com`) and interior wildcards (`foo.*.example.com`) are not allowed. The wildcard suffix must be a multi-label domain (`*.example.com` is valid, but `*.com` is not). Unicode/IDN hostnames are accepted and automatically converted to punycode. + example: + - example.com + - '*.example.com' + - sub.example.com + items: + minLength: 1 + type: string + x-auditable: true + maxItems: 100 + minItems: 1 + type: array + tlsCertificatesAndHostnamesIdentifier: + description: Identifier. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + type: string + x-auditable: true + tlsCertificatesAndHostnamesMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + tlsCertificatesAndHostnamesRequestType: + description: Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers). + enum: + - origin-rsa + - origin-ecc + - keyless-certificate + example: origin-rsa + type: string + x-auditable: true + tlsCertificatesAndHostnamesRequestedValidity: + default: 5475 + description: The number of days for which the certificate should be valid. + enum: + - 7 + - 30 + - 90 + - 365 + - 730 + - 1095 + - 5475 + example: 5475 + type: number + x-auditable: true + tlsCertificatesAndHostnamesRevokedAt: + description: When the certificate was revoked. + example: '2024-09-06T18:43:47.928893Z' + format: date-time + readOnly: true + type: string + x-auditable: true + tlsCertificatesAndHostnamesSchemasCertificateResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 2000 + type: number + total_pages: + description: The number of total pages in the entire result set. + example: 100 + type: number + type: object + result: + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificates' + type: array + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesSchemasCertificateResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificates' + required: + - success + - errors + - messages + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + certificates: + id: cloudflare.origin_ca_certificates.certificates + name: certificates + title: Certificates + methods: + list: + operation: + $ref: '#/paths/~1certificates/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1certificates/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .csr }}{{ $sep }}"csr": {{ toJson .csr }}{{- $sep = "," -}}{{ end }} + + {{- if .hostnames }}{{ $sep }}"hostnames": {{ if eq (kindOf .hostnames) "string" }}{{ .hostnames }}{{ else }}{{ toJson .hostnames }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .request_type }}{{ $sep }}"request_type": {{ toJson .request_type }}{{- $sep = "," -}}{{ end }} + + {{- if .requested_validity }}{{ $sep }}"requested_validity": {{ toJson .requested_validity }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1certificates~1{certificate_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1certificates~1{certificate_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/certificates/methods/get' + - $ref: '#/components/x-stackQL-resources/certificates/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/certificates/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/certificates/methods/delete' + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/origin_tls_client_auth.yaml b/providers/src/cloudflare/v00.00.00000/services/origin_tls_client_auth.yaml index 6b967d66..3dafdeca 100644 --- a/providers/src/cloudflare/v00.00.00000/services/origin_tls_client_auth.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/origin_tls_client_auth.yaml @@ -1,2197 +1,2100 @@ -openapi: 3.0.3 -info: - title: origin_tls_client_auth API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /zones/{zone_id}/origin_tls_client_auth: - get: - description: >- - Lists all client certificates configured for zone-level authenticated - origin pulls. - operationId: zone-level-authenticated-origin-pulls-list-certificates - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasCertificateResponseCollection - description: List Certificates response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPull - type: array - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: List Certificates response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Certificates - tags: - - Zone-Level Authenticated Origin Pulls - x-api-token-group: - - SSL and Certificates Write - - SSL and Certificates Read - x-cfPermissionsRequired: - enum: - - '#ssl:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: origin_tls_client_auth - resource_chain: [] - method: list - post: - description: >- - Upload your own certificate you want Cloudflare to use for - edge-to-origin communication to override the shared certificate. Please - note that it is important to keep only one certificate active. Also, - make sure to enable zone-level authenticated origin pulls by making a - PUT call to settings endpoint to see the uploaded certificate in use. - operationId: zone-level-authenticated-origin-pulls-upload-certificate - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - certificate: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasCertificate - private_key: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesPrivateKey' - required: - - certificate - - private_key - type: object - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasCertificateResponseSingle - description: Upload Certificate response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - certificate: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasCertificate - enabled: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasEnabled - id: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesIdentifier - private_key: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesPrivateKey - expires_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasExpiresOn - issuer: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIssuer' - signature: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSignature - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasStatus - uploaded_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasUploadedOn - type: object - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Upload Certificate response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Upload Certificate - tags: - - Zone-Level Authenticated Origin Pulls - x-api-token-group: - - SSL and Certificates Write - x-cfPermissionsRequired: - enum: - - '#ssl:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: origin_tls_client_auth - resource_chain: [] - method: create - /zones/{zone_id}/origin_tls_client_auth/hostnames: - get: - description: >- - List certificate ID - hostname associations for the given zone. Shows - which hostnames are associated to which certificates for authenticated - origin pulls. - operationId: per-hostname-authenticated-origin-pull-list-hostname-associations - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: query - name: page - schema: - default: 1 - description: Page number of paginated results. - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 50 - description: Number of associations per page. - maximum: 1000 - minimum: 1 - type: number - - in: query - name: status - schema: - description: >- - Filter associations by status. Use comma-separated values to - filter by multiple statuses, or "all" to include every status. - Defaults to "active" if not provided. - enum: - - active - - pending_deployment - - pending_deletion - - deleted - - deployment_timed_out - - deletion_timed_out - - all - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAssocResponseCollection - description: List Hostname Associations response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - properties: - count: - description: >- - Total results returned based on your search - parameters. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: Total pages available of results. - type: number - type: object - result: - items: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAssocObject - type: array - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: List Hostname Associations response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Hostname Associations - tags: - - Per-hostname Authenticated Origin Pull - x-api-token-group: - - SSL and Certificates Write - - SSL and Certificates Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: origin_tls_client_auth - resource_chain: - - hostnames - method: update - put: - description: >- - Associate a hostname to a certificate and enable, disable or invalidate - the association. If disabled, client certificate will not be sent to the - hostname even if activated at the zone level. 100 maximum associations - on a single certificate are allowed. Note: Use a null value for - parameter *enabled* to invalidate the association. - operationId: >- - per-hostname-authenticated-origin-pull-enable-or-disable-a-hostname-for-client-authentication - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - config: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesConfig' - required: - - config - type: object - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAopResponseCollection - description: Enable or Disable a Hostname for Client Authentication response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPull - type: array - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: >- - Enable or Disable a Hostname for Client Authentication response - failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Enable or Disable a Hostname for Client Authentication - tags: - - Per-hostname Authenticated Origin Pull - x-api-token-group: - - SSL and Certificates Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /zones/{zone_id}/origin_tls_client_auth/hostnames/certificates: - get: - description: >- - Lists all client certificates configured for per-hostname authenticated - origin pulls on the zone. - operationId: per-hostname-authenticated-origin-pull-list-certificates - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasCertificateResponseCollection - description: List Certificates response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasCertificateObject - type: array - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: List Certificates response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Certificates - tags: - - Per-hostname Authenticated Origin Pull - x-api-token-group: - - SSL and Certificates Write - - SSL and Certificates Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: origin_tls_client_auth - resource_chain: - - hostname_certificates - method: list - post: - description: >- - Upload a certificate to be used for client authentication on a hostname. - 10 hostname certificates per zone are allowed. - operationId: >- - per-hostname-authenticated-origin-pull-upload-a-hostname-client-certificate - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - certificate: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasCertificate - private_key: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasPrivateKey - required: - - certificate - - private_key - type: object - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasCertificateResponseSingle - description: Upload a Hostname Client Certificate response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - $ref: >- - #/components/schemas/unnamedSchemaRefD182888b36f93a765d9ce5aefa3009e9 - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Upload a Hostname Client Certificate response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Upload a Hostname Client Certificate - tags: - - Per-hostname Authenticated Origin Pull - x-api-token-group: - - SSL and Certificates Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: origin_tls_client_auth - resource_chain: - - hostname_certificates - method: create - /zones/{zone_id}/origin_tls_client_auth/hostnames/certificates/{certificate_id}: - delete: - description: >- - Removes a client certificate used for authenticated origin pulls on a - specific hostname. Note: Before deleting the certificate, you must first - invalidate the hostname for client authentication by sending a PUT - request with `enabled` set to null. After invalidating the association, - the certificate can be safely deleted. - operationId: >- - per-hostname-authenticated-origin-pull-delete-hostname-client-certificate - parameters: - - name: certificate_id - in: path - required: true - description: The certificate ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasCertificateResponseSingle - description: Delete Hostname Client Certificate response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - $ref: >- - #/components/schemas/unnamedSchemaRefD182888b36f93a765d9ce5aefa3009e9 - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Delete Hostname Client Certificate response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Hostname Client Certificate - tags: - - Per-hostname Authenticated Origin Pull - x-api-token-group: - - SSL and Certificates Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: origin_tls_client_auth - resource_chain: - - hostname_certificates - method: delete - get: - description: >- - Get the certificate by ID to be used for client authentication on a - hostname. - operationId: >- - per-hostname-authenticated-origin-pull-get-the-hostname-client-certificate - parameters: - - name: certificate_id - in: path - required: true - description: The certificate ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasCertificateResponseSingle - description: Get the Hostname Client Certificate response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - $ref: >- - #/components/schemas/unnamedSchemaRefD182888b36f93a765d9ce5aefa3009e9 - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Get the Hostname Client Certificate response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get the Hostname Client Certificate - tags: - - Per-hostname Authenticated Origin Pull - x-api-token-group: - - SSL and Certificates Write - - SSL and Certificates Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: origin_tls_client_auth - resource_chain: - - hostname_certificates - method: get - /zones/{zone_id}/origin_tls_client_auth/hostnames/{hostname}: - get: - description: >- - Retrieves the client certificate authentication status for a specific - hostname, showing whether authenticated origin pulls are enabled. - operationId: >- - per-hostname-authenticated-origin-pull-get-the-hostname-status-for-client-authentication - parameters: - - in: path - name: hostname - schema: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasHostname' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAopSingleResponse - description: Get the Hostname Status for Client Authentication response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - cert_id: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesIdentifier - cert_status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasStatus - cert_updated_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasUpdatedAt - cert_uploaded_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasUploadedOn - certificate: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasCertificate - created_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasCreatedAt - readOnly: true - enabled: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasEnabled - expires_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasExpiresOn - hostname: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasHostname - issuer: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIssuer' - serial_number: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSerialNumber - signature: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSignature - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasStatus - updated_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasUpdatedAt - readOnly: true - type: object - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Get the Hostname Status for Client Authentication response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get the Hostname Status for Client Authentication - tags: - - Per-hostname Authenticated Origin Pull - x-api-token-group: - - SSL and Certificates Write - - SSL and Certificates Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: origin_tls_client_auth - resource_chain: - - hostnames - method: get - /zones/{zone_id}/origin_tls_client_auth/settings: - get: - description: >- - Get whether zone-level authenticated origin pulls is enabled or not. It - is false by default. - operationId: zone-level-authenticated-origin-pulls-get-enablement-setting-for-zone - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesEnabledResponse - description: Get Enablement Setting for Zone response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - enabled: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasEnabled - type: object - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Get Enablement Setting for Zone response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Enablement Setting for Zone - tags: - - Zone-Level Authenticated Origin Pulls - x-api-token-group: - - SSL and Certificates Write - - SSL and Certificates Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: origin_tls_client_auth - resource_chain: - - settings - method: get - put: - description: >- - Enable or disable zone-level authenticated origin pulls. 'enabled' - should be set true either before/after the certificate is uploaded to - see the certificate in use. - operationId: zone-level-authenticated-origin-pulls-set-enablement-for-zone - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - enabled: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasEnabled - required: - - enabled - type: object - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesEnabledResponse - description: Set Enablement for Zone response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - enabled: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasEnabled - type: object - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Set Enablement for Zone response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Set Enablement for Zone - tags: - - Zone-Level Authenticated Origin Pulls - x-api-token-group: - - SSL and Certificates Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: origin_tls_client_auth - resource_chain: - - settings - method: update - /zones/{zone_id}/origin_tls_client_auth/{certificate_id}: - delete: - description: >- - Removes a client certificate used for zone-level authenticated origin - pulls. - operationId: zone-level-authenticated-origin-pulls-delete-certificate - parameters: - - name: certificate_id - in: path - required: true - description: The certificate ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasCertificateResponseSingle - description: Delete Certificate response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - certificate: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasCertificate - enabled: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasEnabled - id: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesIdentifier - private_key: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesPrivateKey - expires_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasExpiresOn - issuer: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIssuer' - signature: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSignature - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasStatus - uploaded_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasUploadedOn - type: object - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Delete Certificate response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Certificate - tags: - - Zone-Level Authenticated Origin Pulls - x-api-token-group: - - SSL and Certificates Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: origin_tls_client_auth - resource_chain: [] - method: delete - get: - description: >- - Retrieves details for a specific client certificate used in zone-level - authenticated origin pulls. - operationId: zone-level-authenticated-origin-pulls-get-certificate-details - parameters: - - name: certificate_id - in: path - required: true - description: The certificate ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasCertificateResponseSingle - description: Get Certificate Details response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - certificate: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasCertificate - enabled: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasEnabled - id: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesIdentifier - private_key: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesPrivateKey - expires_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasExpiresOn - issuer: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIssuer' - signature: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSignature - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasStatus - uploaded_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasUploadedOn - type: object - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Get Certificate Details response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Certificate Details - tags: - - Zone-Level Authenticated Origin Pulls - x-api-token-group: - - SSL and Certificates Write - - SSL and Certificates Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: origin_tls_client_auth - resource_chain: [] - method: get -components: - schemas: - tlsCertificatesAndHostnamesCertId: - description: Certificate identifier tag. - example: 2458ce5a-0c35-4c7f-82c7-8e9487d3ff60 - maxLength: 36 - type: string - x-auditable: true - tlsCertificatesAndHostnamesComponentsSchemasCertificateResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 2000 - type: number - total_pages: - description: The number of total pages in the entire result set. - example: 100 - type: number - type: object - result: - items: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPull - type: array - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesComponentsSchemasCertificateResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPull - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesComponentsSchemasCreatedAt: - description: The time when the certificate was created. - example: '2100-01-01T05:20:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - tlsCertificatesAndHostnamesComponentsSchemasUpdatedAt: - description: The time when the certificate was updated. - example: '2100-01-01T05:20:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - tlsCertificatesAndHostnamesComponentsSchemasUploadedOn: - description: The time when the certificate was uploaded. - example: '2019-10-28T18:11:23.37411Z' - format: date-time - type: string - x-auditable: true - tlsCertificatesAndHostnamesConfig: - items: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameCertidInput' - type: array - tlsCertificatesAndHostnamesEnabledResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - properties: - enabled: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasEnabled - type: object - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesHostnameAopResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 2000 - type: number - total_pages: - description: The number of total pages in the entire result set. - example: 100 - type: number - type: object - result: - items: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPull - type: array - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesHostnameAopSingleResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameCertidObject' - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesHostnameAssocObject: - properties: - cert_id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertId' - created_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasCreatedAt - readOnly: true - enabled: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasEnabled - hostname: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasHostname' - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasStatus - updated_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasUpdatedAt - readOnly: true - type: object - tlsCertificatesAndHostnamesHostnameAssocResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - properties: - count: - description: Total results returned based on your search parameters. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 50 - type: number - total_count: - description: Total results available without any search parameters. - example: 1 - type: number - total_pages: - description: Total pages available of results. - example: 1 - type: number - type: object - result: - items: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAssocObject - type: array - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPull: - properties: - cert_id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - certificate: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasCertificate - enabled: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasEnabled - hostname: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasHostname' - id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - private_key: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasPrivateKey' - cert_status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasStatus - cert_updated_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasUpdatedAt - cert_uploaded_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasUploadedOn - created_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasCreatedAt - readOnly: true - expires_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasExpiresOn - issuer: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIssuer' - serial_number: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSerialNumber' - signature: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSignature' - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasStatus - updated_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasUpdatedAt - readOnly: true - type: object - tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasCertificate: - description: The hostname certificate. - example: | - -----BEGIN CERTIFICATE----- - MIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV - BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX - aWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF - MQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50 - ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB - CgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1 - CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB - KwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5 - 0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI - dZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2 - izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4 - 9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI - GKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV - BAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF - MAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2 - 2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP - Mlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG - SvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq - 2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw - YbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY= - -----END CERTIFICATE----- - type: string - x-stainless-terraform: - normalize_newlines: true - tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasCertificateResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 2000 - type: number - total_pages: - description: The number of total pages in the entire result set. - example: 100 - type: number - type: object - result: - items: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasCertificateObject - type: array - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasCertificateResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasCertificateObject - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasEnabled: - description: >- - Indicates whether hostname-level authenticated origin pulls is enabled. - A null value voids the association. - example: true - nullable: true - type: boolean - x-auditable: true - tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasExpiresOn: - description: The date when the certificate expires. - example: '2100-01-01T05:20:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasStatus: - description: Status of the certificate or the association. - enum: - - initializing - - pending_deployment - - pending_deletion - - active - - deleted - - deployment_timed_out - - deletion_timed_out - example: active - readOnly: true - type: string - x-auditable: true - tlsCertificatesAndHostnamesHostnameCertidInput: - properties: - cert_id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertId' - enabled: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasEnabled - hostname: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasHostname' - type: object - tlsCertificatesAndHostnamesHostnameCertidObject: - properties: - cert_id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - cert_status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasStatus - cert_updated_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasUpdatedAt - cert_uploaded_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasUploadedOn - certificate: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasCertificate - created_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasCreatedAt - readOnly: true - enabled: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasEnabled - expires_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasExpiresOn - hostname: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasHostname' - issuer: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIssuer' - serial_number: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSerialNumber' - signature: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSignature' - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasStatus - updated_at: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasUpdatedAt - readOnly: true - type: object - tlsCertificatesAndHostnamesIdentifier: - description: Identifier. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - type: string - x-auditable: true - tlsCertificatesAndHostnamesIssuer: - description: The certificate authority that issued the certificate. - example: GlobalSign - readOnly: true - type: string - x-auditable: true - tlsCertificatesAndHostnamesMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - tlsCertificatesAndHostnamesPrivateKey: - description: The zone's private key. - example: | - -----BEGIN RSA PRIVATE KEY----- - MIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG - dtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn - abIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid - tnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py - FxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE - ewooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb - HBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/ - axiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb - +ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g - +j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv - KLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7 - 9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo - /WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu - iacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9 - N2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe - VAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB - vULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U - lySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR - 9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7 - mEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX - dFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe - PG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS - fhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W - qu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T - lv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi - -----END RSA PRIVATE KEY----- - type: string - x-sensitive: true - tlsCertificatesAndHostnamesSchemasCertificateObject: - properties: - certificate: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasCertificate - expires_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasExpiresOn - id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - issuer: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIssuer' - serial_number: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSerialNumber' - signature: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSignature' - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasStatus - uploaded_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasUploadedOn - type: object - tlsCertificatesAndHostnamesSchemasHostname: - description: >- - The hostname on the origin for which the client certificate uploaded - will be used. - example: app.example.com - maxLength: 255 - type: string - x-auditable: true - tlsCertificatesAndHostnamesSchemasPrivateKey: - description: The hostname certificate's private key. - example: | - -----BEGIN RSA PRIVATE KEY----- - MIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG - dtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn - abIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid - tnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py - FxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE - ewooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb - HBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/ - axiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb - +ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g - +j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv - KLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7 - 9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo - /WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu - iacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9 - N2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe - VAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB - vULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U - lySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR - 9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7 - mEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX - dFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe - PG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS - fhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W - qu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T - lv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi - -----END RSA PRIVATE KEY----- - type: string - x-sensitive: true - tlsCertificatesAndHostnamesSchemasUploadedOn: - description: This is the time the certificate was uploaded. - example: '2019-10-28T18:11:23.37411Z' - format: date-time - type: string - x-auditable: true - tlsCertificatesAndHostnamesSerialNumber: - description: The serial number on the uploaded certificate. - example: '6743787633689793699141714808227354901' - type: string - x-auditable: true - tlsCertificatesAndHostnamesSignature: - description: The type of hash used for the certificate. - example: SHA256WithRSA - readOnly: true - type: string - x-auditable: true - tlsCertificatesAndHostnamesZoneAuthenticatedOriginPull: - properties: - certificate: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasCertificate - enabled: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasEnabled - id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - private_key: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesPrivateKey' - expires_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasExpiresOn - issuer: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIssuer' - signature: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSignature' - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasStatus - uploaded_on: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasUploadedOn' - type: object - tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasCertificate: - description: The zone's leaf certificate. - example: | - -----BEGIN CERTIFICATE----- - MIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV - BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX - aWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF - MQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50 - ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB - CgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1 - CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB - KwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5 - 0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI - dZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2 - izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4 - 9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI - GKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV - BAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF - MAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2 - 2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP - Mlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG - SvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq - 2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw - YbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY= - -----END CERTIFICATE----- - type: string - x-stainless-terraform: - normalize_newlines: true - tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasEnabled: - description: Indicates whether zone-level authenticated origin pulls is enabled. - example: true - type: boolean - x-auditable: true - tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasExpiresOn: - description: When the certificate from the authority expires. - example: '2100-01-01T05:20:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasStatus: - description: Status of the certificate activation. - enum: - - initializing - - pending_deployment - - pending_deletion - - active - - deleted - - deployment_timed_out - - deletion_timed_out - example: active - type: string - x-auditable: true - unnamedSchemaRefD182888b36f93a765d9ce5aefa3009e9: - properties: - certificate: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasCertificate - expires_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasExpiresOn - id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - issuer: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIssuer' - serial_number: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSerialNumber' - signature: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSignature' - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasStatus - uploaded_on: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasUploadedOn - type: object - enum: - - null - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - origin_tls_client_auth: - id: cloudflare.origin_tls_client_auth.origin_tls_client_auth - name: origin_tls_client_auth - title: Origin Tls Client Auth - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1origin_tls_client_auth/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1origin_tls_client_auth/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1origin_tls_client_auth~1{certificate_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1origin_tls_client_auth~1{certificate_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/origin_tls_client_auth/methods/get - - $ref: >- - #/components/x-stackQL-resources/origin_tls_client_auth/methods/list - insert: - - $ref: >- - #/components/x-stackQL-resources/origin_tls_client_auth/methods/create - update: [] - delete: - - $ref: >- - #/components/x-stackQL-resources/origin_tls_client_auth/methods/delete - replace: [] - hostnames: - id: cloudflare.origin_tls_client_auth.hostnames - name: hostnames - title: Hostnames - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1origin_tls_client_auth~1hostnames/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - per_hostname_authenticated_origin_pull_enable_or_disable_a_hostname_for_client_authentication: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1origin_tls_client_auth~1hostnames/put' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1origin_tls_client_auth~1hostnames~1{hostname}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/hostnames/methods/get' - - $ref: '#/components/x-stackQL-resources/hostnames/methods/list' - insert: [] - update: [] - delete: [] - replace: - - $ref: >- - #/components/x-stackQL-resources/hostnames/methods/per_hostname_authenticated_origin_pull_enable_or_disable_a_hostname_for_client_authentication - hostname_certificates: - id: cloudflare.origin_tls_client_auth.hostname_certificates - name: hostname_certificates - title: Hostname Certificates - methods: - list: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1origin_tls_client_auth~1hostnames~1certificates/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1origin_tls_client_auth~1hostnames~1certificates/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1origin_tls_client_auth~1hostnames~1certificates~1{certificate_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1origin_tls_client_auth~1hostnames~1certificates~1{certificate_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/hostname_certificates/methods/get' - - $ref: >- - #/components/x-stackQL-resources/hostname_certificates/methods/list - insert: - - $ref: >- - #/components/x-stackQL-resources/hostname_certificates/methods/create - update: [] - delete: - - $ref: >- - #/components/x-stackQL-resources/hostname_certificates/methods/delete - replace: [] - settings: - id: cloudflare.origin_tls_client_auth.settings - name: settings - title: Settings - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1origin_tls_client_auth~1settings/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1origin_tls_client_auth~1settings/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/settings/methods/list' - insert: [] - update: [] - delete: [] - replace: - - $ref: '#/components/x-stackQL-resources/settings/methods/update' +openapi: 3.0.3 +info: + title: origin_tls_client_auth API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /zones/{zone_id}/origin_tls_client_auth: + get: + description: Lists all client certificates configured for zone-level authenticated origin pulls. + operationId: zone-level-authenticated-origin-pulls-list-certificates + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasCertificateResponseCollection' + description: List Certificates response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPull' + type: array + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: List Certificates response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Certificates + tags: + - Zone-Level Authenticated Origin Pulls + x-api-token-group: + - SSL and Certificates Write + - SSL and Certificates Read + x-cfPermissionsRequired: + enum: + - '#ssl:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: origin_tls_client_auth + resource_chain: [] + method: list + post: + description: Upload your own certificate you want Cloudflare to use for edge-to-origin communication to override the shared certificate. Please note that it is important to keep only one certificate active. Also, make sure to enable zone-level authenticated origin pulls by making a PUT call to settings endpoint to see the uploaded certificate in use. + operationId: zone-level-authenticated-origin-pulls-upload-certificate + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + certificate: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasCertificate' + private_key: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPrivateKey' + required: + - certificate + - private_key + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasCertificateResponseSingle' + description: Upload Certificate response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + certificate: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasCertificate' + enabled: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasEnabled' + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + private_key: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPrivateKey' + expires_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasExpiresOn' + issuer: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIssuer' + signature: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSignature' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasStatus' + uploaded_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasUploadedOn' + type: object + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Upload Certificate response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Upload Certificate + tags: + - Zone-Level Authenticated Origin Pulls + x-api-token-group: + - SSL and Certificates Write + x-cfPermissionsRequired: + enum: + - '#ssl:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: origin_tls_client_auth + resource_chain: [] + method: create + /zones/{zone_id}/origin_tls_client_auth/hostnames: + get: + description: List certificate ID - hostname associations for the given zone. Shows which hostnames are associated to which certificates for authenticated origin pulls. + operationId: per-hostname-authenticated-origin-pull-list-hostname-associations + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: query + name: page + schema: + default: 1 + description: Page number of paginated results. + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 50 + description: Number of associations per page. + maximum: 1000 + minimum: 1 + type: number + - in: query + name: status + schema: + description: Filter associations by status. Use comma-separated values to filter by multiple statuses, or "all" to include every status. Defaults to "active" if not provided. + enum: + - active + - pending_deployment + - pending_deletion + - deleted + - deployment_timed_out + - deletion_timed_out + - all + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAssocResponseCollection' + description: List Hostname Associations response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + properties: + count: + description: Total results returned based on your search parameters. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: Total pages available of results. + type: number + type: object + result: + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAssocObject' + type: array + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: List Hostname Associations response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Hostname Associations + tags: + - Per-hostname Authenticated Origin Pull + x-api-token-group: + - SSL and Certificates Write + - SSL and Certificates Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: origin_tls_client_auth + resource_chain: + - hostnames + method: update + put: + description: 'Associate a hostname to a certificate and enable, disable or invalidate the association. If disabled, client certificate will not be sent to the hostname even if activated at the zone level. 100 maximum associations on a single certificate are allowed. Note: Use a null value for parameter *enabled* to invalidate the association.' + operationId: per-hostname-authenticated-origin-pull-enable-or-disable-a-hostname-for-client-authentication + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + config: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesConfig' + required: + - config + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAopResponseCollection' + description: Enable or Disable a Hostname for Client Authentication response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPull' + type: array + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Enable or Disable a Hostname for Client Authentication response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Enable or Disable a Hostname for Client Authentication + tags: + - Per-hostname Authenticated Origin Pull + x-api-token-group: + - SSL and Certificates Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /zones/{zone_id}/origin_tls_client_auth/hostnames/certificates: + get: + description: Lists all client certificates configured for per-hostname authenticated origin pulls on the zone. + operationId: per-hostname-authenticated-origin-pull-list-certificates + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasCertificateResponseCollection' + description: List Certificates response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasCertificateObject' + type: array + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: List Certificates response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Certificates + tags: + - Per-hostname Authenticated Origin Pull + x-api-token-group: + - SSL and Certificates Write + - SSL and Certificates Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: origin_tls_client_auth + resource_chain: + - hostname_certificates + method: list + post: + description: Upload a certificate to be used for client authentication on a hostname. 10 hostname certificates per zone are allowed. + operationId: per-hostname-authenticated-origin-pull-upload-a-hostname-client-certificate + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + certificate: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasCertificate' + private_key: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasPrivateKey' + required: + - certificate + - private_key + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasCertificateResponseSingle' + description: Upload a Hostname Client Certificate response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/unnamedSchemaRefD182888b36f93a765d9ce5aefa3009e9' + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Upload a Hostname Client Certificate response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Upload a Hostname Client Certificate + tags: + - Per-hostname Authenticated Origin Pull + x-api-token-group: + - SSL and Certificates Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: origin_tls_client_auth + resource_chain: + - hostname_certificates + method: create + /zones/{zone_id}/origin_tls_client_auth/hostnames/certificates/{certificate_id}: + delete: + description: 'Removes a client certificate used for authenticated origin pulls on a specific hostname. Note: Before deleting the certificate, you must first invalidate the hostname for client authentication by sending a PUT request with `enabled` set to null. After invalidating the association, the certificate can be safely deleted.' + operationId: per-hostname-authenticated-origin-pull-delete-hostname-client-certificate + parameters: + - name: certificate_id + in: path + required: true + description: The certificate ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasCertificateResponseSingle' + description: Delete Hostname Client Certificate response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/unnamedSchemaRefD182888b36f93a765d9ce5aefa3009e9' + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Delete Hostname Client Certificate response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Hostname Client Certificate + tags: + - Per-hostname Authenticated Origin Pull + x-api-token-group: + - SSL and Certificates Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: origin_tls_client_auth + resource_chain: + - hostname_certificates + method: delete + get: + description: Get the certificate by ID to be used for client authentication on a hostname. + operationId: per-hostname-authenticated-origin-pull-get-the-hostname-client-certificate + parameters: + - name: certificate_id + in: path + required: true + description: The certificate ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasCertificateResponseSingle' + description: Get the Hostname Client Certificate response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/unnamedSchemaRefD182888b36f93a765d9ce5aefa3009e9' + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Get the Hostname Client Certificate response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get the Hostname Client Certificate + tags: + - Per-hostname Authenticated Origin Pull + x-api-token-group: + - SSL and Certificates Write + - SSL and Certificates Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: origin_tls_client_auth + resource_chain: + - hostname_certificates + method: get + /zones/{zone_id}/origin_tls_client_auth/hostnames/{hostname}: + get: + description: Retrieves the client certificate authentication status for a specific hostname, showing whether authenticated origin pulls are enabled. + operationId: per-hostname-authenticated-origin-pull-get-the-hostname-status-for-client-authentication + parameters: + - in: path + name: hostname + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasHostname' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAopSingleResponse' + description: Get the Hostname Status for Client Authentication response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + cert_id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + cert_status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasStatus' + cert_updated_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasUpdatedAt' + cert_uploaded_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasUploadedOn' + certificate: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasCertificate' + created_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasCreatedAt' + readOnly: true + enabled: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasEnabled' + expires_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasExpiresOn' + hostname: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasHostname' + issuer: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIssuer' + serial_number: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSerialNumber' + signature: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSignature' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasStatus' + updated_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasUpdatedAt' + readOnly: true + type: object + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Get the Hostname Status for Client Authentication response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get the Hostname Status for Client Authentication + tags: + - Per-hostname Authenticated Origin Pull + x-api-token-group: + - SSL and Certificates Write + - SSL and Certificates Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: origin_tls_client_auth + resource_chain: + - hostnames + method: get + /zones/{zone_id}/origin_tls_client_auth/settings: + get: + description: Get whether zone-level authenticated origin pulls is enabled or not. It is false by default. + operationId: zone-level-authenticated-origin-pulls-get-enablement-setting-for-zone + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesEnabledResponse' + description: Get Enablement Setting for Zone response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + enabled: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasEnabled' + type: object + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Get Enablement Setting for Zone response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Enablement Setting for Zone + tags: + - Zone-Level Authenticated Origin Pulls + x-api-token-group: + - SSL and Certificates Write + - SSL and Certificates Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: origin_tls_client_auth + resource_chain: + - settings + method: get + put: + description: Enable or disable zone-level authenticated origin pulls. 'enabled' should be set true either before/after the certificate is uploaded to see the certificate in use. + operationId: zone-level-authenticated-origin-pulls-set-enablement-for-zone + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + enabled: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasEnabled' + required: + - enabled + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesEnabledResponse' + description: Set Enablement for Zone response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + enabled: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasEnabled' + type: object + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Set Enablement for Zone response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Set Enablement for Zone + tags: + - Zone-Level Authenticated Origin Pulls + x-api-token-group: + - SSL and Certificates Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: origin_tls_client_auth + resource_chain: + - settings + method: update + /zones/{zone_id}/origin_tls_client_auth/{certificate_id}: + delete: + description: Removes a client certificate used for zone-level authenticated origin pulls. + operationId: zone-level-authenticated-origin-pulls-delete-certificate + parameters: + - name: certificate_id + in: path + required: true + description: The certificate ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasCertificateResponseSingle' + description: Delete Certificate response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + certificate: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasCertificate' + enabled: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasEnabled' + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + private_key: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPrivateKey' + expires_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasExpiresOn' + issuer: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIssuer' + signature: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSignature' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasStatus' + uploaded_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasUploadedOn' + type: object + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Delete Certificate response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Certificate + tags: + - Zone-Level Authenticated Origin Pulls + x-api-token-group: + - SSL and Certificates Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: origin_tls_client_auth + resource_chain: [] + method: delete + get: + description: Retrieves details for a specific client certificate used in zone-level authenticated origin pulls. + operationId: zone-level-authenticated-origin-pulls-get-certificate-details + parameters: + - name: certificate_id + in: path + required: true + description: The certificate ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasCertificateResponseSingle' + description: Get Certificate Details response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + certificate: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasCertificate' + enabled: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasEnabled' + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + private_key: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPrivateKey' + expires_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasExpiresOn' + issuer: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIssuer' + signature: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSignature' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasStatus' + uploaded_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasUploadedOn' + type: object + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Get Certificate Details response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Certificate Details + tags: + - Zone-Level Authenticated Origin Pulls + x-api-token-group: + - SSL and Certificates Write + - SSL and Certificates Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: origin_tls_client_auth + resource_chain: [] + method: get +components: + schemas: + tlsCertificatesAndHostnamesCertId: + description: Certificate identifier tag. + example: 2458ce5a-0c35-4c7f-82c7-8e9487d3ff60 + maxLength: 36 + type: string + x-auditable: true + tlsCertificatesAndHostnamesComponentsSchemasCertificateResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 2000 + type: number + total_pages: + description: The number of total pages in the entire result set. + example: 100 + type: number + type: object + result: + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPull' + type: array + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesComponentsSchemasCertificateResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPull' + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesComponentsSchemasCreatedAt: + description: The time when the certificate was created. + example: '2100-01-01T05:20:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + tlsCertificatesAndHostnamesComponentsSchemasUpdatedAt: + description: The time when the certificate was updated. + example: '2100-01-01T05:20:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + tlsCertificatesAndHostnamesComponentsSchemasUploadedOn: + description: The time when the certificate was uploaded. + example: '2019-10-28T18:11:23.37411Z' + format: date-time + type: string + x-auditable: true + tlsCertificatesAndHostnamesConfig: + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameCertidInput' + type: array + tlsCertificatesAndHostnamesEnabledResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + properties: + enabled: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasEnabled' + type: object + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesHostnameAopResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 2000 + type: number + total_pages: + description: The number of total pages in the entire result set. + example: 100 + type: number + type: object + result: + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPull' + type: array + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesHostnameAopSingleResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameCertidObject' + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesHostnameAssocObject: + properties: + cert_id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertId' + created_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasCreatedAt' + readOnly: true + enabled: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasEnabled' + hostname: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasHostname' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasStatus' + updated_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasUpdatedAt' + readOnly: true + type: object + tlsCertificatesAndHostnamesHostnameAssocResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + properties: + count: + description: Total results returned based on your search parameters. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 50 + type: number + total_count: + description: Total results available without any search parameters. + example: 1 + type: number + total_pages: + description: Total pages available of results. + example: 1 + type: number + type: object + result: + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAssocObject' + type: array + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPull: + properties: + cert_id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + certificate: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasCertificate' + enabled: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasEnabled' + hostname: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasHostname' + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + private_key: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasPrivateKey' + cert_status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasStatus' + cert_updated_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasUpdatedAt' + cert_uploaded_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasUploadedOn' + created_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasCreatedAt' + readOnly: true + expires_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasExpiresOn' + issuer: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIssuer' + serial_number: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSerialNumber' + signature: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSignature' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasStatus' + updated_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasUpdatedAt' + readOnly: true + type: object + tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasCertificate: + description: The hostname certificate. + example: '-----BEGIN CERTIFICATE----- + + MIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV + + BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX + + aWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF + + MQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50 + + ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB + + CgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1 + + CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB + + KwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5 + + 0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI + + dZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2 + + izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4 + + 9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI + + GKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV + + BAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF + + MAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2 + + 2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP + + Mlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG + + SvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq + + 2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw + + YbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY= + + -----END CERTIFICATE----- + + ' + type: string + x-stainless-terraform: + normalize_newlines: true + tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasCertificateResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 2000 + type: number + total_pages: + description: The number of total pages in the entire result set. + example: 100 + type: number + type: object + result: + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasCertificateObject' + type: array + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasCertificateResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasCertificateObject' + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasEnabled: + description: Indicates whether hostname-level authenticated origin pulls is enabled. A null value voids the association. + example: true + nullable: true + type: boolean + x-auditable: true + tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasExpiresOn: + description: The date when the certificate expires. + example: '2100-01-01T05:20:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasStatus: + description: Status of the certificate or the association. + enum: + - initializing + - pending_deployment + - pending_deletion + - active + - deleted + - deployment_timed_out + - deletion_timed_out + example: active + readOnly: true + type: string + x-auditable: true + tlsCertificatesAndHostnamesHostnameCertidInput: + properties: + cert_id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertId' + enabled: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasEnabled' + hostname: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasHostname' + type: object + tlsCertificatesAndHostnamesHostnameCertidObject: + properties: + cert_id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + cert_status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasStatus' + cert_updated_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasUpdatedAt' + cert_uploaded_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasUploadedOn' + certificate: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasCertificate' + created_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasCreatedAt' + readOnly: true + enabled: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasEnabled' + expires_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasExpiresOn' + hostname: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasHostname' + issuer: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIssuer' + serial_number: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSerialNumber' + signature: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSignature' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasStatus' + updated_at: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasUpdatedAt' + readOnly: true + type: object + tlsCertificatesAndHostnamesIdentifier: + description: Identifier. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + type: string + x-auditable: true + tlsCertificatesAndHostnamesIssuer: + description: The certificate authority that issued the certificate. + example: GlobalSign + readOnly: true + type: string + x-auditable: true + tlsCertificatesAndHostnamesMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + tlsCertificatesAndHostnamesPrivateKey: + description: The zone's private key. + example: '-----BEGIN RSA PRIVATE KEY----- + + MIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG + + dtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn + + abIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid + + tnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py + + FxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE + + ewooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb + + HBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/ + + axiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb + + +ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g + + +j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv + + KLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7 + + 9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo + + /WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu + + iacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9 + + N2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe + + VAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB + + vULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U + + lySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR + + 9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7 + + mEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX + + dFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe + + PG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS + + fhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W + + qu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T + + lv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi + + -----END RSA PRIVATE KEY----- + + ' + type: string + x-sensitive: true + tlsCertificatesAndHostnamesSchemasCertificateObject: + properties: + certificate: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasCertificate' + expires_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasExpiresOn' + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + issuer: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIssuer' + serial_number: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSerialNumber' + signature: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSignature' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasStatus' + uploaded_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasUploadedOn' + type: object + tlsCertificatesAndHostnamesSchemasHostname: + description: The hostname on the origin for which the client certificate uploaded will be used. + example: app.example.com + maxLength: 255 + type: string + x-auditable: true + tlsCertificatesAndHostnamesSchemasPrivateKey: + description: The hostname certificate's private key. + example: '-----BEGIN RSA PRIVATE KEY----- + + MIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG + + dtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn + + abIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid + + tnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py + + FxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE + + ewooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb + + HBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/ + + axiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb + + +ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g + + +j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv + + KLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7 + + 9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo + + /WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu + + iacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9 + + N2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe + + VAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB + + vULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U + + lySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR + + 9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7 + + mEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX + + dFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe + + PG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS + + fhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W + + qu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T + + lv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi + + -----END RSA PRIVATE KEY----- + + ' + type: string + x-sensitive: true + tlsCertificatesAndHostnamesSchemasUploadedOn: + description: This is the time the certificate was uploaded. + example: '2019-10-28T18:11:23.37411Z' + format: date-time + type: string + x-auditable: true + tlsCertificatesAndHostnamesSerialNumber: + description: The serial number on the uploaded certificate. + example: '6743787633689793699141714808227354901' + type: string + x-auditable: true + tlsCertificatesAndHostnamesSignature: + description: The type of hash used for the certificate. + example: SHA256WithRSA + readOnly: true + type: string + x-auditable: true + tlsCertificatesAndHostnamesZoneAuthenticatedOriginPull: + properties: + certificate: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasCertificate' + enabled: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasEnabled' + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + private_key: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPrivateKey' + expires_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasExpiresOn' + issuer: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIssuer' + signature: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSignature' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasStatus' + uploaded_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasUploadedOn' + type: object + tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasCertificate: + description: The zone's leaf certificate. + example: '-----BEGIN CERTIFICATE----- + + MIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV + + BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX + + aWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF + + MQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50 + + ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB + + CgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1 + + CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB + + KwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5 + + 0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI + + dZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2 + + izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4 + + 9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI + + GKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV + + BAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF + + MAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2 + + 2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP + + Mlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG + + SvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq + + 2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw + + YbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY= + + -----END CERTIFICATE----- + + ' + type: string + x-stainless-terraform: + normalize_newlines: true + tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasEnabled: + description: Indicates whether zone-level authenticated origin pulls is enabled. + example: true + type: boolean + x-auditable: true + tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasExpiresOn: + description: When the certificate from the authority expires. + example: '2100-01-01T05:20:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + tlsCertificatesAndHostnamesZoneAuthenticatedOriginPullComponentsSchemasStatus: + description: Status of the certificate activation. + enum: + - initializing + - pending_deployment + - pending_deletion + - active + - deleted + - deployment_timed_out + - deletion_timed_out + example: active + type: string + x-auditable: true + unnamedSchemaRefD182888b36f93a765d9ce5aefa3009e9: + properties: + certificate: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasCertificate' + expires_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasExpiresOn' + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + issuer: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIssuer' + serial_number: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSerialNumber' + signature: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSignature' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesHostnameAuthenticatedOriginPullComponentsSchemasStatus' + uploaded_on: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasUploadedOn' + type: object + enum: + - null + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + origin_tls_client_auth: + id: cloudflare.origin_tls_client_auth.origin_tls_client_auth + name: origin_tls_client_auth + title: Origin Tls Client Auth + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1origin_tls_client_auth/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1origin_tls_client_auth/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1origin_tls_client_auth~1{certificate_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1origin_tls_client_auth~1{certificate_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/origin_tls_client_auth/methods/get' + - $ref: '#/components/x-stackQL-resources/origin_tls_client_auth/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/origin_tls_client_auth/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/origin_tls_client_auth/methods/delete' + replace: [] + hostnames: + id: cloudflare.origin_tls_client_auth.hostnames + name: hostnames + title: Hostnames + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1origin_tls_client_auth~1hostnames/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + per_hostname_authenticated_origin_pull_enable_or_disable_a_hostname_for_client_authentication: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1origin_tls_client_auth~1hostnames/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .config }}{{ $sep }}"config": {{ if eq (kindOf .config) "string" }}{{ .config }}{{ else }}{{ toJson .config }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1origin_tls_client_auth~1hostnames~1{hostname}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/hostnames/methods/get' + - $ref: '#/components/x-stackQL-resources/hostnames/methods/list' + insert: [] + update: [] + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/hostnames/methods/per_hostname_authenticated_origin_pull_enable_or_disable_a_hostname_for_client_authentication' + hostname_certificates: + id: cloudflare.origin_tls_client_auth.hostname_certificates + name: hostname_certificates + title: Hostname Certificates + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1origin_tls_client_auth~1hostnames~1certificates/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1origin_tls_client_auth~1hostnames~1certificates/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1origin_tls_client_auth~1hostnames~1certificates~1{certificate_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1origin_tls_client_auth~1hostnames~1certificates~1{certificate_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/hostname_certificates/methods/get' + - $ref: '#/components/x-stackQL-resources/hostname_certificates/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/hostname_certificates/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/hostname_certificates/methods/delete' + replace: [] + settings: + id: cloudflare.origin_tls_client_auth.settings + name: settings + title: Settings + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1origin_tls_client_auth~1settings/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1origin_tls_client_auth~1settings/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/settings/methods/list' + insert: [] + update: [] + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/settings/methods/update' diff --git a/providers/src/cloudflare/v00.00.00000/services/page_rules.yaml b/providers/src/cloudflare/v00.00.00000/services/page_rules.yaml index 7a5a3f33..150aab60 100644 --- a/providers/src/cloudflare/v00.00.00000/services/page_rules.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/page_rules.yaml @@ -1,1073 +1,1074 @@ -openapi: 3.0.3 -info: - title: page_rules API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /zones/{zone_id}/pagerules: - get: - description: Fetches Page Rules in a zone. - operationId: page-rules-list-page-rules - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: query - name: order - schema: - default: priority - description: The field used to sort returned Page Rules. - enum: - - status - - priority - type: string - - in: query - name: direction - schema: - default: desc - description: The direction used to sort returned Page Rules. - enum: - - asc - - desc - type: string - - in: query - name: match - schema: - default: all - description: >- - When set to `all`, all the search requirements must match. When - set to `any`, only one of the search requirements has to match. - enum: - - any - - all - type: string - - in: query - name: status - schema: - default: disabled - description: The status of the Page Rule. - enum: - - active - - disabled - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/zonesSchemasMessages' - messages: - $ref: '#/components/schemas/zonesSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - items: - $ref: '#/components/schemas/zonesPageRule' - type: array - required: - - success - - errors - - messages - type: object - description: List Page Rules response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/zonesSchemasApiResponseCommonFailure' - description: List Page Rules response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Page Rules - tags: - - Page Rules - x-api-token-group: - - Zone Read - - Zone Write - - Page Rules Write - - Page Rules Read - x-stackql-sdk: - service: page_rules - resource_chain: [] - method: list - post: - description: Creates a new Page Rule. - operationId: page-rules-create-a-page-rule - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - actions: - $ref: '#/components/schemas/zonesActions' - priority: - $ref: '#/components/schemas/zonesPriority' - status: - $ref: '#/components/schemas/zonesStatus' - targets: - $ref: '#/components/schemas/zonesTargets' - required: - - targets - - actions - type: object - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/zonesSchemasMessages' - messages: - $ref: '#/components/schemas/zonesSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/zonesPageRule' - required: - - success - - errors - - messages - description: Create a Page Rule response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/zonesSchemasApiResponseCommonFailure' - description: Create a Page Rule response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a Page Rule - tags: - - Page Rules - x-api-token-group: - - Zone Write - - Page Rules Write - x-stackql-sdk: - service: page_rules - resource_chain: [] - method: create - /zones/{zone_id}/pagerules/settings: - get: - deprecated: true - description: >- - Returns a list of settings (and their details) that Page Rules can apply - to matching requests. - operationId: available-page-rules-settings-list-available-page-rules-settings - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/zonesSchemasMessages' - messages: - $ref: '#/components/schemas/zonesSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/zonesSettings' - required: - - success - - errors - - messages - type: object - description: List available Page Rules settings response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/zonesSchemasApiResponseCommonFailure' - description: List available Page Rules settings response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List available Page Rules settings - tags: - - Available Page Rules settings - x-api-token-group: - - Zone Read - - Zone Write - - Page Rules Write - - Page Rules Read - /zones/{zone_id}/pagerules/{pagerule_id}: - delete: - description: Deletes an existing Page Rule. - operationId: page-rules-delete-a-page-rule - parameters: - - in: path - name: pagerule_id - schema: - $ref: '#/components/schemas/zonesSchemasIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/zonesSchemasApiResponseSingleId' - description: Delete a Page Rule response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/zonesSchemasApiResponseCommonFailure' - description: Delete a Page Rule response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete a Page Rule - tags: - - Page Rules - x-api-token-group: - - Zone Write - - Page Rules Write - x-stackql-sdk: - service: page_rules - resource_chain: [] - method: delete - get: - description: Fetches the details of a Page Rule. - operationId: page-rules-get-a-page-rule - parameters: - - in: path - name: pagerule_id - schema: - $ref: '#/components/schemas/zonesSchemasIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/zonesSchemasMessages' - messages: - $ref: '#/components/schemas/zonesSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/zonesPageRule' - required: - - success - - errors - - messages - description: Get a Page Rule response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/zonesSchemasApiResponseCommonFailure' - description: Get a Page Rule response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get a Page Rule - tags: - - Page Rules - x-api-token-group: - - Trust and Safety Write - - Trust and Safety Read - - 'Zero Trust: PII Read' - - Zaraz Edit - - Zaraz Read - - Zaraz Admin - - 'Access: Apps and Policies Revoke' - - 'Access: Apps and Policies Write' - - 'Access: Apps and Policies Read' - - 'Access: Apps and Policies Revoke' - - 'Access: Mutual TLS Certificates Write' - - 'Access: Organizations, Identity Providers, and Groups Write' - - Zone Settings Write - - Zone Settings Read - - Zone Read - - DNS Read - - Workers Scripts Write - - Workers Scripts Read - - Zone Write - - Workers Routes Write - - Workers Routes Read - - Stream Write - - Stream Read - - SSL and Certificates Write - - SSL and Certificates Read - - Logs Write - - Logs Read - - Cache Purge - - Page Rules Write - - Page Rules Read - - Load Balancers Write - - Load Balancers Read - - Firewall Services Write - - Firewall Services Read - - DNS Write - - Apps Write - - Analytics Read - - 'Access: Apps and Policies Write' - - 'Access: Apps and Policies Read' - x-stackql-sdk: - service: page_rules - resource_chain: [] - method: get - patch: - description: Updates one or more fields of an existing Page Rule. - operationId: page-rules-edit-a-page-rule - parameters: - - in: path - name: pagerule_id - schema: - $ref: '#/components/schemas/zonesSchemasIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - actions: - $ref: '#/components/schemas/zonesActions' - priority: - $ref: '#/components/schemas/zonesPriority' - status: - $ref: '#/components/schemas/zonesStatus' - targets: - $ref: '#/components/schemas/zonesTargets' - type: object - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/zonesSchemasMessages' - messages: - $ref: '#/components/schemas/zonesSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/zonesPageRule' - required: - - success - - errors - - messages - description: Edit a Page Rule response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/zonesSchemasApiResponseCommonFailure' - description: Edit a Page Rule response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Edit a Page Rule - tags: - - Page Rules - x-api-token-group: - - Zone Write - - Page Rules Write - x-stackql-sdk: - service: page_rules - resource_chain: [] - method: edit - put: - description: >- - Replaces the configuration of an existing Page Rule. The configuration - of the updated Page Rule will exactly match the data passed in the API - request. - operationId: page-rules-update-a-page-rule - parameters: - - in: path - name: pagerule_id - schema: - $ref: '#/components/schemas/zonesSchemasIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - actions: - $ref: '#/components/schemas/zonesActions' - priority: - $ref: '#/components/schemas/zonesPriority' - status: - $ref: '#/components/schemas/zonesStatus' - targets: - $ref: '#/components/schemas/zonesTargets' - required: - - targets - - actions - type: object - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/zonesSchemasMessages' - messages: - $ref: '#/components/schemas/zonesSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/zonesPageRule' - required: - - success - - errors - - messages - description: Update a Page Rule response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/zonesSchemasApiResponseCommonFailure' - description: Update a Page Rule response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update a Page Rule - tags: - - Page Rules - x-api-token-group: - - Zone Write - - Page Rules Write - x-stackql-sdk: - service: page_rules - resource_chain: [] - method: update -components: - schemas: - zonesActions: - description: >- - The set of actions to perform if the targets of this rule match the - request. Actions can redirect to another URL or override settings, but - not both. - example: - - id: browser_check - value: 'on' - items: - type: object - title: Always Use HTTPS - properties: - id: - description: >- - If enabled, any `http://`` URL is converted to `https://` through - a 301 redirect. - enum: - - always_use_https - type: string - x-auditable: true - value: - description: The status of Automatic HTTPS Rewrites. - enum: - - 'on' - - 'off' - example: 'on' - type: string - x-auditable: true - type: array - x-stainless-skip: - - terraform - zonesCreatedOn: - description: The timestamp of when the Page Rule was created. - example: '2014-01-01T05:20:00.12345Z' - format: date-time - readOnly: true - type: string - x-auditable: true - zonesModifiedOn: - description: The timestamp of when the Page Rule was last modified. - example: '2014-01-01T05:20:00.12345Z' - format: date-time - readOnly: true - type: string - x-auditable: true - zonesPageRule: - properties: - actions: - $ref: '#/components/schemas/zonesActions' - created_on: - $ref: '#/components/schemas/zonesCreatedOn' - readOnly: true - id: - $ref: '#/components/schemas/zonesSchemasIdentifier' - modified_on: - $ref: '#/components/schemas/zonesModifiedOn' - readOnly: true - priority: - $ref: '#/components/schemas/zonesPriority' - status: - $ref: '#/components/schemas/zonesStatus' - targets: - $ref: '#/components/schemas/zonesTargets' - required: - - id - - targets - - actions - - priority - - status - - modified_on - - created_on - type: object - zonesPriority: - default: 1 - description: >- - The priority of the rule, used to define which Page Rule is processed - over another. A higher number indicates a higher priority. For example, - if you have a catch-all Page Rule (rule A: `/images/*`) but want a more - specific Page Rule to take precedence (rule B: `/images/special/*`), - specify a higher priority for rule B so it overrides rule A. - type: integer - x-auditable: true - zonesSchemasApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/zonesSchemasMessages' - messages: - example: [] - $ref: '#/components/schemas/zonesSchemasMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - zonesSchemasApiResponseSingleId: - type: object - properties: - errors: - $ref: '#/components/schemas/zonesSchemasMessages' - messages: - $ref: '#/components/schemas/zonesSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - nullable: true - properties: - id: - $ref: '#/components/schemas/zonesSchemasIdentifier' - required: - - id - type: object - required: - - success - - errors - - messages - zonesSchemasIdentifier: - description: Identifier. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - type: string - x-auditable: true - zonesSchemasMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - zonesSettings: - description: Settings available for the zone. - example: - - id: browser_check - properties: - - name: value - type: toggle - - id: browser_cache_ttl - properties: - - max: 31536000 - min: 1800 - name: value - suggested_values: - - 1800 - - 3600 - - 7200 - - 10800 - - 14400 - - 18000 - - 28800 - - 43200 - - 57600 - - 72000 - - 86400 - - 172800 - - 259200 - - 345600 - - 432000 - - 691200 - - 1382400 - - 2073600 - - 2678400 - - 5356800 - - 16070400 - - 31536000 - type: range - - id: browser_check - properties: - - name: value - type: toggle - - id: cache_key_fields - properties: - - name: value - properties: - - allowEmpty: true - choices: - - include - - exclude - multiple: false - name: query_string - type: select - - allowEmpty: true - choices: - - include - - exclude - - check_presence - multiple: true - name: header - type: select - - allowEmpty: false - choices: - - resolved - multiple: true - name: host - type: select - - allowEmpty: true - choices: - - include - - check_presence - multiple: true - name: cookie - type: select - - allowEmpty: false - choices: - - device_type - - geo - - lang - multiple: true - name: user - type: select - type: object - - id: cache_deception_armor - properties: - - name: value - type: toggle - - id: cache_level - properties: - - choices: - - bypass - - basic - - simplified - - aggressive - - cache_everything - multiple: false - name: value - type: select - - id: cache_ttl_by_status - properties: - - allowEmpty: false - name: value - type: object - - id: disable_apps - properties: [] - - id: disable_performance - properties: [] - - id: disable_security - properties: [] - - id: edge_cache_ttl - properties: - - max: 2419200 - min: 7200 - name: value - suggested_values: - - 7200 - - 10800 - - 14400 - - 18000 - - 28800 - - 43200 - - 57600 - - 72000 - - 86400 - - 172800 - - 259200 - - 345600 - - 432000 - - 518400 - - 604800 - - 1209600 - - 2419200 - type: range - - id: email_obfuscation - properties: - - name: value - type: toggle - - id: forwarding_url - properties: - - choices: - - 301 - - 302 - multiple: false - name: status_code - type: choice - - name: url - type: forwardingUrl - - id: ip_geolocation - properties: - - name: value - type: toggle - - id: explicit_cache_control - properties: - - name: value - type: toggle - - id: rocket_loader - properties: - - name: value - type: toggle - - id: security_level - properties: - - choices: - - essentially_off - - low - - medium - - high - - under_attack - multiple: false - name: value - type: select - - id: server_side_exclude - properties: - - name: value - type: toggle - - id: ssl - properties: - - choices: - - 'off' - - flexible - - full - - strict - multiple: false - name: value - type: choice - items: - type: object - type: array - zonesStatus: - default: disabled - description: The status of the Page Rule. - enum: - - active - - disabled - example: active - type: string - x-auditable: true - zonesTarget: - description: A request condition target. - $ref: '#/components/schemas/zonesUrlTarget' - zonesTargets: - description: The rule targets to evaluate on each request. - example: - - constraint: - operator: matches - value: '*example.com/images/*' - target: url - items: - $ref: '#/components/schemas/zonesTarget' - type: array - x-stainless-skip: - - terraform - zonesUrlTarget: - description: URL target. - properties: - constraint: - description: String constraint. - type: object - properties: - operator: - default: contains - description: >- - The matches operator can use asterisks and pipes as wildcard and - 'or' operators. - enum: - - matches - - contains - - equals - - not_equal - - not_contain - x-auditable: true - type: string - value: - description: >- - The URL pattern to match against the current request. The - pattern may contain up to four asterisks ('*') as placeholders. - type: string - x-auditable: true - example: '*example.com/images/*' - required: - - operator - - value - target: - description: A target based on the URL of the request. - enum: - - url - example: url - x-auditable: true - type: string - type: object - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - pagerules: - id: cloudflare.page_rules.pagerules - name: pagerules - title: Pagerules - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1pagerules/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1pagerules/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1pagerules~1{pagerule_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1pagerules~1{pagerule_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1pagerules~1{pagerule_id}/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1pagerules~1{pagerule_id}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/pagerules/methods/get' - - $ref: '#/components/x-stackQL-resources/pagerules/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/pagerules/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/pagerules/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/pagerules/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/pagerules/methods/update' - settings: - id: cloudflare.page_rules.settings - name: settings - title: Settings - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1pagerules~1settings/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/settings/methods/list' - insert: [] - update: [] - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: page_rules API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /zones/{zone_id}/pagerules: + get: + description: Fetches Page Rules in a zone. + operationId: page-rules-list-page-rules + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: query + name: order + schema: + default: priority + description: The field used to sort returned Page Rules. + enum: + - status + - priority + type: string + - in: query + name: direction + schema: + default: desc + description: The direction used to sort returned Page Rules. + enum: + - asc + - desc + type: string + - in: query + name: match + schema: + default: all + description: When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match. + enum: + - any + - all + type: string + - in: query + name: status + schema: + default: disabled + description: The status of the Page Rule. + enum: + - active + - disabled + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/zonesSchemasMessages' + messages: + $ref: '#/components/schemas/zonesSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + items: + $ref: '#/components/schemas/zonesPageRule' + type: array + required: + - success + - errors + - messages + type: object + description: List Page Rules response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zonesSchemasApiResponseCommonFailure' + description: List Page Rules response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Page Rules + tags: + - Page Rules + x-api-token-group: + - Zone Read + - Zone Write + - Page Rules Write + - Page Rules Read + x-stackql-sdk: + service: page_rules + resource_chain: [] + method: list + post: + description: Creates a new Page Rule. + operationId: page-rules-create-a-page-rule + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + actions: + $ref: '#/components/schemas/zonesActions' + priority: + $ref: '#/components/schemas/zonesPriority' + status: + $ref: '#/components/schemas/zonesStatus' + targets: + $ref: '#/components/schemas/zonesTargets' + required: + - targets + - actions + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/zonesSchemasMessages' + messages: + $ref: '#/components/schemas/zonesSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/zonesPageRule' + required: + - success + - errors + - messages + description: Create a Page Rule response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zonesSchemasApiResponseCommonFailure' + description: Create a Page Rule response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a Page Rule + tags: + - Page Rules + x-api-token-group: + - Zone Write + - Page Rules Write + x-stackql-sdk: + service: page_rules + resource_chain: [] + method: create + /zones/{zone_id}/pagerules/settings: + get: + deprecated: true + description: Returns a list of settings (and their details) that Page Rules can apply to matching requests. + operationId: available-page-rules-settings-list-available-page-rules-settings + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/zonesSchemasMessages' + messages: + $ref: '#/components/schemas/zonesSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/zonesSettings' + required: + - success + - errors + - messages + type: object + description: List available Page Rules settings response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zonesSchemasApiResponseCommonFailure' + description: List available Page Rules settings response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List available Page Rules settings + tags: + - Available Page Rules settings + x-api-token-group: + - Zone Read + - Zone Write + - Page Rules Write + - Page Rules Read + /zones/{zone_id}/pagerules/{pagerule_id}: + delete: + description: Deletes an existing Page Rule. + operationId: page-rules-delete-a-page-rule + parameters: + - in: path + name: pagerule_id + schema: + $ref: '#/components/schemas/zonesSchemasIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/zonesSchemasApiResponseSingleId' + description: Delete a Page Rule response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zonesSchemasApiResponseCommonFailure' + description: Delete a Page Rule response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete a Page Rule + tags: + - Page Rules + x-api-token-group: + - Zone Write + - Page Rules Write + x-stackql-sdk: + service: page_rules + resource_chain: [] + method: delete + get: + description: Fetches the details of a Page Rule. + operationId: page-rules-get-a-page-rule + parameters: + - in: path + name: pagerule_id + schema: + $ref: '#/components/schemas/zonesSchemasIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/zonesSchemasMessages' + messages: + $ref: '#/components/schemas/zonesSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/zonesPageRule' + required: + - success + - errors + - messages + description: Get a Page Rule response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zonesSchemasApiResponseCommonFailure' + description: Get a Page Rule response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get a Page Rule + tags: + - Page Rules + x-api-token-group: + - Trust and Safety Write + - Trust and Safety Read + - 'Zero Trust: PII Read' + - Zaraz Edit + - Zaraz Read + - Zaraz Admin + - 'Access: Apps and Policies Revoke' + - 'Access: Apps and Policies Write' + - 'Access: Apps and Policies Read' + - 'Access: Apps and Policies Revoke' + - 'Access: Mutual TLS Certificates Write' + - 'Access: Organizations, Identity Providers, and Groups Write' + - Zone Settings Write + - Zone Settings Read + - Zone Read + - DNS Read + - Workers Scripts Write + - Workers Scripts Read + - Zone Write + - Workers Routes Write + - Workers Routes Read + - Stream Write + - Stream Read + - SSL and Certificates Write + - SSL and Certificates Read + - Logs Write + - Logs Read + - Cache Purge + - Page Rules Write + - Page Rules Read + - Load Balancers Write + - Load Balancers Read + - Firewall Services Write + - Firewall Services Read + - DNS Write + - Apps Write + - Analytics Read + - 'Access: Apps and Policies Write' + - 'Access: Apps and Policies Read' + x-stackql-sdk: + service: page_rules + resource_chain: [] + method: get + patch: + description: Updates one or more fields of an existing Page Rule. + operationId: page-rules-edit-a-page-rule + parameters: + - in: path + name: pagerule_id + schema: + $ref: '#/components/schemas/zonesSchemasIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + actions: + $ref: '#/components/schemas/zonesActions' + priority: + $ref: '#/components/schemas/zonesPriority' + status: + $ref: '#/components/schemas/zonesStatus' + targets: + $ref: '#/components/schemas/zonesTargets' + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/zonesSchemasMessages' + messages: + $ref: '#/components/schemas/zonesSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/zonesPageRule' + required: + - success + - errors + - messages + description: Edit a Page Rule response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zonesSchemasApiResponseCommonFailure' + description: Edit a Page Rule response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Edit a Page Rule + tags: + - Page Rules + x-api-token-group: + - Zone Write + - Page Rules Write + x-stackql-sdk: + service: page_rules + resource_chain: [] + method: edit + put: + description: Replaces the configuration of an existing Page Rule. The configuration of the updated Page Rule will exactly match the data passed in the API request. + operationId: page-rules-update-a-page-rule + parameters: + - in: path + name: pagerule_id + schema: + $ref: '#/components/schemas/zonesSchemasIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + actions: + $ref: '#/components/schemas/zonesActions' + priority: + $ref: '#/components/schemas/zonesPriority' + status: + $ref: '#/components/schemas/zonesStatus' + targets: + $ref: '#/components/schemas/zonesTargets' + required: + - targets + - actions + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/zonesSchemasMessages' + messages: + $ref: '#/components/schemas/zonesSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/zonesPageRule' + required: + - success + - errors + - messages + description: Update a Page Rule response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zonesSchemasApiResponseCommonFailure' + description: Update a Page Rule response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update a Page Rule + tags: + - Page Rules + x-api-token-group: + - Zone Write + - Page Rules Write + x-stackql-sdk: + service: page_rules + resource_chain: [] + method: update +components: + schemas: + zonesActions: + description: The set of actions to perform if the targets of this rule match the request. Actions can redirect to another URL or override settings, but not both. + example: + - id: browser_check + value: 'on' + items: + type: object + title: Always Use HTTPS + properties: + id: + description: If enabled, any `http://`` URL is converted to `https://` through a 301 redirect. + enum: + - always_use_https + type: string + x-auditable: true + value: + description: The status of Automatic HTTPS Rewrites. + enum: + - 'on' + - 'off' + example: 'on' + type: string + x-auditable: true + type: array + x-stainless-skip: + - terraform + zonesCreatedOn: + description: The timestamp of when the Page Rule was created. + example: '2014-01-01T05:20:00.12345Z' + format: date-time + readOnly: true + type: string + x-auditable: true + zonesModifiedOn: + description: The timestamp of when the Page Rule was last modified. + example: '2014-01-01T05:20:00.12345Z' + format: date-time + readOnly: true + type: string + x-auditable: true + zonesPageRule: + properties: + actions: + $ref: '#/components/schemas/zonesActions' + created_on: + $ref: '#/components/schemas/zonesCreatedOn' + readOnly: true + id: + $ref: '#/components/schemas/zonesSchemasIdentifier' + modified_on: + $ref: '#/components/schemas/zonesModifiedOn' + readOnly: true + priority: + $ref: '#/components/schemas/zonesPriority' + status: + $ref: '#/components/schemas/zonesStatus' + targets: + $ref: '#/components/schemas/zonesTargets' + required: + - id + - targets + - actions + - priority + - status + - modified_on + - created_on + type: object + zonesPriority: + default: 1 + description: 'The priority of the rule, used to define which Page Rule is processed over another. A higher number indicates a higher priority. For example, if you have a catch-all Page Rule (rule A: `/images/*`) but want a more specific Page Rule to take precedence (rule B: `/images/special/*`), specify a higher priority for rule B so it overrides rule A.' + type: integer + x-auditable: true + zonesSchemasApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/zonesSchemasMessages' + messages: + example: [] + $ref: '#/components/schemas/zonesSchemasMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + zonesSchemasApiResponseSingleId: + type: object + properties: + errors: + $ref: '#/components/schemas/zonesSchemasMessages' + messages: + $ref: '#/components/schemas/zonesSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + nullable: true + properties: + id: + $ref: '#/components/schemas/zonesSchemasIdentifier' + required: + - id + type: object + required: + - success + - errors + - messages + zonesSchemasIdentifier: + description: Identifier. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + type: string + x-auditable: true + zonesSchemasMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + zonesSettings: + description: Settings available for the zone. + example: + - id: browser_check + properties: + - name: value + type: toggle + - id: browser_cache_ttl + properties: + - max: 31536000 + min: 1800 + name: value + suggested_values: + - 1800 + - 3600 + - 7200 + - 10800 + - 14400 + - 18000 + - 28800 + - 43200 + - 57600 + - 72000 + - 86400 + - 172800 + - 259200 + - 345600 + - 432000 + - 691200 + - 1382400 + - 2073600 + - 2678400 + - 5356800 + - 16070400 + - 31536000 + type: range + - id: browser_check + properties: + - name: value + type: toggle + - id: cache_key_fields + properties: + - name: value + properties: + - allowEmpty: true + choices: + - include + - exclude + multiple: false + name: query_string + type: select + - allowEmpty: true + choices: + - include + - exclude + - check_presence + multiple: true + name: header + type: select + - allowEmpty: false + choices: + - resolved + multiple: true + name: host + type: select + - allowEmpty: true + choices: + - include + - check_presence + multiple: true + name: cookie + type: select + - allowEmpty: false + choices: + - device_type + - geo + - lang + multiple: true + name: user + type: select + type: object + - id: cache_deception_armor + properties: + - name: value + type: toggle + - id: cache_level + properties: + - choices: + - bypass + - basic + - simplified + - aggressive + - cache_everything + multiple: false + name: value + type: select + - id: cache_ttl_by_status + properties: + - allowEmpty: false + name: value + type: object + - id: disable_apps + properties: [] + - id: disable_performance + properties: [] + - id: disable_security + properties: [] + - id: edge_cache_ttl + properties: + - max: 2419200 + min: 7200 + name: value + suggested_values: + - 7200 + - 10800 + - 14400 + - 18000 + - 28800 + - 43200 + - 57600 + - 72000 + - 86400 + - 172800 + - 259200 + - 345600 + - 432000 + - 518400 + - 604800 + - 1209600 + - 2419200 + type: range + - id: email_obfuscation + properties: + - name: value + type: toggle + - id: forwarding_url + properties: + - choices: + - 301 + - 302 + multiple: false + name: status_code + type: choice + - name: url + type: forwardingUrl + - id: ip_geolocation + properties: + - name: value + type: toggle + - id: explicit_cache_control + properties: + - name: value + type: toggle + - id: rocket_loader + properties: + - name: value + type: toggle + - id: security_level + properties: + - choices: + - essentially_off + - low + - medium + - high + - under_attack + multiple: false + name: value + type: select + - id: server_side_exclude + properties: + - name: value + type: toggle + - id: ssl + properties: + - choices: + - 'off' + - flexible + - full + - strict + multiple: false + name: value + type: choice + items: + type: object + type: array + zonesStatus: + default: disabled + description: The status of the Page Rule. + enum: + - active + - disabled + example: active + type: string + x-auditable: true + zonesTarget: + description: A request condition target. + $ref: '#/components/schemas/zonesUrlTarget' + zonesTargets: + description: The rule targets to evaluate on each request. + example: + - constraint: + operator: matches + value: '*example.com/images/*' + target: url + items: + $ref: '#/components/schemas/zonesTarget' + type: array + x-stainless-skip: + - terraform + zonesUrlTarget: + description: URL target. + properties: + constraint: + description: String constraint. + type: object + properties: + operator: + default: contains + description: The matches operator can use asterisks and pipes as wildcard and 'or' operators. + enum: + - matches + - contains + - equals + - not_equal + - not_contain + x-auditable: true + type: string + value: + description: The URL pattern to match against the current request. The pattern may contain up to four asterisks ('*') as placeholders. + type: string + x-auditable: true + example: '*example.com/images/*' + required: + - operator + - value + target: + description: A target based on the URL of the request. + enum: + - url + example: url + x-auditable: true + type: string + type: object + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + pagerules: + id: cloudflare.page_rules.pagerules + name: pagerules + title: Pagerules + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1pagerules/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1pagerules/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .actions }}{{ $sep }}"actions": {{ if eq (kindOf .actions) "string" }}{{ .actions }}{{ else }}{{ toJson .actions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .priority }}{{ $sep }}"priority": {{ toJson .priority }}{{- $sep = "," -}}{{ end }} + + {{- if .status }}{{ $sep }}"status": {{ toJson .status }}{{- $sep = "," -}}{{ end }} + + {{- if .targets }}{{ $sep }}"targets": {{ if eq (kindOf .targets) "string" }}{{ .targets }}{{ else }}{{ toJson .targets }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1pagerules~1{pagerule_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1pagerules~1{pagerule_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1pagerules~1{pagerule_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .actions }}{{ $sep }}"actions": {{ if eq (kindOf .actions) "string" }}{{ .actions }}{{ else }}{{ toJson .actions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .priority }}{{ $sep }}"priority": {{ toJson .priority }}{{- $sep = "," -}}{{ end }} + + {{- if .status }}{{ $sep }}"status": {{ toJson .status }}{{- $sep = "," -}}{{ end }} + + {{- if .targets }}{{ $sep }}"targets": {{ if eq (kindOf .targets) "string" }}{{ .targets }}{{ else }}{{ toJson .targets }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1pagerules~1{pagerule_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .actions }}{{ $sep }}"actions": {{ if eq (kindOf .actions) "string" }}{{ .actions }}{{ else }}{{ toJson .actions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .priority }}{{ $sep }}"priority": {{ toJson .priority }}{{- $sep = "," -}}{{ end }} + + {{- if .status }}{{ $sep }}"status": {{ toJson .status }}{{- $sep = "," -}}{{ end }} + + {{- if .targets }}{{ $sep }}"targets": {{ if eq (kindOf .targets) "string" }}{{ .targets }}{{ else }}{{ toJson .targets }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/pagerules/methods/get' + - $ref: '#/components/x-stackQL-resources/pagerules/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/pagerules/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/pagerules/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/pagerules/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/pagerules/methods/update' + settings: + id: cloudflare.page_rules.settings + name: settings + title: Settings + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1pagerules~1settings/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/settings/methods/list' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/pages.yaml b/providers/src/cloudflare/v00.00.00000/services/pages.yaml index 59bf439b..f3f03965 100644 --- a/providers/src/cloudflare/v00.00.00000/services/pages.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/pages.yaml @@ -1,3025 +1,2906 @@ -openapi: 3.0.3 -info: - title: pages API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/pages/projects: - get: - description: Fetch a list of all user projects. - operationId: pages-project-get-projects - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: page - schema: - description: Which page of projects to fetch. - type: integer - - in: query - name: per_page - schema: - description: How many projects to return per page. - type: integer - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/pagesMessages' - messages: - $ref: '#/components/schemas/pagesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: '#/components/schemas/pagesProject' - type: array - required: - - success - - errors - - messages - - result - description: Get projects response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/pagesApiResponseCommonFailure' - description: Get projects response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get projects - tags: - - Pages Project - x-api-token-group: - - Pages Read - - Pages Write - x-stackql-sdk: - service: pages - resource_chain: - - projects - method: list - post: - description: Create a new project. - operationId: pages-project-create-project - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - build_config: - description: Configs for the project build process. - properties: - build_caching: - description: Enable build caching for the project. - type: boolean - x-auditable: true - build_command: - description: Command used to build project. - type: string - x-auditable: true - destination_dir: - description: Output directory of the build. - type: string - x-auditable: true - root_dir: - description: Directory to run the command. - type: string - x-auditable: true - web_analytics_tag: - description: The classifying tag for analytics. - nullable: true - type: string - x-auditable: true - web_analytics_token: - description: The auth token for analytics. - nullable: true - type: string - x-sensitive: true - type: object - deployment_configs: - description: Configs for deployments in a project. - properties: - preview: - description: Configs for preview deploys. - $ref: '#/components/schemas/pagesDeploymentConfigValuesRequest' - production: - description: Configs for production deploys. - $ref: '#/components/schemas/pagesDeploymentConfigValuesRequest' - type: object - name: - description: Name of the project. - type: string - x-auditable: true - production_branch: - description: >- - Production branch of the project. Used to identify - production deployments. - type: string - x-auditable: true - source: - description: Configs for the project source control. - properties: - config: - properties: - deployments_enabled: - deprecated: true - description: >- - Whether to enable automatic deployments when pushing - to the source repository. When disabled, no - deployments (production or preview) will be - triggered automatically. - type: boolean - x-auditable: true - x-stainless-deprecation-message: >- - Use `production_deployments_enabled` and - `preview_deployment_setting` for more granular - control. - owner: - description: The owner of the repository. - type: string - x-auditable: true - owner_id: - description: The owner ID of the repository. - type: string - x-auditable: true - path_excludes: - description: >- - A list of paths that should be excluded from - triggering a preview deployment. Wildcard syntax - (`*`) is supported. - items: - type: string - x-auditable: true - type: array - path_includes: - description: >- - A list of paths that should be watched to trigger a - preview deployment. Wildcard syntax (`*`) is - supported. - items: - type: string - x-auditable: true - type: array - pr_comments_enabled: - description: Whether to enable PR comments. - type: boolean - x-auditable: true - preview_branch_excludes: - description: >- - A list of branches that should not trigger a preview - deployment. Wildcard syntax (`*`) is supported. Must - be used with `preview_deployment_setting` set to - `custom`. - items: - type: string - x-auditable: true - type: array - preview_branch_includes: - description: >- - A list of branches that should trigger a preview - deployment. Wildcard syntax (`*`) is supported. Must - be used with `preview_deployment_setting` set to - `custom`. - items: - type: string - x-auditable: true - type: array - preview_deployment_setting: - description: >- - Controls whether commits to preview branches trigger - a preview deployment. - enum: - - all - - none - - custom - type: string - x-auditable: true - production_branch: - description: The production branch of the repository. - type: string - x-auditable: true - production_deployments_enabled: - description: >- - Whether to trigger a production deployment on - commits to the production branch. - type: boolean - x-auditable: true - repo_id: - description: The ID of the repository. - type: string - x-auditable: true - repo_name: - description: The name of the repository. - type: string - x-auditable: true - type: object - type: - description: The source control management provider. - enum: - - github - - gitlab - type: string - x-auditable: true - required: - - type - - config - type: object - required: - - name - - production_branch - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/pagesMessages' - messages: - $ref: '#/components/schemas/pagesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/pagesProject' - required: - - success - - errors - - messages - - result - type: object - description: Create project response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/pagesApiResponseCommonFailure' - description: Create project response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create project - tags: - - Pages Project - x-api-token-group: - - Pages Write - x-stackql-sdk: - service: pages - resource_chain: - - projects - method: create - /accounts/{account_id}/pages/projects/{project_name}: - delete: - description: Delete a project by name. - operationId: pages-project-delete-project - parameters: - - name: project_name - in: path - required: true - description: The Pages project name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/pagesMessages' - messages: - $ref: '#/components/schemas/pagesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - nullable: true - type: object - required: - - success - - errors - - messages - - result - type: object - description: Delete project response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/pagesApiResponseCommonFailure' - description: Delete project response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete project - tags: - - Pages Project - x-api-token-group: - - Pages Write - x-stackql-sdk: - service: pages - resource_chain: - - projects - method: delete - get: - description: Fetch a project by name. - operationId: pages-project-get-project - parameters: - - name: project_name - in: path - required: true - description: The Pages project name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/pagesMessages' - messages: - $ref: '#/components/schemas/pagesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/pagesProject' - required: - - success - - errors - - messages - - result - type: object - description: Get project response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/pagesApiResponseCommonFailure' - description: Get project response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get project - tags: - - Pages Project - x-api-token-group: - - Pages Read - - Pages Write - x-stackql-sdk: - service: pages - resource_chain: - - projects - method: get - patch: - description: >- - Set new attributes for an existing project. Modify environment - variables. To delete an environment variable, set the key to null. - operationId: pages-project-update-project - parameters: - - name: project_name - in: path - required: true - description: The Pages project name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - build_config: - description: Configs for the project build process. - properties: - build_caching: - description: Enable build caching for the project. - type: boolean - x-auditable: true - build_command: - description: Command used to build project. - type: string - x-auditable: true - destination_dir: - description: Output directory of the build. - type: string - x-auditable: true - root_dir: - description: Directory to run the command. - type: string - x-auditable: true - web_analytics_tag: - description: The classifying tag for analytics. - nullable: true - type: string - x-auditable: true - web_analytics_token: - description: The auth token for analytics. - nullable: true - type: string - x-sensitive: true - type: object - deployment_configs: - description: Configs for deployments in a project. - properties: - preview: - description: Configs for preview deploys. - $ref: '#/components/schemas/pagesDeploymentConfigValuesRequest' - production: - description: Configs for production deploys. - $ref: '#/components/schemas/pagesDeploymentConfigValuesRequest' - type: object - name: - description: Name of the project. - type: string - x-auditable: true - production_branch: - description: >- - Production branch of the project. Used to identify - production deployments. - type: string - x-auditable: true - source: - description: Configs for the project source control. - properties: - config: - properties: - deployments_enabled: - deprecated: true - description: >- - Whether to enable automatic deployments when pushing - to the source repository. When disabled, no - deployments (production or preview) will be - triggered automatically. - type: boolean - x-auditable: true - x-stainless-deprecation-message: >- - Use `production_deployments_enabled` and - `preview_deployment_setting` for more granular - control. - owner: - description: The owner of the repository. - type: string - x-auditable: true - owner_id: - description: The owner ID of the repository. - type: string - x-auditable: true - path_excludes: - description: >- - A list of paths that should be excluded from - triggering a preview deployment. Wildcard syntax - (`*`) is supported. - items: - type: string - x-auditable: true - type: array - path_includes: - description: >- - A list of paths that should be watched to trigger a - preview deployment. Wildcard syntax (`*`) is - supported. - items: - type: string - x-auditable: true - type: array - pr_comments_enabled: - description: Whether to enable PR comments. - type: boolean - x-auditable: true - preview_branch_excludes: - description: >- - A list of branches that should not trigger a preview - deployment. Wildcard syntax (`*`) is supported. Must - be used with `preview_deployment_setting` set to - `custom`. - items: - type: string - x-auditable: true - type: array - preview_branch_includes: - description: >- - A list of branches that should trigger a preview - deployment. Wildcard syntax (`*`) is supported. Must - be used with `preview_deployment_setting` set to - `custom`. - items: - type: string - x-auditable: true - type: array - preview_deployment_setting: - description: >- - Controls whether commits to preview branches trigger - a preview deployment. - enum: - - all - - none - - custom - type: string - x-auditable: true - production_branch: - description: The production branch of the repository. - type: string - x-auditable: true - production_deployments_enabled: - description: >- - Whether to trigger a production deployment on - commits to the production branch. - type: boolean - x-auditable: true - repo_id: - description: The ID of the repository. - type: string - x-auditable: true - repo_name: - description: The name of the repository. - type: string - x-auditable: true - type: object - type: - description: The source control management provider. - enum: - - github - - gitlab - type: string - x-auditable: true - required: - - type - - config - type: object - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/pagesMessages' - messages: - $ref: '#/components/schemas/pagesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/pagesProject' - required: - - success - - errors - - messages - - result - type: object - description: Update project response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/pagesApiResponseCommonFailure' - description: Update project response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update project - tags: - - Pages Project - x-api-token-group: - - Pages Write - x-stackql-sdk: - service: pages - resource_chain: - - projects - method: edit - /accounts/{account_id}/pages/projects/{project_name}/deployments: - get: - description: Fetch a list of project deployments. - operationId: pages-deployment-get-deployments - parameters: - - name: project_name - in: path - required: true - description: The Pages project name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: env - schema: - description: What type of deployments to fetch. - enum: - - production - - preview - type: string - - in: query - name: page - schema: - description: Which page of deployments to fetch. - type: integer - - in: query - name: per_page - schema: - description: How many deployments to return per page. - type: integer - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/pagesMessages' - messages: - $ref: '#/components/schemas/pagesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: '#/components/schemas/pagesDeployment' - type: array - required: - - success - - errors - - messages - - result - description: Get deployments response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/pagesApiResponseCommonFailure' - description: Get deployments response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get deployments - tags: - - Pages Deployment - x-api-token-group: - - Pages Read - - Pages Write - x-stackql-sdk: - service: pages - resource_chain: - - projects - - deployments - method: list - post: - description: >- - Start a new deployment from production. The repository and account must - have already been authorized on the Cloudflare Pages dashboard. - operationId: pages-deployment-create-deployment - parameters: - - name: project_name - in: path - required: true - description: The Pages project name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - multipart/form-data: - encoding: - _headers: - contentType: text/plain - _redirects: - contentType: text/plain - _routes.json: - contentType: application/json - _worker.bundle: - contentType: multipart/form-data - _worker.js: - contentType: >- - application/javascript+module, text/javascript+module, - application/javascript, text/javascript - functions-filepath-routing-config.json: - contentType: application/json - manifest: - contentType: application/json - schema: - properties: - _headers: - description: Headers configuration file for the deployment. - format: binary - type: string - _redirects: - description: Redirects configuration file for the deployment. - format: binary - type: string - _routes.json: - description: Routes configuration file defining routing rules. - format: binary - type: string - _worker.bundle: - description: >- - Worker bundle file in multipart/form-data format. Mutually - exclusive with `_worker.js`. Cannot specify both - `_worker.js` and `_worker.bundle` in the same request. - Maximum size: 25 MiB. - format: binary - type: string - _worker.js: - description: >- - Worker JavaScript file. Mutually exclusive with - `_worker.bundle`. Cannot specify both `_worker.js` and - `_worker.bundle` in the same request. - format: binary - type: string - branch: - description: >- - The branch to build the new deployment from. The `HEAD` of - the branch will be used. If omitted, the production branch - will be used by default. - type: string - x-auditable: true - commit_dirty: - description: >- - Boolean string indicating if the working directory has - uncommitted changes. - enum: - - 'true' - - 'false' - type: string - commit_hash: - description: Git commit SHA associated with this deployment. - type: string - commit_message: - description: Git commit message associated with this deployment. - type: string - functions-filepath-routing-config.json: - description: Functions routing configuration file. - format: binary - type: string - manifest: - description: >- - JSON string containing a manifest of files to deploy. Maps - file paths to their content hashes. Required for direct - upload deployments. Maximum 20,000 entries. - type: string - pages_build_output_dir: - description: The build output directory path. - type: string - wrangler_config_hash: - description: >- - Hash of the Wrangler configuration file used for this - deployment. - type: string - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/pagesMessages' - messages: - $ref: '#/components/schemas/pagesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/pagesDeployment' - required: - - success - - errors - - messages - - result - type: object - description: Create deployment response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/pagesApiResponseCommonFailure' - description: Create deployment response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create deployment - tags: - - Pages Deployment - x-api-token-group: - - Pages Write - x-stackql-sdk: - service: pages - resource_chain: - - projects - - deployments - method: create - /accounts/{account_id}/pages/projects/{project_name}/deployments/{deployment_id}: - delete: - description: Delete a deployment. - operationId: pages-deployment-delete-deployment - parameters: - - in: path - name: deployment_id - schema: - $ref: '#/components/schemas/pagesIdentifier' - required: true - - name: project_name - in: path - required: true - description: The Pages project name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: force - schema: - description: >- - Allow deletion of aliased non-production deployments when a normal - delete would be rejected. - type: boolean - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/pagesMessages' - messages: - $ref: '#/components/schemas/pagesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - nullable: true - type: object - required: - - success - - errors - - messages - - result - type: object - description: Delete deployment response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/pagesApiResponseCommonFailure' - description: Delete deployment response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete deployment - tags: - - Pages Deployment - x-api-token-group: - - Pages Write - x-stackql-sdk: - service: pages - resource_chain: - - projects - - deployments - method: delete - get: - description: Fetch information about a deployment. - operationId: pages-deployment-get-deployment-info - parameters: - - in: path - name: deployment_id - schema: - $ref: '#/components/schemas/pagesIdentifier' - required: true - - name: project_name - in: path - required: true - description: The Pages project name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/pagesMessages' - messages: - $ref: '#/components/schemas/pagesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/pagesDeployment' - required: - - success - - errors - - messages - - result - type: object - description: Get deployment info response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/pagesApiResponseCommonFailure' - description: Get deployment info response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get deployment info - tags: - - Pages Deployment - x-api-token-group: - - Pages Read - - Pages Write - x-stackql-sdk: - service: pages - resource_chain: - - projects - - deployments - method: get - /accounts/{account_id}/pages/projects/{project_name}/deployments/{deployment_id}/history/logs: - get: - description: Fetch deployment logs for a project. - operationId: pages-deployment-get-deployment-logs - parameters: - - in: path - name: deployment_id - schema: - $ref: '#/components/schemas/pagesIdentifier' - required: true - - name: project_name - in: path - required: true - description: The Pages project name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/pagesMessages' - messages: - $ref: '#/components/schemas/pagesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/pagesDeploymentLog' - required: - - success - - errors - - messages - - result - type: object - description: Get deployment logs response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/pagesApiResponseCommonFailure' - description: Get deployment logs response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get deployment logs - tags: - - Pages Deployment - x-api-token-group: - - Pages Read - - Pages Write - x-stackql-sdk: - service: pages - resource_chain: - - projects - - deployments - - history - - logs - method: get - /accounts/{account_id}/pages/projects/{project_name}/deployments/{deployment_id}/retry: - post: - description: Retry a previous deployment. - operationId: pages-deployment-retry-deployment - parameters: - - in: path - name: deployment_id - schema: - $ref: '#/components/schemas/pagesIdentifier' - required: true - - name: project_name - in: path - required: true - description: The Pages project name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/pagesMessages' - messages: - $ref: '#/components/schemas/pagesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/pagesDeployment' - required: - - success - - errors - - messages - - result - type: object - description: Retry deployment response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/pagesApiResponseCommonFailure' - description: Retry deployment response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Retry deployment - tags: - - Pages Deployment - x-api-token-group: - - Pages Write - x-stackql-sdk: - service: pages - resource_chain: - - projects - - deployments - method: retry - /accounts/{account_id}/pages/projects/{project_name}/deployments/{deployment_id}/rollback: - post: - description: >- - Rollback the production deployment to a previous deployment. You can - only rollback to succesful builds on production. - operationId: pages-deployment-rollback-deployment - parameters: - - in: path - name: deployment_id - schema: - $ref: '#/components/schemas/pagesIdentifier' - required: true - - name: project_name - in: path - required: true - description: The Pages project name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/pagesMessages' - messages: - $ref: '#/components/schemas/pagesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/pagesDeployment' - required: - - success - - errors - - messages - - result - type: object - description: Rollback deployment response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/pagesApiResponseCommonFailure' - description: Rollback deployment response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Rollback deployment - tags: - - Pages Deployment - x-api-token-group: - - Pages Write - x-stackql-sdk: - service: pages - resource_chain: - - projects - - deployments - method: rollback - /accounts/{account_id}/pages/projects/{project_name}/domains: - get: - description: Fetch a list of all domains associated with a Pages project. - operationId: pages-domains-get-domains - parameters: - - name: project_name - in: path - required: true - description: The Pages project name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/pagesMessages' - messages: - $ref: '#/components/schemas/pagesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: '#/components/schemas/pagesDomain' - type: array - required: - - success - - errors - - messages - - result - description: Get domains response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/pagesApiResponseCommonFailure' - description: Get domains response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get domains - tags: - - Pages Domains - x-api-token-group: - - Pages Read - - Pages Write - x-stackql-sdk: - service: pages - resource_chain: - - projects - - domains - method: list - post: - description: Add a new domain for the Pages project. - operationId: pages-domains-add-domain - parameters: - - name: project_name - in: path - required: true - description: The Pages project name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - name: - $ref: '#/components/schemas/pagesDomainName' - required: - - name - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/pagesMessages' - messages: - $ref: '#/components/schemas/pagesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/pagesDomain' - required: - - success - - errors - - messages - - result - type: object - description: Add domain response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/pagesApiResponseCommonFailure' - description: Add domain response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Add domain - tags: - - Pages Domains - x-api-token-group: - - Pages Write - x-stackql-sdk: - service: pages - resource_chain: - - projects - - domains - method: create - /accounts/{account_id}/pages/projects/{project_name}/domains/{domain_name}: - delete: - description: Delete a Pages project's domain. - operationId: pages-domains-delete-domain - parameters: - - in: path - name: domain_name - schema: - $ref: '#/components/schemas/pagesDomainName' - required: true - - name: project_name - in: path - required: true - description: The Pages project name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/pagesMessages' - messages: - $ref: '#/components/schemas/pagesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - nullable: true - type: object - required: - - success - - errors - - messages - - result - type: object - description: Delete domain response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/pagesApiResponseCommonFailure' - description: Delete domain response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete domain - tags: - - Pages Domains - x-api-token-group: - - Pages Write - x-stackql-sdk: - service: pages - resource_chain: - - projects - - domains - method: delete - get: - description: Fetch a single domain. - operationId: pages-domains-get-domain - parameters: - - in: path - name: domain_name - schema: - $ref: '#/components/schemas/pagesDomainName' - required: true - - name: project_name - in: path - required: true - description: The Pages project name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/pagesMessages' - messages: - $ref: '#/components/schemas/pagesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/pagesDomain' - required: - - success - - errors - - messages - - result - type: object - description: Get domain response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/pagesApiResponseCommonFailure' - description: Get domain response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get domain - tags: - - Pages Domains - x-api-token-group: - - Pages Read - - Pages Write - x-stackql-sdk: - service: pages - resource_chain: - - projects - - domains - method: get - patch: - description: Retry the validation status of a single domain. - operationId: pages-domains-patch-domain - parameters: - - in: path - name: domain_name - schema: - $ref: '#/components/schemas/pagesDomainName' - required: true - - name: project_name - in: path - required: true - description: The Pages project name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/pagesMessages' - messages: - $ref: '#/components/schemas/pagesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/pagesDomain' - required: - - success - - errors - - messages - - result - type: object - description: Patch domain response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/pagesApiResponseCommonFailure' - description: Patch domain response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Patch domain - tags: - - Pages Domains - x-api-token-group: - - Pages Write - x-stackql-sdk: - service: pages - resource_chain: - - projects - - domains - method: edit - /accounts/{account_id}/pages/projects/{project_name}/purge_build_cache: - post: - description: Purge all cached build artifacts for a Pages project - operationId: pages-purge-build-cache - parameters: - - name: project_name - in: path - required: true - description: The Pages project name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/pagesMessages' - messages: - $ref: '#/components/schemas/pagesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - nullable: true - type: object - required: - - success - - errors - - messages - - result - type: object - description: Purge build cache response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/pagesApiResponseCommonFailure' - description: Purge build cache failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Purge build cache - tags: - - Pages Build Cache - x-api-token-group: - - Pages Write - x-stackql-sdk: - service: pages - resource_chain: - - projects - method: purge_build_cache -components: - schemas: - pagesApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/pagesMessages' - messages: - example: [] - $ref: '#/components/schemas/pagesMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - pagesBuildConfig: - description: Configs for the project build process. - properties: - build_caching: - description: Enable build caching for the project. - example: true - nullable: true - type: boolean - x-auditable: true - build_command: - description: Command used to build project. - example: npm run build - nullable: true - type: string - x-auditable: true - destination_dir: - description: Assets output directory of the build. - example: build - nullable: true - type: string - x-auditable: true - root_dir: - description: Directory to run the command. - example: / - nullable: true - type: string - x-auditable: true - web_analytics_tag: - description: The classifying tag for analytics. - example: cee1c73f6e4743d0b5e6bb1a0bcaabcc - nullable: true - type: string - x-auditable: true - web_analytics_token: - description: The auth token for analytics. - example: 021e1057c18547eca7b79f2516f06o7x - nullable: true - type: string - x-sensitive: true - required: - - web_analytics_tag - - web_analytics_token - type: object - pagesDeployment: - properties: - aliases: - description: A list of alias URLs pointing to this deployment. - example: - - https://branchname.projectname.pages.dev - items: - type: string - x-auditable: true - nullable: true - readOnly: true - type: array - build_config: - $ref: '#/components/schemas/pagesBuildConfig' - created_on: - description: When the deployment was created. - example: '2021-03-09T00:55:03.923456Z' - format: date-time - readOnly: true - type: string - x-auditable: true - deployment_trigger: - description: Info about what caused the deployment. - properties: - metadata: - description: Additional info about the trigger. - properties: - branch: - description: Where the trigger happened. - example: main - type: string - x-auditable: true - commit_dirty: - description: Whether the deployment trigger commit was dirty. - example: false - type: boolean - x-auditable: true - commit_hash: - description: Hash of the deployment trigger commit. - example: ad9ccd918a81025731e10e40267e11273a263421 - type: string - x-auditable: true - commit_message: - description: Message of the deployment trigger commit. - example: Update index.html - type: string - x-auditable: true - required: - - branch - - commit_hash - - commit_message - - commit_dirty - type: object - type: - description: What caused the deployment. - enum: - - github:push - - ad_hoc - - deploy_hook - example: ad_hoc - type: string - x-auditable: true - readOnly: true - required: - - type - - metadata - type: object - env_vars: - $ref: '#/components/schemas/pagesEnvVars' - environment: - description: Type of deploy. - enum: - - preview - - production - example: preview - readOnly: true - type: string - x-auditable: true - id: - description: Id of the deployment. - example: f64788e9-fccd-4d4a-a28a-cb84f88f6 - readOnly: true - type: string - x-auditable: true - is_skipped: - description: If the deployment has been skipped. - example: true - readOnly: true - type: boolean - x-auditable: true - latest_stage: - $ref: '#/components/schemas/pagesStage' - modified_on: - description: When the deployment was last modified. - example: '2021-03-09T00:58:59.045655Z' - format: date-time - readOnly: true - type: string - x-auditable: true - project_id: - description: Id of the project. - example: 7b162ea7-7367-4d67-bcde-1160995d5 - readOnly: true - type: string - x-auditable: true - project_name: - $ref: '#/components/schemas/pagesProjectName' - short_id: - description: Short Id (8 character) of the deployment. - example: f64788e9 - readOnly: true - type: string - x-auditable: true - source: - $ref: '#/components/schemas/pagesSource' - stages: - description: List of past stages. - example: - - ended_on: '2021-06-03T15:39:03.134378Z' - name: queued - started_on: '2021-06-03T15:38:15.608194Z' - status: active - - ended_on: null - name: initialize - started_on: null - status: idle - - ended_on: null - name: clone_repo - started_on: null - status: idle - - ended_on: null - name: build - started_on: null - status: idle - - ended_on: null - name: deploy - started_on: null - status: idle - items: - $ref: '#/components/schemas/pagesStage' - readOnly: true - type: array - url: - description: The live URL to view this deployment. - example: https://f64788e9.ninjakittens.pages.dev - readOnly: true - type: string - x-auditable: true - uses_functions: - description: Whether the deployment uses functions. - nullable: true - readOnly: true - type: boolean - x-auditable: true - required: - - aliases - - build_config - - created_on - - deployment_trigger - - environment - - env_vars - - id - - is_skipped - - latest_stage - - modified_on - - project_id - - project_name - - short_id - - source - - stages - - url - type: object - pagesDeploymentConfigValues: - properties: - ai_bindings: - description: Constellation bindings used for Pages Functions. - example: - AI_BINDING: - project_id: some-project-id - type: object - always_use_latest_compatibility_date: - description: >- - Whether to always use the latest compatibility date for Pages - Functions. - example: false - type: boolean - x-auditable: true - analytics_engine_datasets: - description: Analytics Engine bindings used for Pages Functions. - example: - ANALYTICS_ENGINE_BINDING: - dataset: api_analytics - type: object - browsers: - description: Browser bindings used for Pages Functions. - example: - BROWSER: {} - type: object - build_image_major_version: - description: The major version of the build image to use for Pages Functions. - example: 3 - type: integer - x-auditable: true - compatibility_date: - description: Compatibility date used for Pages Functions. - example: '2025-01-01' - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - compatibility_flags: - description: Compatibility flags used for Pages Functions. - example: - - url_standard - items: - type: string - x-auditable: true - type: array - d1_databases: - description: D1 databases used for Pages Functions. - example: - D1_BINDING: - id: 445e2955-951a-43f8-a35b-a4d0c8138f63 - type: object - durable_object_namespaces: - description: Durable Object namespaces used for Pages Functions. - example: - DO_BINDING: - namespace_id: 5eb63bbbe01eeed093cb22bb8f5acdc3 - type: object - env_vars: - $ref: '#/components/schemas/pagesEnvVars' - fail_open: - description: Whether to fail open when the deployment config cannot be applied. - example: true - type: boolean - x-auditable: true - hyperdrive_bindings: - description: Hyperdrive bindings used for Pages Functions. - example: - HYPERDRIVE: - id: a76a99bc342644deb02c38d66082262a - type: object - kv_namespaces: - description: KV namespaces used for Pages Functions. - example: - KV_BINDING: - namespace_id: 5eb63bbbe01eeed093cb22bb8f5acdc3 - type: object - limits: - description: Limits for Pages Functions. - example: - cpu_ms: 100 - properties: - cpu_ms: - description: CPU time limit in milliseconds. - example: 100 - type: integer - x-auditable: true - required: - - cpu_ms - type: object - mtls_certificates: - description: mTLS bindings used for Pages Functions. - example: - MTLS: - certificate_id: d7cdd17c-916f-4cb7-aabe-585eb382ec4e - type: object - placement: - description: Placement setting used for Pages Functions. - example: - mode: smart - properties: - mode: - description: Placement mode. - example: smart - type: string - x-auditable: true - required: - - mode - type: object - queue_producers: - description: Queue Producer bindings used for Pages Functions. - example: - QUEUE_PRODUCER_BINDING: - name: some-queue - type: object - r2_buckets: - description: R2 buckets used for Pages Functions. - example: - R2_BINDING: - name: some-bucket - type: object - services: - description: Services used for Pages Functions. - example: - SERVICE_BINDING: - entrypoint: MyHandler - environment: production - service: example-worker - type: object - usage_model: - deprecated: true - description: The usage model for Pages Functions. - enum: - - standard - - bundled - - unbound - example: standard - type: string - x-auditable: true - x-stainless-deprecation-message: All new projects now use the Standard usage model. - vectorize_bindings: - description: Vectorize bindings used for Pages Functions. - example: - VECTORIZE: - index_name: my_index - type: object - wrangler_config_hash: - description: Hash of the Wrangler configuration used for the deployment. - example: abc123def456 - type: string - x-auditable: true - required: - - env_vars - - fail_open - - always_use_latest_compatibility_date - - compatibility_date - - compatibility_flags - - build_image_major_version - - usage_model - type: object - pagesDeploymentConfigValuesRequest: - properties: - ai_bindings: - description: Constellation bindings used for Pages Functions. - example: - AI_BINDING: - project_id: some-project-id - type: object - always_use_latest_compatibility_date: - default: false - description: >- - Whether to always use the latest compatibility date for Pages - Functions. - example: false - type: boolean - x-auditable: true - analytics_engine_datasets: - description: Analytics Engine bindings used for Pages Functions. - example: - ANALYTICS_ENGINE_BINDING: - dataset: api_analytics - type: object - browsers: - description: Browser bindings used for Pages Functions. - example: - BROWSER: {} - type: object - build_image_major_version: - default: 3 - description: The major version of the build image to use for Pages Functions. - example: 3 - type: integer - x-auditable: true - compatibility_date: - description: Compatibility date used for Pages Functions. - example: '2025-01-01' - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - compatibility_flags: - description: Compatibility flags used for Pages Functions. - example: - - url_standard - items: - type: string - x-auditable: true - type: array - d1_databases: - description: D1 databases used for Pages Functions. - example: - D1_BINDING: - id: 445e2955-951a-43f8-a35b-a4d0c8138f63 - type: object - durable_object_namespaces: - description: Durable Object namespaces used for Pages Functions. - example: - DO_BINDING: - namespace_id: 5eb63bbbe01eeed093cb22bb8f5acdc3 - type: object - env_vars: - description: Environment variables used for builds and Pages Functions. - type: object - fail_open: - default: true - description: Whether to fail open when the deployment config cannot be applied. - example: true - type: boolean - x-auditable: true - hyperdrive_bindings: - description: Hyperdrive bindings used for Pages Functions. - example: - HYPERDRIVE: - id: a76a99bc342644deb02c38d66082262a - type: object - kv_namespaces: - description: KV namespaces used for Pages Functions. - example: - KV_BINDING: - namespace_id: 5eb63bbbe01eeed093cb22bb8f5acdc3 - type: object - limits: - description: Limits for Pages Functions. - example: - cpu_ms: 100 - properties: - cpu_ms: - description: CPU time limit in milliseconds. - example: 100 - type: integer - x-auditable: true - required: - - cpu_ms - type: object - mtls_certificates: - description: mTLS bindings used for Pages Functions. - example: - MTLS: - certificate_id: d7cdd17c-916f-4cb7-aabe-585eb382ec4e - type: object - placement: - description: Placement setting used for Pages Functions. - example: - mode: smart - properties: - mode: - description: Placement mode. - example: smart - type: string - x-auditable: true - required: - - mode - type: object - queue_producers: - description: Queue Producer bindings used for Pages Functions. - example: - QUEUE_PRODUCER_BINDING: - name: some-queue - type: object - r2_buckets: - description: R2 buckets used for Pages Functions. - example: - R2_BINDING: - name: some-bucket - type: object - services: - description: Services used for Pages Functions. - example: - SERVICE_BINDING: - entrypoint: MyHandler - environment: production - service: example-worker - type: object - usage_model: - default: standard - deprecated: true - description: The usage model for Pages Functions. - enum: - - standard - - bundled - - unbound - example: standard - type: string - x-auditable: true - x-stainless-deprecation-message: All new projects now use the Standard usage model. - vectorize_bindings: - description: Vectorize bindings used for Pages Functions. - example: - VECTORIZE: - index_name: my_index - type: object - wrangler_config_hash: - description: Hash of the Wrangler configuration used for the deployment. - example: abc123def456 - type: string - x-auditable: true - type: object - pagesDeploymentLog: - example: - data: - - line: Cloning repository... - ts: '2021-04-20T19:35:29.0749819Z' - - line: From https://github.com/cloudflare/example - ts: '2021-04-20T19:35:30.0749819Z' - - line: ' * branch 209c5bb11d89533f426b2f8469bcae12fdccf71b -> FETCH_HEAD' - ts: '2021-04-20T19:35:30.0749819Z' - - line: '' - ts: '2021-04-20T19:35:30.0749819Z' - - line: HEAD is now at 209c5bb Update index.html - ts: '2021-04-20T19:35:30.0749819Z' - - line: '' - ts: '2021-04-20T19:35:30.0749819Z' - - line: '' - ts: '2021-04-20T19:35:30.0749819Z' - - line: 'Success: Finished cloning repository files' - ts: '2021-04-20T19:35:30.0749819Z' - - line: Installing dependencies - ts: '2021-04-20T19:35:59.0749819Z' - - line: Python version set to 2.7 - ts: '2021-04-20T19:35:59.0931208Z' - - line: v12.18.0 is already installed. - ts: '2021-04-20T19:36:02.2369501Z' - - line: Now using node v12.18.0 (npm v6.14.4) - ts: '2021-04-20T19:36:02.6028886Z' - - line: Started restoring cached build plugins - ts: '2021-04-20T19:36:02.624555Z' - - line: Finished restoring cached build plugins - ts: '2021-04-20T19:36:02.6340688Z' - - line: Attempting ruby version 2.7.1, read from environment - ts: '2021-04-20T19:36:02.963095Z' - - line: Using ruby version 2.7.1 - ts: '2021-04-20T19:36:04.2236084Z' - - line: Using PHP version 5.6 - ts: '2021-04-20T19:36:04.5450152Z' - - line: 5.2 is already installed. - ts: '2021-04-20T19:36:04.5740509Z' - - line: Using Swift version 5.2 - ts: '2021-04-20T19:36:04.577035Z' - - line: Installing Hugo 0.54.0 - ts: '2021-04-20T19:36:04.5771615Z' - - line: >- - Hugo Static Site Generator v0.54.0-B1A82C61A/extended linux/amd64 - BuildDate: 2019-02-01T10:04:38Z - ts: '2021-04-20T19:36:05.4786868Z' - - line: Started restoring cached go cache - ts: '2021-04-20T19:36:05.4794366Z' - - line: Finished restoring cached go cache - ts: '2021-04-20T19:36:05.481977Z' - - line: go version go1.14.4 linux/amd64 - ts: '2021-04-20T19:36:05.9049776Z' - - line: go version go1.14.4 linux/amd64 - ts: '2021-04-20T19:36:05.9086053Z' - - line: Installing missing commands - ts: '2021-04-20T19:36:05.9163568Z' - - line: Verify run directory - ts: '2021-04-20T19:36:05.9163934Z' - - line: >- - Executing user command: echo "skipping build step: no build - command specified" - ts: '2021-04-20T19:36:05.9164636Z' - - line: 'skipping build step: no build command specified' - ts: '2021-04-20T19:36:05.9165087Z' - - line: Finished - ts: '2021-04-20T19:36:05.917412Z' - includes_container_logs: true - total: 30 - properties: - data: - items: - $ref: '#/components/schemas/pagesDeploymentLog_data_item' - type: array - includes_container_logs: - readOnly: true - type: boolean - total: - readOnly: true - type: integer - required: - - total - - includes_container_logs - - data - type: object - pagesDeploymentLog_data_item: - properties: - line: - readOnly: true - type: string - ts: - readOnly: true - type: string - required: - - ts - - line - type: object - pagesDomain: - properties: - certificate_authority: - enum: - - google - - lets_encrypt - example: lets_encrypt - readOnly: true - type: string - x-auditable: true - created_on: - readOnly: true - type: string - x-auditable: true - domain_id: - readOnly: true - type: string - x-auditable: true - id: - readOnly: true - type: string - x-auditable: true - name: - $ref: '#/components/schemas/pagesDomainName' - status: - enum: - - initializing - - pending - - active - - deactivated - - blocked - - error - readOnly: true - type: string - x-auditable: true - validation_data: - properties: - error_message: - type: string - x-auditable: true - method: - enum: - - http - - txt - type: string - x-auditable: true - status: - enum: - - initializing - - pending - - active - - deactivated - - error - type: string - x-auditable: true - txt_name: - type: string - x-auditable: true - txt_value: - type: string - x-auditable: true - readOnly: true - required: - - status - - method - type: object - verification_data: - properties: - error_message: - type: string - x-auditable: true - status: - enum: - - pending - - active - - deactivated - - blocked - - error - type: string - readOnly: true - required: - - status - type: object - zone_tag: - readOnly: true - type: string - x-auditable: true - required: - - id - - domain_id - - name - - status - - created_on - - certificate_authority - - zone_tag - - validation_data - - verification_data - type: object - pagesDomainName: - description: The domain name. - example: this-is-my-domain-01.com - type: string - x-auditable: true - pagesEnvVars: - description: Environment variables used for builds and Pages Functions. - nullable: true - type: object - pagesIdentifier: - description: Identifier. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - type: string - x-auditable: true - pagesMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - pagesProject: - properties: - build_config: - $ref: '#/components/schemas/pagesBuildConfig' - canonical_deployment: - $ref: '#/components/schemas/pagesDeployment' - description: Most recent production deployment of the project. - nullable: true - readOnly: true - type: object - created_on: - description: When the project was created. - example: '2017-01-01T00:00:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - deployment_configs: - description: Configs for deployments in a project. - properties: - preview: - description: Configs for preview deploys. - $ref: '#/components/schemas/pagesDeploymentConfigValues' - production: - description: Configs for production deploys. - $ref: '#/components/schemas/pagesDeploymentConfigValues' - required: - - production - - preview - type: object - domains: - description: A list of associated custom domains for the project. - example: - - customdomain.com - - customdomain.org - items: - type: string - x-auditable: true - readOnly: true - type: array - framework: - description: Framework the project is using. - readOnly: true - type: string - x-auditable: true - framework_version: - description: Version of the framework the project is using. - readOnly: true - type: string - x-auditable: true - id: - description: ID of the project. - example: 7b162ea7-7367-4d67-bcde-1160995d5 - readOnly: true - type: string - x-auditable: true - latest_deployment: - $ref: '#/components/schemas/pagesDeployment' - description: Most recent deployment of the project. - nullable: true - readOnly: true - type: object - name: - $ref: '#/components/schemas/pagesProjectName' - preview_script_name: - description: Name of the preview script. - example: pages-worker--1234567-preview - readOnly: true - type: string - x-auditable: true - production_branch: - description: >- - Production branch of the project. Used to identify production - deployments. - example: main - type: string - x-auditable: true - production_script_name: - description: Name of the production script. - example: pages-worker--1234567-production - readOnly: true - type: string - x-auditable: true - source: - $ref: '#/components/schemas/pagesSource' - subdomain: - description: The Cloudflare subdomain associated with the project. - example: helloworld.pages.dev - readOnly: true - type: string - x-auditable: true - uses_functions: - description: Whether the project uses functions. - nullable: true - readOnly: true - type: boolean - x-auditable: true - required: - - id - - name - - deployment_configs - - latest_deployment - - canonical_deployment - - created_on - - production_branch - - production_script_name - - preview_script_name - - uses_functions - - framework - - framework_version - type: object - pagesProjectName: - description: Name of the project. - example: this-is-my-project-01 - type: string - x-auditable: true - pagesSource: - description: Configs for the project source control. - properties: - config: - properties: - deployments_enabled: - deprecated: true - description: >- - Whether to enable automatic deployments when pushing to the - source repository. When disabled, no deployments (production or - preview) will be triggered automatically. - type: boolean - x-auditable: true - x-stainless-deprecation-message: >- - Use `production_deployments_enabled` and - `preview_deployment_setting` for more granular control. - owner: - description: The owner of the repository. - example: my-org - type: string - x-auditable: true - owner_id: - description: The owner ID of the repository. - example: '12345678' - type: string - x-auditable: true - path_excludes: - description: >- - A list of paths that should be excluded from triggering a - preview deployment. Wildcard syntax (`*`) is supported. - items: - type: string - x-auditable: true - type: array - path_includes: - description: >- - A list of paths that should be watched to trigger a preview - deployment. Wildcard syntax (`*`) is supported. - items: - type: string - x-auditable: true - type: array - pr_comments_enabled: - description: Whether to enable PR comments. - type: boolean - x-auditable: true - preview_branch_excludes: - description: >- - A list of branches that should not trigger a preview deployment. - Wildcard syntax (`*`) is supported. Must be used with - `preview_deployment_setting` set to `custom`. - items: - type: string - x-auditable: true - type: array - preview_branch_includes: - description: >- - A list of branches that should trigger a preview deployment. - Wildcard syntax (`*`) is supported. Must be used with - `preview_deployment_setting` set to `custom`. - items: - type: string - x-auditable: true - type: array - preview_deployment_setting: - description: >- - Controls whether commits to preview branches trigger a preview - deployment. - enum: - - all - - none - - custom - type: string - x-auditable: true - production_branch: - description: The production branch of the repository. - example: main - type: string - x-auditable: true - production_deployments_enabled: - description: >- - Whether to trigger a production deployment on commits to the - production branch. - type: boolean - x-auditable: true - repo_id: - description: The ID of the repository. - example: '12345678' - type: string - x-auditable: true - repo_name: - description: The name of the repository. - example: my-repo - type: string - x-auditable: true - required: - - deployments_enabled - - owner - - owner_id - - path_excludes - - path_includes - - pr_comments_enabled - - preview_branch_excludes - - preview_branch_includes - - preview_deployment_setting - - production_branch - - production_deployments_enabled - - repo_id - - repo_name - type: object - type: - description: The source control management provider. - enum: - - github - - gitlab - example: github - type: string - x-auditable: true - required: - - type - - config - type: object - pagesStage: - description: The status of the deployment. - properties: - ended_on: - description: When the stage ended. - example: '2021-03-09T00:58:59.045655Z' - format: date-time - nullable: true - readOnly: true - type: string - x-auditable: true - name: - description: The current build stage. - enum: - - queued - - initialize - - clone_repo - - build - - deploy - example: deploy - type: string - x-auditable: true - started_on: - description: When the stage started. - example: '2021-03-09T00:55:03.923456Z' - format: date-time - nullable: true - readOnly: true - type: string - x-auditable: true - status: - description: State of the current stage. - enum: - - success - - idle - - active - - failure - - canceled - example: success - readOnly: true - type: string - x-auditable: true - readOnly: true - required: - - name - - started_on - - ended_on - - status - type: object - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - projects: - id: cloudflare.pages.projects - name: projects - title: Projects - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1pages~1projects/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1pages~1projects/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - purge_build_cache: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}~1purge_build_cache/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/projects/methods/get' - - $ref: '#/components/x-stackQL-resources/projects/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/projects/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/projects/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/projects/methods/delete' - replace: [] - deployments: - id: cloudflare.pages.deployments - name: deployments - title: Deployments - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}~1deployments/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}~1deployments/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}~1deployments~1{deployment_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}~1deployments~1{deployment_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - retry: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}~1deployments~1{deployment_id}~1retry/post - response: - mediaType: application/json - openAPIDocKey: '200' - rollback: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}~1deployments~1{deployment_id}~1rollback/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/deployments/methods/get' - - $ref: '#/components/x-stackQL-resources/deployments/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/deployments/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/deployments/methods/delete' - replace: [] - logs: - id: cloudflare.pages.logs - name: logs - title: Logs - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}~1deployments~1{deployment_id}~1history~1logs/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result.data - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/logs/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - domains: - id: cloudflare.pages.domains - name: domains - title: Domains - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}~1domains/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}~1domains/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}~1domains~1{domain_name}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}~1domains~1{domain_name}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}~1domains~1{domain_name}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/domains/methods/get' - - $ref: '#/components/x-stackQL-resources/domains/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/domains/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/domains/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/domains/methods/delete' - replace: [] +openapi: 3.0.3 +info: + title: pages API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/pages/projects: + get: + description: Fetch a list of all user projects. + operationId: pages-project-get-projects + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: page + schema: + description: Which page of projects to fetch. + type: integer + - in: query + name: per_page + schema: + description: How many projects to return per page. + type: integer + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/pagesMessages' + messages: + $ref: '#/components/schemas/pagesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/pagesProject' + type: array + required: + - success + - errors + - messages + - result + description: Get projects response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/pagesApiResponseCommonFailure' + description: Get projects response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get projects + tags: + - Pages Project + x-api-token-group: + - Pages Read + - Pages Write + x-stackql-sdk: + service: pages + resource_chain: + - projects + method: list + post: + description: Create a new project. + operationId: pages-project-create-project + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + build_config: + description: Configs for the project build process. + properties: + build_caching: + description: Enable build caching for the project. + type: boolean + x-auditable: true + build_command: + description: Command used to build project. + type: string + x-auditable: true + destination_dir: + description: Output directory of the build. + type: string + x-auditable: true + root_dir: + description: Directory to run the command. + type: string + x-auditable: true + web_analytics_tag: + description: The classifying tag for analytics. + nullable: true + type: string + x-auditable: true + web_analytics_token: + description: The auth token for analytics. + nullable: true + type: string + x-sensitive: true + type: object + deployment_configs: + description: Configs for deployments in a project. + properties: + preview: + description: Configs for preview deploys. + $ref: '#/components/schemas/pagesDeploymentConfigValuesRequest' + production: + description: Configs for production deploys. + $ref: '#/components/schemas/pagesDeploymentConfigValuesRequest' + type: object + name: + description: Name of the project. + type: string + x-auditable: true + production_branch: + description: Production branch of the project. Used to identify production deployments. + type: string + x-auditable: true + source: + description: Configs for the project source control. + properties: + config: + properties: + deployments_enabled: + deprecated: true + description: Whether to enable automatic deployments when pushing to the source repository. When disabled, no deployments (production or preview) will be triggered automatically. + type: boolean + x-auditable: true + x-stainless-deprecation-message: Use `production_deployments_enabled` and `preview_deployment_setting` for more granular control. + owner: + description: The owner of the repository. + type: string + x-auditable: true + owner_id: + description: The owner ID of the repository. + type: string + x-auditable: true + path_excludes: + description: A list of paths that should be excluded from triggering a preview deployment. Wildcard syntax (`*`) is supported. + items: + type: string + x-auditable: true + type: array + path_includes: + description: A list of paths that should be watched to trigger a preview deployment. Wildcard syntax (`*`) is supported. + items: + type: string + x-auditable: true + type: array + pr_comments_enabled: + description: Whether to enable PR comments. + type: boolean + x-auditable: true + preview_branch_excludes: + description: A list of branches that should not trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`. + items: + type: string + x-auditable: true + type: array + preview_branch_includes: + description: A list of branches that should trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`. + items: + type: string + x-auditable: true + type: array + preview_deployment_setting: + description: Controls whether commits to preview branches trigger a preview deployment. + enum: + - all + - none + - custom + type: string + x-auditable: true + production_branch: + description: The production branch of the repository. + type: string + x-auditable: true + production_deployments_enabled: + description: Whether to trigger a production deployment on commits to the production branch. + type: boolean + x-auditable: true + repo_id: + description: The ID of the repository. + type: string + x-auditable: true + repo_name: + description: The name of the repository. + type: string + x-auditable: true + type: object + type: + description: The source control management provider. + enum: + - github + - gitlab + type: string + x-auditable: true + required: + - type + - config + type: object + required: + - name + - production_branch + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/pagesMessages' + messages: + $ref: '#/components/schemas/pagesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/pagesProject' + required: + - success + - errors + - messages + - result + type: object + description: Create project response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/pagesApiResponseCommonFailure' + description: Create project response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create project + tags: + - Pages Project + x-api-token-group: + - Pages Write + x-stackql-sdk: + service: pages + resource_chain: + - projects + method: create + /accounts/{account_id}/pages/projects/{project_name}: + delete: + description: Delete a project by name. + operationId: pages-project-delete-project + parameters: + - name: project_name + in: path + required: true + description: The Pages project name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/pagesMessages' + messages: + $ref: '#/components/schemas/pagesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + nullable: true + type: object + required: + - success + - errors + - messages + - result + type: object + description: Delete project response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/pagesApiResponseCommonFailure' + description: Delete project response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete project + tags: + - Pages Project + x-api-token-group: + - Pages Write + x-stackql-sdk: + service: pages + resource_chain: + - projects + method: delete + get: + description: Fetch a project by name. + operationId: pages-project-get-project + parameters: + - name: project_name + in: path + required: true + description: The Pages project name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/pagesMessages' + messages: + $ref: '#/components/schemas/pagesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/pagesProject' + required: + - success + - errors + - messages + - result + type: object + description: Get project response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/pagesApiResponseCommonFailure' + description: Get project response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get project + tags: + - Pages Project + x-api-token-group: + - Pages Read + - Pages Write + x-stackql-sdk: + service: pages + resource_chain: + - projects + method: get + patch: + description: Set new attributes for an existing project. Modify environment variables. To delete an environment variable, set the key to null. + operationId: pages-project-update-project + parameters: + - name: project_name + in: path + required: true + description: The Pages project name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + build_config: + description: Configs for the project build process. + properties: + build_caching: + description: Enable build caching for the project. + type: boolean + x-auditable: true + build_command: + description: Command used to build project. + type: string + x-auditable: true + destination_dir: + description: Output directory of the build. + type: string + x-auditable: true + root_dir: + description: Directory to run the command. + type: string + x-auditable: true + web_analytics_tag: + description: The classifying tag for analytics. + nullable: true + type: string + x-auditable: true + web_analytics_token: + description: The auth token for analytics. + nullable: true + type: string + x-sensitive: true + type: object + deployment_configs: + description: Configs for deployments in a project. + properties: + preview: + description: Configs for preview deploys. + $ref: '#/components/schemas/pagesDeploymentConfigValuesRequest' + production: + description: Configs for production deploys. + $ref: '#/components/schemas/pagesDeploymentConfigValuesRequest' + type: object + name: + description: Name of the project. + type: string + x-auditable: true + production_branch: + description: Production branch of the project. Used to identify production deployments. + type: string + x-auditable: true + source: + description: Configs for the project source control. + properties: + config: + properties: + deployments_enabled: + deprecated: true + description: Whether to enable automatic deployments when pushing to the source repository. When disabled, no deployments (production or preview) will be triggered automatically. + type: boolean + x-auditable: true + x-stainless-deprecation-message: Use `production_deployments_enabled` and `preview_deployment_setting` for more granular control. + owner: + description: The owner of the repository. + type: string + x-auditable: true + owner_id: + description: The owner ID of the repository. + type: string + x-auditable: true + path_excludes: + description: A list of paths that should be excluded from triggering a preview deployment. Wildcard syntax (`*`) is supported. + items: + type: string + x-auditable: true + type: array + path_includes: + description: A list of paths that should be watched to trigger a preview deployment. Wildcard syntax (`*`) is supported. + items: + type: string + x-auditable: true + type: array + pr_comments_enabled: + description: Whether to enable PR comments. + type: boolean + x-auditable: true + preview_branch_excludes: + description: A list of branches that should not trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`. + items: + type: string + x-auditable: true + type: array + preview_branch_includes: + description: A list of branches that should trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`. + items: + type: string + x-auditable: true + type: array + preview_deployment_setting: + description: Controls whether commits to preview branches trigger a preview deployment. + enum: + - all + - none + - custom + type: string + x-auditable: true + production_branch: + description: The production branch of the repository. + type: string + x-auditable: true + production_deployments_enabled: + description: Whether to trigger a production deployment on commits to the production branch. + type: boolean + x-auditable: true + repo_id: + description: The ID of the repository. + type: string + x-auditable: true + repo_name: + description: The name of the repository. + type: string + x-auditable: true + type: object + type: + description: The source control management provider. + enum: + - github + - gitlab + type: string + x-auditable: true + required: + - type + - config + type: object + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/pagesMessages' + messages: + $ref: '#/components/schemas/pagesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/pagesProject' + required: + - success + - errors + - messages + - result + type: object + description: Update project response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/pagesApiResponseCommonFailure' + description: Update project response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update project + tags: + - Pages Project + x-api-token-group: + - Pages Write + x-stackql-sdk: + service: pages + resource_chain: + - projects + method: edit + /accounts/{account_id}/pages/projects/{project_name}/deployments: + get: + description: Fetch a list of project deployments. + operationId: pages-deployment-get-deployments + parameters: + - name: project_name + in: path + required: true + description: The Pages project name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: env + schema: + description: What type of deployments to fetch. + enum: + - production + - preview + type: string + - in: query + name: page + schema: + description: Which page of deployments to fetch. + type: integer + - in: query + name: per_page + schema: + description: How many deployments to return per page. + type: integer + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/pagesMessages' + messages: + $ref: '#/components/schemas/pagesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/pagesDeployment' + type: array + required: + - success + - errors + - messages + - result + description: Get deployments response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/pagesApiResponseCommonFailure' + description: Get deployments response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get deployments + tags: + - Pages Deployment + x-api-token-group: + - Pages Read + - Pages Write + x-stackql-sdk: + service: pages + resource_chain: + - projects + - deployments + method: list + post: + description: Start a new deployment from production. The repository and account must have already been authorized on the Cloudflare Pages dashboard. + operationId: pages-deployment-create-deployment + parameters: + - name: project_name + in: path + required: true + description: The Pages project name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + multipart/form-data: + encoding: + _headers: + contentType: text/plain + _redirects: + contentType: text/plain + _routes.json: + contentType: application/json + _worker.bundle: + contentType: multipart/form-data + _worker.js: + contentType: application/javascript+module, text/javascript+module, application/javascript, text/javascript + functions-filepath-routing-config.json: + contentType: application/json + manifest: + contentType: application/json + schema: + properties: + _headers: + description: Headers configuration file for the deployment. + format: binary + type: string + _redirects: + description: Redirects configuration file for the deployment. + format: binary + type: string + _routes.json: + description: Routes configuration file defining routing rules. + format: binary + type: string + _worker.bundle: + description: 'Worker bundle file in multipart/form-data format. Mutually exclusive with `_worker.js`. Cannot specify both `_worker.js` and `_worker.bundle` in the same request. Maximum size: 25 MiB.' + format: binary + type: string + _worker.js: + description: Worker JavaScript file. Mutually exclusive with `_worker.bundle`. Cannot specify both `_worker.js` and `_worker.bundle` in the same request. + format: binary + type: string + branch: + description: The branch to build the new deployment from. The `HEAD` of the branch will be used. If omitted, the production branch will be used by default. + type: string + x-auditable: true + commit_dirty: + description: Boolean string indicating if the working directory has uncommitted changes. + enum: + - 'true' + - 'false' + type: string + commit_hash: + description: Git commit SHA associated with this deployment. + type: string + commit_message: + description: Git commit message associated with this deployment. + type: string + functions-filepath-routing-config.json: + description: Functions routing configuration file. + format: binary + type: string + manifest: + description: JSON string containing a manifest of files to deploy. Maps file paths to their content hashes. Required for direct upload deployments. Maximum 20,000 entries. + type: string + pages_build_output_dir: + description: The build output directory path. + type: string + wrangler_config_hash: + description: Hash of the Wrangler configuration file used for this deployment. + type: string + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/pagesMessages' + messages: + $ref: '#/components/schemas/pagesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/pagesDeployment' + required: + - success + - errors + - messages + - result + type: object + description: Create deployment response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/pagesApiResponseCommonFailure' + description: Create deployment response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create deployment + tags: + - Pages Deployment + x-api-token-group: + - Pages Write + x-stackql-sdk: + service: pages + resource_chain: + - projects + - deployments + method: create + /accounts/{account_id}/pages/projects/{project_name}/deployments/{deployment_id}: + delete: + description: Delete a deployment. + operationId: pages-deployment-delete-deployment + parameters: + - in: path + name: deployment_id + schema: + $ref: '#/components/schemas/pagesIdentifier' + required: true + - name: project_name + in: path + required: true + description: The Pages project name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: force + schema: + description: Allow deletion of aliased non-production deployments when a normal delete would be rejected. + type: boolean + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/pagesMessages' + messages: + $ref: '#/components/schemas/pagesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + nullable: true + type: object + required: + - success + - errors + - messages + - result + type: object + description: Delete deployment response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/pagesApiResponseCommonFailure' + description: Delete deployment response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete deployment + tags: + - Pages Deployment + x-api-token-group: + - Pages Write + x-stackql-sdk: + service: pages + resource_chain: + - projects + - deployments + method: delete + get: + description: Fetch information about a deployment. + operationId: pages-deployment-get-deployment-info + parameters: + - in: path + name: deployment_id + schema: + $ref: '#/components/schemas/pagesIdentifier' + required: true + - name: project_name + in: path + required: true + description: The Pages project name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/pagesMessages' + messages: + $ref: '#/components/schemas/pagesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/pagesDeployment' + required: + - success + - errors + - messages + - result + type: object + description: Get deployment info response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/pagesApiResponseCommonFailure' + description: Get deployment info response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get deployment info + tags: + - Pages Deployment + x-api-token-group: + - Pages Read + - Pages Write + x-stackql-sdk: + service: pages + resource_chain: + - projects + - deployments + method: get + /accounts/{account_id}/pages/projects/{project_name}/deployments/{deployment_id}/history/logs: + get: + description: Fetch deployment logs for a project. + operationId: pages-deployment-get-deployment-logs + parameters: + - in: path + name: deployment_id + schema: + $ref: '#/components/schemas/pagesIdentifier' + required: true + - name: project_name + in: path + required: true + description: The Pages project name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/pagesMessages' + messages: + $ref: '#/components/schemas/pagesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/pagesDeploymentLog' + required: + - success + - errors + - messages + - result + type: object + description: Get deployment logs response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/pagesApiResponseCommonFailure' + description: Get deployment logs response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get deployment logs + tags: + - Pages Deployment + x-api-token-group: + - Pages Read + - Pages Write + x-stackql-sdk: + service: pages + resource_chain: + - projects + - deployments + - history + - logs + method: get + /accounts/{account_id}/pages/projects/{project_name}/deployments/{deployment_id}/retry: + post: + description: Retry a previous deployment. + operationId: pages-deployment-retry-deployment + parameters: + - in: path + name: deployment_id + schema: + $ref: '#/components/schemas/pagesIdentifier' + required: true + - name: project_name + in: path + required: true + description: The Pages project name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/pagesMessages' + messages: + $ref: '#/components/schemas/pagesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/pagesDeployment' + required: + - success + - errors + - messages + - result + type: object + description: Retry deployment response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/pagesApiResponseCommonFailure' + description: Retry deployment response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Retry deployment + tags: + - Pages Deployment + x-api-token-group: + - Pages Write + x-stackql-sdk: + service: pages + resource_chain: + - projects + - deployments + method: retry + /accounts/{account_id}/pages/projects/{project_name}/deployments/{deployment_id}/rollback: + post: + description: Rollback the production deployment to a previous deployment. You can only rollback to succesful builds on production. + operationId: pages-deployment-rollback-deployment + parameters: + - in: path + name: deployment_id + schema: + $ref: '#/components/schemas/pagesIdentifier' + required: true + - name: project_name + in: path + required: true + description: The Pages project name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/pagesMessages' + messages: + $ref: '#/components/schemas/pagesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/pagesDeployment' + required: + - success + - errors + - messages + - result + type: object + description: Rollback deployment response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/pagesApiResponseCommonFailure' + description: Rollback deployment response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Rollback deployment + tags: + - Pages Deployment + x-api-token-group: + - Pages Write + x-stackql-sdk: + service: pages + resource_chain: + - projects + - deployments + method: rollback + /accounts/{account_id}/pages/projects/{project_name}/domains: + get: + description: Fetch a list of all domains associated with a Pages project. + operationId: pages-domains-get-domains + parameters: + - name: project_name + in: path + required: true + description: The Pages project name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/pagesMessages' + messages: + $ref: '#/components/schemas/pagesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/pagesDomain' + type: array + required: + - success + - errors + - messages + - result + description: Get domains response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/pagesApiResponseCommonFailure' + description: Get domains response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get domains + tags: + - Pages Domains + x-api-token-group: + - Pages Read + - Pages Write + x-stackql-sdk: + service: pages + resource_chain: + - projects + - domains + method: list + post: + description: Add a new domain for the Pages project. + operationId: pages-domains-add-domain + parameters: + - name: project_name + in: path + required: true + description: The Pages project name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + name: + $ref: '#/components/schemas/pagesDomainName' + required: + - name + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/pagesMessages' + messages: + $ref: '#/components/schemas/pagesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/pagesDomain' + required: + - success + - errors + - messages + - result + type: object + description: Add domain response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/pagesApiResponseCommonFailure' + description: Add domain response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Add domain + tags: + - Pages Domains + x-api-token-group: + - Pages Write + x-stackql-sdk: + service: pages + resource_chain: + - projects + - domains + method: create + /accounts/{account_id}/pages/projects/{project_name}/domains/{domain_name}: + delete: + description: Delete a Pages project's domain. + operationId: pages-domains-delete-domain + parameters: + - in: path + name: domain_name + schema: + $ref: '#/components/schemas/pagesDomainName' + required: true + - name: project_name + in: path + required: true + description: The Pages project name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/pagesMessages' + messages: + $ref: '#/components/schemas/pagesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + nullable: true + type: object + required: + - success + - errors + - messages + - result + type: object + description: Delete domain response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/pagesApiResponseCommonFailure' + description: Delete domain response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete domain + tags: + - Pages Domains + x-api-token-group: + - Pages Write + x-stackql-sdk: + service: pages + resource_chain: + - projects + - domains + method: delete + get: + description: Fetch a single domain. + operationId: pages-domains-get-domain + parameters: + - in: path + name: domain_name + schema: + $ref: '#/components/schemas/pagesDomainName' + required: true + - name: project_name + in: path + required: true + description: The Pages project name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/pagesMessages' + messages: + $ref: '#/components/schemas/pagesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/pagesDomain' + required: + - success + - errors + - messages + - result + type: object + description: Get domain response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/pagesApiResponseCommonFailure' + description: Get domain response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get domain + tags: + - Pages Domains + x-api-token-group: + - Pages Read + - Pages Write + x-stackql-sdk: + service: pages + resource_chain: + - projects + - domains + method: get + patch: + description: Retry the validation status of a single domain. + operationId: pages-domains-patch-domain + parameters: + - in: path + name: domain_name + schema: + $ref: '#/components/schemas/pagesDomainName' + required: true + - name: project_name + in: path + required: true + description: The Pages project name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/pagesMessages' + messages: + $ref: '#/components/schemas/pagesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/pagesDomain' + required: + - success + - errors + - messages + - result + type: object + description: Patch domain response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/pagesApiResponseCommonFailure' + description: Patch domain response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Patch domain + tags: + - Pages Domains + x-api-token-group: + - Pages Write + x-stackql-sdk: + service: pages + resource_chain: + - projects + - domains + method: edit + /accounts/{account_id}/pages/projects/{project_name}/purge_build_cache: + post: + description: Purge all cached build artifacts for a Pages project + operationId: pages-purge-build-cache + parameters: + - name: project_name + in: path + required: true + description: The Pages project name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/pagesMessages' + messages: + $ref: '#/components/schemas/pagesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + nullable: true + type: object + required: + - success + - errors + - messages + - result + type: object + description: Purge build cache response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/pagesApiResponseCommonFailure' + description: Purge build cache failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Purge build cache + tags: + - Pages Build Cache + x-api-token-group: + - Pages Write + x-stackql-sdk: + service: pages + resource_chain: + - projects + method: purge_build_cache +components: + schemas: + pagesApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/pagesMessages' + messages: + example: [] + $ref: '#/components/schemas/pagesMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + pagesBuildConfig: + description: Configs for the project build process. + properties: + build_caching: + description: Enable build caching for the project. + example: true + nullable: true + type: boolean + x-auditable: true + build_command: + description: Command used to build project. + example: npm run build + nullable: true + type: string + x-auditable: true + destination_dir: + description: Assets output directory of the build. + example: build + nullable: true + type: string + x-auditable: true + root_dir: + description: Directory to run the command. + example: / + nullable: true + type: string + x-auditable: true + web_analytics_tag: + description: The classifying tag for analytics. + example: cee1c73f6e4743d0b5e6bb1a0bcaabcc + nullable: true + type: string + x-auditable: true + web_analytics_token: + description: The auth token for analytics. + example: 021e1057c18547eca7b79f2516f06o7x + nullable: true + type: string + x-sensitive: true + required: + - web_analytics_tag + - web_analytics_token + type: object + pagesDeployment: + properties: + aliases: + description: A list of alias URLs pointing to this deployment. + example: + - https://branchname.projectname.pages.dev + items: + type: string + x-auditable: true + nullable: true + readOnly: true + type: array + build_config: + $ref: '#/components/schemas/pagesBuildConfig' + created_on: + description: When the deployment was created. + example: '2021-03-09T00:55:03.923456Z' + format: date-time + readOnly: true + type: string + x-auditable: true + deployment_trigger: + description: Info about what caused the deployment. + properties: + metadata: + description: Additional info about the trigger. + properties: + branch: + description: Where the trigger happened. + example: main + type: string + x-auditable: true + commit_dirty: + description: Whether the deployment trigger commit was dirty. + example: false + type: boolean + x-auditable: true + commit_hash: + description: Hash of the deployment trigger commit. + example: ad9ccd918a81025731e10e40267e11273a263421 + type: string + x-auditable: true + commit_message: + description: Message of the deployment trigger commit. + example: Update index.html + type: string + x-auditable: true + required: + - branch + - commit_hash + - commit_message + - commit_dirty + type: object + type: + description: What caused the deployment. + enum: + - github:push + - ad_hoc + - deploy_hook + example: ad_hoc + type: string + x-auditable: true + readOnly: true + required: + - type + - metadata + type: object + env_vars: + $ref: '#/components/schemas/pagesEnvVars' + environment: + description: Type of deploy. + enum: + - preview + - production + example: preview + readOnly: true + type: string + x-auditable: true + id: + description: Id of the deployment. + example: f64788e9-fccd-4d4a-a28a-cb84f88f6 + readOnly: true + type: string + x-auditable: true + is_skipped: + description: If the deployment has been skipped. + example: true + readOnly: true + type: boolean + x-auditable: true + latest_stage: + $ref: '#/components/schemas/pagesStage' + modified_on: + description: When the deployment was last modified. + example: '2021-03-09T00:58:59.045655Z' + format: date-time + readOnly: true + type: string + x-auditable: true + project_id: + description: Id of the project. + example: 7b162ea7-7367-4d67-bcde-1160995d5 + readOnly: true + type: string + x-auditable: true + project_name: + $ref: '#/components/schemas/pagesProjectName' + short_id: + description: Short Id (8 character) of the deployment. + example: f64788e9 + readOnly: true + type: string + x-auditable: true + source: + $ref: '#/components/schemas/pagesSource' + stages: + description: List of past stages. + example: + - ended_on: '2021-06-03T15:39:03.134378Z' + name: queued + started_on: '2021-06-03T15:38:15.608194Z' + status: active + - ended_on: null + name: initialize + started_on: null + status: idle + - ended_on: null + name: clone_repo + started_on: null + status: idle + - ended_on: null + name: build + started_on: null + status: idle + - ended_on: null + name: deploy + started_on: null + status: idle + items: + $ref: '#/components/schemas/pagesStage' + readOnly: true + type: array + url: + description: The live URL to view this deployment. + example: https://f64788e9.ninjakittens.pages.dev + readOnly: true + type: string + x-auditable: true + uses_functions: + description: Whether the deployment uses functions. + nullable: true + readOnly: true + type: boolean + x-auditable: true + required: + - aliases + - build_config + - created_on + - deployment_trigger + - environment + - env_vars + - id + - is_skipped + - latest_stage + - modified_on + - project_id + - project_name + - short_id + - source + - stages + - url + type: object + pagesDeploymentConfigValues: + properties: + ai_bindings: + description: Constellation bindings used for Pages Functions. + example: + AI_BINDING: + project_id: some-project-id + type: object + always_use_latest_compatibility_date: + description: Whether to always use the latest compatibility date for Pages Functions. + example: false + type: boolean + x-auditable: true + analytics_engine_datasets: + description: Analytics Engine bindings used for Pages Functions. + example: + ANALYTICS_ENGINE_BINDING: + dataset: api_analytics + type: object + browsers: + description: Browser bindings used for Pages Functions. + example: + BROWSER: {} + type: object + build_image_major_version: + description: The major version of the build image to use for Pages Functions. + example: 3 + type: integer + x-auditable: true + compatibility_date: + description: Compatibility date used for Pages Functions. + example: '2025-01-01' + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + compatibility_flags: + description: Compatibility flags used for Pages Functions. + example: + - url_standard + items: + type: string + x-auditable: true + type: array + d1_databases: + description: D1 databases used for Pages Functions. + example: + D1_BINDING: + id: 445e2955-951a-43f8-a35b-a4d0c8138f63 + type: object + durable_object_namespaces: + description: Durable Object namespaces used for Pages Functions. + example: + DO_BINDING: + namespace_id: 5eb63bbbe01eeed093cb22bb8f5acdc3 + type: object + env_vars: + $ref: '#/components/schemas/pagesEnvVars' + fail_open: + description: Whether to fail open when the deployment config cannot be applied. + example: true + type: boolean + x-auditable: true + hyperdrive_bindings: + description: Hyperdrive bindings used for Pages Functions. + example: + HYPERDRIVE: + id: a76a99bc342644deb02c38d66082262a + type: object + kv_namespaces: + description: KV namespaces used for Pages Functions. + example: + KV_BINDING: + namespace_id: 5eb63bbbe01eeed093cb22bb8f5acdc3 + type: object + limits: + description: Limits for Pages Functions. + example: + cpu_ms: 100 + properties: + cpu_ms: + description: CPU time limit in milliseconds. + example: 100 + type: integer + x-auditable: true + required: + - cpu_ms + type: object + mtls_certificates: + description: mTLS bindings used for Pages Functions. + example: + MTLS: + certificate_id: d7cdd17c-916f-4cb7-aabe-585eb382ec4e + type: object + placement: + description: Placement setting used for Pages Functions. + example: + mode: smart + properties: + mode: + description: Placement mode. + example: smart + type: string + x-auditable: true + required: + - mode + type: object + queue_producers: + description: Queue Producer bindings used for Pages Functions. + example: + QUEUE_PRODUCER_BINDING: + name: some-queue + type: object + r2_buckets: + description: R2 buckets used for Pages Functions. + example: + R2_BINDING: + name: some-bucket + type: object + services: + description: Services used for Pages Functions. + example: + SERVICE_BINDING: + entrypoint: MyHandler + environment: production + service: example-worker + type: object + usage_model: + deprecated: true + description: The usage model for Pages Functions. + enum: + - standard + - bundled + - unbound + example: standard + type: string + x-auditable: true + x-stainless-deprecation-message: All new projects now use the Standard usage model. + vectorize_bindings: + description: Vectorize bindings used for Pages Functions. + example: + VECTORIZE: + index_name: my_index + type: object + wrangler_config_hash: + description: Hash of the Wrangler configuration used for the deployment. + example: abc123def456 + type: string + x-auditable: true + required: + - env_vars + - fail_open + - always_use_latest_compatibility_date + - compatibility_date + - compatibility_flags + - build_image_major_version + - usage_model + type: object + pagesDeploymentConfigValuesRequest: + properties: + ai_bindings: + description: Constellation bindings used for Pages Functions. + example: + AI_BINDING: + project_id: some-project-id + type: object + always_use_latest_compatibility_date: + default: false + description: Whether to always use the latest compatibility date for Pages Functions. + example: false + type: boolean + x-auditable: true + analytics_engine_datasets: + description: Analytics Engine bindings used for Pages Functions. + example: + ANALYTICS_ENGINE_BINDING: + dataset: api_analytics + type: object + browsers: + description: Browser bindings used for Pages Functions. + example: + BROWSER: {} + type: object + build_image_major_version: + default: 3 + description: The major version of the build image to use for Pages Functions. + example: 3 + type: integer + x-auditable: true + compatibility_date: + description: Compatibility date used for Pages Functions. + example: '2025-01-01' + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + compatibility_flags: + description: Compatibility flags used for Pages Functions. + example: + - url_standard + items: + type: string + x-auditable: true + type: array + d1_databases: + description: D1 databases used for Pages Functions. + example: + D1_BINDING: + id: 445e2955-951a-43f8-a35b-a4d0c8138f63 + type: object + durable_object_namespaces: + description: Durable Object namespaces used for Pages Functions. + example: + DO_BINDING: + namespace_id: 5eb63bbbe01eeed093cb22bb8f5acdc3 + type: object + env_vars: + description: Environment variables used for builds and Pages Functions. + type: object + fail_open: + default: true + description: Whether to fail open when the deployment config cannot be applied. + example: true + type: boolean + x-auditable: true + hyperdrive_bindings: + description: Hyperdrive bindings used for Pages Functions. + example: + HYPERDRIVE: + id: a76a99bc342644deb02c38d66082262a + type: object + kv_namespaces: + description: KV namespaces used for Pages Functions. + example: + KV_BINDING: + namespace_id: 5eb63bbbe01eeed093cb22bb8f5acdc3 + type: object + limits: + description: Limits for Pages Functions. + example: + cpu_ms: 100 + properties: + cpu_ms: + description: CPU time limit in milliseconds. + example: 100 + type: integer + x-auditable: true + required: + - cpu_ms + type: object + mtls_certificates: + description: mTLS bindings used for Pages Functions. + example: + MTLS: + certificate_id: d7cdd17c-916f-4cb7-aabe-585eb382ec4e + type: object + placement: + description: Placement setting used for Pages Functions. + example: + mode: smart + properties: + mode: + description: Placement mode. + example: smart + type: string + x-auditable: true + required: + - mode + type: object + queue_producers: + description: Queue Producer bindings used for Pages Functions. + example: + QUEUE_PRODUCER_BINDING: + name: some-queue + type: object + r2_buckets: + description: R2 buckets used for Pages Functions. + example: + R2_BINDING: + name: some-bucket + type: object + services: + description: Services used for Pages Functions. + example: + SERVICE_BINDING: + entrypoint: MyHandler + environment: production + service: example-worker + type: object + usage_model: + default: standard + deprecated: true + description: The usage model for Pages Functions. + enum: + - standard + - bundled + - unbound + example: standard + type: string + x-auditable: true + x-stainless-deprecation-message: All new projects now use the Standard usage model. + vectorize_bindings: + description: Vectorize bindings used for Pages Functions. + example: + VECTORIZE: + index_name: my_index + type: object + wrangler_config_hash: + description: Hash of the Wrangler configuration used for the deployment. + example: abc123def456 + type: string + x-auditable: true + type: object + pagesDeploymentLog: + example: + data: + - line: Cloning repository... + ts: '2021-04-20T19:35:29.0749819Z' + - line: From https://github.com/cloudflare/example + ts: '2021-04-20T19:35:30.0749819Z' + - line: ' * branch 209c5bb11d89533f426b2f8469bcae12fdccf71b -> FETCH_HEAD' + ts: '2021-04-20T19:35:30.0749819Z' + - line: '' + ts: '2021-04-20T19:35:30.0749819Z' + - line: HEAD is now at 209c5bb Update index.html + ts: '2021-04-20T19:35:30.0749819Z' + - line: '' + ts: '2021-04-20T19:35:30.0749819Z' + - line: '' + ts: '2021-04-20T19:35:30.0749819Z' + - line: 'Success: Finished cloning repository files' + ts: '2021-04-20T19:35:30.0749819Z' + - line: Installing dependencies + ts: '2021-04-20T19:35:59.0749819Z' + - line: Python version set to 2.7 + ts: '2021-04-20T19:35:59.0931208Z' + - line: v12.18.0 is already installed. + ts: '2021-04-20T19:36:02.2369501Z' + - line: Now using node v12.18.0 (npm v6.14.4) + ts: '2021-04-20T19:36:02.6028886Z' + - line: Started restoring cached build plugins + ts: '2021-04-20T19:36:02.624555Z' + - line: Finished restoring cached build plugins + ts: '2021-04-20T19:36:02.6340688Z' + - line: Attempting ruby version 2.7.1, read from environment + ts: '2021-04-20T19:36:02.963095Z' + - line: Using ruby version 2.7.1 + ts: '2021-04-20T19:36:04.2236084Z' + - line: Using PHP version 5.6 + ts: '2021-04-20T19:36:04.5450152Z' + - line: 5.2 is already installed. + ts: '2021-04-20T19:36:04.5740509Z' + - line: Using Swift version 5.2 + ts: '2021-04-20T19:36:04.577035Z' + - line: Installing Hugo 0.54.0 + ts: '2021-04-20T19:36:04.5771615Z' + - line: 'Hugo Static Site Generator v0.54.0-B1A82C61A/extended linux/amd64 BuildDate: 2019-02-01T10:04:38Z' + ts: '2021-04-20T19:36:05.4786868Z' + - line: Started restoring cached go cache + ts: '2021-04-20T19:36:05.4794366Z' + - line: Finished restoring cached go cache + ts: '2021-04-20T19:36:05.481977Z' + - line: go version go1.14.4 linux/amd64 + ts: '2021-04-20T19:36:05.9049776Z' + - line: go version go1.14.4 linux/amd64 + ts: '2021-04-20T19:36:05.9086053Z' + - line: Installing missing commands + ts: '2021-04-20T19:36:05.9163568Z' + - line: Verify run directory + ts: '2021-04-20T19:36:05.9163934Z' + - line: 'Executing user command: echo "skipping build step: no build command specified"' + ts: '2021-04-20T19:36:05.9164636Z' + - line: 'skipping build step: no build command specified' + ts: '2021-04-20T19:36:05.9165087Z' + - line: Finished + ts: '2021-04-20T19:36:05.917412Z' + includes_container_logs: true + total: 30 + properties: + data: + items: + $ref: '#/components/schemas/pagesDeploymentLog_data_item' + type: array + includes_container_logs: + readOnly: true + type: boolean + total: + readOnly: true + type: integer + required: + - total + - includes_container_logs + - data + type: object + pagesDeploymentLog_data_item: + properties: + line: + readOnly: true + type: string + ts: + readOnly: true + type: string + required: + - ts + - line + type: object + pagesDomain: + properties: + certificate_authority: + enum: + - google + - lets_encrypt + example: lets_encrypt + readOnly: true + type: string + x-auditable: true + created_on: + readOnly: true + type: string + x-auditable: true + domain_id: + readOnly: true + type: string + x-auditable: true + id: + readOnly: true + type: string + x-auditable: true + name: + $ref: '#/components/schemas/pagesDomainName' + status: + enum: + - initializing + - pending + - active + - deactivated + - blocked + - error + readOnly: true + type: string + x-auditable: true + validation_data: + properties: + error_message: + type: string + x-auditable: true + method: + enum: + - http + - txt + type: string + x-auditable: true + status: + enum: + - initializing + - pending + - active + - deactivated + - error + type: string + x-auditable: true + txt_name: + type: string + x-auditable: true + txt_value: + type: string + x-auditable: true + readOnly: true + required: + - status + - method + type: object + verification_data: + properties: + error_message: + type: string + x-auditable: true + status: + enum: + - pending + - active + - deactivated + - blocked + - error + type: string + readOnly: true + required: + - status + type: object + zone_tag: + readOnly: true + type: string + x-auditable: true + required: + - id + - domain_id + - name + - status + - created_on + - certificate_authority + - zone_tag + - validation_data + - verification_data + type: object + pagesDomainName: + description: The domain name. + example: this-is-my-domain-01.com + type: string + x-auditable: true + pagesEnvVars: + description: Environment variables used for builds and Pages Functions. + nullable: true + type: object + pagesIdentifier: + description: Identifier. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + type: string + x-auditable: true + pagesMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + pagesProject: + properties: + build_config: + $ref: '#/components/schemas/pagesBuildConfig' + canonical_deployment: + $ref: '#/components/schemas/pagesDeployment' + description: Most recent production deployment of the project. + nullable: true + readOnly: true + type: object + created_on: + description: When the project was created. + example: '2017-01-01T00:00:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + deployment_configs: + description: Configs for deployments in a project. + properties: + preview: + description: Configs for preview deploys. + $ref: '#/components/schemas/pagesDeploymentConfigValues' + production: + description: Configs for production deploys. + $ref: '#/components/schemas/pagesDeploymentConfigValues' + required: + - production + - preview + type: object + domains: + description: A list of associated custom domains for the project. + example: + - customdomain.com + - customdomain.org + items: + type: string + x-auditable: true + readOnly: true + type: array + framework: + description: Framework the project is using. + readOnly: true + type: string + x-auditable: true + framework_version: + description: Version of the framework the project is using. + readOnly: true + type: string + x-auditable: true + id: + description: ID of the project. + example: 7b162ea7-7367-4d67-bcde-1160995d5 + readOnly: true + type: string + x-auditable: true + latest_deployment: + $ref: '#/components/schemas/pagesDeployment' + description: Most recent deployment of the project. + nullable: true + readOnly: true + type: object + name: + $ref: '#/components/schemas/pagesProjectName' + preview_script_name: + description: Name of the preview script. + example: pages-worker--1234567-preview + readOnly: true + type: string + x-auditable: true + production_branch: + description: Production branch of the project. Used to identify production deployments. + example: main + type: string + x-auditable: true + production_script_name: + description: Name of the production script. + example: pages-worker--1234567-production + readOnly: true + type: string + x-auditable: true + source: + $ref: '#/components/schemas/pagesSource' + subdomain: + description: The Cloudflare subdomain associated with the project. + example: helloworld.pages.dev + readOnly: true + type: string + x-auditable: true + uses_functions: + description: Whether the project uses functions. + nullable: true + readOnly: true + type: boolean + x-auditable: true + required: + - id + - name + - deployment_configs + - latest_deployment + - canonical_deployment + - created_on + - production_branch + - production_script_name + - preview_script_name + - uses_functions + - framework + - framework_version + type: object + pagesProjectName: + description: Name of the project. + example: this-is-my-project-01 + type: string + x-auditable: true + pagesSource: + description: Configs for the project source control. + properties: + config: + properties: + deployments_enabled: + deprecated: true + description: Whether to enable automatic deployments when pushing to the source repository. When disabled, no deployments (production or preview) will be triggered automatically. + type: boolean + x-auditable: true + x-stainless-deprecation-message: Use `production_deployments_enabled` and `preview_deployment_setting` for more granular control. + owner: + description: The owner of the repository. + example: my-org + type: string + x-auditable: true + owner_id: + description: The owner ID of the repository. + example: '12345678' + type: string + x-auditable: true + path_excludes: + description: A list of paths that should be excluded from triggering a preview deployment. Wildcard syntax (`*`) is supported. + items: + type: string + x-auditable: true + type: array + path_includes: + description: A list of paths that should be watched to trigger a preview deployment. Wildcard syntax (`*`) is supported. + items: + type: string + x-auditable: true + type: array + pr_comments_enabled: + description: Whether to enable PR comments. + type: boolean + x-auditable: true + preview_branch_excludes: + description: A list of branches that should not trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`. + items: + type: string + x-auditable: true + type: array + preview_branch_includes: + description: A list of branches that should trigger a preview deployment. Wildcard syntax (`*`) is supported. Must be used with `preview_deployment_setting` set to `custom`. + items: + type: string + x-auditable: true + type: array + preview_deployment_setting: + description: Controls whether commits to preview branches trigger a preview deployment. + enum: + - all + - none + - custom + type: string + x-auditable: true + production_branch: + description: The production branch of the repository. + example: main + type: string + x-auditable: true + production_deployments_enabled: + description: Whether to trigger a production deployment on commits to the production branch. + type: boolean + x-auditable: true + repo_id: + description: The ID of the repository. + example: '12345678' + type: string + x-auditable: true + repo_name: + description: The name of the repository. + example: my-repo + type: string + x-auditable: true + required: + - deployments_enabled + - owner + - owner_id + - path_excludes + - path_includes + - pr_comments_enabled + - preview_branch_excludes + - preview_branch_includes + - preview_deployment_setting + - production_branch + - production_deployments_enabled + - repo_id + - repo_name + type: object + type: + description: The source control management provider. + enum: + - github + - gitlab + example: github + type: string + x-auditable: true + required: + - type + - config + type: object + pagesStage: + description: The status of the deployment. + properties: + ended_on: + description: When the stage ended. + example: '2021-03-09T00:58:59.045655Z' + format: date-time + nullable: true + readOnly: true + type: string + x-auditable: true + name: + description: The current build stage. + enum: + - queued + - initialize + - clone_repo + - build + - deploy + example: deploy + type: string + x-auditable: true + started_on: + description: When the stage started. + example: '2021-03-09T00:55:03.923456Z' + format: date-time + nullable: true + readOnly: true + type: string + x-auditable: true + status: + description: State of the current stage. + enum: + - success + - idle + - active + - failure + - canceled + example: success + readOnly: true + type: string + x-auditable: true + readOnly: true + required: + - name + - started_on + - ended_on + - status + type: object + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + projects: + id: cloudflare.pages.projects + name: projects + title: Projects + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pages~1projects/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pages~1projects/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .build_config }}{{ $sep }}"build_config": {{ if eq (kindOf .build_config) "string" }}{{ .build_config }}{{ else }}{{ toJson .build_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .deployment_configs }}{{ $sep }}"deployment_configs": {{ if eq (kindOf .deployment_configs) "string" }}{{ .deployment_configs }}{{ else }}{{ toJson .deployment_configs }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .production_branch }}{{ $sep }}"production_branch": {{ toJson .production_branch }}{{- $sep = "," -}}{{ end }} + + {{- if .source }}{{ $sep }}"source": {{ if eq (kindOf .source) "string" }}{{ .source }}{{ else }}{{ toJson .source }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .build_config }}{{ $sep }}"build_config": {{ if eq (kindOf .build_config) "string" }}{{ .build_config }}{{ else }}{{ toJson .build_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .deployment_configs }}{{ $sep }}"deployment_configs": {{ if eq (kindOf .deployment_configs) "string" }}{{ .deployment_configs }}{{ else }}{{ toJson .deployment_configs }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .production_branch }}{{ $sep }}"production_branch": {{ toJson .production_branch }}{{- $sep = "," -}}{{ end }} + + {{- if .source }}{{ $sep }}"source": {{ if eq (kindOf .source) "string" }}{{ .source }}{{ else }}{{ toJson .source }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + purge_build_cache: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}~1purge_build_cache/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/projects/methods/get' + - $ref: '#/components/x-stackQL-resources/projects/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/projects/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/projects/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/projects/methods/delete' + replace: [] + deployments: + id: cloudflare.pages.deployments + name: deployments + title: Deployments + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}~1deployments/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}~1deployments/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}~1deployments~1{deployment_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}~1deployments~1{deployment_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + retry: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}~1deployments~1{deployment_id}~1retry/post' + response: + mediaType: application/json + openAPIDocKey: '200' + rollback: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}~1deployments~1{deployment_id}~1rollback/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/deployments/methods/get' + - $ref: '#/components/x-stackQL-resources/deployments/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/deployments/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/deployments/methods/delete' + replace: [] + logs: + id: cloudflare.pages.logs + name: logs + title: Logs + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}~1deployments~1{deployment_id}~1history~1logs/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result.data + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/logs/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + domains: + id: cloudflare.pages.domains + name: domains + title: Domains + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}~1domains/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}~1domains/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}~1domains~1{domain_name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}~1domains~1{domain_name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pages~1projects~1{project_name}~1domains~1{domain_name}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/domains/methods/get' + - $ref: '#/components/x-stackQL-resources/domains/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/domains/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/domains/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/domains/methods/delete' + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/pipelines.yaml b/providers/src/cloudflare/v00.00.00000/services/pipelines.yaml index f468300f..1aba0c33 100644 --- a/providers/src/cloudflare/v00.00.00000/services/pipelines.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/pipelines.yaml @@ -1,3211 +1,3109 @@ -openapi: 3.0.3 -info: - title: pipelines API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/pipelines: - get: - deprecated: true - description: >- - [DEPRECATED] List, filter, and paginate pipelines in an account. Use the - new /pipelines/v1/pipelines endpoint instead. - operationId: getV4AccountsByAccount_idPipelines_deprecated - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: search - schema: - description: Specifies the prefix of pipeline name to search. - type: string - - in: query - name: page - schema: - default: '1' - description: Specifies which page to retrieve. - type: string - - in: query - name: per_page - schema: - default: '25' - description: Specifies the number of pipelines per page. - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result_info: - properties: - count: - description: Indicates the number of items on current page. - type: number - page: - description: Indicates the current page number. - type: number - per_page: - description: Indicates the number of items per page. - type: number - total_count: - description: Indicates the total number of items. - type: number - required: - - count - - page - - per_page - - total_count - type: object - results: - items: - $ref: >- - #/components/schemas/cloudflarePipelinesWorkersPipelinesPipeline - type: array - success: - $ref: >- - #/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess - required: - - success - - results - - result_info - type: object - description: >- - [DEPRECATED] Lists the pipelines. Use /pipelines/v1/pipelines - instead. - 4XX: - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - results: - nullable: true - type: object - x-stainless-empty-object: true - success: - $ref: >- - #/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess - required: - - success - - results - - errors - type: object - description: Indicates the error trying to list pipelines. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: '[DEPRECATED] List Pipelines' - tags: - - workers_pipelines_other - x-api-token-group: - - Pipelines Write - - Pipelines Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: pipelines - resource_chain: [] - method: list - post: - deprecated: true - description: >- - [DEPRECATED] Create a new pipeline. Use the new /pipelines/v1/pipelines - endpoint instead. - operationId: postV4AccountsByAccount_idPipelines_deprecated - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - destination: - properties: - batch: - properties: - max_bytes: - default: 100000000 - description: Specifies rough maximum size of files. - maximum: 100000000 - minimum: 1000 - type: integer - max_duration_s: - default: 300 - description: >- - Specifies duration to wait to aggregate batches - files. - maximum: 300 - minimum: 0.25 - type: number - max_rows: - default: 10000000 - description: Specifies rough maximum number of rows per file. - maximum: 10000000 - minimum: 100 - type: integer - type: object - compression: - properties: - type: - default: gzip - description: >- - Specifies the desired compression algorithm and - format. - enum: - - none - - gzip - - deflate - type: string - type: object - credentials: - properties: - access_key_id: - description: Specifies the R2 Bucket Access Key Id. - type: string - endpoint: - description: Specifies the R2 Endpoint. - type: string - secret_access_key: - description: Specifies the R2 Bucket Secret Access Key. - type: string - required: - - endpoint - - access_key_id - - secret_access_key - type: object - format: - description: Specifies the format of data to deliver. - enum: - - json - type: string - path: - properties: - bucket: - description: Specifies the R2 Bucket to store files. - type: string - filename: - description: >- - Specifies the name pattern to for individual data - files. - type: string - filepath: - description: Specifies the name pattern for directory. - type: string - prefix: - description: Specifies the base directory within the bucket. - type: string - required: - - bucket - type: object - type: - description: Specifies the type of destination. - enum: - - r2 - type: string - required: - - type - - format - - batch - - compression - - path - - credentials - type: object - name: - description: Defines the name of the pipeline. - maxLength: 128 - minLength: 1 - type: string - source: - items: - type: object - description: >- - [DEPRECATED] HTTP source configuration. Use the new - streams API instead. - properties: - authentication: - description: >- - Specifies whether authentication is required to send - to this pipeline via HTTP. - type: boolean - cors: - properties: - origins: - description: >- - Specifies allowed origins to allow Cross Origin - HTTP Requests. - items: - type: string - maxItems: 5 - type: array - type: object - format: - description: Specifies the format of source data. - enum: - - json - type: string - type: - type: string - required: - - format - - type - minItems: 1 - type: array - required: - - name - - source - - destination - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - $ref: >- - #/components/schemas/cloudflarePipelinesWorkersPipelinesPipeline - success: - $ref: >- - #/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess - required: - - success - - result - type: object - description: >- - [DEPRECATED] Indicates a successfully created pipeline. Use - /pipelines/v1/pipelines instead. - 4XX: - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - results: - nullable: true - type: object - x-stainless-empty-object: true - success: - $ref: >- - #/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess - required: - - success - - results - - errors - type: object - description: Indicates an error in creating a pipeline. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: '[DEPRECATED] Create Pipeline' - tags: - - workers_pipelines_other - x-api-token-group: - - Pipelines Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: pipelines - resource_chain: [] - method: create - /accounts/{account_id}/pipelines/v1/pipelines: - get: - description: List/Filter Pipelines in Account. - operationId: getV4AccountsByAccount_idPipelinesV1Pipelines - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: page - schema: - default: 1 - type: number - - in: query - name: per_page - schema: - type: number - responses: - '200': - content: - application/json: - schema: - properties: - result: - items: - properties: - created_at: - type: string - readOnly: true - id: - description: Indicates a unique identifier for this pipeline. - type: string - modified_at: - type: string - readOnly: true - name: - description: Indicates the name of the Pipeline. - maxLength: 128 - minLength: 1 - type: string - sql: - description: Specifies SQL for the Pipeline processing flow. - type: string - status: - description: Indicates the current status of the Pipeline. - type: string - required: - - id - - name - - created_at - - modified_at - - sql - - status - type: object - type: array - result_info: - properties: - count: - description: Indicates the number of items on current page. - type: number - page: - description: Indicates the current page number. - type: number - per_page: - description: Indicates the number of items per page. - type: number - total_count: - description: Indicates the total number of items. - type: number - required: - - count - - page - - per_page - - total_count - type: object - success: - $ref: >- - #/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess - required: - - success - - result - - result_info - type: object - description: Indicates a successfully listed Pipelines. - 4XX: - description: Indicates an error in listing Pipelines. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Pipelines - tags: - - workers_pipelines_other - x-api-token-group: - - Pipelines Write - - Pipelines Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: pipelines - resource_chain: [] - method: list_v1 - post: - description: Create a new Pipeline. - operationId: postV4AccountsByAccount_idPipelinesV1Pipelines - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - name: - description: Specifies the name of the Pipeline. - maxLength: 128 - minLength: 1 - type: string - sql: - description: Specifies SQL for the Pipeline processing flow. - type: string - required: - - name - - sql - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - created_at: - type: string - readOnly: true - id: - description: Indicates a unique identifier for this pipeline. - type: string - modified_at: - type: string - readOnly: true - name: - description: Indicates the name of the Pipeline. - maxLength: 128 - minLength: 1 - type: string - sql: - description: Specifies SQL for the Pipeline processing flow. - type: string - status: - description: Indicates the current status of the Pipeline. - type: string - required: - - id - - name - - created_at - - modified_at - - sql - - status - type: object - success: - $ref: >- - #/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess - required: - - success - - result - type: object - description: Indicates a successfully created Pipeline. - 4XX: - description: Indicates an error in creating a Pipeline. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Pipeline - tags: - - workers_pipelines_other - x-api-token-group: - - Pipelines Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: pipelines - resource_chain: [] - method: create_v1 - /accounts/{account_id}/pipelines/v1/pipelines/{pipeline_id}: - delete: - description: Delete Pipeline in Account. - operationId: deleteV4AccountsByAccount_idPipelinesV1PipelinesByPipeline_id - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: pipeline_id - schema: - $ref: '#/components/schemas/cloudflarePipelinesWorkersPipelinesPipelineId' - required: true - responses: - '200': - content: - application/json: - schema: - properties: - result: - type: object - success: - $ref: >- - #/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess - required: - - success - - result - type: object - description: Indicates a successfully deleted Pipeline. - 4XX: - description: Indicates an error in listing Pipelines. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Pipelines - tags: - - workers_pipelines_other - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: pipelines - resource_chain: [] - method: delete_v1 - get: - description: Get Pipelines Details. - operationId: getV4AccountsByAccount_idPipelinesV1PipelinesByPipeline_id - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: pipeline_id - schema: - $ref: '#/components/schemas/cloudflarePipelinesWorkersPipelinesPipelineId' - required: true - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - created_at: - type: string - readOnly: true - failure_reason: - description: Indicates the reason for the failure of the Pipeline. - type: string - id: - description: Indicates a unique identifier for this pipeline. - type: string - modified_at: - type: string - readOnly: true - name: - description: Indicates the name of the Pipeline. - maxLength: 128 - minLength: 1 - type: string - sql: - description: Specifies SQL for the Pipeline processing flow. - type: string - status: - description: Indicates the current status of the Pipeline. - type: string - tables: - description: List of streams and sinks used by this pipeline. - items: - properties: - id: - description: >- - Unique identifier for the connection (stream or - sink). - type: string - latest: - description: Latest available version of the connection. - type: integer - name: - description: Name of the connection. - maxLength: 128 - minLength: 1 - type: string - type: - description: Type of the connection. - enum: - - stream - - sink - type: string - version: - description: >- - Current version of the connection used by this - pipeline. - type: integer - required: - - id - - version - - latest - - type - - name - type: object - type: array - required: - - id - - name - - created_at - - modified_at - - sql - - status - - tables - type: object - success: - $ref: >- - #/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess - required: - - success - - result - type: object - description: Indicates a successfully retrieved Pipeline. - 4XX: - description: Indicates an error in retrieving Pipelines. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Pipeline Details - tags: - - workers_pipelines_other - x-api-token-group: - - Pipelines Write - - Pipelines Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: pipelines - resource_chain: [] - method: get_v1 - /accounts/{account_id}/pipelines/v1/sinks: - get: - description: List/Filter Sinks in Account. - operationId: getV4AccountsByAccount_idPipelinesV1Sinks - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: pipeline_id - schema: - type: string - - in: query - name: page - schema: - default: 1 - type: number - - in: query - name: per_page - schema: - type: number - responses: - '200': - content: - application/json: - schema: - properties: - result: - items: - properties: - config: - description: Defines the configuration of the R2 Sink. - type: object - title: R2 Sink Public - properties: - account_id: - description: Cloudflare Account ID for the bucket - title: Account ID - type: string - bucket: - description: R2 Bucket to write to - title: Bucket - type: string - file_naming: - description: Controls filename prefix/suffix and strategy. - properties: - prefix: - description: >- - The prefix to use in file name. i.e - prefix-.parquet - title: Filename Prefix - type: string - strategy: - description: Filename generation strategy. - enum: - - serial - - uuid - - uuid_v7 - - ulid - title: Filename Strategy - type: string - suffix: - description: >- - This will overwrite the default file suffix. - i.e .parquet, use with caution - title: Filename Suffix - type: string - title: File Naming - type: object - jurisdiction: - description: Jurisdiction this bucket is hosted in - title: Jurisdiction - type: string - partitioning: - description: Data-layout partitioning for sinks. - properties: - time_pattern: - description: The pattern of the date string - title: Time Partition Pattern - type: string - title: Partitioning Configuration - type: object - path: - description: Subpath within the bucket to write to - title: Path - type: string - rolling_policy: - description: >- - Rolling policy for file sinks (when & why to - close a file and open a new one). - properties: - file_size_bytes: - description: >- - Files will be rolled after reaching this - number of bytes - format: uint64 - minimum: 0 - title: File Size - type: integer - inactivity_seconds: - description: >- - Number of seconds of inactivity to wait - before rolling over to a new file - format: uint64 - minimum: 1 - title: Inactivity Seconds - type: integer - interval_seconds: - description: >- - Number of seconds to wait before rolling - over to a new file - format: uint64 - minimum: 1 - title: Interval Seconds - type: integer - title: File Rolling Policy - type: object - namespace: - description: Table namespace - title: Namespace - type: string - table_name: - description: Table name - title: Table Name - type: string - required: - - account_id - - bucket - created_at: - format: date-time - type: string - readOnly: true - format: - $ref: '#/components/schemas/cloudflarePipelinesFormat' - id: - description: Indicates a unique identifier for this sink. - type: string - modified_at: - format: date-time - type: string - readOnly: true - name: - description: Defines the name of the Sink. - maxLength: 128 - minLength: 1 - type: string - schema: - $ref: >- - #/components/schemas/cloudflarePipelinesConnectionSchema - type: - description: Specifies the type of sink. - enum: - - r2 - - r2_data_catalog - type: string - required: - - id - - name - - created_at - - modified_at - - type - type: object - type: array - result_info: - properties: - count: - description: Indicates the number of items on current page. - type: number - page: - description: Indicates the current page number. - type: number - per_page: - description: Indicates the number of items per page. - type: number - total_count: - description: Indicates the total number of items. - type: number - required: - - count - - page - - per_page - - total_count - type: object - success: - $ref: >- - #/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess - required: - - success - - result - - result_info - type: object - description: Indicates successfully listed Sinks. - 4XX: - description: Indicates an error in listing Sinks. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Sinks - tags: - - workers_pipelines_other - x-api-token-group: - - Pipelines Write - - Pipelines Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: pipelines - resource_chain: - - sinks - method: list - post: - description: Create a new Sink. - operationId: postV4AccountsByAccount_idPipelinesV1Sinks - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - config: - description: Defines the configuration of the R2 Sink. - type: object - title: R2 Sink - properties: - account_id: - description: Cloudflare Account ID for the bucket - title: Account ID - type: string - bucket: - description: R2 Bucket to write to - title: Bucket - type: string - credentials: - properties: - access_key_id: - description: Cloudflare Account ID for the bucket - format: var-str - title: Access Key ID - type: string - secret_access_key: - description: Cloudflare Account ID for the bucket - format: var-str - title: Access Key ID - type: string - x-sensitive: true - required: - - access_key_id - - secret_access_key - title: R2 Credentials - type: object - file_naming: - description: Controls filename prefix/suffix and strategy. - properties: - prefix: - description: >- - The prefix to use in file name. i.e - prefix-.parquet - title: Filename Prefix - type: string - strategy: - description: Filename generation strategy. - enum: - - serial - - uuid - - uuid_v7 - - ulid - title: Filename Strategy - type: string - suffix: - description: >- - This will overwrite the default file suffix. i.e - .parquet, use with caution - title: Filename Suffix - type: string - title: File Naming - type: object - jurisdiction: - description: Jurisdiction this bucket is hosted in - title: Jurisdiction - type: string - partitioning: - description: Data-layout partitioning for sinks. - properties: - time_pattern: - description: The pattern of the date string - title: Time Partition Pattern - type: string - title: Partitioning Configuration - type: object - path: - description: Subpath within the bucket to write to - title: Path - type: string - rolling_policy: - description: >- - Rolling policy for file sinks (when & why to close a - file and open a new one). - properties: - file_size_bytes: - description: >- - Files will be rolled after reaching this number of - bytes - format: uint64 - minimum: 0 - title: File Size - type: integer - inactivity_seconds: - description: >- - Number of seconds of inactivity to wait before - rolling over to a new file - format: uint64 - minimum: 1 - title: Inactivity Seconds - type: integer - interval_seconds: - description: >- - Number of seconds to wait before rolling over to a - new file - format: uint64 - minimum: 1 - title: Interval Seconds - type: integer - title: File Rolling Policy - type: object - namespace: - description: Table namespace - title: Namespace - type: string - table_name: - description: Table name - title: Table Name - type: string - token: - description: Authentication token - format: var-str - type: string - x-sensitive: true - required: - - account_id - - bucket - format: - $ref: '#/components/schemas/cloudflarePipelinesFormat' - name: - description: Defines the name of the Sink. - maxLength: 128 - minLength: 1 - type: string - schema: - $ref: '#/components/schemas/cloudflarePipelinesConnectionSchema' - type: - description: Specifies the type of sink. - enum: - - r2 - - r2_data_catalog - type: string - required: - - name - - type - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - config: - type: object - title: R2 Sink - properties: - account_id: - description: Cloudflare Account ID for the bucket - title: Account ID - type: string - bucket: - description: R2 Bucket to write to - title: Bucket - type: string - credentials: - properties: - access_key_id: - description: Cloudflare Account ID for the bucket - format: var-str - title: Access Key ID - type: string - secret_access_key: - description: Cloudflare Account ID for the bucket - format: var-str - title: Access Key ID - type: string - x-sensitive: true - required: - - access_key_id - - secret_access_key - title: R2 Credentials - type: object - file_naming: - description: Controls filename prefix/suffix and strategy. - properties: - prefix: - description: >- - The prefix to use in file name. i.e - prefix-.parquet - title: Filename Prefix - type: string - strategy: - description: Filename generation strategy. - enum: - - serial - - uuid - - uuid_v7 - - ulid - title: Filename Strategy - type: string - suffix: - description: >- - This will overwrite the default file suffix. - i.e .parquet, use with caution - title: Filename Suffix - type: string - title: File Naming - type: object - jurisdiction: - description: Jurisdiction this bucket is hosted in - title: Jurisdiction - type: string - partitioning: - description: Data-layout partitioning for sinks. - properties: - time_pattern: - description: The pattern of the date string - title: Time Partition Pattern - type: string - title: Partitioning Configuration - type: object - path: - description: Subpath within the bucket to write to - title: Path - type: string - rolling_policy: - description: >- - Rolling policy for file sinks (when & why to close - a file and open a new one). - properties: - file_size_bytes: - description: >- - Files will be rolled after reaching this - number of bytes - format: uint64 - minimum: 0 - title: File Size - type: integer - inactivity_seconds: - description: >- - Number of seconds of inactivity to wait before - rolling over to a new file - format: uint64 - minimum: 1 - title: Inactivity Seconds - type: integer - interval_seconds: - description: >- - Number of seconds to wait before rolling over - to a new file - format: uint64 - minimum: 1 - title: Interval Seconds - type: integer - title: File Rolling Policy - type: object - namespace: - description: Table namespace - title: Namespace - type: string - table_name: - description: Table name - title: Table Name - type: string - token: - description: Authentication token - format: var-str - type: string - x-sensitive: true - required: - - account_id - - bucket - description: R2 Data Catalog Sink - created_at: - format: date-time - type: string - readOnly: true - format: - $ref: '#/components/schemas/cloudflarePipelinesFormat' - id: - description: Indicates a unique identifier for this sink. - type: string - modified_at: - format: date-time - type: string - readOnly: true - name: - description: Defines the name of the Sink. - maxLength: 128 - minLength: 1 - type: string - schema: - $ref: >- - #/components/schemas/cloudflarePipelinesConnectionSchema - type: - description: Specifies the type of sink. - enum: - - r2 - - r2_data_catalog - type: string - required: - - id - - name - - created_at - - modified_at - - type - type: object - success: - $ref: >- - #/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess - required: - - success - - result - type: object - description: Indicates a successfully created Sink. - 4XX: - description: Indicates an error in creating a Sink. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Sink - tags: - - workers_pipelines_other - x-api-token-group: - - Pipelines Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: pipelines - resource_chain: - - sinks - method: create - /accounts/{account_id}/pipelines/v1/sinks/{sink_id}: - delete: - description: Delete Pipeline in Account. - operationId: deleteV4AccountsByAccount_idPipelinesV1SinksBySink_id - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: sink_id - schema: - $ref: '#/components/schemas/cloudflarePipelinesWorkersPipelinesSinkId' - required: true - - in: query - name: force - schema: - description: >- - Delete sink forcefully, including deleting any dependent - pipelines. - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - type: object - success: - $ref: >- - #/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess - required: - - success - - result - type: object - description: Indicates a successfully deleted Sink. - 4XX: - description: Indicates an error in listing Sinks. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Sink - tags: - - workers_pipelines_other - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: pipelines - resource_chain: - - sinks - method: delete - get: - description: Get Sink Details. - operationId: getV4AccountsByAccount_idPipelinesV1SinksBySink_id - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: sink_id - schema: - $ref: '#/components/schemas/cloudflarePipelinesWorkersPipelinesSinkId' - required: true - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - config: - description: Defines the configuration of the R2 Sink. - type: object - title: R2 Sink Public - properties: - account_id: - description: Cloudflare Account ID for the bucket - title: Account ID - type: string - bucket: - description: R2 Bucket to write to - title: Bucket - type: string - file_naming: - description: Controls filename prefix/suffix and strategy. - properties: - prefix: - description: >- - The prefix to use in file name. i.e - prefix-.parquet - title: Filename Prefix - type: string - strategy: - description: Filename generation strategy. - enum: - - serial - - uuid - - uuid_v7 - - ulid - title: Filename Strategy - type: string - suffix: - description: >- - This will overwrite the default file suffix. - i.e .parquet, use with caution - title: Filename Suffix - type: string - title: File Naming - type: object - jurisdiction: - description: Jurisdiction this bucket is hosted in - title: Jurisdiction - type: string - partitioning: - description: Data-layout partitioning for sinks. - properties: - time_pattern: - description: The pattern of the date string - title: Time Partition Pattern - type: string - title: Partitioning Configuration - type: object - path: - description: Subpath within the bucket to write to - title: Path - type: string - rolling_policy: - description: >- - Rolling policy for file sinks (when & why to close - a file and open a new one). - properties: - file_size_bytes: - description: >- - Files will be rolled after reaching this - number of bytes - format: uint64 - minimum: 0 - title: File Size - type: integer - inactivity_seconds: - description: >- - Number of seconds of inactivity to wait before - rolling over to a new file - format: uint64 - minimum: 1 - title: Inactivity Seconds - type: integer - interval_seconds: - description: >- - Number of seconds to wait before rolling over - to a new file - format: uint64 - minimum: 1 - title: Interval Seconds - type: integer - title: File Rolling Policy - type: object - namespace: - description: Table namespace - title: Namespace - type: string - table_name: - description: Table name - title: Table Name - type: string - required: - - account_id - - bucket - created_at: - format: date-time - type: string - readOnly: true - format: - $ref: '#/components/schemas/cloudflarePipelinesFormat' - id: - description: Indicates a unique identifier for this sink. - type: string - modified_at: - format: date-time - type: string - readOnly: true - name: - description: Defines the name of the Sink. - maxLength: 128 - minLength: 1 - type: string - schema: - $ref: >- - #/components/schemas/cloudflarePipelinesConnectionSchema - type: - description: Specifies the type of sink. - enum: - - r2 - - r2_data_catalog - type: string - required: - - id - - name - - created_at - - modified_at - - type - type: object - success: - $ref: >- - #/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess - required: - - success - - result - type: object - description: Indicates that Sink was retrieved. - 4XX: - description: Indicates an error in listing Sinks. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Sink Details - tags: - - workers_pipelines_other - x-api-token-group: - - Pipelines Write - - Pipelines Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: pipelines - resource_chain: - - sinks - method: get - /accounts/{account_id}/pipelines/v1/streams: - get: - description: List/Filter Streams in Account. - operationId: getV4AccountsByAccount_idPipelinesV1Streams - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: pipeline_id - schema: - $ref: '#/components/schemas/cloudflarePipelinesWorkersPipelinesPipelineId' - - in: query - name: page - schema: - default: 1 - type: number - - in: query - name: per_page - schema: - type: number - responses: - '200': - content: - application/json: - schema: - properties: - result: - items: - properties: - created_at: - format: date-time - type: string - readOnly: true - endpoint: - description: Indicates the endpoint URL of this stream. - format: uri - type: string - format: - $ref: '#/components/schemas/cloudflarePipelinesFormat' - http: - properties: - authentication: - description: >- - Indicates that authentication is required for - the HTTP endpoint. - type: boolean - cors: - description: >- - Specifies the CORS options for the HTTP - endpoint. - properties: - origins: - items: - type: string - maxItems: 5 - type: array - type: object - enabled: - description: Indicates that the HTTP endpoint is enabled. - type: boolean - required: - - enabled - - authentication - type: object - id: - description: Indicates a unique identifier for this stream. - type: string - modified_at: - format: date-time - type: string - readOnly: true - name: - description: Indicates the name of the Stream. - maxLength: 128 - minLength: 1 - type: string - schema: - $ref: >- - #/components/schemas/cloudflarePipelinesConnectionSchema - version: - description: Indicates the current version of this stream. - type: integer - worker_binding: - properties: - enabled: - description: Indicates that the worker binding is enabled. - type: boolean - required: - - enabled - type: object - required: - - id - - name - - version - - created_at - - modified_at - - http - - worker_binding - type: object - type: array - result_info: - properties: - count: - description: Indicates the number of items on current page. - type: number - page: - description: Indicates the current page number. - type: number - per_page: - description: Indicates the number of items per page. - type: number - total_count: - description: Indicates the total number of items. - type: number - required: - - count - - page - - per_page - - total_count - type: object - success: - $ref: >- - #/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess - required: - - success - - result - - result_info - type: object - description: Indicates a successfully created Stream. - 4XX: - description: Indicates an error in listing Streams. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Streams - tags: - - workers_pipelines_other - x-api-token-group: - - Pipelines Write - - Pipelines Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: pipelines - resource_chain: - - streams - method: list - post: - description: Create a new Stream. - operationId: postV4AccountsByAccount_idPipelinesV1Streams - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - format: - $ref: '#/components/schemas/cloudflarePipelinesFormat' - http: - default: - authentication: false - enabled: true - properties: - authentication: - description: >- - Indicates that authentication is required for the HTTP - endpoint. - type: boolean - cors: - description: Specifies the CORS options for the HTTP endpoint. - properties: - origins: - items: - type: string - maxItems: 5 - type: array - type: object - enabled: - description: Indicates that the HTTP endpoint is enabled. - type: boolean - required: - - enabled - - authentication - type: object - name: - description: Specifies the name of the Stream. - maxLength: 128 - minLength: 1 - type: string - schema: - $ref: '#/components/schemas/cloudflarePipelinesConnectionSchema' - worker_binding: - default: - enabled: true - properties: - enabled: - description: Indicates that the worker binding is enabled. - type: boolean - required: - - enabled - type: object - required: - - name - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - created_at: - format: date-time - type: string - readOnly: true - endpoint: - description: Indicates the endpoint URL of this stream. - format: uri - type: string - format: - $ref: '#/components/schemas/cloudflarePipelinesFormat' - http: - properties: - authentication: - description: >- - Indicates that authentication is required for the - HTTP endpoint. - type: boolean - cors: - description: Specifies the CORS options for the HTTP endpoint. - properties: - origins: - items: - type: string - maxItems: 5 - type: array - type: object - enabled: - description: Indicates that the HTTP endpoint is enabled. - type: boolean - required: - - enabled - - authentication - type: object - id: - description: Indicates a unique identifier for this stream. - type: string - modified_at: - format: date-time - type: string - readOnly: true - name: - description: Indicates the name of the Stream. - maxLength: 128 - minLength: 1 - type: string - schema: - $ref: >- - #/components/schemas/cloudflarePipelinesConnectionSchema - version: - description: Indicates the current version of this stream. - type: integer - worker_binding: - properties: - enabled: - description: Indicates that the worker binding is enabled. - type: boolean - required: - - enabled - type: object - required: - - id - - name - - version - - created_at - - modified_at - - http - - worker_binding - type: object - success: - $ref: >- - #/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess - required: - - success - - result - type: object - description: Indicates a successfully created Stream. - 4XX: - description: Indicates an error in creating a Stream. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Stream - tags: - - workers_pipelines_other - x-api-token-group: - - Pipelines Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: pipelines - resource_chain: - - streams - method: create - /accounts/{account_id}/pipelines/v1/streams/{stream_id}: - delete: - description: Delete Stream in Account. - operationId: deleteV4AccountsByAccount_idPipelinesV1StreamsByStream_id - parameters: - - in: query - name: force - schema: - description: >- - Delete stream forcefully, including deleting any dependent - pipelines. - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: stream_id - schema: - $ref: '#/components/schemas/cloudflarePipelinesWorkersPipelinesStreamId' - required: true - responses: - '200': - content: - application/json: - schema: - properties: - result: - type: object - success: - $ref: >- - #/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess - required: - - success - - result - type: object - description: Indicates a successfully deleted Stream. - 4XX: - description: Indicates an error in listing Streams. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Stream - tags: - - workers_pipelines_other - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: pipelines - resource_chain: - - streams - method: delete - get: - description: Get Stream Details. - operationId: getV4AccountsByAccount_idPipelinesV1StreamsByStream_id - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: stream_id - schema: - $ref: '#/components/schemas/cloudflarePipelinesWorkersPipelinesStreamId' - required: true - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - created_at: - format: date-time - type: string - readOnly: true - endpoint: - description: Indicates the endpoint URL of this stream. - format: uri - type: string - format: - $ref: '#/components/schemas/cloudflarePipelinesFormat' - http: - properties: - authentication: - description: >- - Indicates that authentication is required for the - HTTP endpoint. - type: boolean - cors: - description: Specifies the CORS options for the HTTP endpoint. - properties: - origins: - items: - type: string - maxItems: 5 - type: array - type: object - enabled: - description: Indicates that the HTTP endpoint is enabled. - type: boolean - required: - - enabled - - authentication - type: object - id: - description: Indicates a unique identifier for this stream. - type: string - modified_at: - format: date-time - type: string - readOnly: true - name: - description: Indicates the name of the Stream. - maxLength: 128 - minLength: 1 - type: string - schema: - $ref: >- - #/components/schemas/cloudflarePipelinesConnectionSchema - version: - description: Indicates the current version of this stream. - type: integer - worker_binding: - properties: - enabled: - description: Indicates that the worker binding is enabled. - type: boolean - required: - - enabled - type: object - required: - - id - - name - - version - - created_at - - modified_at - - http - - worker_binding - type: object - success: - $ref: >- - #/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess - required: - - success - - result - type: object - description: Indicates a successfully retrieved Stream. - 4XX: - description: Indicates an error in retrieving Stream. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Stream Details - tags: - - workers_pipelines_other - x-api-token-group: - - Pipelines Write - - Pipelines Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: pipelines - resource_chain: - - streams - method: get - patch: - description: Update a Stream. - operationId: patchV4AccountsByAccount_idPipelinesV1StreamsByStream_id - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: stream_id - schema: - $ref: '#/components/schemas/cloudflarePipelinesWorkersPipelinesStreamId' - required: true - requestBody: - content: - application/json: - schema: - properties: - http: - properties: - authentication: - description: >- - Indicates that authentication is required for the HTTP - endpoint. - type: boolean - cors: - description: Specifies the CORS options for the HTTP endpoint. - properties: - origins: - items: - type: string - maxItems: 5 - type: array - type: object - enabled: - description: Indicates that the HTTP endpoint is enabled. - type: boolean - required: - - enabled - - authentication - type: object - worker_binding: - properties: - enabled: - description: Indicates that the worker binding is enabled. - type: boolean - required: - - enabled - type: object - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - created_at: - format: date-time - type: string - readOnly: true - endpoint: - description: Indicates the endpoint URL of this stream. - format: uri - type: string - format: - $ref: '#/components/schemas/cloudflarePipelinesFormat' - http: - properties: - authentication: - description: >- - Indicates that authentication is required for the - HTTP endpoint. - type: boolean - cors: - description: Specifies the CORS options for the HTTP endpoint. - properties: - origins: - items: - type: string - maxItems: 5 - type: array - type: object - enabled: - description: Indicates that the HTTP endpoint is enabled. - type: boolean - required: - - enabled - - authentication - type: object - id: - description: Indicates a unique identifier for this stream. - type: string - modified_at: - format: date-time - type: string - readOnly: true - name: - description: Indicates the name of the Stream. - maxLength: 128 - minLength: 1 - type: string - version: - description: Indicates the current version of this stream. - type: integer - worker_binding: - properties: - enabled: - description: Indicates that the worker binding is enabled. - type: boolean - required: - - enabled - type: object - required: - - id - - name - - version - - created_at - - modified_at - - http - - worker_binding - type: object - success: - $ref: >- - #/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess - required: - - success - - result - type: object - description: Indicates a successfully updated Stream. - 4XX: - description: Indicates an error in creating a Stream. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Stream - tags: - - workers_pipelines_other - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: pipelines - resource_chain: - - streams - method: update - /accounts/{account_id}/pipelines/v1/validate_sql: - post: - description: Validate Arroyo SQL. - operationId: postV4AccountsByAccount_idPipelinesV1Validate_sql - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - sql: - description: Specifies SQL to validate. - type: string - required: - - sql - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - graph: - $ref: '#/components/schemas/cloudflarePipelinesPipelineGraph' - tables: - description: Indicates tables involved in the processing. - type: object - required: - - tables - type: object - success: - $ref: >- - #/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess - required: - - success - - result - type: object - description: Indicates SQL validation success. - 4XX: - description: Indicates SQL validation failed. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Validate SQL - tags: - - workers_pipelines_other - x-api-token-group: - - Pipelines Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: pipelines - resource_chain: [] - method: validate_sql - /accounts/{account_id}/pipelines/{pipeline_name}: - delete: - deprecated: true - description: >- - [DEPRECATED] Delete a pipeline. Use the new /pipelines/v1/pipelines - endpoint instead. - operationId: deleteV4AccountsByAccount_idPipelinesByPipeline_name_deprecated - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: pipeline_name - schema: - description: Defines the name of the pipeline. - maxLength: 128 - minLength: 1 - type: string - required: true - responses: - '200': - description: '[DEPRECATED] Indicates a successfully deleted pipeline.' - 4XX: - description: Indicates an error in deleting a pipeline. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: '[DEPRECATED] Delete Pipeline' - tags: - - workers_pipelines_other - x-api-token-group: - - Pipelines Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: pipelines - resource_chain: [] - method: delete - get: - deprecated: true - description: >- - [DEPRECATED] Get configuration of a pipeline. Use the new - /pipelines/v1/pipelines endpoint instead. - operationId: getV4AccountsByAccount_idPipelinesByPipeline_name_deprecated - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: pipeline_name - schema: - description: Defines the name of the pipeline. - maxLength: 128 - minLength: 1 - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - result: - $ref: >- - #/components/schemas/cloudflarePipelinesWorkersPipelinesPipeline - success: - $ref: >- - #/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess - required: - - success - - result - type: object - description: '[DEPRECATED] Describes the configuration of a pipeline.' - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - results: - nullable: true - type: object - x-stainless-empty-object: true - success: - $ref: >- - #/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess - required: - - success - - results - - errors - type: object - description: Indicates that the pipeline was not found. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: '[DEPRECATED] Get Pipeline' - tags: - - workers_pipelines_other - x-api-token-group: - - Pipelines Write - - Pipelines Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: pipelines - resource_chain: [] - method: get - put: - deprecated: true - description: >- - [DEPRECATED] Update an existing pipeline. Use the new - /pipelines/v1/pipelines endpoint instead. - operationId: putV4AccountsByAccount_idPipelinesByPipeline_name_deprecated - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: pipeline_name - schema: - description: Defines the name of the pipeline. - maxLength: 128 - minLength: 1 - type: string - required: true - requestBody: - content: - application/json: - schema: - properties: - destination: - properties: - batch: - properties: - max_bytes: - default: 100000000 - description: Specifies rough maximum size of files. - maximum: 100000000 - minimum: 1000 - type: integer - max_duration_s: - default: 300 - description: >- - Specifies duration to wait to aggregate batches - files. - maximum: 300 - minimum: 0.25 - type: number - max_rows: - default: 10000000 - description: Specifies rough maximum number of rows per file. - maximum: 10000000 - minimum: 100 - type: integer - type: object - compression: - properties: - type: - default: gzip - description: >- - Specifies the desired compression algorithm and - format. - enum: - - none - - gzip - - deflate - type: string - type: object - credentials: - properties: - access_key_id: - description: Specifies the R2 Bucket Access Key Id. - type: string - endpoint: - description: Specifies the R2 Endpoint. - type: string - secret_access_key: - description: Specifies the R2 Bucket Secret Access Key. - type: string - required: - - endpoint - - access_key_id - - secret_access_key - type: object - format: - description: Specifies the format of data to deliver. - enum: - - json - type: string - path: - properties: - bucket: - description: Specifies the R2 Bucket to store files. - type: string - filename: - description: >- - Specifies the name pattern to for individual data - files. - type: string - filepath: - description: Specifies the name pattern for directory. - type: string - prefix: - description: Specifies the base directory within the bucket. - type: string - required: - - bucket - type: object - type: - description: Specifies the type of destination. - enum: - - r2 - type: string - required: - - type - - format - - batch - - compression - - path - type: object - name: - description: Defines the name of the pipeline. - maxLength: 128 - minLength: 1 - type: string - source: - items: - type: object - description: >- - [DEPRECATED] HTTP source configuration. Use the new - streams API instead. - properties: - authentication: - description: >- - Specifies whether authentication is required to send - to this pipeline via HTTP. - type: boolean - cors: - properties: - origins: - description: >- - Specifies allowed origins to allow Cross Origin - HTTP Requests. - items: - type: string - maxItems: 5 - type: array - type: object - format: - description: Specifies the format of source data. - enum: - - json - type: string - type: - type: string - required: - - format - - type - minItems: 1 - type: array - required: - - name - - source - - destination - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - $ref: >- - #/components/schemas/cloudflarePipelinesWorkersPipelinesPipeline - success: - $ref: >- - #/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess - required: - - success - - result - type: object - description: '[DEPRECATED] Indicates a successfully updated pipeline.' - 4XX: - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - results: - nullable: true - type: object - x-stainless-empty-object: true - success: - $ref: >- - #/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess - required: - - success - - results - - errors - type: object - description: Indicates an error updating pipeline. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: '[DEPRECATED] Update Pipeline' - tags: - - workers_pipelines_other - x-api-token-group: - - Pipelines Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: pipelines - resource_chain: [] - method: update -components: - schemas: - cloudflarePipelinesConnectionSchema: - properties: - fields: - items: - $ref: '#/components/schemas/cloudflarePipelinesSourceField' - type: array - format: - $ref: '#/components/schemas/cloudflarePipelinesFormat' - inferred: - nullable: true - type: boolean - type: object - cloudflarePipelinesDecimalEncoding: - enum: - - number - - string - - bytes - type: string - cloudflarePipelinesFormat: - type: object - title: Json - properties: - decimal_encoding: - $ref: '#/components/schemas/cloudflarePipelinesDecimalEncoding' - timestamp_format: - $ref: '#/components/schemas/cloudflarePipelinesTimestampFormat' - unstructured: - type: boolean - type: - enum: - - json - type: string - compression: - $ref: '#/components/schemas/cloudflarePipelinesParquetCompression' - row_group_bytes: - format: int64 - minimum: 0 - nullable: true - type: integer - required: - - type - cloudflarePipelinesParquetCompression: - enum: - - uncompressed - - snappy - - gzip - - zstd - - lz4 - type: string - cloudflarePipelinesPipelineEdge: - properties: - dest_id: - format: int32 - minimum: 0 - type: integer - edge_type: - type: string - key_type: - type: string - src_id: - format: int32 - minimum: 0 - type: integer - value_type: - type: string - required: - - src_id - - dest_id - - key_type - - value_type - - edge_type - type: object - cloudflarePipelinesPipelineGraph: - properties: - edges: - items: - $ref: '#/components/schemas/cloudflarePipelinesPipelineEdge' - type: array - nodes: - items: - $ref: '#/components/schemas/cloudflarePipelinesPipelineNode' - type: array - required: - - nodes - - edges - type: object - cloudflarePipelinesPipelineNode: - properties: - description: - type: string - node_id: - format: int32 - minimum: 0 - type: integer - operator: - type: string - parallelism: - format: int32 - minimum: 0 - type: integer - required: - - node_id - - operator - - description - - parallelism - type: object - cloudflarePipelinesSourceField: - properties: - metadata_key: - nullable: true - type: string - name: - type: string - sql_name: - type: string - type: - enum: - - int32 - type: string - unit: - $ref: '#/components/schemas/cloudflarePipelinesTimestampUnit' - fields: - items: - $ref: '#/components/schemas/cloudflarePipelinesSourceField' - type: array - items: - $ref: '#/components/schemas/cloudflarePipelinesSourceField' - required: - - type - type: object - title: Int32 - cloudflarePipelinesTimestampFormat: - enum: - - rfc3339 - - unix_millis - type: string - cloudflarePipelinesTimestampUnit: - enum: - - second - - millisecond - - microsecond - - nanosecond - type: string - cloudflarePipelinesWorkerPipelinesCommonSuccess: - description: Indicates whether the API call was successful. - example: true - type: boolean - cloudflarePipelinesWorkersPipelinesPipeline: - deprecated: true - description: >- - [DEPRECATED] Describes the configuration of a pipeline. Use the new - streams/sinks/pipelines API instead. - properties: - destination: - properties: - batch: - properties: - max_bytes: - default: 100000000 - description: Specifies rough maximum size of files. - maximum: 100000000 - minimum: 1000 - type: integer - max_duration_s: - default: 300 - description: Specifies duration to wait to aggregate batches files. - maximum: 300 - minimum: 0.25 - type: number - max_rows: - default: 10000000 - description: Specifies rough maximum number of rows per file. - maximum: 10000000 - minimum: 100 - type: integer - required: - - max_rows - - max_bytes - - max_duration_s - type: object - compression: - properties: - type: - default: gzip - description: Specifies the desired compression algorithm and format. - enum: - - none - - gzip - - deflate - example: gzip - type: string - required: - - type - type: object - format: - description: Specifies the format of data to deliver. - enum: - - json - type: string - path: - example: - bucket: bucket - prefix: base - properties: - bucket: - description: Specifies the R2 Bucket to store files. - example: bucket - type: string - filename: - description: Specifies the name pattern to for individual data files. - example: ${slug}${extension} - type: string - filepath: - description: Specifies the name pattern for directory. - example: ${date}/${hour} - type: string - prefix: - description: Specifies the base directory within the bucket. - example: base - type: string - required: - - bucket - type: object - type: - description: Specifies the type of destination. - enum: - - r2 - type: string - required: - - type - - format - - batch - - compression - - path - type: object - endpoint: - description: Indicates the endpoint URL to send traffic. - example: https://123f8a8258064ed892a347f173372359.pipelines.cloudflare.com - type: string - id: - description: Specifies the pipeline identifier. - example: 123f8a8258064ed892a347f173372359 - type: string - name: - description: Defines the name of the pipeline. - example: sample_pipeline - maxLength: 128 - minLength: 1 - type: string - source: - items: - type: object - description: >- - [DEPRECATED] HTTP source configuration. Use the new streams API - instead. - properties: - authentication: - description: >- - Specifies whether authentication is required to send to this - pipeline via HTTP. - type: boolean - cors: - properties: - origins: - description: >- - Specifies allowed origins to allow Cross Origin HTTP - Requests. - example: - - '*' - items: - type: string - maxItems: 5 - type: array - type: object - format: - description: Specifies the format of source data. - enum: - - json - type: string - type: - type: string - required: - - format - - type - minItems: 1 - type: array - version: - description: Indicates the version number of last saved configuration. - example: 2 - type: number - required: - - name - - source - - destination - - id - - version - - endpoint - type: object - cloudflarePipelinesWorkersPipelinesPipelineId: - description: Specifies the public ID of the pipeline. - example: 043e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - minLength: 32 - type: string - cloudflarePipelinesWorkersPipelinesSinkId: - description: Specifies the publid ID of the sink. - example: 0223105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - minLength: 32 - type: string - cloudflarePipelinesWorkersPipelinesStreamId: - description: Specifies the public ID of the stream. - example: 033e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - minLength: 32 - type: string - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - accounts_pipelines: - id: cloudflare.pipelines.accounts_pipelines - name: accounts_pipelines - title: Accounts Pipelines - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1pipelines/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.results - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1pipelines/post' - response: - mediaType: application/json - openAPIDocKey: '200' - get_by_account: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1pipelines~1{pipeline_name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/accounts_pipelines/methods/get_by_account - - $ref: '#/components/x-stackQL-resources/accounts_pipelines/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/accounts_pipelines/methods/create' - update: [] - delete: [] - replace: [] - v1_pipelines: - id: cloudflare.pipelines.v1_pipelines - name: v1_pipelines - title: V1 Pipelines - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1pipelines~1v1~1pipelines/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create_v1: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1pipelines~1v1~1pipelines/post' - response: - mediaType: application/json - openAPIDocKey: '200' - get_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pipelines~1v1~1pipelines~1{pipeline_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/v1_pipelines/methods/get_by_account - - $ref: '#/components/x-stackQL-resources/v1_pipelines/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/v1_pipelines/methods/create_v1' - update: [] - delete: [] - replace: [] - pipelines: - id: cloudflare.pipelines.pipelines - name: pipelines - title: Pipelines - methods: - delete_v1: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pipelines~1v1~1pipelines~1{pipeline_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - validate_sql_v1: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1pipelines~1v1~1validate_sql/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pipelines~1{pipeline_name}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1pipelines~1{pipeline_name}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/pipelines/methods/delete_v1' - - $ref: '#/components/x-stackQL-resources/pipelines/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/pipelines/methods/update' - sinks: - id: cloudflare.pipelines.sinks - name: sinks - title: Sinks - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1pipelines~1v1~1sinks/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1pipelines~1v1~1sinks/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pipelines~1v1~1sinks~1{sink_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pipelines~1v1~1sinks~1{sink_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/sinks/methods/get' - - $ref: '#/components/x-stackQL-resources/sinks/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/sinks/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/sinks/methods/delete' - replace: [] - streams: - id: cloudflare.pipelines.streams - name: streams - title: Streams - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1pipelines~1v1~1streams/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1pipelines~1v1~1streams/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pipelines~1v1~1streams~1{stream_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pipelines~1v1~1streams~1{stream_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1pipelines~1v1~1streams~1{stream_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/streams/methods/get' - - $ref: '#/components/x-stackQL-resources/streams/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/streams/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/streams/methods/update' - delete: - - $ref: '#/components/x-stackQL-resources/streams/methods/delete' - replace: [] +openapi: 3.0.3 +info: + title: pipelines API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/pipelines: + get: + deprecated: true + description: '[DEPRECATED] List, filter, and paginate pipelines in an account. Use the new /pipelines/v1/pipelines endpoint instead.' + operationId: getV4AccountsByAccount_idPipelines_deprecated + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: search + schema: + description: Specifies the prefix of pipeline name to search. + type: string + - in: query + name: page + schema: + default: '1' + description: Specifies which page to retrieve. + type: string + - in: query + name: per_page + schema: + default: '25' + description: Specifies the number of pipelines per page. + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result_info: + properties: + count: + description: Indicates the number of items on current page. + type: number + page: + description: Indicates the current page number. + type: number + per_page: + description: Indicates the number of items per page. + type: number + total_count: + description: Indicates the total number of items. + type: number + required: + - count + - page + - per_page + - total_count + type: object + results: + items: + $ref: '#/components/schemas/cloudflarePipelinesWorkersPipelinesPipeline' + type: array + success: + $ref: '#/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess' + required: + - success + - results + - result_info + type: object + description: '[DEPRECATED] Lists the pipelines. Use /pipelines/v1/pipelines instead.' + 4XX: + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + results: + nullable: true + type: object + x-stainless-empty-object: true + success: + $ref: '#/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess' + required: + - success + - results + - errors + type: object + description: Indicates the error trying to list pipelines. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: '[DEPRECATED] List Pipelines' + tags: + - workers_pipelines_other + x-api-token-group: + - Pipelines Write + - Pipelines Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: pipelines + resource_chain: [] + method: list + post: + deprecated: true + description: '[DEPRECATED] Create a new pipeline. Use the new /pipelines/v1/pipelines endpoint instead.' + operationId: postV4AccountsByAccount_idPipelines_deprecated + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + destination: + properties: + batch: + properties: + max_bytes: + default: 100000000 + description: Specifies rough maximum size of files. + maximum: 100000000 + minimum: 1000 + type: integer + max_duration_s: + default: 300 + description: Specifies duration to wait to aggregate batches files. + maximum: 300 + minimum: 0.25 + type: number + max_rows: + default: 10000000 + description: Specifies rough maximum number of rows per file. + maximum: 10000000 + minimum: 100 + type: integer + type: object + compression: + properties: + type: + default: gzip + description: Specifies the desired compression algorithm and format. + enum: + - none + - gzip + - deflate + type: string + type: object + credentials: + properties: + access_key_id: + description: Specifies the R2 Bucket Access Key Id. + type: string + endpoint: + description: Specifies the R2 Endpoint. + type: string + secret_access_key: + description: Specifies the R2 Bucket Secret Access Key. + type: string + required: + - endpoint + - access_key_id + - secret_access_key + type: object + format: + description: Specifies the format of data to deliver. + enum: + - json + type: string + path: + properties: + bucket: + description: Specifies the R2 Bucket to store files. + type: string + filename: + description: Specifies the name pattern to for individual data files. + type: string + filepath: + description: Specifies the name pattern for directory. + type: string + prefix: + description: Specifies the base directory within the bucket. + type: string + required: + - bucket + type: object + type: + description: Specifies the type of destination. + enum: + - r2 + type: string + required: + - type + - format + - batch + - compression + - path + - credentials + type: object + name: + description: Defines the name of the pipeline. + maxLength: 128 + minLength: 1 + type: string + source: + items: + type: object + description: '[DEPRECATED] HTTP source configuration. Use the new streams API instead.' + properties: + authentication: + description: Specifies whether authentication is required to send to this pipeline via HTTP. + type: boolean + cors: + properties: + origins: + description: Specifies allowed origins to allow Cross Origin HTTP Requests. + items: + type: string + maxItems: 5 + type: array + type: object + format: + description: Specifies the format of source data. + enum: + - json + type: string + type: + type: string + required: + - format + - type + minItems: 1 + type: array + required: + - name + - source + - destination + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + $ref: '#/components/schemas/cloudflarePipelinesWorkersPipelinesPipeline' + success: + $ref: '#/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess' + required: + - success + - result + type: object + description: '[DEPRECATED] Indicates a successfully created pipeline. Use /pipelines/v1/pipelines instead.' + 4XX: + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + results: + nullable: true + type: object + x-stainless-empty-object: true + success: + $ref: '#/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess' + required: + - success + - results + - errors + type: object + description: Indicates an error in creating a pipeline. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: '[DEPRECATED] Create Pipeline' + tags: + - workers_pipelines_other + x-api-token-group: + - Pipelines Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: pipelines + resource_chain: [] + method: create + /accounts/{account_id}/pipelines/v1/pipelines: + get: + description: List/Filter Pipelines in Account. + operationId: getV4AccountsByAccount_idPipelinesV1Pipelines + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: page + schema: + default: 1 + type: number + - in: query + name: per_page + schema: + type: number + responses: + '200': + content: + application/json: + schema: + properties: + result: + items: + properties: + created_at: + type: string + readOnly: true + id: + description: Indicates a unique identifier for this pipeline. + type: string + modified_at: + type: string + readOnly: true + name: + description: Indicates the name of the Pipeline. + maxLength: 128 + minLength: 1 + type: string + sql: + description: Specifies SQL for the Pipeline processing flow. + type: string + status: + description: Indicates the current status of the Pipeline. + type: string + required: + - id + - name + - created_at + - modified_at + - sql + - status + type: object + type: array + result_info: + properties: + count: + description: Indicates the number of items on current page. + type: number + page: + description: Indicates the current page number. + type: number + per_page: + description: Indicates the number of items per page. + type: number + total_count: + description: Indicates the total number of items. + type: number + required: + - count + - page + - per_page + - total_count + type: object + success: + $ref: '#/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess' + required: + - success + - result + - result_info + type: object + description: Indicates a successfully listed Pipelines. + 4XX: + description: Indicates an error in listing Pipelines. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Pipelines + tags: + - workers_pipelines_other + x-api-token-group: + - Pipelines Write + - Pipelines Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: pipelines + resource_chain: [] + method: list_v1 + post: + description: Create a new Pipeline. + operationId: postV4AccountsByAccount_idPipelinesV1Pipelines + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + name: + description: Specifies the name of the Pipeline. + maxLength: 128 + minLength: 1 + type: string + sql: + description: Specifies SQL for the Pipeline processing flow. + type: string + required: + - name + - sql + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + created_at: + type: string + readOnly: true + id: + description: Indicates a unique identifier for this pipeline. + type: string + modified_at: + type: string + readOnly: true + name: + description: Indicates the name of the Pipeline. + maxLength: 128 + minLength: 1 + type: string + sql: + description: Specifies SQL for the Pipeline processing flow. + type: string + status: + description: Indicates the current status of the Pipeline. + type: string + required: + - id + - name + - created_at + - modified_at + - sql + - status + type: object + success: + $ref: '#/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess' + required: + - success + - result + type: object + description: Indicates a successfully created Pipeline. + 4XX: + description: Indicates an error in creating a Pipeline. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Pipeline + tags: + - workers_pipelines_other + x-api-token-group: + - Pipelines Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: pipelines + resource_chain: [] + method: create_v1 + /accounts/{account_id}/pipelines/v1/pipelines/{pipeline_id}: + delete: + description: Delete Pipeline in Account. + operationId: deleteV4AccountsByAccount_idPipelinesV1PipelinesByPipeline_id + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: pipeline_id + schema: + $ref: '#/components/schemas/cloudflarePipelinesWorkersPipelinesPipelineId' + required: true + responses: + '200': + content: + application/json: + schema: + properties: + result: + type: object + success: + $ref: '#/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess' + required: + - success + - result + type: object + description: Indicates a successfully deleted Pipeline. + 4XX: + description: Indicates an error in listing Pipelines. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Pipelines + tags: + - workers_pipelines_other + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: pipelines + resource_chain: [] + method: delete_v1 + get: + description: Get Pipelines Details. + operationId: getV4AccountsByAccount_idPipelinesV1PipelinesByPipeline_id + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: pipeline_id + schema: + $ref: '#/components/schemas/cloudflarePipelinesWorkersPipelinesPipelineId' + required: true + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + created_at: + type: string + readOnly: true + failure_reason: + description: Indicates the reason for the failure of the Pipeline. + type: string + id: + description: Indicates a unique identifier for this pipeline. + type: string + modified_at: + type: string + readOnly: true + name: + description: Indicates the name of the Pipeline. + maxLength: 128 + minLength: 1 + type: string + sql: + description: Specifies SQL for the Pipeline processing flow. + type: string + status: + description: Indicates the current status of the Pipeline. + type: string + tables: + description: List of streams and sinks used by this pipeline. + items: + properties: + id: + description: Unique identifier for the connection (stream or sink). + type: string + latest: + description: Latest available version of the connection. + type: integer + name: + description: Name of the connection. + maxLength: 128 + minLength: 1 + type: string + type: + description: Type of the connection. + enum: + - stream + - sink + type: string + version: + description: Current version of the connection used by this pipeline. + type: integer + required: + - id + - version + - latest + - type + - name + type: object + type: array + required: + - id + - name + - created_at + - modified_at + - sql + - status + - tables + type: object + success: + $ref: '#/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess' + required: + - success + - result + type: object + description: Indicates a successfully retrieved Pipeline. + 4XX: + description: Indicates an error in retrieving Pipelines. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Pipeline Details + tags: + - workers_pipelines_other + x-api-token-group: + - Pipelines Write + - Pipelines Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: pipelines + resource_chain: [] + method: get_v1 + /accounts/{account_id}/pipelines/v1/sinks: + get: + description: List/Filter Sinks in Account. + operationId: getV4AccountsByAccount_idPipelinesV1Sinks + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: pipeline_id + schema: + type: string + - in: query + name: page + schema: + default: 1 + type: number + - in: query + name: per_page + schema: + type: number + responses: + '200': + content: + application/json: + schema: + properties: + result: + items: + properties: + config: + description: Defines the configuration of the R2 Sink. + type: object + title: R2 Sink Public + properties: + account_id: + description: Cloudflare Account ID for the bucket + title: Account ID + type: string + bucket: + description: R2 Bucket to write to + title: Bucket + type: string + file_naming: + description: Controls filename prefix/suffix and strategy. + properties: + prefix: + description: The prefix to use in file name. i.e prefix-.parquet + title: Filename Prefix + type: string + strategy: + description: Filename generation strategy. + enum: + - serial + - uuid + - uuid_v7 + - ulid + title: Filename Strategy + type: string + suffix: + description: This will overwrite the default file suffix. i.e .parquet, use with caution + title: Filename Suffix + type: string + title: File Naming + type: object + jurisdiction: + description: Jurisdiction this bucket is hosted in + title: Jurisdiction + type: string + partitioning: + description: Data-layout partitioning for sinks. + properties: + time_pattern: + description: The pattern of the date string + title: Time Partition Pattern + type: string + title: Partitioning Configuration + type: object + path: + description: Subpath within the bucket to write to + title: Path + type: string + rolling_policy: + description: Rolling policy for file sinks (when & why to close a file and open a new one). + properties: + file_size_bytes: + description: Files will be rolled after reaching this number of bytes + format: uint64 + minimum: 0 + title: File Size + type: integer + inactivity_seconds: + description: Number of seconds of inactivity to wait before rolling over to a new file + format: uint64 + minimum: 1 + title: Inactivity Seconds + type: integer + interval_seconds: + description: Number of seconds to wait before rolling over to a new file + format: uint64 + minimum: 1 + title: Interval Seconds + type: integer + title: File Rolling Policy + type: object + namespace: + description: Table namespace + title: Namespace + type: string + table_name: + description: Table name + title: Table Name + type: string + required: + - account_id + - bucket + created_at: + format: date-time + type: string + readOnly: true + format: + $ref: '#/components/schemas/cloudflarePipelinesFormat' + id: + description: Indicates a unique identifier for this sink. + type: string + modified_at: + format: date-time + type: string + readOnly: true + name: + description: Defines the name of the Sink. + maxLength: 128 + minLength: 1 + type: string + schema: + $ref: '#/components/schemas/cloudflarePipelinesConnectionSchema' + type: + description: Specifies the type of sink. + enum: + - r2 + - r2_data_catalog + type: string + required: + - id + - name + - created_at + - modified_at + - type + type: object + type: array + result_info: + properties: + count: + description: Indicates the number of items on current page. + type: number + page: + description: Indicates the current page number. + type: number + per_page: + description: Indicates the number of items per page. + type: number + total_count: + description: Indicates the total number of items. + type: number + required: + - count + - page + - per_page + - total_count + type: object + success: + $ref: '#/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess' + required: + - success + - result + - result_info + type: object + description: Indicates successfully listed Sinks. + 4XX: + description: Indicates an error in listing Sinks. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Sinks + tags: + - workers_pipelines_other + x-api-token-group: + - Pipelines Write + - Pipelines Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: pipelines + resource_chain: + - sinks + method: list + post: + description: Create a new Sink. + operationId: postV4AccountsByAccount_idPipelinesV1Sinks + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + config: + description: Defines the configuration of the R2 Sink. + type: object + title: R2 Sink + properties: + account_id: + description: Cloudflare Account ID for the bucket + title: Account ID + type: string + bucket: + description: R2 Bucket to write to + title: Bucket + type: string + credentials: + properties: + access_key_id: + description: Cloudflare Account ID for the bucket + format: var-str + title: Access Key ID + type: string + secret_access_key: + description: Cloudflare Account ID for the bucket + format: var-str + title: Access Key ID + type: string + x-sensitive: true + required: + - access_key_id + - secret_access_key + title: R2 Credentials + type: object + file_naming: + description: Controls filename prefix/suffix and strategy. + properties: + prefix: + description: The prefix to use in file name. i.e prefix-.parquet + title: Filename Prefix + type: string + strategy: + description: Filename generation strategy. + enum: + - serial + - uuid + - uuid_v7 + - ulid + title: Filename Strategy + type: string + suffix: + description: This will overwrite the default file suffix. i.e .parquet, use with caution + title: Filename Suffix + type: string + title: File Naming + type: object + jurisdiction: + description: Jurisdiction this bucket is hosted in + title: Jurisdiction + type: string + partitioning: + description: Data-layout partitioning for sinks. + properties: + time_pattern: + description: The pattern of the date string + title: Time Partition Pattern + type: string + title: Partitioning Configuration + type: object + path: + description: Subpath within the bucket to write to + title: Path + type: string + rolling_policy: + description: Rolling policy for file sinks (when & why to close a file and open a new one). + properties: + file_size_bytes: + description: Files will be rolled after reaching this number of bytes + format: uint64 + minimum: 0 + title: File Size + type: integer + inactivity_seconds: + description: Number of seconds of inactivity to wait before rolling over to a new file + format: uint64 + minimum: 1 + title: Inactivity Seconds + type: integer + interval_seconds: + description: Number of seconds to wait before rolling over to a new file + format: uint64 + minimum: 1 + title: Interval Seconds + type: integer + title: File Rolling Policy + type: object + namespace: + description: Table namespace + title: Namespace + type: string + table_name: + description: Table name + title: Table Name + type: string + token: + description: Authentication token + format: var-str + type: string + x-sensitive: true + required: + - account_id + - bucket + format: + $ref: '#/components/schemas/cloudflarePipelinesFormat' + name: + description: Defines the name of the Sink. + maxLength: 128 + minLength: 1 + type: string + schema: + $ref: '#/components/schemas/cloudflarePipelinesConnectionSchema' + type: + description: Specifies the type of sink. + enum: + - r2 + - r2_data_catalog + type: string + required: + - name + - type + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + config: + type: object + title: R2 Sink + properties: + account_id: + description: Cloudflare Account ID for the bucket + title: Account ID + type: string + bucket: + description: R2 Bucket to write to + title: Bucket + type: string + credentials: + properties: + access_key_id: + description: Cloudflare Account ID for the bucket + format: var-str + title: Access Key ID + type: string + secret_access_key: + description: Cloudflare Account ID for the bucket + format: var-str + title: Access Key ID + type: string + x-sensitive: true + required: + - access_key_id + - secret_access_key + title: R2 Credentials + type: object + file_naming: + description: Controls filename prefix/suffix and strategy. + properties: + prefix: + description: The prefix to use in file name. i.e prefix-.parquet + title: Filename Prefix + type: string + strategy: + description: Filename generation strategy. + enum: + - serial + - uuid + - uuid_v7 + - ulid + title: Filename Strategy + type: string + suffix: + description: This will overwrite the default file suffix. i.e .parquet, use with caution + title: Filename Suffix + type: string + title: File Naming + type: object + jurisdiction: + description: Jurisdiction this bucket is hosted in + title: Jurisdiction + type: string + partitioning: + description: Data-layout partitioning for sinks. + properties: + time_pattern: + description: The pattern of the date string + title: Time Partition Pattern + type: string + title: Partitioning Configuration + type: object + path: + description: Subpath within the bucket to write to + title: Path + type: string + rolling_policy: + description: Rolling policy for file sinks (when & why to close a file and open a new one). + properties: + file_size_bytes: + description: Files will be rolled after reaching this number of bytes + format: uint64 + minimum: 0 + title: File Size + type: integer + inactivity_seconds: + description: Number of seconds of inactivity to wait before rolling over to a new file + format: uint64 + minimum: 1 + title: Inactivity Seconds + type: integer + interval_seconds: + description: Number of seconds to wait before rolling over to a new file + format: uint64 + minimum: 1 + title: Interval Seconds + type: integer + title: File Rolling Policy + type: object + namespace: + description: Table namespace + title: Namespace + type: string + table_name: + description: Table name + title: Table Name + type: string + token: + description: Authentication token + format: var-str + type: string + x-sensitive: true + required: + - account_id + - bucket + description: R2 Data Catalog Sink + created_at: + format: date-time + type: string + readOnly: true + format: + $ref: '#/components/schemas/cloudflarePipelinesFormat' + id: + description: Indicates a unique identifier for this sink. + type: string + modified_at: + format: date-time + type: string + readOnly: true + name: + description: Defines the name of the Sink. + maxLength: 128 + minLength: 1 + type: string + schema: + $ref: '#/components/schemas/cloudflarePipelinesConnectionSchema' + type: + description: Specifies the type of sink. + enum: + - r2 + - r2_data_catalog + type: string + required: + - id + - name + - created_at + - modified_at + - type + type: object + success: + $ref: '#/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess' + required: + - success + - result + type: object + description: Indicates a successfully created Sink. + 4XX: + description: Indicates an error in creating a Sink. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Sink + tags: + - workers_pipelines_other + x-api-token-group: + - Pipelines Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: pipelines + resource_chain: + - sinks + method: create + /accounts/{account_id}/pipelines/v1/sinks/{sink_id}: + delete: + description: Delete Pipeline in Account. + operationId: deleteV4AccountsByAccount_idPipelinesV1SinksBySink_id + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: sink_id + schema: + $ref: '#/components/schemas/cloudflarePipelinesWorkersPipelinesSinkId' + required: true + - in: query + name: force + schema: + description: Delete sink forcefully, including deleting any dependent pipelines. + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + type: object + success: + $ref: '#/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess' + required: + - success + - result + type: object + description: Indicates a successfully deleted Sink. + 4XX: + description: Indicates an error in listing Sinks. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Sink + tags: + - workers_pipelines_other + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: pipelines + resource_chain: + - sinks + method: delete + get: + description: Get Sink Details. + operationId: getV4AccountsByAccount_idPipelinesV1SinksBySink_id + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: sink_id + schema: + $ref: '#/components/schemas/cloudflarePipelinesWorkersPipelinesSinkId' + required: true + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + config: + description: Defines the configuration of the R2 Sink. + type: object + title: R2 Sink Public + properties: + account_id: + description: Cloudflare Account ID for the bucket + title: Account ID + type: string + bucket: + description: R2 Bucket to write to + title: Bucket + type: string + file_naming: + description: Controls filename prefix/suffix and strategy. + properties: + prefix: + description: The prefix to use in file name. i.e prefix-.parquet + title: Filename Prefix + type: string + strategy: + description: Filename generation strategy. + enum: + - serial + - uuid + - uuid_v7 + - ulid + title: Filename Strategy + type: string + suffix: + description: This will overwrite the default file suffix. i.e .parquet, use with caution + title: Filename Suffix + type: string + title: File Naming + type: object + jurisdiction: + description: Jurisdiction this bucket is hosted in + title: Jurisdiction + type: string + partitioning: + description: Data-layout partitioning for sinks. + properties: + time_pattern: + description: The pattern of the date string + title: Time Partition Pattern + type: string + title: Partitioning Configuration + type: object + path: + description: Subpath within the bucket to write to + title: Path + type: string + rolling_policy: + description: Rolling policy for file sinks (when & why to close a file and open a new one). + properties: + file_size_bytes: + description: Files will be rolled after reaching this number of bytes + format: uint64 + minimum: 0 + title: File Size + type: integer + inactivity_seconds: + description: Number of seconds of inactivity to wait before rolling over to a new file + format: uint64 + minimum: 1 + title: Inactivity Seconds + type: integer + interval_seconds: + description: Number of seconds to wait before rolling over to a new file + format: uint64 + minimum: 1 + title: Interval Seconds + type: integer + title: File Rolling Policy + type: object + namespace: + description: Table namespace + title: Namespace + type: string + table_name: + description: Table name + title: Table Name + type: string + required: + - account_id + - bucket + created_at: + format: date-time + type: string + readOnly: true + format: + $ref: '#/components/schemas/cloudflarePipelinesFormat' + id: + description: Indicates a unique identifier for this sink. + type: string + modified_at: + format: date-time + type: string + readOnly: true + name: + description: Defines the name of the Sink. + maxLength: 128 + minLength: 1 + type: string + schema: + $ref: '#/components/schemas/cloudflarePipelinesConnectionSchema' + type: + description: Specifies the type of sink. + enum: + - r2 + - r2_data_catalog + type: string + required: + - id + - name + - created_at + - modified_at + - type + type: object + success: + $ref: '#/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess' + required: + - success + - result + type: object + description: Indicates that Sink was retrieved. + 4XX: + description: Indicates an error in listing Sinks. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Sink Details + tags: + - workers_pipelines_other + x-api-token-group: + - Pipelines Write + - Pipelines Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: pipelines + resource_chain: + - sinks + method: get + /accounts/{account_id}/pipelines/v1/streams: + get: + description: List/Filter Streams in Account. + operationId: getV4AccountsByAccount_idPipelinesV1Streams + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: pipeline_id + schema: + $ref: '#/components/schemas/cloudflarePipelinesWorkersPipelinesPipelineId' + - in: query + name: page + schema: + default: 1 + type: number + - in: query + name: per_page + schema: + type: number + responses: + '200': + content: + application/json: + schema: + properties: + result: + items: + properties: + created_at: + format: date-time + type: string + readOnly: true + endpoint: + description: Indicates the endpoint URL of this stream. + format: uri + type: string + format: + $ref: '#/components/schemas/cloudflarePipelinesFormat' + http: + properties: + authentication: + description: Indicates that authentication is required for the HTTP endpoint. + type: boolean + cors: + description: Specifies the CORS options for the HTTP endpoint. + properties: + origins: + items: + type: string + maxItems: 5 + type: array + type: object + enabled: + description: Indicates that the HTTP endpoint is enabled. + type: boolean + required: + - enabled + - authentication + type: object + id: + description: Indicates a unique identifier for this stream. + type: string + modified_at: + format: date-time + type: string + readOnly: true + name: + description: Indicates the name of the Stream. + maxLength: 128 + minLength: 1 + type: string + schema: + $ref: '#/components/schemas/cloudflarePipelinesConnectionSchema' + version: + description: Indicates the current version of this stream. + type: integer + worker_binding: + properties: + enabled: + description: Indicates that the worker binding is enabled. + type: boolean + required: + - enabled + type: object + required: + - id + - name + - version + - created_at + - modified_at + - http + - worker_binding + type: object + type: array + result_info: + properties: + count: + description: Indicates the number of items on current page. + type: number + page: + description: Indicates the current page number. + type: number + per_page: + description: Indicates the number of items per page. + type: number + total_count: + description: Indicates the total number of items. + type: number + required: + - count + - page + - per_page + - total_count + type: object + success: + $ref: '#/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess' + required: + - success + - result + - result_info + type: object + description: Indicates a successfully created Stream. + 4XX: + description: Indicates an error in listing Streams. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Streams + tags: + - workers_pipelines_other + x-api-token-group: + - Pipelines Write + - Pipelines Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: pipelines + resource_chain: + - streams + method: list + post: + description: Create a new Stream. + operationId: postV4AccountsByAccount_idPipelinesV1Streams + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + format: + $ref: '#/components/schemas/cloudflarePipelinesFormat' + http: + default: + authentication: false + enabled: true + properties: + authentication: + description: Indicates that authentication is required for the HTTP endpoint. + type: boolean + cors: + description: Specifies the CORS options for the HTTP endpoint. + properties: + origins: + items: + type: string + maxItems: 5 + type: array + type: object + enabled: + description: Indicates that the HTTP endpoint is enabled. + type: boolean + required: + - enabled + - authentication + type: object + name: + description: Specifies the name of the Stream. + maxLength: 128 + minLength: 1 + type: string + schema: + $ref: '#/components/schemas/cloudflarePipelinesConnectionSchema' + worker_binding: + default: + enabled: true + properties: + enabled: + description: Indicates that the worker binding is enabled. + type: boolean + required: + - enabled + type: object + required: + - name + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + created_at: + format: date-time + type: string + readOnly: true + endpoint: + description: Indicates the endpoint URL of this stream. + format: uri + type: string + format: + $ref: '#/components/schemas/cloudflarePipelinesFormat' + http: + properties: + authentication: + description: Indicates that authentication is required for the HTTP endpoint. + type: boolean + cors: + description: Specifies the CORS options for the HTTP endpoint. + properties: + origins: + items: + type: string + maxItems: 5 + type: array + type: object + enabled: + description: Indicates that the HTTP endpoint is enabled. + type: boolean + required: + - enabled + - authentication + type: object + id: + description: Indicates a unique identifier for this stream. + type: string + modified_at: + format: date-time + type: string + readOnly: true + name: + description: Indicates the name of the Stream. + maxLength: 128 + minLength: 1 + type: string + schema: + $ref: '#/components/schemas/cloudflarePipelinesConnectionSchema' + version: + description: Indicates the current version of this stream. + type: integer + worker_binding: + properties: + enabled: + description: Indicates that the worker binding is enabled. + type: boolean + required: + - enabled + type: object + required: + - id + - name + - version + - created_at + - modified_at + - http + - worker_binding + type: object + success: + $ref: '#/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess' + required: + - success + - result + type: object + description: Indicates a successfully created Stream. + 4XX: + description: Indicates an error in creating a Stream. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Stream + tags: + - workers_pipelines_other + x-api-token-group: + - Pipelines Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: pipelines + resource_chain: + - streams + method: create + /accounts/{account_id}/pipelines/v1/streams/{stream_id}: + delete: + description: Delete Stream in Account. + operationId: deleteV4AccountsByAccount_idPipelinesV1StreamsByStream_id + parameters: + - in: query + name: force + schema: + description: Delete stream forcefully, including deleting any dependent pipelines. + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: stream_id + schema: + $ref: '#/components/schemas/cloudflarePipelinesWorkersPipelinesStreamId' + required: true + responses: + '200': + content: + application/json: + schema: + properties: + result: + type: object + success: + $ref: '#/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess' + required: + - success + - result + type: object + description: Indicates a successfully deleted Stream. + 4XX: + description: Indicates an error in listing Streams. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Stream + tags: + - workers_pipelines_other + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: pipelines + resource_chain: + - streams + method: delete + get: + description: Get Stream Details. + operationId: getV4AccountsByAccount_idPipelinesV1StreamsByStream_id + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: stream_id + schema: + $ref: '#/components/schemas/cloudflarePipelinesWorkersPipelinesStreamId' + required: true + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + created_at: + format: date-time + type: string + readOnly: true + endpoint: + description: Indicates the endpoint URL of this stream. + format: uri + type: string + format: + $ref: '#/components/schemas/cloudflarePipelinesFormat' + http: + properties: + authentication: + description: Indicates that authentication is required for the HTTP endpoint. + type: boolean + cors: + description: Specifies the CORS options for the HTTP endpoint. + properties: + origins: + items: + type: string + maxItems: 5 + type: array + type: object + enabled: + description: Indicates that the HTTP endpoint is enabled. + type: boolean + required: + - enabled + - authentication + type: object + id: + description: Indicates a unique identifier for this stream. + type: string + modified_at: + format: date-time + type: string + readOnly: true + name: + description: Indicates the name of the Stream. + maxLength: 128 + minLength: 1 + type: string + schema: + $ref: '#/components/schemas/cloudflarePipelinesConnectionSchema' + version: + description: Indicates the current version of this stream. + type: integer + worker_binding: + properties: + enabled: + description: Indicates that the worker binding is enabled. + type: boolean + required: + - enabled + type: object + required: + - id + - name + - version + - created_at + - modified_at + - http + - worker_binding + type: object + success: + $ref: '#/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess' + required: + - success + - result + type: object + description: Indicates a successfully retrieved Stream. + 4XX: + description: Indicates an error in retrieving Stream. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Stream Details + tags: + - workers_pipelines_other + x-api-token-group: + - Pipelines Write + - Pipelines Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: pipelines + resource_chain: + - streams + method: get + patch: + description: Update a Stream. + operationId: patchV4AccountsByAccount_idPipelinesV1StreamsByStream_id + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: stream_id + schema: + $ref: '#/components/schemas/cloudflarePipelinesWorkersPipelinesStreamId' + required: true + requestBody: + content: + application/json: + schema: + properties: + http: + properties: + authentication: + description: Indicates that authentication is required for the HTTP endpoint. + type: boolean + cors: + description: Specifies the CORS options for the HTTP endpoint. + properties: + origins: + items: + type: string + maxItems: 5 + type: array + type: object + enabled: + description: Indicates that the HTTP endpoint is enabled. + type: boolean + required: + - enabled + - authentication + type: object + worker_binding: + properties: + enabled: + description: Indicates that the worker binding is enabled. + type: boolean + required: + - enabled + type: object + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + created_at: + format: date-time + type: string + readOnly: true + endpoint: + description: Indicates the endpoint URL of this stream. + format: uri + type: string + format: + $ref: '#/components/schemas/cloudflarePipelinesFormat' + http: + properties: + authentication: + description: Indicates that authentication is required for the HTTP endpoint. + type: boolean + cors: + description: Specifies the CORS options for the HTTP endpoint. + properties: + origins: + items: + type: string + maxItems: 5 + type: array + type: object + enabled: + description: Indicates that the HTTP endpoint is enabled. + type: boolean + required: + - enabled + - authentication + type: object + id: + description: Indicates a unique identifier for this stream. + type: string + modified_at: + format: date-time + type: string + readOnly: true + name: + description: Indicates the name of the Stream. + maxLength: 128 + minLength: 1 + type: string + version: + description: Indicates the current version of this stream. + type: integer + worker_binding: + properties: + enabled: + description: Indicates that the worker binding is enabled. + type: boolean + required: + - enabled + type: object + required: + - id + - name + - version + - created_at + - modified_at + - http + - worker_binding + type: object + success: + $ref: '#/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess' + required: + - success + - result + type: object + description: Indicates a successfully updated Stream. + 4XX: + description: Indicates an error in creating a Stream. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Stream + tags: + - workers_pipelines_other + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: pipelines + resource_chain: + - streams + method: update + /accounts/{account_id}/pipelines/v1/validate_sql: + post: + description: Validate Arroyo SQL. + operationId: postV4AccountsByAccount_idPipelinesV1Validate_sql + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + sql: + description: Specifies SQL to validate. + type: string + required: + - sql + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + graph: + $ref: '#/components/schemas/cloudflarePipelinesPipelineGraph' + tables: + description: Indicates tables involved in the processing. + type: object + required: + - tables + type: object + success: + $ref: '#/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess' + required: + - success + - result + type: object + description: Indicates SQL validation success. + 4XX: + description: Indicates SQL validation failed. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Validate SQL + tags: + - workers_pipelines_other + x-api-token-group: + - Pipelines Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: pipelines + resource_chain: [] + method: validate_sql + /accounts/{account_id}/pipelines/{pipeline_name}: + delete: + deprecated: true + description: '[DEPRECATED] Delete a pipeline. Use the new /pipelines/v1/pipelines endpoint instead.' + operationId: deleteV4AccountsByAccount_idPipelinesByPipeline_name_deprecated + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: pipeline_name + schema: + description: Defines the name of the pipeline. + maxLength: 128 + minLength: 1 + type: string + required: true + responses: + '200': + description: '[DEPRECATED] Indicates a successfully deleted pipeline.' + 4XX: + description: Indicates an error in deleting a pipeline. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: '[DEPRECATED] Delete Pipeline' + tags: + - workers_pipelines_other + x-api-token-group: + - Pipelines Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: pipelines + resource_chain: [] + method: delete + get: + deprecated: true + description: '[DEPRECATED] Get configuration of a pipeline. Use the new /pipelines/v1/pipelines endpoint instead.' + operationId: getV4AccountsByAccount_idPipelinesByPipeline_name_deprecated + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: pipeline_name + schema: + description: Defines the name of the pipeline. + maxLength: 128 + minLength: 1 + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + result: + $ref: '#/components/schemas/cloudflarePipelinesWorkersPipelinesPipeline' + success: + $ref: '#/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess' + required: + - success + - result + type: object + description: '[DEPRECATED] Describes the configuration of a pipeline.' + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + results: + nullable: true + type: object + x-stainless-empty-object: true + success: + $ref: '#/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess' + required: + - success + - results + - errors + type: object + description: Indicates that the pipeline was not found. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: '[DEPRECATED] Get Pipeline' + tags: + - workers_pipelines_other + x-api-token-group: + - Pipelines Write + - Pipelines Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: pipelines + resource_chain: [] + method: get + put: + deprecated: true + description: '[DEPRECATED] Update an existing pipeline. Use the new /pipelines/v1/pipelines endpoint instead.' + operationId: putV4AccountsByAccount_idPipelinesByPipeline_name_deprecated + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: pipeline_name + schema: + description: Defines the name of the pipeline. + maxLength: 128 + minLength: 1 + type: string + required: true + requestBody: + content: + application/json: + schema: + properties: + destination: + properties: + batch: + properties: + max_bytes: + default: 100000000 + description: Specifies rough maximum size of files. + maximum: 100000000 + minimum: 1000 + type: integer + max_duration_s: + default: 300 + description: Specifies duration to wait to aggregate batches files. + maximum: 300 + minimum: 0.25 + type: number + max_rows: + default: 10000000 + description: Specifies rough maximum number of rows per file. + maximum: 10000000 + minimum: 100 + type: integer + type: object + compression: + properties: + type: + default: gzip + description: Specifies the desired compression algorithm and format. + enum: + - none + - gzip + - deflate + type: string + type: object + credentials: + properties: + access_key_id: + description: Specifies the R2 Bucket Access Key Id. + type: string + endpoint: + description: Specifies the R2 Endpoint. + type: string + secret_access_key: + description: Specifies the R2 Bucket Secret Access Key. + type: string + required: + - endpoint + - access_key_id + - secret_access_key + type: object + format: + description: Specifies the format of data to deliver. + enum: + - json + type: string + path: + properties: + bucket: + description: Specifies the R2 Bucket to store files. + type: string + filename: + description: Specifies the name pattern to for individual data files. + type: string + filepath: + description: Specifies the name pattern for directory. + type: string + prefix: + description: Specifies the base directory within the bucket. + type: string + required: + - bucket + type: object + type: + description: Specifies the type of destination. + enum: + - r2 + type: string + required: + - type + - format + - batch + - compression + - path + type: object + name: + description: Defines the name of the pipeline. + maxLength: 128 + minLength: 1 + type: string + source: + items: + type: object + description: '[DEPRECATED] HTTP source configuration. Use the new streams API instead.' + properties: + authentication: + description: Specifies whether authentication is required to send to this pipeline via HTTP. + type: boolean + cors: + properties: + origins: + description: Specifies allowed origins to allow Cross Origin HTTP Requests. + items: + type: string + maxItems: 5 + type: array + type: object + format: + description: Specifies the format of source data. + enum: + - json + type: string + type: + type: string + required: + - format + - type + minItems: 1 + type: array + required: + - name + - source + - destination + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + $ref: '#/components/schemas/cloudflarePipelinesWorkersPipelinesPipeline' + success: + $ref: '#/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess' + required: + - success + - result + type: object + description: '[DEPRECATED] Indicates a successfully updated pipeline.' + 4XX: + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + results: + nullable: true + type: object + x-stainless-empty-object: true + success: + $ref: '#/components/schemas/cloudflarePipelinesWorkerPipelinesCommonSuccess' + required: + - success + - results + - errors + type: object + description: Indicates an error updating pipeline. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: '[DEPRECATED] Update Pipeline' + tags: + - workers_pipelines_other + x-api-token-group: + - Pipelines Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: pipelines + resource_chain: [] + method: update +components: + schemas: + cloudflarePipelinesConnectionSchema: + properties: + fields: + items: + $ref: '#/components/schemas/cloudflarePipelinesSourceField' + type: array + format: + $ref: '#/components/schemas/cloudflarePipelinesFormat' + inferred: + nullable: true + type: boolean + type: object + cloudflarePipelinesDecimalEncoding: + enum: + - number + - string + - bytes + type: string + cloudflarePipelinesFormat: + type: object + title: Json + properties: + decimal_encoding: + $ref: '#/components/schemas/cloudflarePipelinesDecimalEncoding' + timestamp_format: + $ref: '#/components/schemas/cloudflarePipelinesTimestampFormat' + unstructured: + type: boolean + type: + enum: + - json + type: string + compression: + $ref: '#/components/schemas/cloudflarePipelinesParquetCompression' + row_group_bytes: + format: int64 + minimum: 0 + nullable: true + type: integer + required: + - type + cloudflarePipelinesParquetCompression: + enum: + - uncompressed + - snappy + - gzip + - zstd + - lz4 + type: string + cloudflarePipelinesPipelineEdge: + properties: + dest_id: + format: int32 + minimum: 0 + type: integer + edge_type: + type: string + key_type: + type: string + src_id: + format: int32 + minimum: 0 + type: integer + value_type: + type: string + required: + - src_id + - dest_id + - key_type + - value_type + - edge_type + type: object + cloudflarePipelinesPipelineGraph: + properties: + edges: + items: + $ref: '#/components/schemas/cloudflarePipelinesPipelineEdge' + type: array + nodes: + items: + $ref: '#/components/schemas/cloudflarePipelinesPipelineNode' + type: array + required: + - nodes + - edges + type: object + cloudflarePipelinesPipelineNode: + properties: + description: + type: string + node_id: + format: int32 + minimum: 0 + type: integer + operator: + type: string + parallelism: + format: int32 + minimum: 0 + type: integer + required: + - node_id + - operator + - description + - parallelism + type: object + cloudflarePipelinesSourceField: + properties: + metadata_key: + nullable: true + type: string + name: + type: string + sql_name: + type: string + type: + enum: + - int32 + type: string + unit: + $ref: '#/components/schemas/cloudflarePipelinesTimestampUnit' + fields: + items: + $ref: '#/components/schemas/cloudflarePipelinesSourceField' + type: array + items: + $ref: '#/components/schemas/cloudflarePipelinesSourceField' + required: + - type + type: object + title: Int32 + cloudflarePipelinesTimestampFormat: + enum: + - rfc3339 + - unix_millis + type: string + cloudflarePipelinesTimestampUnit: + enum: + - second + - millisecond + - microsecond + - nanosecond + type: string + cloudflarePipelinesWorkerPipelinesCommonSuccess: + description: Indicates whether the API call was successful. + example: true + type: boolean + cloudflarePipelinesWorkersPipelinesPipeline: + deprecated: true + description: '[DEPRECATED] Describes the configuration of a pipeline. Use the new streams/sinks/pipelines API instead.' + properties: + destination: + properties: + batch: + properties: + max_bytes: + default: 100000000 + description: Specifies rough maximum size of files. + maximum: 100000000 + minimum: 1000 + type: integer + max_duration_s: + default: 300 + description: Specifies duration to wait to aggregate batches files. + maximum: 300 + minimum: 0.25 + type: number + max_rows: + default: 10000000 + description: Specifies rough maximum number of rows per file. + maximum: 10000000 + minimum: 100 + type: integer + required: + - max_rows + - max_bytes + - max_duration_s + type: object + compression: + properties: + type: + default: gzip + description: Specifies the desired compression algorithm and format. + enum: + - none + - gzip + - deflate + example: gzip + type: string + required: + - type + type: object + format: + description: Specifies the format of data to deliver. + enum: + - json + type: string + path: + example: + bucket: bucket + prefix: base + properties: + bucket: + description: Specifies the R2 Bucket to store files. + example: bucket + type: string + filename: + description: Specifies the name pattern to for individual data files. + example: ${slug}${extension} + type: string + filepath: + description: Specifies the name pattern for directory. + example: ${date}/${hour} + type: string + prefix: + description: Specifies the base directory within the bucket. + example: base + type: string + required: + - bucket + type: object + type: + description: Specifies the type of destination. + enum: + - r2 + type: string + required: + - type + - format + - batch + - compression + - path + type: object + endpoint: + description: Indicates the endpoint URL to send traffic. + example: https://123f8a8258064ed892a347f173372359.pipelines.cloudflare.com + type: string + id: + description: Specifies the pipeline identifier. + example: 123f8a8258064ed892a347f173372359 + type: string + name: + description: Defines the name of the pipeline. + example: sample_pipeline + maxLength: 128 + minLength: 1 + type: string + source: + items: + type: object + description: '[DEPRECATED] HTTP source configuration. Use the new streams API instead.' + properties: + authentication: + description: Specifies whether authentication is required to send to this pipeline via HTTP. + type: boolean + cors: + properties: + origins: + description: Specifies allowed origins to allow Cross Origin HTTP Requests. + example: + - '*' + items: + type: string + maxItems: 5 + type: array + type: object + format: + description: Specifies the format of source data. + enum: + - json + type: string + type: + type: string + required: + - format + - type + minItems: 1 + type: array + version: + description: Indicates the version number of last saved configuration. + example: 2 + type: number + required: + - name + - source + - destination + - id + - version + - endpoint + type: object + cloudflarePipelinesWorkersPipelinesPipelineId: + description: Specifies the public ID of the pipeline. + example: 043e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + minLength: 32 + type: string + cloudflarePipelinesWorkersPipelinesSinkId: + description: Specifies the publid ID of the sink. + example: 0223105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + minLength: 32 + type: string + cloudflarePipelinesWorkersPipelinesStreamId: + description: Specifies the public ID of the stream. + example: 033e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + minLength: 32 + type: string + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + accounts_pipelines: + id: cloudflare.pipelines.accounts_pipelines + name: accounts_pipelines + title: Accounts Pipelines + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pipelines/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.results + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pipelines/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .destination }}{{ $sep }}"destination": {{ if eq (kindOf .destination) "string" }}{{ .destination }}{{ else }}{{ toJson .destination }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .source }}{{ $sep }}"source": {{ if eq (kindOf .source) "string" }}{{ .source }}{{ else }}{{ toJson .source }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + get_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pipelines~1{pipeline_name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/accounts_pipelines/methods/get_by_account' + - $ref: '#/components/x-stackQL-resources/accounts_pipelines/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/accounts_pipelines/methods/create' + update: [] + delete: [] + replace: [] + v1_pipelines: + id: cloudflare.pipelines.v1_pipelines + name: v1_pipelines + title: V1 Pipelines + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pipelines~1v1~1pipelines/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create_v1: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pipelines~1v1~1pipelines/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pipelines~1v1~1pipelines~1{pipeline_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/v1_pipelines/methods/get_by_account' + - $ref: '#/components/x-stackQL-resources/v1_pipelines/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/v1_pipelines/methods/create_v1' + update: [] + delete: [] + replace: [] + pipelines: + id: cloudflare.pipelines.pipelines + name: pipelines + title: Pipelines + methods: + delete_v1: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pipelines~1v1~1pipelines~1{pipeline_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + validate_sql_v1: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pipelines~1v1~1validate_sql/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pipelines~1{pipeline_name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pipelines~1{pipeline_name}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .destination }}{{ $sep }}"destination": {{ if eq (kindOf .destination) "string" }}{{ .destination }}{{ else }}{{ toJson .destination }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .source }}{{ $sep }}"source": {{ if eq (kindOf .source) "string" }}{{ .source }}{{ else }}{{ toJson .source }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/pipelines/methods/delete_v1' + - $ref: '#/components/x-stackQL-resources/pipelines/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/pipelines/methods/update' + sinks: + id: cloudflare.pipelines.sinks + name: sinks + title: Sinks + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pipelines~1v1~1sinks/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pipelines~1v1~1sinks/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .config }}{{ $sep }}"config": {{ if eq (kindOf .config) "string" }}{{ .config }}{{ else }}{{ toJson .config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .format }}{{ $sep }}"format": {{ if eq (kindOf .format) "string" }}{{ .format }}{{ else }}{{ toJson .format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .schema }}{{ $sep }}"schema": {{ if eq (kindOf .schema) "string" }}{{ .schema }}{{ else }}{{ toJson .schema }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pipelines~1v1~1sinks~1{sink_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pipelines~1v1~1sinks~1{sink_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/sinks/methods/get' + - $ref: '#/components/x-stackQL-resources/sinks/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/sinks/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/sinks/methods/delete' + replace: [] + streams: + id: cloudflare.pipelines.streams + name: streams + title: Streams + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pipelines~1v1~1streams/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pipelines~1v1~1streams/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .format }}{{ $sep }}"format": {{ if eq (kindOf .format) "string" }}{{ .format }}{{ else }}{{ toJson .format }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .http }}{{ $sep }}"http": {{ if eq (kindOf .http) "string" }}{{ .http }}{{ else }}{{ toJson .http }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .schema }}{{ $sep }}"schema": {{ if eq (kindOf .schema) "string" }}{{ .schema }}{{ else }}{{ toJson .schema }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .worker_binding }}{{ $sep }}"worker_binding": {{ if eq (kindOf .worker_binding) "string" }}{{ .worker_binding }}{{ else }}{{ toJson .worker_binding }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pipelines~1v1~1streams~1{stream_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pipelines~1v1~1streams~1{stream_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1pipelines~1v1~1streams~1{stream_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .http }}{{ $sep }}"http": {{ if eq (kindOf .http) "string" }}{{ .http }}{{ else }}{{ toJson .http }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .worker_binding }}{{ $sep }}"worker_binding": {{ if eq (kindOf .worker_binding) "string" }}{{ .worker_binding }}{{ else }}{{ toJson .worker_binding }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/streams/methods/get' + - $ref: '#/components/x-stackQL-resources/streams/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/streams/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/streams/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/streams/methods/delete' + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/queues.yaml b/providers/src/cloudflare/v00.00.00000/services/queues.yaml index 52d11ac3..907d380c 100644 --- a/providers/src/cloudflare/v00.00.00000/services/queues.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/queues.yaml @@ -1,2615 +1,2676 @@ -openapi: 3.0.3 -info: - title: queues API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/event_subscriptions/subscriptions: - get: - description: >- - Get a paginated list of event subscriptions with optional sorting and - filtering - operationId: subscriptions-list - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Page number for pagination - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - description: Number of items per page - in: query - name: per_page - schema: - default: 20 - maximum: 100 - minimum: 1 - type: integer - - description: Field to sort by - in: query - name: order - schema: - default: name - enum: - - created_at - - name - - enabled - - source - type: string - - description: Sort direction - in: query - name: direction - schema: - default: asc - enum: - - asc - - desc - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/mqApiV4Error' - messages: - $ref: '#/components/schemas/mqApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - items: - $ref: '#/components/schemas/mqEventSubscription' - type: array - result_info: - properties: - count: - description: Number of items in current page - type: integer - page: - description: Current page number - type: integer - per_page: - description: Items per page - type: integer - total_count: - description: Total number of items - type: integer - total_pages: - description: Total number of pages - type: integer - required: - - count - - total_count - - page - - per_page - - total_pages - type: object - description: List of event subscriptions - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Event Subscriptions - tags: - - Queue - x-api-token-group: - - Queues Write - - Queues Read - - Workers Scripts Write - - Workers Scripts Read - x-stackql-sdk: - service: queues - resource_chain: - - subscriptions - method: list - post: - description: Create a new event subscription for a queue - operationId: subscriptions-create - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - destination: - $ref: '#/components/schemas/mqEventDestination' - enabled: - description: Whether the subscription is active - type: boolean - x-auditable: true - events: - description: List of event types this subscription handles - items: - type: string - minItems: 1 - type: array - x-auditable: true - name: - description: Name of the subscription - type: string - x-auditable: true - source: - $ref: '#/components/schemas/mqEventSource' - type: object - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/mqApiV4Error' - messages: - $ref: '#/components/schemas/mqApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - $ref: '#/components/schemas/mqEventSubscription' - description: Successfully created event subscription - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Failure' - description: Invalid request body or validation errors - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Failure' - description: Queue does not exist or resource not found on source - '405': - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Failure' - description: Multiple subscriptions on same resource not supported - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Event Subscription - tags: - - Queue - x-api-token-group: - - Queues Write - - Workers Scripts Write - x-stackql-sdk: - service: queues - resource_chain: - - subscriptions - method: create - /accounts/{account_id}/event_subscriptions/subscriptions/{subscription_id}: - delete: - description: Delete an existing event subscription - operationId: subscriptions-delete - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: subscription_id - in: path - required: true - description: The subscription ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/mqApiV4Error' - messages: - $ref: '#/components/schemas/mqApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - $ref: '#/components/schemas/mqEventSubscription' - description: Successfully created event subscription - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Event Subscription - tags: - - Queue - x-api-token-group: - - Queues Write - - Workers Scripts Write - x-stackql-sdk: - service: queues - resource_chain: - - subscriptions - method: delete - get: - description: Get details about an existing event subscription - operationId: subscriptions-get - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: subscription_id - in: path - required: true - description: The subscription ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/mqApiV4Error' - messages: - $ref: '#/components/schemas/mqApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - $ref: '#/components/schemas/mqEventSubscription' - description: Details about an event subscription - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Failure' - description: Event subscription does not exist - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Event Subscription - tags: - - Queue - x-api-token-group: - - Queues Write - - Workers Scripts Write - x-stackql-sdk: - service: queues - resource_chain: - - subscriptions - method: get - patch: - description: Update an existing event subscription - operationId: subscriptions-patch - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: subscription_id - in: path - required: true - description: The subscription ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - destination: - $ref: '#/components/schemas/mqEventDestination' - enabled: - description: Whether the subscription is active - type: boolean - x-auditable: true - events: - description: List of event types this subscription handles - items: - type: string - minItems: 1 - type: array - x-auditable: true - name: - description: Name of the subscription - type: string - x-auditable: true - type: object - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/mqApiV4Error' - messages: - $ref: '#/components/schemas/mqApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - $ref: '#/components/schemas/mqEventSubscription' - description: Successfully created event subscription - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Failure' - description: Invalid request body or validation errors - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Failure' - description: Queue does not exist or resource not found on source - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Event Subscription - tags: - - Queue - x-api-token-group: - - Queues Write - - Workers Scripts Write - x-stackql-sdk: - service: queues - resource_chain: - - subscriptions - method: update - /accounts/{account_id}/queues: - get: - description: Returns the queues owned by an account. - operationId: queues-list - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/mqApiV4Error' - messages: - $ref: '#/components/schemas/mqApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - items: - $ref: '#/components/schemas/mqQueue' - type: array - result_info: - properties: - count: - description: Total number of queues - type: number - page: - description: Current page within paginated list of queues - type: number - per_page: - description: Number of queues per page - type: number - total_count: - description: Total queues available without any search parameters - type: number - total_pages: - description: Total pages available without any search parameters - type: number - type: object - description: List of all Queues that belong to this account - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Queues - tags: - - Queue - x-api-token-group: - - Queues Write - - Queues Read - - Workers Scripts Write - - Workers Scripts Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.worker.queue.list - x-stackql-sdk: - service: queues - resource_chain: [] - method: list - post: - description: Create a new queue - operationId: queues-create - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - queue_name: - $ref: '#/components/schemas/mqQueueName' - required: - - queue_name - type: object - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/mqApiV4Error' - messages: - $ref: '#/components/schemas/mqApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - $ref: '#/components/schemas/mqQueue' - description: Created Queue - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Queue - tags: - - Queue - x-api-token-group: - - Queues Write - - Workers Scripts Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.worker.queue.create - x-stackql-sdk: - service: queues - resource_chain: [] - method: create - /accounts/{account_id}/queues/{queue_id}: - delete: - description: Deletes a queue - operationId: queues-delete - parameters: - - name: queue_id - in: path - required: true - description: The Cloudflare Queue ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Success' - description: Successful delete - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Queue - tags: - - Queue - x-api-token-group: - - Queues Write - - Workers Scripts Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.worker.queue.delete - x-stackql-sdk: - service: queues - resource_chain: [] - method: delete - get: - description: Get details about a specific queue. - operationId: queues-get - parameters: - - name: queue_id - in: path - required: true - description: The Cloudflare Queue ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/mqApiV4Error' - messages: - $ref: '#/components/schemas/mqApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - $ref: '#/components/schemas/mqQueue' - description: Details of the requested Queue - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Queue - tags: - - Queue - x-api-token-group: - - Queues Write - - Queues Read - - Workers Scripts Write - - Workers Scripts Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.worker.queue.read - x-stackql-sdk: - service: queues - resource_chain: [] - method: get - patch: - description: Updates a Queue. - operationId: queues-update-partial - parameters: - - name: queue_id - in: path - required: true - description: The Cloudflare Queue ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/mqQueue' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/mqApiV4Error' - messages: - $ref: '#/components/schemas/mqApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - type: object - $ref: '#/components/schemas/mqQueue' - description: Updated Queue - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Queue - tags: - - Queue - x-api-token-group: - - Queues Write - - Workers Scripts Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.worker.queue.update - x-stackql-sdk: - service: queues - resource_chain: [] - method: edit - put: - description: >- - Updates a Queue. Note that this endpoint does not support partial - updates. If successful, the Queue's configuration is overwritten with - the supplied configuration. - operationId: queues-update - parameters: - - name: queue_id - in: path - required: true - description: The Cloudflare Queue ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/mqQueue' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/mqApiV4Error' - messages: - $ref: '#/components/schemas/mqApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - type: object - $ref: '#/components/schemas/mqQueue' - description: Updated Queue - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Queue - tags: - - Queue - x-api-token-group: - - Queues Write - - Workers Scripts Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.worker.queue.update - x-stackql-sdk: - service: queues - resource_chain: [] - method: update - /accounts/{account_id}/queues/{queue_id}/consumers: - get: - description: Returns the consumers for a Queue - operationId: queues-list-consumers - parameters: - - name: queue_id - in: path - required: true - description: The Cloudflare Queue ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/mqApiV4Error' - messages: - $ref: '#/components/schemas/mqApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - items: - $ref: '#/components/schemas/mqConsumerResponse' - type: array - description: All consumers attached to this Queue - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Queue Consumers - tags: - - Queue - x-api-token-group: - - Queues Write - - Queues Read - - Workers Scripts Write - - Workers Scripts Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.worker.queue.list - x-stackql-sdk: - service: queues - resource_chain: - - consumers - method: list - post: - description: Creates a new consumer for a Queue - operationId: queues-create-consumer - parameters: - - name: queue_id - in: path - required: true - description: The Cloudflare Queue ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/mqConsumerRequest' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/mqApiV4Error' - messages: - $ref: '#/components/schemas/mqApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - $ref: '#/components/schemas/mqConsumerResponse' - description: Create Queue Consumer response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a Queue Consumer - tags: - - Queue - x-api-token-group: - - Queues Write - - Workers Scripts Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.worker.queue.create - x-stackql-sdk: - service: queues - resource_chain: - - consumers - method: create - /accounts/{account_id}/queues/{queue_id}/consumers/{consumer_id}: - delete: - description: Deletes the consumer for a queue. - operationId: queues-delete-consumer - parameters: - - in: path - name: consumer_id - schema: - $ref: '#/components/schemas/mqIdentifier' - required: true - - name: queue_id - in: path - required: true - description: The Cloudflare Queue ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Success' - description: Successful consumer delete - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Queue Consumer - tags: - - Queue - x-api-token-group: - - Queues Write - - Workers Scripts Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.worker.queue.delete - x-stackql-sdk: - service: queues - resource_chain: - - consumers - method: delete - get: - description: Fetches the consumer for a queue by consumer id - operationId: queues-get-consumer - parameters: - - in: path - name: consumer_id - schema: - $ref: '#/components/schemas/mqIdentifier' - required: true - - name: queue_id - in: path - required: true - description: The Cloudflare Queue ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/mqApiV4Error' - messages: - $ref: '#/components/schemas/mqApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - $ref: '#/components/schemas/mqConsumerResponse' - description: Get Queue Consumer response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Failure' - description: Get Queue Consumer response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Queue Consumer - tags: - - Queue - x-api-token-group: - - Queues Write - - Queues Read - - Workers Scripts Write - - Workers Scripts Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.worker.queue.read - x-stackql-sdk: - service: queues - resource_chain: - - consumers - method: get - put: - description: Updates the consumer for a queue, or creates one if it does not exist. - operationId: queues-update-consumer - parameters: - - in: path - name: consumer_id - schema: - $ref: '#/components/schemas/mqIdentifier' - required: true - - name: queue_id - in: path - required: true - description: The Cloudflare Queue ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/mqConsumerRequest' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/mqApiV4Error' - messages: - $ref: '#/components/schemas/mqApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - $ref: '#/components/schemas/mqConsumerResponse' - description: Update Queue Consumer response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Failure' - description: Update Queue Consumer response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Queue Consumer - tags: - - Queue - x-api-token-group: - - Queues Write - - Workers Scripts Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.worker.queue.update - x-stackql-sdk: - service: queues - resource_chain: - - consumers - method: update - /accounts/{account_id}/queues/{queue_id}/messages: - post: - description: Push a message to a Queue - operationId: queues-push-message - parameters: - - name: queue_id - in: path - required: true - description: The Cloudflare Queue ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/mqQueueMessage' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/mqApiV4Error' - messages: - $ref: '#/components/schemas/mqApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - properties: - metadata: - properties: - metrics: - $ref: '#/components/schemas/mqQueueMetrics' - type: object - type: object - description: Successful message ingestion. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Push Message - tags: - - Queue - x-api-token-group: - - Queues Write - - Workers Scripts Write - x-auditable: false - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.worker.queue.update - x-stackql-sdk: - service: queues - resource_chain: - - messages - method: push - /accounts/{account_id}/queues/{queue_id}/messages/ack: - post: - description: Acknowledge + Retry messages from a Queue - operationId: queues-ack-messages - parameters: - - name: queue_id - in: path - required: true - description: The Cloudflare Queue ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - acks: - items: - properties: - lease_id: - $ref: '#/components/schemas/mqLeaseId' - type: object - type: array - retries: - items: - properties: - delay_seconds: - $ref: '#/components/schemas/mqRetryDelay' - lease_id: - $ref: '#/components/schemas/mqLeaseId' - type: object - type: array - type: object - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/mqApiV4Error' - messages: - $ref: '#/components/schemas/mqApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - properties: - ackCount: - description: >- - The number of messages that were succesfully - acknowledged. - type: number - retryCount: - description: The number of messages that were succesfully retried. - type: number - warnings: - description: >- - Map of lease IDs to warning messages encountered - during acknowledgement. - type: object - type: object - description: Details of ACKs and retries - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Acknowledge + Retry Queue Messages - tags: - - Queue - x-api-token-group: - - Queues Write - - Workers Scripts Write - x-auditable: false - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.worker.queue.update - x-stackql-sdk: - service: queues - resource_chain: - - messages - method: ack - /accounts/{account_id}/queues/{queue_id}/messages/batch: - post: - description: Push a batch of message to a Queue - operationId: queues-push-messages - parameters: - - name: queue_id - in: path - required: true - description: The Cloudflare Queue ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/mqQueueBatch' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/mqApiV4Error' - messages: - $ref: '#/components/schemas/mqApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - properties: - metadata: - properties: - metrics: - $ref: '#/components/schemas/mqQueueMetrics' - type: object - type: object - description: Successful batch ingestion. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Push Message Batch - tags: - - Queue - x-api-token-group: - - Queues Write - - Workers Scripts Write - x-auditable: false - x-stackql-sdk: - service: queues - resource_chain: - - messages - method: bulk_push - /accounts/{account_id}/queues/{queue_id}/messages/preview: - post: - description: >- - Preview messages from a Queue without leasing them. Messages remain - available for subsequent preview or pull operations. - operationId: queues-preview-messages - parameters: - - name: queue_id - in: path - required: true - description: The Cloudflare Queue ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - batch_size: - $ref: '#/components/schemas/mqBatchSize' - type: object - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/mqApiV4Error' - messages: - $ref: '#/components/schemas/mqApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - properties: - messages: - $ref: '#/components/schemas/mqQueuePullBatch' - type: object - description: A batch of previewed messages from the Queue - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Preview Queue Messages - tags: - - Queue - x-api-token-group: - - Queues Write - - Queues Read - - Workers Scripts Write - - Workers Scripts Read - x-auditable: false - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.worker.queue.update - /accounts/{account_id}/queues/{queue_id}/messages/preview/ack: - post: - description: >- - Delete previewed messages from a Queue. Note that messages acknowledged - this way aren't considered delivered, they are instantly deleted from - this queue and do not affect metrics. - operationId: queues-ack-preview-messages - parameters: - - name: queue_id - in: path - required: true - description: The Cloudflare Queue ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - acks: - items: - properties: - lease_id: - $ref: '#/components/schemas/mqLeaseId' - type: object - type: array - retries: - items: - properties: - delay_seconds: - $ref: '#/components/schemas/mqRetryDelay' - lease_id: - $ref: '#/components/schemas/mqLeaseId' - type: object - type: array - type: object - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/mqApiV4Error' - messages: - $ref: '#/components/schemas/mqApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - properties: - warnings: - description: >- - Map of lease IDs to warning messages encountered - during acknowledgement. - type: object - type: object - description: Result of acknowledging previewed messages - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Previewed Queue Messages - tags: - - Queue - x-api-token-group: - - Queues Write - - Workers Scripts Write - x-auditable: false - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.worker.queue.update - /accounts/{account_id}/queues/{queue_id}/messages/pull: - post: - description: Pull a batch of messages from a Queue - operationId: queues-pull-messages - parameters: - - name: queue_id - in: path - required: true - description: The Cloudflare Queue ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - batch_size: - $ref: '#/components/schemas/mqBatchSize' - visibility_timeout_ms: - $ref: '#/components/schemas/mqVisibilityTimeout' - type: object - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/mqApiV4Error' - messages: - $ref: '#/components/schemas/mqApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - properties: - message_backlog_count: - description: The number of unacknowledged messages in the queue. - type: number - messages: - $ref: '#/components/schemas/mqQueuePullBatch' - metadata: - properties: - metrics: - $ref: '#/components/schemas/mqQueueMetrics' - type: object - type: object - description: A batch of messages in the Queue - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Pull Queue Messages - tags: - - Queue - x-api-token-group: - - Queues Write - - Workers Scripts Write - x-auditable: false - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.worker.queue.update - x-stackql-sdk: - service: queues - resource_chain: - - messages - method: pull - /accounts/{account_id}/queues/{queue_id}/metrics: - get: - description: >- - Return best-effort metrics for a queue. Values may be approximate due to - the distributed nature of queues. - operationId: queues-get-metrics - parameters: - - name: queue_id - in: path - required: true - description: The Cloudflare Queue ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/mqApiV4Error' - messages: - $ref: '#/components/schemas/mqApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - $ref: '#/components/schemas/mqQueueMetrics' - text/event-stream: - schema: - $ref: '#/components/schemas/mqQueueMetrics' - description: Queue metrics. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Failure' - description: Failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Queue Metrics - tags: - - Queue - x-api-token-group: - - Queues Write - - Queues Read - - Workers Scripts Write - - Workers Scripts Read - x-stackql-sdk: - service: queues - resource_chain: [] - method: get_metrics - /accounts/{account_id}/queues/{queue_id}/purge: - get: - description: Get details about a Queue's purge status. - operationId: queues-purge-get - parameters: - - name: queue_id - in: path - required: true - description: The Cloudflare Queue ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/mqApiV4Error' - messages: - $ref: '#/components/schemas/mqApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - properties: - completed: - description: >- - Indicates if the last purge operation completed - successfully. - readOnly: true - type: string - x-auditable: true - started_at: - description: Timestamp when the last purge operation started. - readOnly: true - type: string - x-auditable: true - type: object - description: Details of the requested Queue - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Queue Purge Status - tags: - - Queue - x-api-token-group: - - Queues Write - - Queues Read - - Workers Scripts Write - - Workers Scripts Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.worker.queue.read - x-stackql-sdk: - service: queues - resource_chain: - - purge - method: status - post: - description: Deletes all messages from the Queue. - operationId: queues-purge - parameters: - - name: queue_id - in: path - required: true - description: The Cloudflare Queue ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - delete_messages_permanently: - description: Confimation that all messages will be deleted permanently. - type: boolean - x-auditable: true - type: object - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/mqApiV4Error' - messages: - $ref: '#/components/schemas/mqApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - type: object - $ref: '#/components/schemas/mqQueue' - description: Updated Queue - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/mqApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Purge Queue - tags: - - Queue - x-api-token-group: - - Queues Write - - Workers Scripts Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.worker.queue.update - x-stackql-sdk: - service: queues - resource_chain: - - purge - method: start -components: - schemas: - mqApiV4Error: - example: - - code: 7003 - message: No route for the URI - items: - $ref: '#/components/schemas/responseInfo' - minLength: 1 - type: array - mqApiV4Failure: - properties: - errors: - $ref: '#/components/schemas/mqApiV4Error' - messages: - $ref: '#/components/schemas/mqApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - false - example: false - type: boolean - x-auditable: true - type: object - mqApiV4Message: - example: [] - items: - type: string - x-auditable: true - type: array - mqApiV4Success: - properties: - errors: - $ref: '#/components/schemas/mqApiV4Error' - messages: - $ref: '#/components/schemas/mqApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - type: object - mqBatchSize: - description: The maximum number of messages to include in a batch. - example: 50 - type: number - x-auditable: true - mqConsumerRequest: - description: Request body for creating or updating a consumer - type: object - properties: - dead_letter_queue: - $ref: '#/components/schemas/mqQueueName' - script_name: - $ref: '#/components/schemas/mqScriptName' - settings: - properties: - batch_size: - $ref: '#/components/schemas/mqBatchSize' - max_concurrency: - $ref: '#/components/schemas/mqMaxConcurrency' - max_retries: - $ref: '#/components/schemas/mqMaxRetries' - max_wait_time_ms: - $ref: '#/components/schemas/mqMaxWaitTime' - retry_delay: - $ref: '#/components/schemas/mqRetryDelay' - type: object - type: - enum: - - worker - type: string - x-auditable: true - required: - - type - mqConsumerResponse: - description: Response body representing a consumer - type: object - properties: - consumer_id: - $ref: '#/components/schemas/mqIdentifier' - created_on: - format: date-time - type: string - x-auditable: true - readOnly: true - dead_letter_queue: - description: Name of the dead letter queue, or empty string if not configured - type: string - x-auditable: true - queue_name: - $ref: '#/components/schemas/mqQueueName' - script_name: - $ref: '#/components/schemas/mqScriptName' - settings: - properties: - batch_size: - $ref: '#/components/schemas/mqBatchSize' - max_concurrency: - $ref: '#/components/schemas/mqMaxConcurrency' - max_retries: - $ref: '#/components/schemas/mqMaxRetries' - max_wait_time_ms: - $ref: '#/components/schemas/mqMaxWaitTime' - retry_delay: - $ref: '#/components/schemas/mqRetryDelay' - type: object - type: - enum: - - worker - type: string - x-auditable: true - mqEventDestination: - description: Destination configuration for the subscription - type: object - $ref: '#/components/schemas/mqEventDestinationQueue' - mqEventDestinationQueue: - properties: - queue_id: - description: ID of the target queue - type: string - x-auditable: true - type: - description: Type of destination - enum: - - queues.queue - type: string - x-auditable: true - required: - - type - - queue_id - type: object - mqEventSource: - description: Source configuration for the subscription - type: object - properties: - type: - description: Type of source - enum: - - images - type: string - x-auditable: true - model_name: - description: Name of the Workers AI model - type: string - x-auditable: true - x-stainless-naming: - python: - property_name: ai_model_name - worker_name: - description: Name of the worker - type: string - x-auditable: true - workflow_name: - description: Name of the workflow - type: string - x-auditable: true - mqEventSubscription: - properties: - created_at: - description: When the subscription was created - format: date-time - type: string - x-auditable: true - readOnly: true - destination: - $ref: '#/components/schemas/mqEventDestination' - enabled: - description: Whether the subscription is active - type: boolean - x-auditable: true - events: - description: List of event types this subscription handles - items: - type: string - minItems: 1 - type: array - x-auditable: true - id: - description: Unique identifier for the subscription - type: string - x-auditable: true - modified_at: - description: When the subscription was last modified - format: date-time - type: string - x-auditable: true - readOnly: true - name: - description: Name of the subscription - type: string - x-auditable: true - source: - $ref: '#/components/schemas/mqEventSource' - required: - - id - - created_at - - modified_at - - name - - enabled - - source - - destination - - events - type: object - mqIdentifier: - description: A Resource identifier. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - readOnly: true - type: string - x-auditable: true - mqLeaseId: - description: >- - An ID that represents an "in-flight" message that has been pulled from a - Queue. You must hold on to this ID and use it to acknowledge this - message. - example: >- - eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0..Q8p21d7dceR6vUfwftONdQ.JVqZgAS-Zk7MqmqccYtTHeeMElNHaOMigeWdb8LyMOg.T2_HV99CYzGaQuhTyW8RsgbnpTRZHRM6N7UoSaAKeK0 - type: string - x-auditable: true - mqMaxConcurrency: - description: >- - Maximum number of concurrent consumers that may consume from this Queue. - Set to `null` to automatically opt in to the platform's maximum - (recommended). - example: 10 - type: number - x-auditable: true - mqMaxRetries: - description: The maximum number of retries - example: 3 - type: number - x-auditable: true - mqMaxWaitTime: - description: >- - The number of milliseconds to wait for a batch to fill up before - attempting to deliver it - example: 5000 - type: number - x-auditable: true - mqProducer: - type: object - properties: - script: - type: string - x-auditable: true - type: - enum: - - worker - type: string - x-auditable: true - bucket_name: - type: string - x-auditable: true - mqQueue: - properties: - consumers: - items: - $ref: '#/components/schemas/mqConsumerResponse' - readOnly: true - type: array - consumers_total_count: - readOnly: true - type: number - created_on: - readOnly: true - type: string - x-auditable: true - modified_on: - readOnly: true - type: string - x-auditable: true - producers: - items: - $ref: '#/components/schemas/mqProducer' - readOnly: true - type: array - producers_total_count: - readOnly: true - type: number - x-auditable: true - queue_id: - readOnly: true - type: string - x-auditable: true - queue_name: - $ref: '#/components/schemas/mqQueueName' - settings: - $ref: '#/components/schemas/mqQueueSettings' - type: object - mqQueueBatch: - properties: - delay_seconds: - description: >- - The number of seconds to wait for attempting to deliver this batch - to consumers - type: number - x-auditable: true - messages: - items: - $ref: '#/components/schemas/mqQueueMessage' - type: array - type: object - mqQueueMessage: - properties: - delay_seconds: - description: >- - The number of seconds to wait for attempting to deliver this message - to consumers - type: number - x-auditable: true - body: - type: string - content_type: - enum: - - text - type: string - x-auditable: true - type: object - mqQueueMetrics: - description: >- - Best-effort metrics for the queue. Values may be approximate due to the - distributed nature of queues. - properties: - backlog_bytes: - description: The size in bytes of unacknowledged messages in the queue. - example: 1024 - type: number - x-auditable: true - backlog_count: - description: The number of unacknowledged messages in the queue. - example: 5 - type: number - x-auditable: true - oldest_message_timestamp_ms: - description: >- - Unix timestamp in milliseconds of the oldest unacknowledged message - in the queue. Returns 0 if unknown. - example: 1710950954154 - type: number - x-auditable: true - required: - - backlog_count - - backlog_bytes - - oldest_message_timestamp_ms - type: object - mqQueueName: - example: example-queue - type: string - x-auditable: true - mqQueuePullBatch: - items: - properties: - attempts: - example: 1 - readOnly: true - type: number - x-auditable: true - body: - example: hello world - readOnly: true - type: string - id: - example: b01b5594f784d0165c2985833f5660dd - readOnly: true - type: string - x-auditable: true - lease_id: - $ref: '#/components/schemas/mqLeaseId' - metadata: - example: - CF-Content-Type: text - CF-sourceMessageSource: dash - readOnly: true - type: object - timestamp_ms: - example: 1710950954154 - readOnly: true - type: number - x-auditable: true - type: object - type: array - mqQueueSettings: - properties: - delivery_delay: - description: Number of seconds to delay delivery of all messages to consumers. - example: 5 - type: number - x-auditable: true - delivery_paused: - description: Indicates if message delivery to consumers is currently paused. - example: true - type: boolean - x-auditable: true - message_retention_period: - description: Number of seconds after which an unconsumed message will be delayed. - example: 345600 - type: number - x-auditable: true - type: object - mqRetryDelay: - description: >- - The number of seconds to delay before making the message available for - another attempt. - example: 10 - type: number - x-auditable: true - mqScriptName: - description: Name of a Worker - example: my-consumer-worker - type: string - x-auditable: true - mqVisibilityTimeout: - description: >- - The number of milliseconds that a message is exclusively leased. After - the timeout, the message becomes available for another attempt. - example: 6000 - type: number - x-auditable: true - responseInfo: - properties: - code: - minimum: 1000 - type: integer - message: - type: string - documentation_url: - type: string - source: - type: object - properties: - pointer: - type: string - required: - - code - - message - type: object - uniqueItems: true - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - subscriptions: - id: cloudflare.queues.subscriptions - name: subscriptions - title: Subscriptions - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1event_subscriptions~1subscriptions/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1event_subscriptions~1subscriptions/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1event_subscriptions~1subscriptions~1{subscription_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1event_subscriptions~1subscriptions~1{subscription_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1event_subscriptions~1subscriptions~1{subscription_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/subscriptions/methods/get' - - $ref: '#/components/x-stackQL-resources/subscriptions/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/subscriptions/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/subscriptions/methods/update' - delete: - - $ref: '#/components/x-stackQL-resources/subscriptions/methods/delete' - replace: [] - queues: - id: cloudflare.queues.queues - name: queues - title: Queues - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1queues/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1queues/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1queues~1{queue_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1queues~1{queue_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1queues~1{queue_id}/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1queues~1{queue_id}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - create_messages: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1messages/post - response: - mediaType: application/json - openAPIDocKey: '200' - batch: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1messages~1batch/post - response: - mediaType: application/json - openAPIDocKey: '200' - preview: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1messages~1preview/post - response: - mediaType: application/json - openAPIDocKey: '200' - pull: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1messages~1pull/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/queues/methods/get' - - $ref: '#/components/x-stackQL-resources/queues/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/queues/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/queues/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/queues/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/queues/methods/update' - consumers: - id: cloudflare.queues.consumers - name: consumers - title: Consumers - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1consumers/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1consumers/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1consumers~1{consumer_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1consumers~1{consumer_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1consumers~1{consumer_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/consumers/methods/get' - - $ref: '#/components/x-stackQL-resources/consumers/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/consumers/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/consumers/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/consumers/methods/update' - messages_ack: - id: cloudflare.queues.messages_ack - name: messages_ack - title: Messages Ack - methods: - ack: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1messages~1ack/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] - preview_ack: - id: cloudflare.queues.preview_ack - name: preview_ack - title: Preview Ack - methods: - ack: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1messages~1preview~1ack/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] - metrics: - id: cloudflare.queues.metrics - name: metrics - title: Metrics - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1metrics/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/metrics/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - purge: - id: cloudflare.queues.purge - name: purge - title: Purge - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1purge/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - start: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1purge/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/purge/methods/list' - insert: [] - update: [] - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: queues API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/event_subscriptions/subscriptions: + get: + description: Get a paginated list of event subscriptions with optional sorting and filtering + operationId: subscriptions-list + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Page number for pagination + in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - description: Number of items per page + in: query + name: per_page + schema: + default: 20 + maximum: 100 + minimum: 1 + type: integer + - description: Field to sort by + in: query + name: order + schema: + default: name + enum: + - created_at + - name + - enabled + - source + type: string + - description: Sort direction + in: query + name: direction + schema: + default: asc + enum: + - asc + - desc + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/mqApiV4Error' + messages: + $ref: '#/components/schemas/mqApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + items: + $ref: '#/components/schemas/mqEventSubscription' + type: array + result_info: + properties: + count: + description: Number of items in current page + type: integer + page: + description: Current page number + type: integer + per_page: + description: Items per page + type: integer + total_count: + description: Total number of items + type: integer + total_pages: + description: Total number of pages + type: integer + required: + - count + - total_count + - page + - per_page + - total_pages + type: object + description: List of event subscriptions + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Event Subscriptions + tags: + - Queue + x-api-token-group: + - Queues Write + - Queues Read + - Workers Scripts Write + - Workers Scripts Read + x-stackql-sdk: + service: queues + resource_chain: + - subscriptions + method: list + post: + description: Create a new event subscription for a queue + operationId: subscriptions-create + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + destination: + $ref: '#/components/schemas/mqEventDestination' + enabled: + description: Whether the subscription is active + type: boolean + x-auditable: true + events: + description: List of event types this subscription handles + items: + type: string + minItems: 1 + type: array + x-auditable: true + name: + description: Name of the subscription + type: string + x-auditable: true + source: + $ref: '#/components/schemas/mqEventSource' + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/mqApiV4Error' + messages: + $ref: '#/components/schemas/mqApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + $ref: '#/components/schemas/mqEventSubscription' + description: Successfully created event subscription + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Failure' + description: Invalid request body or validation errors + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Failure' + description: Queue does not exist or resource not found on source + '405': + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Failure' + description: Multiple subscriptions on same resource not supported + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Event Subscription + tags: + - Queue + x-api-token-group: + - Queues Write + - Workers Scripts Write + x-stackql-sdk: + service: queues + resource_chain: + - subscriptions + method: create + /accounts/{account_id}/event_subscriptions/subscriptions/{subscription_id}: + delete: + description: Delete an existing event subscription + operationId: subscriptions-delete + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: subscription_id + in: path + required: true + description: The subscription ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/mqApiV4Error' + messages: + $ref: '#/components/schemas/mqApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + $ref: '#/components/schemas/mqEventSubscription' + description: Successfully created event subscription + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Event Subscription + tags: + - Queue + x-api-token-group: + - Queues Write + - Workers Scripts Write + x-stackql-sdk: + service: queues + resource_chain: + - subscriptions + method: delete + get: + description: Get details about an existing event subscription + operationId: subscriptions-get + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: subscription_id + in: path + required: true + description: The subscription ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/mqApiV4Error' + messages: + $ref: '#/components/schemas/mqApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + $ref: '#/components/schemas/mqEventSubscription' + description: Details about an event subscription + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Failure' + description: Event subscription does not exist + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Event Subscription + tags: + - Queue + x-api-token-group: + - Queues Write + - Workers Scripts Write + x-stackql-sdk: + service: queues + resource_chain: + - subscriptions + method: get + patch: + description: Update an existing event subscription + operationId: subscriptions-patch + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: subscription_id + in: path + required: true + description: The subscription ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + destination: + $ref: '#/components/schemas/mqEventDestination' + enabled: + description: Whether the subscription is active + type: boolean + x-auditable: true + events: + description: List of event types this subscription handles + items: + type: string + minItems: 1 + type: array + x-auditable: true + name: + description: Name of the subscription + type: string + x-auditable: true + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/mqApiV4Error' + messages: + $ref: '#/components/schemas/mqApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + $ref: '#/components/schemas/mqEventSubscription' + description: Successfully created event subscription + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Failure' + description: Invalid request body or validation errors + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Failure' + description: Queue does not exist or resource not found on source + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Event Subscription + tags: + - Queue + x-api-token-group: + - Queues Write + - Workers Scripts Write + x-stackql-sdk: + service: queues + resource_chain: + - subscriptions + method: update + /accounts/{account_id}/queues: + get: + description: Returns the queues owned by an account. + operationId: queues-list + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/mqApiV4Error' + messages: + $ref: '#/components/schemas/mqApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + items: + $ref: '#/components/schemas/mqQueue' + type: array + result_info: + properties: + count: + description: Total number of queues + type: number + page: + description: Current page within paginated list of queues + type: number + per_page: + description: Number of queues per page + type: number + total_count: + description: Total queues available without any search parameters + type: number + total_pages: + description: Total pages available without any search parameters + type: number + type: object + description: List of all Queues that belong to this account + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Queues + tags: + - Queue + x-api-token-group: + - Queues Write + - Queues Read + - Workers Scripts Write + - Workers Scripts Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.worker.queue.list + x-stackql-sdk: + service: queues + resource_chain: [] + method: list + post: + description: Create a new queue + operationId: queues-create + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + queue_name: + $ref: '#/components/schemas/mqQueueName' + required: + - queue_name + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/mqApiV4Error' + messages: + $ref: '#/components/schemas/mqApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + $ref: '#/components/schemas/mqQueue' + description: Created Queue + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Queue + tags: + - Queue + x-api-token-group: + - Queues Write + - Workers Scripts Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.worker.queue.create + x-stackql-sdk: + service: queues + resource_chain: [] + method: create + /accounts/{account_id}/queues/{queue_id}: + delete: + description: Deletes a queue + operationId: queues-delete + parameters: + - name: queue_id + in: path + required: true + description: The Cloudflare Queue ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Success' + description: Successful delete + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Queue + tags: + - Queue + x-api-token-group: + - Queues Write + - Workers Scripts Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.worker.queue.delete + x-stackql-sdk: + service: queues + resource_chain: [] + method: delete + get: + description: Get details about a specific queue. + operationId: queues-get + parameters: + - name: queue_id + in: path + required: true + description: The Cloudflare Queue ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/mqApiV4Error' + messages: + $ref: '#/components/schemas/mqApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + $ref: '#/components/schemas/mqQueue' + description: Details of the requested Queue + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Queue + tags: + - Queue + x-api-token-group: + - Queues Write + - Queues Read + - Workers Scripts Write + - Workers Scripts Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.worker.queue.read + x-stackql-sdk: + service: queues + resource_chain: [] + method: get + patch: + description: Updates a Queue. + operationId: queues-update-partial + parameters: + - name: queue_id + in: path + required: true + description: The Cloudflare Queue ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/mqQueue' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/mqApiV4Error' + messages: + $ref: '#/components/schemas/mqApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + type: object + $ref: '#/components/schemas/mqQueue' + description: Updated Queue + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Queue + tags: + - Queue + x-api-token-group: + - Queues Write + - Workers Scripts Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.worker.queue.update + x-stackql-sdk: + service: queues + resource_chain: [] + method: edit + put: + description: Updates a Queue. Note that this endpoint does not support partial updates. If successful, the Queue's configuration is overwritten with the supplied configuration. + operationId: queues-update + parameters: + - name: queue_id + in: path + required: true + description: The Cloudflare Queue ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/mqQueue' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/mqApiV4Error' + messages: + $ref: '#/components/schemas/mqApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + type: object + $ref: '#/components/schemas/mqQueue' + description: Updated Queue + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Queue + tags: + - Queue + x-api-token-group: + - Queues Write + - Workers Scripts Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.worker.queue.update + x-stackql-sdk: + service: queues + resource_chain: [] + method: update + /accounts/{account_id}/queues/{queue_id}/consumers: + get: + description: Returns the consumers for a Queue + operationId: queues-list-consumers + parameters: + - name: queue_id + in: path + required: true + description: The Cloudflare Queue ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/mqApiV4Error' + messages: + $ref: '#/components/schemas/mqApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + items: + $ref: '#/components/schemas/mqConsumerResponse' + type: array + description: All consumers attached to this Queue + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Queue Consumers + tags: + - Queue + x-api-token-group: + - Queues Write + - Queues Read + - Workers Scripts Write + - Workers Scripts Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.worker.queue.list + x-stackql-sdk: + service: queues + resource_chain: + - consumers + method: list + post: + description: Creates a new consumer for a Queue + operationId: queues-create-consumer + parameters: + - name: queue_id + in: path + required: true + description: The Cloudflare Queue ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/mqConsumerRequest' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/mqApiV4Error' + messages: + $ref: '#/components/schemas/mqApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + $ref: '#/components/schemas/mqConsumerResponse' + description: Create Queue Consumer response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a Queue Consumer + tags: + - Queue + x-api-token-group: + - Queues Write + - Workers Scripts Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.worker.queue.create + x-stackql-sdk: + service: queues + resource_chain: + - consumers + method: create + /accounts/{account_id}/queues/{queue_id}/consumers/{consumer_id}: + delete: + description: Deletes the consumer for a queue. + operationId: queues-delete-consumer + parameters: + - in: path + name: consumer_id + schema: + $ref: '#/components/schemas/mqIdentifier' + required: true + - name: queue_id + in: path + required: true + description: The Cloudflare Queue ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Success' + description: Successful consumer delete + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Queue Consumer + tags: + - Queue + x-api-token-group: + - Queues Write + - Workers Scripts Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.worker.queue.delete + x-stackql-sdk: + service: queues + resource_chain: + - consumers + method: delete + get: + description: Fetches the consumer for a queue by consumer id + operationId: queues-get-consumer + parameters: + - in: path + name: consumer_id + schema: + $ref: '#/components/schemas/mqIdentifier' + required: true + - name: queue_id + in: path + required: true + description: The Cloudflare Queue ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/mqApiV4Error' + messages: + $ref: '#/components/schemas/mqApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + $ref: '#/components/schemas/mqConsumerResponse' + description: Get Queue Consumer response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Failure' + description: Get Queue Consumer response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Queue Consumer + tags: + - Queue + x-api-token-group: + - Queues Write + - Queues Read + - Workers Scripts Write + - Workers Scripts Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.worker.queue.read + x-stackql-sdk: + service: queues + resource_chain: + - consumers + method: get + put: + description: Updates the consumer for a queue, or creates one if it does not exist. + operationId: queues-update-consumer + parameters: + - in: path + name: consumer_id + schema: + $ref: '#/components/schemas/mqIdentifier' + required: true + - name: queue_id + in: path + required: true + description: The Cloudflare Queue ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/mqConsumerRequest' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/mqApiV4Error' + messages: + $ref: '#/components/schemas/mqApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + $ref: '#/components/schemas/mqConsumerResponse' + description: Update Queue Consumer response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Failure' + description: Update Queue Consumer response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Queue Consumer + tags: + - Queue + x-api-token-group: + - Queues Write + - Workers Scripts Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.worker.queue.update + x-stackql-sdk: + service: queues + resource_chain: + - consumers + method: update + /accounts/{account_id}/queues/{queue_id}/messages: + post: + description: Push a message to a Queue + operationId: queues-push-message + parameters: + - name: queue_id + in: path + required: true + description: The Cloudflare Queue ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/mqQueueMessage' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/mqApiV4Error' + messages: + $ref: '#/components/schemas/mqApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + properties: + metadata: + properties: + metrics: + $ref: '#/components/schemas/mqQueueMetrics' + type: object + type: object + description: Successful message ingestion. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Push Message + tags: + - Queue + x-api-token-group: + - Queues Write + - Workers Scripts Write + x-auditable: false + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.worker.queue.update + x-stackql-sdk: + service: queues + resource_chain: + - messages + method: push + /accounts/{account_id}/queues/{queue_id}/messages/ack: + post: + description: Acknowledge + Retry messages from a Queue + operationId: queues-ack-messages + parameters: + - name: queue_id + in: path + required: true + description: The Cloudflare Queue ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + acks: + items: + properties: + lease_id: + $ref: '#/components/schemas/mqLeaseId' + type: object + type: array + retries: + items: + properties: + delay_seconds: + $ref: '#/components/schemas/mqRetryDelay' + lease_id: + $ref: '#/components/schemas/mqLeaseId' + type: object + type: array + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/mqApiV4Error' + messages: + $ref: '#/components/schemas/mqApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + properties: + ackCount: + description: The number of messages that were succesfully acknowledged. + type: number + retryCount: + description: The number of messages that were succesfully retried. + type: number + warnings: + description: Map of lease IDs to warning messages encountered during acknowledgement. + type: object + type: object + description: Details of ACKs and retries + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Acknowledge + Retry Queue Messages + tags: + - Queue + x-api-token-group: + - Queues Write + - Workers Scripts Write + x-auditable: false + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.worker.queue.update + x-stackql-sdk: + service: queues + resource_chain: + - messages + method: ack + /accounts/{account_id}/queues/{queue_id}/messages/batch: + post: + description: Push a batch of message to a Queue + operationId: queues-push-messages + parameters: + - name: queue_id + in: path + required: true + description: The Cloudflare Queue ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/mqQueueBatch' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/mqApiV4Error' + messages: + $ref: '#/components/schemas/mqApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + properties: + metadata: + properties: + metrics: + $ref: '#/components/schemas/mqQueueMetrics' + type: object + type: object + description: Successful batch ingestion. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Push Message Batch + tags: + - Queue + x-api-token-group: + - Queues Write + - Workers Scripts Write + x-auditable: false + x-stackql-sdk: + service: queues + resource_chain: + - messages + method: bulk_push + /accounts/{account_id}/queues/{queue_id}/messages/preview: + post: + description: Preview messages from a Queue without leasing them. Messages remain available for subsequent preview or pull operations. + operationId: queues-preview-messages + parameters: + - name: queue_id + in: path + required: true + description: The Cloudflare Queue ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + batch_size: + $ref: '#/components/schemas/mqBatchSize' + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/mqApiV4Error' + messages: + $ref: '#/components/schemas/mqApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + properties: + messages: + $ref: '#/components/schemas/mqQueuePullBatch' + type: object + description: A batch of previewed messages from the Queue + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Preview Queue Messages + tags: + - Queue + x-api-token-group: + - Queues Write + - Queues Read + - Workers Scripts Write + - Workers Scripts Read + x-auditable: false + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.worker.queue.update + /accounts/{account_id}/queues/{queue_id}/messages/preview/ack: + post: + description: Delete previewed messages from a Queue. Note that messages acknowledged this way aren't considered delivered, they are instantly deleted from this queue and do not affect metrics. + operationId: queues-ack-preview-messages + parameters: + - name: queue_id + in: path + required: true + description: The Cloudflare Queue ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + acks: + items: + properties: + lease_id: + $ref: '#/components/schemas/mqLeaseId' + type: object + type: array + retries: + items: + properties: + delay_seconds: + $ref: '#/components/schemas/mqRetryDelay' + lease_id: + $ref: '#/components/schemas/mqLeaseId' + type: object + type: array + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/mqApiV4Error' + messages: + $ref: '#/components/schemas/mqApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + properties: + warnings: + description: Map of lease IDs to warning messages encountered during acknowledgement. + type: object + type: object + description: Result of acknowledging previewed messages + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Previewed Queue Messages + tags: + - Queue + x-api-token-group: + - Queues Write + - Workers Scripts Write + x-auditable: false + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.worker.queue.update + /accounts/{account_id}/queues/{queue_id}/messages/pull: + post: + description: Pull a batch of messages from a Queue + operationId: queues-pull-messages + parameters: + - name: queue_id + in: path + required: true + description: The Cloudflare Queue ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + batch_size: + $ref: '#/components/schemas/mqBatchSize' + visibility_timeout_ms: + $ref: '#/components/schemas/mqVisibilityTimeout' + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/mqApiV4Error' + messages: + $ref: '#/components/schemas/mqApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + properties: + message_backlog_count: + description: The number of unacknowledged messages in the queue. + type: number + messages: + $ref: '#/components/schemas/mqQueuePullBatch' + metadata: + properties: + metrics: + $ref: '#/components/schemas/mqQueueMetrics' + type: object + type: object + description: A batch of messages in the Queue + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Pull Queue Messages + tags: + - Queue + x-api-token-group: + - Queues Write + - Workers Scripts Write + x-auditable: false + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.worker.queue.update + x-stackql-sdk: + service: queues + resource_chain: + - messages + method: pull + /accounts/{account_id}/queues/{queue_id}/metrics: + get: + description: Return best-effort metrics for a queue. Values may be approximate due to the distributed nature of queues. + operationId: queues-get-metrics + parameters: + - name: queue_id + in: path + required: true + description: The Cloudflare Queue ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/mqApiV4Error' + messages: + $ref: '#/components/schemas/mqApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + $ref: '#/components/schemas/mqQueueMetrics' + text/event-stream: + schema: + $ref: '#/components/schemas/mqQueueMetrics' + description: Queue metrics. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Failure' + description: Failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Queue Metrics + tags: + - Queue + x-api-token-group: + - Queues Write + - Queues Read + - Workers Scripts Write + - Workers Scripts Read + x-stackql-sdk: + service: queues + resource_chain: [] + method: get_metrics + /accounts/{account_id}/queues/{queue_id}/purge: + get: + description: Get details about a Queue's purge status. + operationId: queues-purge-get + parameters: + - name: queue_id + in: path + required: true + description: The Cloudflare Queue ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/mqApiV4Error' + messages: + $ref: '#/components/schemas/mqApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + properties: + completed: + description: Indicates if the last purge operation completed successfully. + readOnly: true + type: string + x-auditable: true + started_at: + description: Timestamp when the last purge operation started. + readOnly: true + type: string + x-auditable: true + type: object + description: Details of the requested Queue + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Queue Purge Status + tags: + - Queue + x-api-token-group: + - Queues Write + - Queues Read + - Workers Scripts Write + - Workers Scripts Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.worker.queue.read + x-stackql-sdk: + service: queues + resource_chain: + - purge + method: status + post: + description: Deletes all messages from the Queue. + operationId: queues-purge + parameters: + - name: queue_id + in: path + required: true + description: The Cloudflare Queue ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + delete_messages_permanently: + description: Confimation that all messages will be deleted permanently. + type: boolean + x-auditable: true + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/mqApiV4Error' + messages: + $ref: '#/components/schemas/mqApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + type: object + $ref: '#/components/schemas/mqQueue' + description: Updated Queue + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/mqApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Purge Queue + tags: + - Queue + x-api-token-group: + - Queues Write + - Workers Scripts Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.worker.queue.update + x-stackql-sdk: + service: queues + resource_chain: + - purge + method: start +components: + schemas: + mqApiV4Error: + example: + - code: 7003 + message: No route for the URI + items: + $ref: '#/components/schemas/responseInfo' + minLength: 1 + type: array + mqApiV4Failure: + properties: + errors: + $ref: '#/components/schemas/mqApiV4Error' + messages: + $ref: '#/components/schemas/mqApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - false + example: false + type: boolean + x-auditable: true + type: object + mqApiV4Message: + example: [] + items: + type: string + x-auditable: true + type: array + mqApiV4Success: + properties: + errors: + $ref: '#/components/schemas/mqApiV4Error' + messages: + $ref: '#/components/schemas/mqApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + type: object + mqBatchSize: + description: The maximum number of messages to include in a batch. + example: 50 + type: number + x-auditable: true + mqConsumerRequest: + description: Request body for creating or updating a consumer + type: object + properties: + dead_letter_queue: + $ref: '#/components/schemas/mqQueueName' + script_name: + $ref: '#/components/schemas/mqScriptName' + settings: + properties: + batch_size: + $ref: '#/components/schemas/mqBatchSize' + max_concurrency: + $ref: '#/components/schemas/mqMaxConcurrency' + max_retries: + $ref: '#/components/schemas/mqMaxRetries' + max_wait_time_ms: + $ref: '#/components/schemas/mqMaxWaitTime' + retry_delay: + $ref: '#/components/schemas/mqRetryDelay' + type: object + type: + enum: + - worker + type: string + x-auditable: true + required: + - type + mqConsumerResponse: + description: Response body representing a consumer + type: object + properties: + consumer_id: + $ref: '#/components/schemas/mqIdentifier' + created_on: + format: date-time + type: string + x-auditable: true + readOnly: true + dead_letter_queue: + description: Name of the dead letter queue, or empty string if not configured + type: string + x-auditable: true + queue_name: + $ref: '#/components/schemas/mqQueueName' + script_name: + $ref: '#/components/schemas/mqScriptName' + settings: + properties: + batch_size: + $ref: '#/components/schemas/mqBatchSize' + max_concurrency: + $ref: '#/components/schemas/mqMaxConcurrency' + max_retries: + $ref: '#/components/schemas/mqMaxRetries' + max_wait_time_ms: + $ref: '#/components/schemas/mqMaxWaitTime' + retry_delay: + $ref: '#/components/schemas/mqRetryDelay' + type: object + type: + enum: + - worker + type: string + x-auditable: true + mqEventDestination: + description: Destination configuration for the subscription + type: object + $ref: '#/components/schemas/mqEventDestinationQueue' + mqEventDestinationQueue: + properties: + queue_id: + description: ID of the target queue + type: string + x-auditable: true + type: + description: Type of destination + enum: + - queues.queue + type: string + x-auditable: true + required: + - type + - queue_id + type: object + mqEventSource: + description: Source configuration for the subscription + type: object + properties: + type: + description: Type of source + enum: + - images + type: string + x-auditable: true + model_name: + description: Name of the Workers AI model + type: string + x-auditable: true + x-stainless-naming: + python: + property_name: ai_model_name + worker_name: + description: Name of the worker + type: string + x-auditable: true + workflow_name: + description: Name of the workflow + type: string + x-auditable: true + mqEventSubscription: + properties: + created_at: + description: When the subscription was created + format: date-time + type: string + x-auditable: true + readOnly: true + destination: + $ref: '#/components/schemas/mqEventDestination' + enabled: + description: Whether the subscription is active + type: boolean + x-auditable: true + events: + description: List of event types this subscription handles + items: + type: string + minItems: 1 + type: array + x-auditable: true + id: + description: Unique identifier for the subscription + type: string + x-auditable: true + modified_at: + description: When the subscription was last modified + format: date-time + type: string + x-auditable: true + readOnly: true + name: + description: Name of the subscription + type: string + x-auditable: true + source: + $ref: '#/components/schemas/mqEventSource' + required: + - id + - created_at + - modified_at + - name + - enabled + - source + - destination + - events + type: object + mqIdentifier: + description: A Resource identifier. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + readOnly: true + type: string + x-auditable: true + mqLeaseId: + description: An ID that represents an "in-flight" message that has been pulled from a Queue. You must hold on to this ID and use it to acknowledge this message. + example: eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0..Q8p21d7dceR6vUfwftONdQ.JVqZgAS-Zk7MqmqccYtTHeeMElNHaOMigeWdb8LyMOg.T2_HV99CYzGaQuhTyW8RsgbnpTRZHRM6N7UoSaAKeK0 + type: string + x-auditable: true + mqMaxConcurrency: + description: Maximum number of concurrent consumers that may consume from this Queue. Set to `null` to automatically opt in to the platform's maximum (recommended). + example: 10 + type: number + x-auditable: true + mqMaxRetries: + description: The maximum number of retries + example: 3 + type: number + x-auditable: true + mqMaxWaitTime: + description: The number of milliseconds to wait for a batch to fill up before attempting to deliver it + example: 5000 + type: number + x-auditable: true + mqProducer: + type: object + properties: + script: + type: string + x-auditable: true + type: + enum: + - worker + type: string + x-auditable: true + bucket_name: + type: string + x-auditable: true + mqQueue: + properties: + consumers: + items: + $ref: '#/components/schemas/mqConsumerResponse' + readOnly: true + type: array + consumers_total_count: + readOnly: true + type: number + created_on: + readOnly: true + type: string + x-auditable: true + modified_on: + readOnly: true + type: string + x-auditable: true + producers: + items: + $ref: '#/components/schemas/mqProducer' + readOnly: true + type: array + producers_total_count: + readOnly: true + type: number + x-auditable: true + queue_id: + readOnly: true + type: string + x-auditable: true + queue_name: + $ref: '#/components/schemas/mqQueueName' + settings: + $ref: '#/components/schemas/mqQueueSettings' + type: object + mqQueueBatch: + properties: + delay_seconds: + description: The number of seconds to wait for attempting to deliver this batch to consumers + type: number + x-auditable: true + messages: + items: + $ref: '#/components/schemas/mqQueueMessage' + type: array + type: object + mqQueueMessage: + properties: + delay_seconds: + description: The number of seconds to wait for attempting to deliver this message to consumers + type: number + x-auditable: true + body: + type: string + content_type: + enum: + - text + type: string + x-auditable: true + type: object + mqQueueMetrics: + description: Best-effort metrics for the queue. Values may be approximate due to the distributed nature of queues. + properties: + backlog_bytes: + description: The size in bytes of unacknowledged messages in the queue. + example: 1024 + type: number + x-auditable: true + backlog_count: + description: The number of unacknowledged messages in the queue. + example: 5 + type: number + x-auditable: true + oldest_message_timestamp_ms: + description: Unix timestamp in milliseconds of the oldest unacknowledged message in the queue. Returns 0 if unknown. + example: 1710950954154 + type: number + x-auditable: true + required: + - backlog_count + - backlog_bytes + - oldest_message_timestamp_ms + type: object + mqQueueName: + example: example-queue + type: string + x-auditable: true + mqQueuePullBatch: + items: + properties: + attempts: + example: 1 + readOnly: true + type: number + x-auditable: true + body: + example: hello world + readOnly: true + type: string + id: + example: b01b5594f784d0165c2985833f5660dd + readOnly: true + type: string + x-auditable: true + lease_id: + $ref: '#/components/schemas/mqLeaseId' + metadata: + example: + CF-Content-Type: text + CF-sourceMessageSource: dash + readOnly: true + type: object + timestamp_ms: + example: 1710950954154 + readOnly: true + type: number + x-auditable: true + type: object + type: array + mqQueueSettings: + properties: + delivery_delay: + description: Number of seconds to delay delivery of all messages to consumers. + example: 5 + type: number + x-auditable: true + delivery_paused: + description: Indicates if message delivery to consumers is currently paused. + example: true + type: boolean + x-auditable: true + message_retention_period: + description: Number of seconds after which an unconsumed message will be delayed. + example: 345600 + type: number + x-auditable: true + type: object + mqRetryDelay: + description: The number of seconds to delay before making the message available for another attempt. + example: 10 + type: number + x-auditable: true + mqScriptName: + description: Name of a Worker + example: my-consumer-worker + type: string + x-auditable: true + mqVisibilityTimeout: + description: The number of milliseconds that a message is exclusively leased. After the timeout, the message becomes available for another attempt. + example: 6000 + type: number + x-auditable: true + responseInfo: + properties: + code: + minimum: 1000 + type: integer + message: + type: string + documentation_url: + type: string + source: + type: object + properties: + pointer: + type: string + required: + - code + - message + type: object + uniqueItems: true + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + subscriptions: + id: cloudflare.queues.subscriptions + name: subscriptions + title: Subscriptions + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1event_subscriptions~1subscriptions/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1event_subscriptions~1subscriptions/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .destination }}{{ $sep }}"destination": {{ if eq (kindOf .destination) "string" }}{{ .destination }}{{ else }}{{ toJson .destination }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .events }}{{ $sep }}"events": {{ if eq (kindOf .events) "string" }}{{ .events }}{{ else }}{{ toJson .events }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .source }}{{ $sep }}"source": {{ if eq (kindOf .source) "string" }}{{ .source }}{{ else }}{{ toJson .source }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1event_subscriptions~1subscriptions~1{subscription_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1event_subscriptions~1subscriptions~1{subscription_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1event_subscriptions~1subscriptions~1{subscription_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .destination }}{{ $sep }}"destination": {{ if eq (kindOf .destination) "string" }}{{ .destination }}{{ else }}{{ toJson .destination }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .events }}{{ $sep }}"events": {{ if eq (kindOf .events) "string" }}{{ .events }}{{ else }}{{ toJson .events }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/subscriptions/methods/get' + - $ref: '#/components/x-stackQL-resources/subscriptions/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/subscriptions/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/subscriptions/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/subscriptions/methods/delete' + replace: [] + queues: + id: cloudflare.queues.queues + name: queues + title: Queues + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1queues/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1queues/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1queues~1{queue_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1queues~1{queue_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1queues~1{queue_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .queue_name }}{{ $sep }}"queue_name": {{ toJson .queue_name }}{{- $sep = "," -}}{{ end }} + + {{- if .settings }}{{ $sep }}"settings": {{ if eq (kindOf .settings) "string" }}{{ .settings }}{{ else }}{{ toJson .settings }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1queues~1{queue_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .queue_name }}{{ $sep }}"queue_name": {{ toJson .queue_name }}{{- $sep = "," -}}{{ end }} + + {{- if .settings }}{{ $sep }}"settings": {{ if eq (kindOf .settings) "string" }}{{ .settings }}{{ else }}{{ toJson .settings }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + create_messages: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1messages/post' + response: + mediaType: application/json + openAPIDocKey: '200' + batch: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1messages~1batch/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .delay_seconds }}{{ $sep }}"delay_seconds": {{ toJson .delay_seconds }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + preview: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1messages~1preview/post' + response: + mediaType: application/json + openAPIDocKey: '200' + pull: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1messages~1pull/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/queues/methods/get' + - $ref: '#/components/x-stackQL-resources/queues/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/queues/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/queues/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/queues/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/queues/methods/update' + consumers: + id: cloudflare.queues.consumers + name: consumers + title: Consumers + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1consumers/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1consumers/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .dead_letter_queue }}{{ $sep }}"dead_letter_queue": {{ toJson .dead_letter_queue }}{{- $sep = "," -}}{{ end }} + + {{- if .script_name }}{{ $sep }}"script_name": {{ toJson .script_name }}{{- $sep = "," -}}{{ end }} + + {{- if .settings }}{{ $sep }}"settings": {{ if eq (kindOf .settings) "string" }}{{ .settings }}{{ else }}{{ toJson .settings }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1consumers~1{consumer_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1consumers~1{consumer_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1consumers~1{consumer_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .dead_letter_queue }}{{ $sep }}"dead_letter_queue": {{ toJson .dead_letter_queue }}{{- $sep = "," -}}{{ end }} + + {{- if .script_name }}{{ $sep }}"script_name": {{ toJson .script_name }}{{- $sep = "," -}}{{ end }} + + {{- if .settings }}{{ $sep }}"settings": {{ if eq (kindOf .settings) "string" }}{{ .settings }}{{ else }}{{ toJson .settings }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/consumers/methods/get' + - $ref: '#/components/x-stackQL-resources/consumers/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/consumers/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/consumers/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/consumers/methods/update' + messages_ack: + id: cloudflare.queues.messages_ack + name: messages_ack + title: Messages Ack + methods: + ack: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1messages~1ack/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .acks }}{{ $sep }}"acks": {{ if eq (kindOf .acks) "string" }}{{ .acks }}{{ else }}{{ toJson .acks }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .retries }}{{ $sep }}"retries": {{ if eq (kindOf .retries) "string" }}{{ .retries }}{{ else }}{{ toJson .retries }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + preview_ack: + id: cloudflare.queues.preview_ack + name: preview_ack + title: Preview Ack + methods: + ack: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1messages~1preview~1ack/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .acks }}{{ $sep }}"acks": {{ if eq (kindOf .acks) "string" }}{{ .acks }}{{ else }}{{ toJson .acks }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .retries }}{{ $sep }}"retries": {{ if eq (kindOf .retries) "string" }}{{ .retries }}{{ else }}{{ toJson .retries }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + metrics: + id: cloudflare.queues.metrics + name: metrics + title: Metrics + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1metrics/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/metrics/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + purge: + id: cloudflare.queues.purge + name: purge + title: Purge + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1purge/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + start: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1queues~1{queue_id}~1purge/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/purge/methods/list' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/r2.yaml b/providers/src/cloudflare/v00.00.00000/services/r2.yaml index 3b7fe8a7..387fa2e8 100644 --- a/providers/src/cloudflare/v00.00.00000/services/r2.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/r2.yaml @@ -4024,6 +4024,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .rules }}{{ $sep }}"rules": {{ if eq (kindOf .rules) "string" }}{{ .rules }}{{ else }}{{ toJson .rules }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/event_notifications/methods/get' @@ -4112,6 +4125,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .rules }}{{ $sep }}"rules": {{ if eq (kindOf .rules) "string" }}{{ .rules }}{{ else }}{{ toJson .rules }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/cors/methods/list' @@ -4142,6 +4168,27 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ciphers }}{{ $sep }}"ciphers": {{ if eq (kindOf .ciphers) "string" }}{{ .ciphers }}{{ else }}{{ toJson .ciphers }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .domain }}{{ $sep }}"domain": {{ toJson .domain }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .minTLS }}{{ $sep }}"minTLS": {{ toJson .minTLS }}{{- $sep = "," -}}{{ end }} + + {{- if .zoneId }}{{ $sep }}"zoneId": {{ toJson .zoneId }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1domains~1custom~1{domain}/delete' @@ -4164,6 +4211,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ciphers }}{{ $sep }}"ciphers": {{ if eq (kindOf .ciphers) "string" }}{{ .ciphers }}{{ else }}{{ toJson .ciphers }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .minTLS }}{{ $sep }}"minTLS": {{ toJson .minTLS }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/custom/methods/get' @@ -4225,6 +4289,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .rules }}{{ $sep }}"rules": {{ if eq (kindOf .rules) "string" }}{{ .rules }}{{ else }}{{ toJson .rules }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/lifecycle/methods/list' @@ -4283,6 +4360,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .rules }}{{ $sep }}"rules": {{ if eq (kindOf .rules) "string" }}{{ .rules }}{{ else }}{{ toJson .rules }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/locks/methods/list' @@ -4317,6 +4407,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .destination }}{{ $sep }}"destination": {{ if eq (kindOf .destination) "string" }}{{ .destination }}{{ else }}{{ toJson .destination }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .source }}{{ $sep }}"source": {{ if eq (kindOf .source) "string" }}{{ .source }}{{ else }}{{ toJson .source }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/sippy/methods/list' @@ -4359,6 +4464,29 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .bucket }}{{ $sep }}"bucket": {{ toJson .bucket }}{{- $sep = "," -}}{{ end }} + + {{- if .objects }}{{ $sep }}"objects": {{ if eq (kindOf .objects) "string" }}{{ .objects }}{{ else }}{{ toJson .objects }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .parentAccessKeyId }}{{ $sep }}"parentAccessKeyId": {{ toJson .parentAccessKeyId }}{{- $sep = "," -}}{{ end }} + + {{- if .permission }}{{ $sep }}"permission": {{ toJson .permission }}{{- $sep = "," -}}{{ end }} + + {{- if .prefixes }}{{ $sep }}"prefixes": {{ if eq (kindOf .prefixes) "string" }}{{ .prefixes }}{{ else }}{{ toJson .prefixes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ttlSeconds }}{{ $sep }}"ttlSeconds": {{ toJson .ttlSeconds }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: [] insert: [] @@ -4398,6 +4526,23 @@ components: response: mediaType: application/json openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .overwrite }}{{ $sep }}"overwrite": {{ toJson .overwrite }}{{- $sep = "," -}}{{ end }} + + {{- if .source }}{{ $sep }}"source": {{ if eq (kindOf .source) "string" }}{{ .source }}{{ else }}{{ toJson .source }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .target }}{{ $sep }}"target": {{ if eq (kindOf .target) "string" }}{{ .target }}{{ else }}{{ toJson .target }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' abort_all: operation: $ref: '#/paths/~1accounts~1{account_id}~1slurper~1jobs~1abortAll/put' @@ -4497,6 +4642,33 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .bucket }}{{ $sep }}"bucket": {{ toJson .bucket }}{{- $sep = "," -}}{{ end }} + + {{- if .endpoint }}{{ $sep }}"endpoint": {{ toJson .endpoint }}{{- $sep = "," -}}{{ end }} + + {{- if .keys }}{{ $sep }}"keys": {{ if eq (kindOf .keys) "string" }}{{ .keys }}{{ else }}{{ toJson .keys }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .pathPrefix }}{{ $sep }}"pathPrefix": {{ toJson .pathPrefix }}{{- $sep = "," -}}{{ end }} + + {{- if .region }}{{ $sep }}"region": {{ toJson .region }}{{- $sep = "," -}}{{ end }} + + {{- if .secret }}{{ $sep }}"secret": {{ if eq (kindOf .secret) "string" }}{{ .secret }}{{ else }}{{ toJson .secret }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .vendor }}{{ $sep }}"vendor": {{ toJson .vendor }}{{- $sep = "," -}}{{ end }} + + {{- if .jurisdiction }}{{ $sep }}"jurisdiction": {{ toJson .jurisdiction }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: [] insert: [] @@ -4517,6 +4689,25 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .bucket }}{{ $sep }}"bucket": {{ toJson .bucket }}{{- $sep = "," -}}{{ end }} + + {{- if .jurisdiction }}{{ $sep }}"jurisdiction": {{ toJson .jurisdiction }}{{- $sep = "," -}}{{ end }} + + {{- if .secret }}{{ $sep }}"secret": {{ if eq (kindOf .secret) "string" }}{{ .secret }}{{ else }}{{ toJson .secret }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .vendor }}{{ $sep }}"vendor": {{ toJson .vendor }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: [] insert: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/rate_limits.yaml b/providers/src/cloudflare/v00.00.00000/services/rate_limits.yaml index d4a4b967..fa9eca2b 100644 --- a/providers/src/cloudflare/v00.00.00000/services/rate_limits.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/rate_limits.yaml @@ -1,984 +1,935 @@ -openapi: 3.0.3 -info: - title: rate_limits API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /zones/{zone_id}/rate_limits: - get: - deprecated: true - description: Fetches the rate limits for a zone. - operationId: rate-limits-for-a-zone-list-rate-limits - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: query - name: page - schema: - default: 1 - description: Defines the page number of paginated results. - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 20 - description: >- - Defines the maximum number of results per page. You can only set - the value to `1` or to a multiple of 5 such as `5`, `10`, `15`, or - `20`. - maximum: 1000 - minimum: 1 - type: number - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallRatelimitResponseCollection' - description: List rate limits response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - items: - type: object - $ref: '#/components/schemas/firewallRateLimits' - nullable: true - type: array - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/firewallResultInfo' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: List rate limits response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List rate limits - tags: - - Rate limits for a zone - x-api-token-group: - - Firewall Services Write - - Firewall Services Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rate_limits - resource_chain: [] - method: list - post: - deprecated: true - description: >- - Creates a new rate limit for a zone. Refer to the object definition for - a list of required attributes. - operationId: rate-limits-for-a-zone-create-a-rate-limit - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - action: - $ref: '#/components/schemas/firewallAction' - match: - $ref: '#/components/schemas/firewallMatch' - period: - $ref: '#/components/schemas/firewallPeriod' - threshold: - $ref: '#/components/schemas/firewallThreshold' - required: - - match - - threshold - - period - - action - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallRatelimitResponseSingle' - description: Create a rate limit response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - type: object - properties: - action: - $ref: '#/components/schemas/firewallAction' - bypass: - $ref: '#/components/schemas/firewallBypass' - description: - $ref: '#/components/schemas/firewallDescription' - disabled: - $ref: '#/components/schemas/firewallDisabled' - id: - $ref: '#/components/schemas/firewallId' - match: - $ref: '#/components/schemas/firewallMatch' - period: - $ref: '#/components/schemas/firewallPeriod' - threshold: - $ref: '#/components/schemas/firewallThreshold' - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Create a rate limit response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a rate limit - tags: - - Rate limits for a zone - x-api-token-group: - - Firewall Services Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rate_limits - resource_chain: [] - method: create - /zones/{zone_id}/rate_limits/{rate_limit_id}: - delete: - deprecated: true - description: Deletes an existing rate limit. - operationId: rate-limits-for-a-zone-delete-a-rate-limit - parameters: - - in: path - name: rate_limit_id - schema: - $ref: '#/components/schemas/firewallRateLimitId' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - type: object - properties: - action: - $ref: '#/components/schemas/firewallAction' - bypass: - $ref: '#/components/schemas/firewallBypass' - description: - $ref: '#/components/schemas/firewallDescription' - disabled: - $ref: '#/components/schemas/firewallDisabled' - id: - $ref: '#/components/schemas/firewallId' - match: - $ref: '#/components/schemas/firewallMatch' - period: - $ref: '#/components/schemas/firewallPeriod' - threshold: - $ref: '#/components/schemas/firewallThreshold' - success: - description: Defines whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Delete a rate limit response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - type: object - properties: - action: - $ref: '#/components/schemas/firewallAction' - bypass: - $ref: '#/components/schemas/firewallBypass' - description: - $ref: '#/components/schemas/firewallDescription' - disabled: - $ref: '#/components/schemas/firewallDisabled' - id: - $ref: '#/components/schemas/firewallId' - match: - $ref: '#/components/schemas/firewallMatch' - period: - $ref: '#/components/schemas/firewallPeriod' - threshold: - $ref: '#/components/schemas/firewallThreshold' - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Delete a rate limit response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete a rate limit - tags: - - Rate limits for a zone - x-api-token-group: - - Firewall Services Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rate_limits - resource_chain: [] - method: delete - get: - deprecated: true - description: Fetches the details of a rate limit. - operationId: rate-limits-for-a-zone-get-a-rate-limit - parameters: - - in: path - name: rate_limit_id - schema: - $ref: '#/components/schemas/firewallRateLimitId' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallRatelimitResponseSingle' - description: Get a rate limit response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - type: object - properties: - action: - $ref: '#/components/schemas/firewallAction' - bypass: - $ref: '#/components/schemas/firewallBypass' - description: - $ref: '#/components/schemas/firewallDescription' - disabled: - $ref: '#/components/schemas/firewallDisabled' - id: - $ref: '#/components/schemas/firewallId' - match: - $ref: '#/components/schemas/firewallMatch' - period: - $ref: '#/components/schemas/firewallPeriod' - threshold: - $ref: '#/components/schemas/firewallThreshold' - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Get a rate limit response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get a rate limit - tags: - - Rate limits for a zone - x-api-token-group: - - Firewall Services Write - - Firewall Services Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rate_limits - resource_chain: [] - method: get - put: - deprecated: true - description: Updates an existing rate limit. - operationId: rate-limits-for-a-zone-update-a-rate-limit - parameters: - - in: path - name: rate_limit_id - schema: - $ref: '#/components/schemas/firewallRateLimitId' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - action: - $ref: '#/components/schemas/firewallAction' - match: - $ref: '#/components/schemas/firewallMatch' - period: - $ref: '#/components/schemas/firewallPeriod' - threshold: - $ref: '#/components/schemas/firewallThreshold' - required: - - match - - threshold - - period - - action - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallRatelimitResponseSingle' - description: Update a rate limit response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - type: object - properties: - action: - $ref: '#/components/schemas/firewallAction' - bypass: - $ref: '#/components/schemas/firewallBypass' - description: - $ref: '#/components/schemas/firewallDescription' - disabled: - $ref: '#/components/schemas/firewallDisabled' - id: - $ref: '#/components/schemas/firewallId' - match: - $ref: '#/components/schemas/firewallMatch' - period: - $ref: '#/components/schemas/firewallPeriod' - threshold: - $ref: '#/components/schemas/firewallThreshold' - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Update a rate limit response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update a rate limit - tags: - - Rate limits for a zone - x-api-token-group: - - Firewall Services Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rate_limits - resource_chain: [] - method: edit -components: - schemas: - firewallAction: - description: >- - The action to perform when the threshold of matched traffic within the - configured period is exceeded. - type: object - properties: - mode: - $ref: '#/components/schemas/firewallMode' - response: - $ref: '#/components/schemas/firewallCustomResponse' - timeout: - $ref: '#/components/schemas/firewallTimeout' - firewallBody: - description: >- - The response body to return. The value must conform to the configured - content type. - example: This request has been rate-limited. - maxLength: 10240 - type: string - firewallBypass: - description: >- - Criteria specifying when the current rate limit should be bypassed. You - can specify that the rate limit should not apply to one or more URLs. - items: - properties: - name: - enum: - - url - example: url - type: string - value: - description: The URL to bypass. - example: api.example.com/* - type: string - type: object - type: array - firewallContentType: - description: >- - The content type of the body. Must be one of the following: - `text/plain`, `text/xml`, or `application/json`. - example: text/xml - maxLength: 50 - type: string - x-auditable: true - firewallCustomResponse: - description: >- - A custom content type and reponse to return when the threshold is - exceeded. The custom response configured in this object will override - the custom error for the zone. This object is optional. Notes: If you - omit this object, Cloudflare will use the default HTML error page. If - "mode" is "challenge", "managed_challenge", or "js_challenge", - Cloudflare will use the zone challenge pages and you should not provide - the "response" object. - type: object - properties: - body: - $ref: '#/components/schemas/firewallBody' - content_type: - $ref: '#/components/schemas/firewallContentType' - firewallDescription: - description: >- - An informative summary of the rule. This value is sanitized and any tags - will be removed. - example: Prevent multiple login failures to mitigate brute force attacks - maxLength: 1024 - type: string - x-auditable: true - firewallDisabled: - description: When true, indicates that the rate limit is currently disabled. - example: false - type: boolean - x-auditable: true - firewallHeaderName: - description: The name of the response header to match. - example: Cf-Cache-Status - type: string - x-auditable: true - firewallHeaderOp: - description: >- - The operator used when matching: `eq` means "equal" and `ne` means "not - equal". - enum: - - eq - - ne - example: ne - type: string - x-auditable: true - firewallHeaderValue: - description: The value of the response header, which must match exactly. - example: HIT - type: string - x-auditable: true - firewallId: - description: The unique identifier of the rate limit. - example: 372e67954025e0ba6aaa6d586b9e0b59 - maxLength: 32 - readOnly: true - type: string - x-auditable: true - firewallMatch: - description: Determines which traffic the rate limit counts towards the threshold. - type: object - properties: - headers: - items: - properties: - name: - $ref: '#/components/schemas/firewallHeaderName' - op: - $ref: '#/components/schemas/firewallHeaderOp' - value: - $ref: '#/components/schemas/firewallHeaderValue' - type: object - type: array - request: - properties: - methods: - $ref: '#/components/schemas/firewallMethods' - schemes: - $ref: '#/components/schemas/firewallSchemes' - url: - $ref: '#/components/schemas/firewallUrl' - type: object - response: - properties: - origin_traffic: - $ref: '#/components/schemas/firewallOriginTraffic' - type: object - firewallMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - firewallMethods: - description: >- - The HTTP methods to match. You can specify a subset (for example, - `['POST','PUT']`) or all methods (`['_ALL_']`). This field is optional - when creating a rate limit. - example: - - GET - - POST - items: - description: An HTTP method or `_ALL_` to indicate all methods. - enum: - - GET - - POST - - PUT - - DELETE - - PATCH - - HEAD - - _ALL_ - example: GET - type: string - x-auditable: true - type: array - firewallMode: - description: The action to perform. - enum: - - simulate - - ban - - challenge - - js_challenge - - managed_challenge - example: challenge - type: string - x-auditable: true - firewallOriginTraffic: - description: >- - When true, only the uncached traffic served from your origin servers - will count towards rate limiting. In this case, any cached traffic - served by Cloudflare will not count towards rate limiting. This field is - optional. Notes: This field is deprecated. Instead, use response headers - and set "origin_traffic" to "false" to avoid legacy behaviour - interacting with the "response_headers" property. - type: boolean - x-auditable: true - firewallPeriod: - description: >- - The time in seconds (an integer value) to count matching traffic. If the - count exceeds the configured threshold within this period, Cloudflare - will perform the configured action. - example: 900 - maximum: 86400 - minimum: 10 - type: number - x-auditable: true - firewallRateLimitId: - description: Defines the unique identifier of the rate limit. - example: 372e67954025e0ba6aaa6d586b9e0b59 - maxLength: 32 - readOnly: true - type: string - firewallRateLimits: - type: object - $ref: '#/components/schemas/firewallRatelimit' - firewallRatelimit: - properties: - action: - $ref: '#/components/schemas/firewallAction' - bypass: - $ref: '#/components/schemas/firewallBypass' - description: - $ref: '#/components/schemas/firewallDescription' - disabled: - $ref: '#/components/schemas/firewallDisabled' - id: - $ref: '#/components/schemas/firewallId' - match: - $ref: '#/components/schemas/firewallMatch' - period: - $ref: '#/components/schemas/firewallPeriod' - threshold: - $ref: '#/components/schemas/firewallThreshold' - type: object - firewallRatelimitResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - items: - type: object - $ref: '#/components/schemas/firewallRateLimits' - nullable: true - type: array - success: - description: Defines whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/firewallResultInfo' - required: - - success - - errors - - messages - - result - firewallRatelimitResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - $ref: '#/components/schemas/firewallRateLimits' - success: - description: Defines whether the API call was successful. - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - firewallResultInfo: - properties: - count: - description: Defines the total number of results for the requested service. - example: 1 - type: number - page: - description: Defines the current page within paginated list of results. - example: 1 - type: number - per_page: - description: Defines the number of results per page of results. - example: 20 - type: number - total_count: - description: Defines the total results available without any search parameters. - example: 2000 - type: number - type: object - firewallSchemes: - description: >- - The HTTP schemes to match. You can specify one scheme (`['HTTPS']`), - both schemes (`['HTTP','HTTPS']`), or all schemes (`['_ALL_']`). This - field is optional. - example: - - HTTP - - HTTPS - items: - description: An HTTP scheme or `_ALL_` to indicate all schemes. - example: HTTPS - type: string - type: array - x-auditable: true - firewallThreshold: - description: >- - The threshold that will trigger the configured mitigation action. - Configure this value along with the `period` property to establish a - threshold per period. - example: 60 - minimum: 1 - type: number - x-auditable: true - firewallTimeout: - description: >- - The time in seconds during which Cloudflare will perform the mitigation - action. Must be an integer value greater than or equal to the period. - Notes: If "mode" is "challenge", "managed_challenge", or "js_challenge", - Cloudflare will use the zone's Challenge Passage time and you should not - provide this value. - example: 86400 - maximum: 86400 - minimum: 1 - type: number - x-auditable: true - firewallUrl: - description: >- - The URL pattern to match, composed of a host and a path such as - `example.org/path*`. Normalization is applied before the pattern is - matched. `*` wildcards are expanded to match applicable traffic. Query - strings are not matched. Set the value to `*` to match all traffic to - your zone. - example: '*.example.org/path*' - maxLength: 1024 - type: string - x-auditable: true - responseInfo: - properties: - code: - minimum: 1000 - type: integer - message: - type: string - documentation_url: - type: string - source: - type: object - properties: - pointer: - type: string - required: - - code - - message - type: object - uniqueItems: true - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - rate_limits: - id: cloudflare.rate_limits.rate_limits - name: rate_limits - title: Rate Limits - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1rate_limits/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1rate_limits/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1rate_limits~1{rate_limit_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1rate_limits~1{rate_limit_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1rate_limits~1{rate_limit_id}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/rate_limits/methods/get' - - $ref: '#/components/x-stackQL-resources/rate_limits/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/rate_limits/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/rate_limits/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/rate_limits/methods/edit' +openapi: 3.0.3 +info: + title: rate_limits API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /zones/{zone_id}/rate_limits: + get: + deprecated: true + description: Fetches the rate limits for a zone. + operationId: rate-limits-for-a-zone-list-rate-limits + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: query + name: page + schema: + default: 1 + description: Defines the page number of paginated results. + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 20 + description: Defines the maximum number of results per page. You can only set the value to `1` or to a multiple of 5 such as `5`, `10`, `15`, or `20`. + maximum: 1000 + minimum: 1 + type: number + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallRatelimitResponseCollection' + description: List rate limits response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + items: + type: object + $ref: '#/components/schemas/firewallRateLimits' + nullable: true + type: array + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/firewallResultInfo' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: List rate limits response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List rate limits + tags: + - Rate limits for a zone + x-api-token-group: + - Firewall Services Write + - Firewall Services Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rate_limits + resource_chain: [] + method: list + post: + deprecated: true + description: Creates a new rate limit for a zone. Refer to the object definition for a list of required attributes. + operationId: rate-limits-for-a-zone-create-a-rate-limit + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + action: + $ref: '#/components/schemas/firewallAction' + match: + $ref: '#/components/schemas/firewallMatch' + period: + $ref: '#/components/schemas/firewallPeriod' + threshold: + $ref: '#/components/schemas/firewallThreshold' + required: + - match + - threshold + - period + - action + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallRatelimitResponseSingle' + description: Create a rate limit response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + type: object + properties: + action: + $ref: '#/components/schemas/firewallAction' + bypass: + $ref: '#/components/schemas/firewallBypass' + description: + $ref: '#/components/schemas/firewallDescription' + disabled: + $ref: '#/components/schemas/firewallDisabled' + id: + $ref: '#/components/schemas/firewallId' + match: + $ref: '#/components/schemas/firewallMatch' + period: + $ref: '#/components/schemas/firewallPeriod' + threshold: + $ref: '#/components/schemas/firewallThreshold' + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Create a rate limit response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a rate limit + tags: + - Rate limits for a zone + x-api-token-group: + - Firewall Services Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rate_limits + resource_chain: [] + method: create + /zones/{zone_id}/rate_limits/{rate_limit_id}: + delete: + deprecated: true + description: Deletes an existing rate limit. + operationId: rate-limits-for-a-zone-delete-a-rate-limit + parameters: + - in: path + name: rate_limit_id + schema: + $ref: '#/components/schemas/firewallRateLimitId' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + type: object + properties: + action: + $ref: '#/components/schemas/firewallAction' + bypass: + $ref: '#/components/schemas/firewallBypass' + description: + $ref: '#/components/schemas/firewallDescription' + disabled: + $ref: '#/components/schemas/firewallDisabled' + id: + $ref: '#/components/schemas/firewallId' + match: + $ref: '#/components/schemas/firewallMatch' + period: + $ref: '#/components/schemas/firewallPeriod' + threshold: + $ref: '#/components/schemas/firewallThreshold' + success: + description: Defines whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Delete a rate limit response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + type: object + properties: + action: + $ref: '#/components/schemas/firewallAction' + bypass: + $ref: '#/components/schemas/firewallBypass' + description: + $ref: '#/components/schemas/firewallDescription' + disabled: + $ref: '#/components/schemas/firewallDisabled' + id: + $ref: '#/components/schemas/firewallId' + match: + $ref: '#/components/schemas/firewallMatch' + period: + $ref: '#/components/schemas/firewallPeriod' + threshold: + $ref: '#/components/schemas/firewallThreshold' + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Delete a rate limit response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete a rate limit + tags: + - Rate limits for a zone + x-api-token-group: + - Firewall Services Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rate_limits + resource_chain: [] + method: delete + get: + deprecated: true + description: Fetches the details of a rate limit. + operationId: rate-limits-for-a-zone-get-a-rate-limit + parameters: + - in: path + name: rate_limit_id + schema: + $ref: '#/components/schemas/firewallRateLimitId' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallRatelimitResponseSingle' + description: Get a rate limit response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + type: object + properties: + action: + $ref: '#/components/schemas/firewallAction' + bypass: + $ref: '#/components/schemas/firewallBypass' + description: + $ref: '#/components/schemas/firewallDescription' + disabled: + $ref: '#/components/schemas/firewallDisabled' + id: + $ref: '#/components/schemas/firewallId' + match: + $ref: '#/components/schemas/firewallMatch' + period: + $ref: '#/components/schemas/firewallPeriod' + threshold: + $ref: '#/components/schemas/firewallThreshold' + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Get a rate limit response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get a rate limit + tags: + - Rate limits for a zone + x-api-token-group: + - Firewall Services Write + - Firewall Services Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rate_limits + resource_chain: [] + method: get + put: + deprecated: true + description: Updates an existing rate limit. + operationId: rate-limits-for-a-zone-update-a-rate-limit + parameters: + - in: path + name: rate_limit_id + schema: + $ref: '#/components/schemas/firewallRateLimitId' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + action: + $ref: '#/components/schemas/firewallAction' + match: + $ref: '#/components/schemas/firewallMatch' + period: + $ref: '#/components/schemas/firewallPeriod' + threshold: + $ref: '#/components/schemas/firewallThreshold' + required: + - match + - threshold + - period + - action + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallRatelimitResponseSingle' + description: Update a rate limit response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + type: object + properties: + action: + $ref: '#/components/schemas/firewallAction' + bypass: + $ref: '#/components/schemas/firewallBypass' + description: + $ref: '#/components/schemas/firewallDescription' + disabled: + $ref: '#/components/schemas/firewallDisabled' + id: + $ref: '#/components/schemas/firewallId' + match: + $ref: '#/components/schemas/firewallMatch' + period: + $ref: '#/components/schemas/firewallPeriod' + threshold: + $ref: '#/components/schemas/firewallThreshold' + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Update a rate limit response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update a rate limit + tags: + - Rate limits for a zone + x-api-token-group: + - Firewall Services Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rate_limits + resource_chain: [] + method: edit +components: + schemas: + firewallAction: + description: The action to perform when the threshold of matched traffic within the configured period is exceeded. + type: object + properties: + mode: + $ref: '#/components/schemas/firewallMode' + response: + $ref: '#/components/schemas/firewallCustomResponse' + timeout: + $ref: '#/components/schemas/firewallTimeout' + firewallBody: + description: The response body to return. The value must conform to the configured content type. + example: This request has been rate-limited. + maxLength: 10240 + type: string + firewallBypass: + description: Criteria specifying when the current rate limit should be bypassed. You can specify that the rate limit should not apply to one or more URLs. + items: + properties: + name: + enum: + - url + example: url + type: string + value: + description: The URL to bypass. + example: api.example.com/* + type: string + type: object + type: array + firewallContentType: + description: 'The content type of the body. Must be one of the following: `text/plain`, `text/xml`, or `application/json`.' + example: text/xml + maxLength: 50 + type: string + x-auditable: true + firewallCustomResponse: + description: 'A custom content type and reponse to return when the threshold is exceeded. The custom response configured in this object will override the custom error for the zone. This object is optional. Notes: If you omit this object, Cloudflare will use the default HTML error page. If "mode" is "challenge", "managed_challenge", or "js_challenge", Cloudflare will use the zone challenge pages and you should not provide the "response" object.' + type: object + properties: + body: + $ref: '#/components/schemas/firewallBody' + content_type: + $ref: '#/components/schemas/firewallContentType' + firewallDescription: + description: An informative summary of the rule. This value is sanitized and any tags will be removed. + example: Prevent multiple login failures to mitigate brute force attacks + maxLength: 1024 + type: string + x-auditable: true + firewallDisabled: + description: When true, indicates that the rate limit is currently disabled. + example: false + type: boolean + x-auditable: true + firewallHeaderName: + description: The name of the response header to match. + example: Cf-Cache-Status + type: string + x-auditable: true + firewallHeaderOp: + description: 'The operator used when matching: `eq` means "equal" and `ne` means "not equal".' + enum: + - eq + - ne + example: ne + type: string + x-auditable: true + firewallHeaderValue: + description: The value of the response header, which must match exactly. + example: HIT + type: string + x-auditable: true + firewallId: + description: The unique identifier of the rate limit. + example: 372e67954025e0ba6aaa6d586b9e0b59 + maxLength: 32 + readOnly: true + type: string + x-auditable: true + firewallMatch: + description: Determines which traffic the rate limit counts towards the threshold. + type: object + properties: + headers: + items: + properties: + name: + $ref: '#/components/schemas/firewallHeaderName' + op: + $ref: '#/components/schemas/firewallHeaderOp' + value: + $ref: '#/components/schemas/firewallHeaderValue' + type: object + type: array + request: + properties: + methods: + $ref: '#/components/schemas/firewallMethods' + schemes: + $ref: '#/components/schemas/firewallSchemes' + url: + $ref: '#/components/schemas/firewallUrl' + type: object + response: + properties: + origin_traffic: + $ref: '#/components/schemas/firewallOriginTraffic' + type: object + firewallMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + firewallMethods: + description: The HTTP methods to match. You can specify a subset (for example, `['POST','PUT']`) or all methods (`['_ALL_']`). This field is optional when creating a rate limit. + example: + - GET + - POST + items: + description: An HTTP method or `_ALL_` to indicate all methods. + enum: + - GET + - POST + - PUT + - DELETE + - PATCH + - HEAD + - _ALL_ + example: GET + type: string + x-auditable: true + type: array + firewallMode: + description: The action to perform. + enum: + - simulate + - ban + - challenge + - js_challenge + - managed_challenge + example: challenge + type: string + x-auditable: true + firewallOriginTraffic: + description: 'When true, only the uncached traffic served from your origin servers will count towards rate limiting. In this case, any cached traffic served by Cloudflare will not count towards rate limiting. This field is optional. Notes: This field is deprecated. Instead, use response headers and set "origin_traffic" to "false" to avoid legacy behaviour interacting with the "response_headers" property.' + type: boolean + x-auditable: true + firewallPeriod: + description: The time in seconds (an integer value) to count matching traffic. If the count exceeds the configured threshold within this period, Cloudflare will perform the configured action. + example: 900 + maximum: 86400 + minimum: 10 + type: number + x-auditable: true + firewallRateLimitId: + description: Defines the unique identifier of the rate limit. + example: 372e67954025e0ba6aaa6d586b9e0b59 + maxLength: 32 + readOnly: true + type: string + firewallRateLimits: + type: object + $ref: '#/components/schemas/firewallRatelimit' + firewallRatelimit: + properties: + action: + $ref: '#/components/schemas/firewallAction' + bypass: + $ref: '#/components/schemas/firewallBypass' + description: + $ref: '#/components/schemas/firewallDescription' + disabled: + $ref: '#/components/schemas/firewallDisabled' + id: + $ref: '#/components/schemas/firewallId' + match: + $ref: '#/components/schemas/firewallMatch' + period: + $ref: '#/components/schemas/firewallPeriod' + threshold: + $ref: '#/components/schemas/firewallThreshold' + type: object + firewallRatelimitResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + items: + type: object + $ref: '#/components/schemas/firewallRateLimits' + nullable: true + type: array + success: + description: Defines whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/firewallResultInfo' + required: + - success + - errors + - messages + - result + firewallRatelimitResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + $ref: '#/components/schemas/firewallRateLimits' + success: + description: Defines whether the API call was successful. + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + firewallResultInfo: + properties: + count: + description: Defines the total number of results for the requested service. + example: 1 + type: number + page: + description: Defines the current page within paginated list of results. + example: 1 + type: number + per_page: + description: Defines the number of results per page of results. + example: 20 + type: number + total_count: + description: Defines the total results available without any search parameters. + example: 2000 + type: number + type: object + firewallSchemes: + description: The HTTP schemes to match. You can specify one scheme (`['HTTPS']`), both schemes (`['HTTP','HTTPS']`), or all schemes (`['_ALL_']`). This field is optional. + example: + - HTTP + - HTTPS + items: + description: An HTTP scheme or `_ALL_` to indicate all schemes. + example: HTTPS + type: string + type: array + x-auditable: true + firewallThreshold: + description: The threshold that will trigger the configured mitigation action. Configure this value along with the `period` property to establish a threshold per period. + example: 60 + minimum: 1 + type: number + x-auditable: true + firewallTimeout: + description: 'The time in seconds during which Cloudflare will perform the mitigation action. Must be an integer value greater than or equal to the period. Notes: If "mode" is "challenge", "managed_challenge", or "js_challenge", Cloudflare will use the zone''s Challenge Passage time and you should not provide this value.' + example: 86400 + maximum: 86400 + minimum: 1 + type: number + x-auditable: true + firewallUrl: + description: The URL pattern to match, composed of a host and a path such as `example.org/path*`. Normalization is applied before the pattern is matched. `*` wildcards are expanded to match applicable traffic. Query strings are not matched. Set the value to `*` to match all traffic to your zone. + example: '*.example.org/path*' + maxLength: 1024 + type: string + x-auditable: true + responseInfo: + properties: + code: + minimum: 1000 + type: integer + message: + type: string + documentation_url: + type: string + source: + type: object + properties: + pointer: + type: string + required: + - code + - message + type: object + uniqueItems: true + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + rate_limits: + id: cloudflare.rate_limits.rate_limits + name: rate_limits + title: Rate Limits + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1rate_limits/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1rate_limits/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .action }}{{ $sep }}"action": {{ if eq (kindOf .action) "string" }}{{ .action }}{{ else }}{{ toJson .action }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .match }}{{ $sep }}"match": {{ if eq (kindOf .match) "string" }}{{ .match }}{{ else }}{{ toJson .match }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .period }}{{ $sep }}"period": {{ toJson .period }}{{- $sep = "," -}}{{ end }} + + {{- if .threshold }}{{ $sep }}"threshold": {{ toJson .threshold }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1rate_limits~1{rate_limit_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1rate_limits~1{rate_limit_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1rate_limits~1{rate_limit_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .action }}{{ $sep }}"action": {{ if eq (kindOf .action) "string" }}{{ .action }}{{ else }}{{ toJson .action }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .match }}{{ $sep }}"match": {{ if eq (kindOf .match) "string" }}{{ .match }}{{ else }}{{ toJson .match }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .period }}{{ $sep }}"period": {{ toJson .period }}{{- $sep = "," -}}{{ end }} + + {{- if .threshold }}{{ $sep }}"threshold": {{ toJson .threshold }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/rate_limits/methods/get' + - $ref: '#/components/x-stackQL-resources/rate_limits/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/rate_limits/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/rate_limits/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/rate_limits/methods/edit' diff --git a/providers/src/cloudflare/v00.00.00000/services/realtime_kit.yaml b/providers/src/cloudflare/v00.00.00000/services/realtime_kit.yaml index b1c6f82c..2c803684 100644 --- a/providers/src/cloudflare/v00.00.00000/services/realtime_kit.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/realtime_kit.yaml @@ -1,11143 +1,10733 @@ -openapi: 3.0.3 -info: - title: realtime_kit API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/moq/relays: - get: - description: >- - Lists all MoQ relays for the account. Returns only metadata. Config, - status, and tokens are omitted. - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: integer - message: - type: string - type: object - type: array - messages: - items: - properties: - code: - type: integer - message: - type: string - type: object - type: array - success: - type: boolean - result: - items: - $ref: '#/components/schemas/moqRelayListItem' - type: array - result_info: - $ref: '#/components/schemas/moqResultInfo' - required: - - success - - errors - - messages - type: object - description: Relay list retrieved successfully. - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/moqApiResponseError' - description: 'Error 21006: Unexpected server error.' - security: - - api_token: [] - summary: List relays - tags: - - MoQ Relays - operationId: get_accounts_account_id_moq_relays - post: - description: >- - Provisions a new MoQ relay instance. Auto-creates a publish+subscribe - token and a subscribe-only token. Token values are included in the - response (shown once). Config is set to defaults (lingering subscribe - enabled, 30s ceiling, origin fallback off). Use PUT to modify. - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - name: - description: Human-readable name for the relay. - type: string - required: - - name - type: object - responses: - '201': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: integer - message: - type: string - type: object - type: array - messages: - items: - properties: - code: - type: integer - message: - type: string - type: object - type: array - success: - type: boolean - result: - $ref: '#/components/schemas/moqRelayCreateResponse' - required: - - success - - errors - - messages - type: object - description: Relay created successfully. - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/moqApiResponseError' - description: >- - Bad request. Possible errors: - 21002: Request body too small (empty - or missing name) - 21004: Failed to decode body (invalid JSON) - '409': - content: - application/json: - schema: - $ref: '#/components/schemas/moqApiResponseError' - description: 'Error 21008: Relay limit exceeded for this account.' - '413': - content: - application/json: - schema: - $ref: '#/components/schemas/moqApiResponseError' - description: 'Error 21001: Request body too large.' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/moqApiResponseError' - description: 'Error 21006: Unexpected server error.' - security: - - api_token: [] - summary: Create a relay - tags: - - MoQ Relays - operationId: post_accounts_account_id_moq_relays - /accounts/{account_id}/moq/relays/{relay_id}: - delete: - description: Soft-deletes a MoQ relay. - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Relay unique identifier (32 hex characters). - in: path - name: relay_id - schema: - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: integer - message: - type: string - type: object - type: array - messages: - items: - properties: - code: - type: integer - message: - type: string - type: object - type: array - success: - type: boolean - result: - nullable: true - type: object - required: - - success - - errors - - messages - type: object - description: Relay deleted successfully. - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/moqApiResponseError' - description: 'Error 21003: Relay ID should be 32 hex characters.' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/moqApiResponseError' - description: 'Error 21007: Relay not found.' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/moqApiResponseError' - description: 'Error 21006: Unexpected server error.' - security: - - api_token: [] - summary: Delete a relay - tags: - - MoQ Relays - operationId: delete_accounts_account_id_moq_relays_relay_id - get: - description: >- - Retrieves a single MoQ relay including config and status. Tokens are NOT - included. - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Relay unique identifier (32 hex characters). - in: path - name: relay_id - schema: - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: integer - message: - type: string - type: object - type: array - messages: - items: - properties: - code: - type: integer - message: - type: string - type: object - type: array - success: - type: boolean - result: - $ref: '#/components/schemas/moqRelay' - required: - - success - - errors - - messages - type: object - description: Relay retrieved successfully. - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/moqApiResponseError' - description: 'Error 21003: Relay ID should be 32 hex characters.' - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/moqApiResponseError' - description: 'Error 21007: Relay not found.' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/moqApiResponseError' - description: 'Error 21006: Unexpected server error.' - security: - - api_token: [] - summary: Get a relay - tags: - - MoQ Relays - operationId: get_accounts_account_id_moq_relays_relay_id - put: - description: >- - Updates a relay's name and/or configuration. Partial updates: omitted - fields are preserved. Config sub-objects replace as whole objects when - present. origin_fallback and lingering_subscribe are mutually exclusive. - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Relay unique identifier (32 hex characters). - in: path - name: relay_id - schema: - type: string - required: true - requestBody: - content: - application/json: - schema: - properties: - config: - $ref: '#/components/schemas/moqRelayConfig' - name: - type: string - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: integer - message: - type: string - type: object - type: array - messages: - items: - properties: - code: - type: integer - message: - type: string - type: object - type: array - success: - type: boolean - result: - $ref: '#/components/schemas/moqRelay' - required: - - success - - errors - - messages - type: object - description: Relay updated successfully. - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/moqApiResponseError' - description: >- - Bad request. Possible errors: 21003 (relay ID should be 32 hex - characters), 21004 (failed to decode body, invalid JSON), 21009 - (origin_fallback and lingering_subscribe are mutually exclusive), - 21011 (name must not be empty). - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/moqApiResponseError' - description: 'Error 21007: Relay not found.' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/moqApiResponseError' - description: 'Error 21006: Unexpected server error.' - security: - - api_token: [] - summary: Update a relay - tags: - - MoQ Relays - operationId: put_accounts_account_id_moq_relays_relay_id - /accounts/{account_id}/moq/relays/{relay_id}/tokens/rotate: - post: - description: >- - Generates a new token for the specified type. The old token is - immediately invalidated. Token value is shown once in the response. - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Relay unique identifier (32 hex characters). - in: path - name: relay_id - schema: - type: string - required: true - requestBody: - content: - application/json: - schema: - properties: - type: - description: Which token type to rotate. - enum: - - publish_subscribe - - subscribe - type: string - required: - - type - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: integer - message: - type: string - type: object - type: array - messages: - items: - properties: - code: - type: integer - message: - type: string - type: object - type: array - success: - type: boolean - result: - $ref: '#/components/schemas/moqRotateTokenResponse' - required: - - success - - errors - - messages - type: object - description: Token rotated successfully. - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/moqApiResponseError' - description: >- - Bad request. Possible errors: 21003 (relay ID should be 32 hex - characters), 21004 (failed to decode body, invalid JSON), 21010 - (invalid token type). - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/moqApiResponseError' - description: 'Error 21007: Relay not found.' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/moqApiResponseError' - description: 'Error 21006: Unexpected server error.' - security: - - api_token: [] - summary: Rotate a token - tags: - - MoQ Relays - operationId: post_accounts_account_id_moq_relays_relay_id_tokens_rotate - /accounts/{account_id}/realtime/kit/apps: - get: - description: Fetch all apps for your account - operationId: get_apps - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - data: - items: - properties: - created_at: - type: string - readOnly: true - id: - type: string - name: - type: string - type: object - type: array - success: - type: boolean - type: object - description: OK - security: - - api_token: [] - summary: Fetch all apps - tags: - - Apps - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - apps - method: get - post: - description: Create new app for your account - operationId: create_app - requestBody: - content: - application/json: - schema: - properties: - name: - type: string - required: - - name - type: object - responses: - '200': - content: - application/json: - schema: - properties: - data: - properties: - app: - properties: - created_at: - type: string - readOnly: true - id: - type: string - name: - type: string - type: object - type: object - success: - type: boolean - type: object - description: OK - security: - - api_token: [] - summary: Create App - tags: - - Apps - x-api-token-group: - - Realtime Admin - - Realtime - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - x-stackql-sdk: - service: realtime_kit - resource_chain: - - apps - method: post - /accounts/{account_id}/realtime/kit/{app_id}/analytics/daywise: - get: - description: >- - Returns day-wise session and recording analytics data of an App for the - specified time range start_date to end_date. If start_date and end_date - are not provided, the default time range is set from 30 days ago to the - current date. - operationId: get-org-analytics - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - description: start date in YYYY-MM-DD format - in: query - name: start_date - schema: - type: string - - description: end date in YYYY-MM-DD format - in: query - name: end_date - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - data: - properties: - recording_stats: - description: >- - Recording statistics of an App during the range - specified - properties: - day_stats: - description: Day wise recording stats - items: - properties: - day: - type: string - total_recording_minutes: - description: Total recording minutes for a specific day - type: integer - total_recordings: - description: >- - Total number of recordings for a specific - day - type: integer - type: object - type: array - recording_count: - description: >- - Total number of recordings during the range - specified - type: integer - recording_minutes_consumed: - description: Total recording minutes during the range specified - type: number - type: object - session_stats: - description: >- - Session statistics of an App during the range - specified - properties: - day_stats: - description: Day wise session stats - items: - properties: - day: - type: string - total_session_minutes: - description: Total session minutes for a specific day - type: number - total_sessions: - description: Total number of sessions for a specific day - type: integer - type: object - type: array - sessions_count: - description: >- - Total number of sessions during the range - specified - type: integer - sessions_minutes_consumed: - description: Total session minutes during the range specified - type: number - type: object - type: object - success: - type: boolean - type: object - description: OK - security: - - api_token: [] - summary: Fetch day-wise session and recording analytics data for an App - tags: - - Analytics - - Organizations - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - analytics - method: get_org_analytics - /accounts/{account_id}/realtime/kit/{app_id}/analytics/livestreams/overall: - get: - description: Returns livestream analytics for the specified time range. - operationId: get-livestream-analytics-complete - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - description: >- - Specify the start time range in ISO format to access the livestream - analytics. - in: query - name: start_time - schema: - format: date-time - type: string - - description: >- - Specify the end time range in ISO format to access the livestream - analytics. - in: query - name: end_time - schema: - format: date-time - type: string - responses: - '200': - content: - application/json: - schema: - properties: - data: - properties: - count: - description: Count of total livestreams. - type: integer - total_ingest_seconds: - description: >- - Total time duration for which the input was given or - the meeting was streamed. - type: integer - total_viewer_seconds: - description: >- - Total view time for which the viewers watched the - stream. - type: integer - type: object - success: - type: boolean - type: object - description: OK - security: - - api_token: [] - summary: Fetch complete analytics data for your livestreams - tags: - - Live streams - - LivestreamAnalytics - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - livestreams - method: get_livestream_analytics_complete - /accounts/{account_id}/realtime/kit/{app_id}/livestreams: - get: - description: >- - Returns details of livestreams associated with the given App ID. It - includes livestreams created by your App and RealtimeKit meetings that - are livestreamed by your App. If you only want details of livestreams - created by your App and not RealtimeKit meetings, you can use the - `exclude_meetings` query parameter. - operationId: fetch_all_livestreams - parameters: - - description: Exclude the RealtimeKit meetings that are livestreamed. - in: query - name: exclude_meetings - schema: - default: false - type: boolean - - description: Number of results per page. - in: query - name: per_page - schema: - type: integer - - description: >- - The page number from which you want your page search results to be - displayed. - in: query - name: page_no - schema: - type: integer - - description: Specifies the status of the operation. - in: query - name: status - schema: - enum: - - LIVE - - IDLE - - ERRORED - - INVOKED - type: string - - description: >- - Specify the start time range in ISO format to access the live - stream. - in: query - name: start_time - schema: - format: date-time - type: string - - description: Specify the end time range in ISO format to access the live stream. - in: query - name: end_time - schema: - format: date-time - type: string - - description: Specifies the sorting order for the results. - in: query - name: sort_order - schema: - enum: - - ASC - - DSC - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - data: - properties: - created_at: - description: >- - Timestamp the object was created at. The time is - returned in ISO format. - format: date-time - type: string - readOnly: true - disabled: - description: Specifies if the livestream was disabled. - type: string - id: - description: The ID of the livestream. - format: uuid - type: string - ingest_server: - description: >- - The server URL to which the RTMP encoder sends the - video and audio data. - type: string - meeting_id: - description: ID of the meeting. - type: string - name: - description: Name of the livestream. - type: string - paging: - properties: - end_offset: - type: integer - start_offset: - type: integer - total_count: - type: integer - type: object - playback_url: - description: >- - The web address that viewers can use to watch the - livestream. - type: string - status: - enum: - - LIVE - - IDLE - - ERRORED - - INVOKED - type: string - stream_key: - description: Unique key for accessing each livestream. - type: string - updated_at: - description: >- - Timestamp the object was updated at. The time is - returned in ISO format. - format: date-time - type: string - readOnly: true - type: object - success: - type: boolean - type: object - description: OK - security: - - api_token: [] - summary: Fetch all livestreams - tags: - - Live streams - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - livestreams - method: get_all_livestreams - post: - description: >- - Creates a livestream for the given App ID and returns ingest server, - stream key, and playback URL. You can pass custom input to the ingest - server and stream key, and freely distribute the content using the - playback URL on any player that supports HLS/LHLS. - requestBody: - content: - application/json: - schema: - properties: - name: - description: Name of the livestream - nullable: true - type: string - type: object - responses: - '201': - content: - application/json: - schema: - properties: - data: - properties: - disabled: - description: Specifies if the livestream was disabled. - type: boolean - id: - description: The livestream ID. - type: string - ingest_server: - description: >- - The server URL to which the RTMP encoder should send - the video and audio data. - type: string - meeting_id: - nullable: true - type: string - name: - type: string - playback_url: - description: >- - The web address that viewers can use to watch the - livestream. - type: string - status: - enum: - - LIVE - - IDLE - - ERRORED - - INVOKED - type: string - stream_key: - description: Unique key for accessing each livestream. - type: string - type: object - success: - type: boolean - type: object - description: Successful response - security: - - api_token: [] - summary: Create an independent livestream - tags: - - Live streams - x-api-token-group: - - Realtime Admin - - Realtime - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - x-stackql-sdk: - service: realtime_kit - resource_chain: - - livestreams - method: create_independent_livestream - operationId: post_accounts_account_id_realtime_kit_app_id_livestreams - /accounts/{account_id}/realtime/kit/{app_id}/livestreams/sessions/{livestream_session_id}: - get: - description: >- - Returns livestream session details for the given livestream session ID. - Retrieve the `livestream_session_id`using the `Fetch livestream session - details using a session ID` API. - operationId: get-v2-livestreams-livestream-session-id - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - in: path - name: livestream_session_id - schema: - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - data: - properties: - created_at: - description: >- - Timestamp the object was created at. The time is - returned in ISO format. - format: date-time - type: string - readOnly: true - err_message: - description: >- - The server URL to which the RTMP encoder sends the - video and audio data. - type: string - id: - description: The livestream ID. - type: string - ingest_seconds: - description: Name of the livestream. - type: integer - livestream_id: - type: string - started_time: - description: Unique key for accessing each livestream. - type: string - stopped_time: - description: >- - The web address that viewers can use to watch the - livestream. - type: string - updated_at: - description: >- - Timestamp the object was updated at. The time is - returned in ISO format. - type: string - readOnly: true - viewer_seconds: - description: Specifies if the livestream was disabled. - type: integer - type: object - success: - type: boolean - type: object - description: OK - security: - - api_token: [] - summary: Fetch livestream session details using livestream session ID - tags: - - Live streams - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - livestreams - method: get_livestream_session_details_for_session_id - /accounts/{account_id}/realtime/kit/{app_id}/livestreams/{livestream_id}: - get: - description: >- - Returns details of a livestream with sessions for the given livestream - ID. Retreive the livestream ID using the `Start livestreaming a meeting` - API. - operationId: get-v2-livestream-session-livestream-id - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - description: >- - The page number from which you want your page search results to be - displayed. - in: query - name: page_no - schema: - type: integer - - description: Number of results per page. - in: query - name: per_page - schema: - type: integer - - in: path - name: livestream_id - schema: - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - data: - properties: - livestream: - properties: - created_at: - description: >- - Timestamp the object was created at. The time is - returned in ISO format. - type: string - readOnly: true - disabled: - description: Specifies if the livestream was disabled. - type: string - id: - description: ID of the livestream. - type: string - ingest_server: - description: >- - The server URL to which the RTMP encoder sends the - video and audio data. - type: string - meeting_id: - description: The ID of the meeting. - type: string - name: - description: Name of the livestream. - type: string - playback_url: - description: >- - The web address that viewers can use to watch the - livestream. - type: string - status: - enum: - - LIVE - - IDLE - - ERRORED - - INVOKED - type: string - stream_key: - description: Unique key for accessing each livestream. - type: string - updated_at: - description: >- - Timestamp the object was updated at. The time is - returned in ISO format. - type: string - readOnly: true - type: object - paging: - properties: - end_offset: - type: integer - start_offset: - type: integer - total_count: - type: integer - type: object - session: - properties: - created_at: - description: >- - Timestamp the object was created at. The time is - returned in ISO format. - format: date-time - type: string - readOnly: true - err_message: - type: string - id: - description: ID of the session. - type: string - ingest_seconds: - description: >- - The time duration for which the input was given or - the meeting was streamed. - type: number - invoked_time: - description: >- - Timestamp the object was invoked. The time is - returned in ISO format. - format: date-time - type: string - livestream_id: - type: string - started_time: - description: >- - Timestamp the object was started. The time is - returned in ISO format. - format: date-time - type: string - stopped_time: - description: >- - Timestamp the object was stopped. The time is - returned in ISO format. - format: date-time - type: string - updated_at: - description: >- - Timestamp the object was updated at. The time is - returned in ISO format. - format: date-time - type: string - readOnly: true - viewer_seconds: - description: >- - The total view time for which the viewers watched - the stream. - type: number - type: object - type: object - success: - type: boolean - type: object - description: OK - security: - - api_token: [] - summary: Fetch livestream details using livestream ID - tags: - - Live streams - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - livestreams - method: get_livestream_session_for_livestream_id - /accounts/{account_id}/realtime/kit/{app_id}/livestreams/{livestream_id}/active-livestream-session: - get: - description: >- - Returns details of all active livestreams for the given livestream ID. - Retreive the livestream ID using the `Start livestreaming a meeting` - API. - operationId: get-v2-active-livestream-session-details - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - in: path - name: livestream_id - schema: - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - data: - properties: - livestream: - properties: - created_at: - description: >- - Timestamp the object was created at. The time is - returned in ISO format. - format: date-time - type: string - readOnly: true - disabled: - description: Specifies if the livestream was disabled. - type: string - id: - type: string - ingest_server: - description: >- - The server URL to which the RTMP encoder sends the - video and audio data. - type: string - meeting_id: - description: ID of the meeting. - type: string - name: - description: Name of the livestream. - type: string - playback_url: - description: >- - The web address that viewers can use to watch the - livestream. - type: string - status: - enum: - - LIVE - - IDLE - - ERRORED - - INVOKED - type: string - stream_key: - description: Unique key for accessing each livestream. - type: string - updated_at: - description: >- - Timestamp the object was updated at. The time is - returned in ISO format. - format: date-time - type: string - readOnly: true - type: object - session: - properties: - created_at: - description: >- - Timestamp the object was created at. The time is - returned in ISO format. - format: date-time - type: string - readOnly: true - err_message: - type: string - id: - type: string - ingest_seconds: - description: >- - The time duration for which the input was given or - the meeting was streamed. - type: string - invoked_time: - description: >- - Timestamp the object was invoked. The time is - returned in ISO format. - format: date-time - type: string - livestream_id: - type: string - started_time: - description: >- - Timestamp the object was started. The time is - returned in ISO format. - format: date-time - type: string - stopped_time: - description: >- - Timestamp the object was stopped. The time is - returned in ISO format. - format: date-time - type: string - updated_at: - description: >- - Timestamp the object was updated at. The time is - returned in ISO format. - format: date-time - type: string - readOnly: true - viewer_seconds: - description: >- - The total view time for which the viewers watched - the stream. - type: string - type: object - type: object - success: - type: boolean - type: object - description: OK - security: - - api_token: [] - summary: Fetch active livestream session details - tags: - - Live streams - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - livestreams - method: get_active_livestreams_for_livestream_id - /accounts/{account_id}/realtime/kit/{app_id}/meetings: - get: - description: Returns all meetings for the given App ID. - operationId: get_all_meetings - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - allowEmptyValue: true - description: >- - The page number from which you want your page search results to be - displayed. - in: query - name: page_no - schema: - minimum: 0 - type: number - - allowEmptyValue: true - description: Number of results per page - in: query - name: per_page - schema: - minimum: 0 - type: number - - description: >- - The start time range for which you want to retrieve the meetings. - The time must be specified in ISO format. - in: query - name: start_time - schema: - format: date-time - type: string - - description: >- - The end time range for which you want to retrieve the meetings. The - time must be specified in ISO format. - in: query - name: end_time - schema: - format: date-time - type: string - - description: >- - The search query string. You can search using the meeting ID or - title. - in: query - name: search - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - data: - items: - type: object - $ref: '#/components/schemas/realtimekitMeeting' - type: array - paging: - properties: - end_offset: - type: number - start_offset: - type: number - total_count: - minimum: 0 - type: number - required: - - total_count - - start_offset - - end_offset - type: object - success: - type: boolean - required: - - success - - data - - paging - title: PagingResponse - type: object - description: Success response - security: - - api_token: [] - summary: Fetch all meetings for an App - tags: - - Meetings - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - meetings - method: get - post: - description: Create a meeting for the given App ID. - operationId: create_meeting - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - ai_config: - $ref: '#/components/schemas/realtimekitAIConfig' - live_stream_on_start: - default: false - description: >- - Specifies if the meeting should start getting livestreamed - on start. - nullable: true - type: boolean - persist_chat: - default: false - description: >- - If a meeting is set to persist_chat, meeting chat would - remain for a week within the meeting space. - type: boolean - record_on_start: - default: false - description: >- - Specifies if the meeting should start getting recorded as - soon as someone joins the meeting. - nullable: true - type: boolean - recording_config: - $ref: '#/components/schemas/realtimekitRecordingConfig' - session_keep_alive_time_in_secs: - default: 60 - description: >- - Time in seconds, for which a session remains active, after - the last participant has left the meeting. - maximum: 600 - minimum: 60 - type: number - summarize_on_end: - default: false - description: >- - Automatically generate summary of meetings using - transcripts. Requires Transcriptions to be enabled, and can - be retrieved via Webhooks or summary API. - type: boolean - title: - description: Title of the meeting - nullable: true - type: string - type: object - description: Create meeting body - responses: - '201': - content: - application/json: - schema: - properties: - data: - description: Data returned by the operation - type: object - properties: - created_at: - description: >- - Timestamp the object was created at. The time is - returned in ISO format. - format: date-time - readOnly: true - type: string - id: - description: ID of the meeting. - format: uuid - readOnly: true - type: string - live_stream_on_start: - description: >- - Specifies if the meeting should start getting - livestreamed on start. - type: boolean - persist_chat: - description: >- - Specifies if Chat within a meeting should persist for - a week. - type: boolean - record_on_start: - description: >- - Specifies if the meeting should start getting recorded - as soon as someone joins the meeting. - type: boolean - session_keep_alive_time_in_secs: - default: 60 - description: >- - Time in seconds, for which a session remains active, - after the last participant has left the meeting. - maximum: 600 - minimum: 60 - type: number - status: - description: >- - Whether the meeting is `ACTIVE` or `INACTIVE`. Users - will not be able to join an `INACTIVE` meeting. - enum: - - ACTIVE - - INACTIVE - type: string - summarize_on_end: - description: >- - Automatically generate summary of meetings using - transcripts. Requires Transcriptions to be enabled, - and can be retrieved via Webhooks or summary API. - type: boolean - title: - description: Title of the meeting. - type: string - updated_at: - description: >- - Timestamp the object was updated at. The time is - returned in ISO format. - format: date-time - readOnly: true - type: string - recording_config: - $ref: '#/components/schemas/realtimekitRecordingConfig' - ai_config: - $ref: '#/components/schemas/realtimekitAIConfig' - required: - - id - - created_at - - updated_at - success: - default: true - description: Success status of the operation - type: boolean - required: - - success - title: GenericSuccessResponse - type: object - description: Success Response - security: - - api_token: [] - summary: Create a meeting - tags: - - Meetings - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - meetings - method: create - /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}: - get: - description: Returns a meeting details in an App for the given meeting ID. - operationId: get_meeting - parameters: - - in: query - name: name - schema: - type: string - - name: meeting_id - in: path - required: true - description: The Realtime Kit meeting ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - data: - description: Data returned by the operation - type: object - properties: - created_at: - description: >- - Timestamp the object was created at. The time is - returned in ISO format. - format: date-time - readOnly: true - type: string - id: - description: ID of the meeting. - format: uuid - readOnly: true - type: string - live_stream_on_start: - description: >- - Specifies if the meeting should start getting - livestreamed on start. - type: boolean - persist_chat: - description: >- - Specifies if Chat within a meeting should persist for - a week. - type: boolean - record_on_start: - description: >- - Specifies if the meeting should start getting recorded - as soon as someone joins the meeting. - type: boolean - session_keep_alive_time_in_secs: - default: 60 - description: >- - Time in seconds, for which a session remains active, - after the last participant has left the meeting. - maximum: 600 - minimum: 60 - type: number - status: - description: >- - Whether the meeting is `ACTIVE` or `INACTIVE`. Users - will not be able to join an `INACTIVE` meeting. - enum: - - ACTIVE - - INACTIVE - type: string - summarize_on_end: - description: >- - Automatically generate summary of meetings using - transcripts. Requires Transcriptions to be enabled, - and can be retrieved via Webhooks or summary API. - type: boolean - title: - description: Title of the meeting. - type: string - updated_at: - description: >- - Timestamp the object was updated at. The time is - returned in ISO format. - format: date-time - readOnly: true - type: string - recording_config: - $ref: '#/components/schemas/realtimekitRecordingConfig' - ai_config: - $ref: '#/components/schemas/realtimekitAIConfig' - required: - - id - - created_at - - updated_at - success: - default: true - description: Success status of the operation - type: boolean - required: - - success - title: GenericSuccessResponse - type: object - description: Success Response - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/realtimekitGenericErrorResponse' - description: Failure response - security: - - api_token: [] - summary: Fetch a meeting for an App - tags: - - Meetings - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - meetings - method: get_meeting_by_id - patch: - description: Updates a meeting in an App for the given meeting ID. - operationId: update_meeting - parameters: - - name: meeting_id - in: path - required: true - description: The Realtime Kit meeting ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - ai_config: - $ref: '#/components/schemas/realtimekitAIConfig' - live_stream_on_start: - default: false - description: >- - Specifies if the meeting should start getting livestreamed - on start. - type: boolean - persist_chat: - default: false - description: >- - If a meeting is updated to persist_chat, meeting chat would - remain for a week within the meeting space. - type: boolean - record_on_start: - default: false - description: >- - Specifies if the meeting should start getting recorded as - soon as someone joins the meeting. - type: boolean - session_keep_alive_time_in_secs: - default: 60 - description: >- - Time in seconds, for which a session remains active, after - the last participant has left the meeting. - maximum: 600 - minimum: 60 - type: number - status: - description: >- - Whether the meeting is `ACTIVE` or `INACTIVE`. Users will - not be able to join an `INACTIVE` meeting. - enum: - - ACTIVE - - INACTIVE - type: string - summarize_on_end: - default: false - description: >- - Automatically generate summary of meetings using - transcripts. Requires Transcriptions to be enabled, and can - be retrieved via Webhooks or summary API. - type: boolean - title: - description: Title of the meeting - type: string - type: object - description: Create meeting body - responses: - '200': - content: - application/json: - schema: - properties: - data: - description: Data returned by the operation - type: object - properties: - created_at: - description: >- - Timestamp the object was created at. The time is - returned in ISO format. - format: date-time - readOnly: true - type: string - id: - description: ID of the meeting. - format: uuid - readOnly: true - type: string - live_stream_on_start: - description: >- - Specifies if the meeting should start getting - livestreamed on start. - type: boolean - persist_chat: - description: >- - Specifies if Chat within a meeting should persist for - a week. - type: boolean - record_on_start: - description: >- - Specifies if the meeting should start getting recorded - as soon as someone joins the meeting. - type: boolean - session_keep_alive_time_in_secs: - default: 60 - description: >- - Time in seconds, for which a session remains active, - after the last participant has left the meeting. - maximum: 600 - minimum: 60 - type: number - status: - description: >- - Whether the meeting is `ACTIVE` or `INACTIVE`. Users - will not be able to join an `INACTIVE` meeting. - enum: - - ACTIVE - - INACTIVE - type: string - summarize_on_end: - description: >- - Automatically generate summary of meetings using - transcripts. Requires Transcriptions to be enabled, - and can be retrieved via Webhooks or summary API. - type: boolean - title: - description: Title of the meeting. - type: string - updated_at: - description: >- - Timestamp the object was updated at. The time is - returned in ISO format. - format: date-time - readOnly: true - type: string - recording_config: - $ref: '#/components/schemas/realtimekitRecordingConfig' - ai_config: - $ref: '#/components/schemas/realtimekitAIConfig' - required: - - id - - created_at - - updated_at - success: - default: true - description: Success status of the operation - type: boolean - required: - - success - title: GenericSuccessResponse - type: object - description: Success Response - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/realtimekitGenericErrorResponse' - description: Failure response - security: - - api_token: [] - summary: Update a meeting - tags: - - Meetings - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - meetings - method: update_meeting_by_id - put: - description: Replaces all the details for the given meeting ID. - operationId: replace_meeting - parameters: - - name: meeting_id - in: path - required: true - description: The Realtime Kit meeting ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - ai_config: - $ref: '#/components/schemas/realtimekitAIConfig' - live_stream_on_start: - default: false - description: >- - Specifies if the meeting should start getting livestreamed - on start. - nullable: true - type: boolean - persist_chat: - default: false - description: >- - If a meeting is set to persist_chat, meeting chat would - remain for a week within the meeting space. - type: boolean - record_on_start: - default: false - description: >- - Specifies if the meeting should start getting recorded as - soon as someone joins the meeting. - nullable: true - type: boolean - recording_config: - $ref: '#/components/schemas/realtimekitRecordingConfig' - session_keep_alive_time_in_secs: - default: 60 - description: >- - Time in seconds, for which a session remains active, after - the last participant has left the meeting. - maximum: 600 - minimum: 60 - type: number - summarize_on_end: - default: false - description: >- - Automatically generate summary of meetings using - transcripts. Requires Transcriptions to be enabled, and can - be retrieved via Webhooks or summary API. - type: boolean - title: - description: Title of the meeting - nullable: true - type: string - type: object - description: Create meeting body - responses: - '200': - content: - application/json: - schema: - properties: - data: - description: Data returned by the operation - type: object - properties: - created_at: - description: >- - Timestamp the object was created at. The time is - returned in ISO format. - format: date-time - readOnly: true - type: string - id: - description: ID of the meeting. - format: uuid - readOnly: true - type: string - live_stream_on_start: - description: >- - Specifies if the meeting should start getting - livestreamed on start. - type: boolean - persist_chat: - description: >- - Specifies if Chat within a meeting should persist for - a week. - type: boolean - record_on_start: - description: >- - Specifies if the meeting should start getting recorded - as soon as someone joins the meeting. - type: boolean - session_keep_alive_time_in_secs: - default: 60 - description: >- - Time in seconds, for which a session remains active, - after the last participant has left the meeting. - maximum: 600 - minimum: 60 - type: number - status: - description: >- - Whether the meeting is `ACTIVE` or `INACTIVE`. Users - will not be able to join an `INACTIVE` meeting. - enum: - - ACTIVE - - INACTIVE - type: string - summarize_on_end: - description: >- - Automatically generate summary of meetings using - transcripts. Requires Transcriptions to be enabled, - and can be retrieved via Webhooks or summary API. - type: boolean - title: - description: Title of the meeting. - type: string - updated_at: - description: >- - Timestamp the object was updated at. The time is - returned in ISO format. - format: date-time - readOnly: true - type: string - recording_config: - $ref: '#/components/schemas/realtimekitRecordingConfig' - ai_config: - $ref: '#/components/schemas/realtimekitAIConfig' - required: - - id - - created_at - - updated_at - success: - default: true - description: Success status of the operation - type: boolean - required: - - success - title: GenericSuccessResponse - type: object - description: Success Response - security: - - api_token: [] - summary: Replace a meeting - tags: - - Meetings - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - meetings - method: replace_meeting_by_id - /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-livestream: - get: - description: Returns details of all active livestreams for the given meeting ID. - operationId: get-v2-meetings-meetingId-active-livestream - parameters: - - name: meeting_id - in: path - required: true - description: The Realtime Kit meeting ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - data: - properties: - created_at: - description: >- - Timestamp the object was created at. The time is - returned in ISO format. - format: date-time - type: string - readOnly: true - disabled: - description: Specifies if the livestream was disabled. - type: string - id: - description: The livestream ID. - type: string - ingest_server: - description: >- - The server URL to which the RTMP encoder sends the - video and audio data. - type: string - meeting_id: - type: string - name: - description: Name of the livestream. - nullable: true - type: string - playback_url: - description: >- - The web address that viewers can use to watch the - livestream. - type: string - status: - enum: - - LIVE - - IDLE - - ERRORED - - INVOKED - type: string - stream_key: - description: Unique key for accessing each livestream. - type: string - updated_at: - description: >- - Timestamp the object was updated at. The time is - returned in ISO format. - format: date-time - type: string - readOnly: true - type: object - success: - type: boolean - type: object - description: OK - security: - - api_token: [] - summary: Fetch active livestreams for a meeting - tags: - - Live streams - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - livestreams - method: get_meeting_active_livestreams - /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-livestream/stop: - post: - description: >- - Stops the active livestream of a meeting associated with the given - meeting ID. Retreive the meeting ID using the `Create a meeting` API. - operationId: stop_livestreaming - parameters: - - name: meeting_id - in: path - required: true - description: The Realtime Kit meeting ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - requestBody: - content: {} - responses: - '200': - content: - application/json: - schema: - properties: - data: - properties: - message: - type: string - type: object - success: - type: boolean - type: object - description: OK - security: - - api_token: [] - summary: Stop livestreaming a meeting - tags: - - Live streams - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - livestreams - method: stop_livestreaming_a_meeting - /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session: - get: - description: Returns details of an ongoing active session for the given meeting ID. - operationId: GetActiveSession - parameters: - - name: meeting_id - in: path - required: true - description: The Realtime Kit meeting ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - data: - $ref: '#/components/schemas/realtimekitActiveSession' - success: - type: boolean - type: object - description: Active Session Success response - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/realtimekitGenericErrorResponse' - description: Active Session is not found for the given meetingId - security: - - api_token: [] - summary: Fetch details of an active session - tags: - - Active session - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - active_session - method: get_active_session - /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session/kick: - post: - description: >- - Kicks one or more participants from an active session using user ID or - custom participant ID. - operationId: KickPartcipants - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - name: meeting_id - in: path - required: true - description: The Realtime Kit meeting ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - custom_participant_ids: - items: - type: string - type: array - participant_ids: - items: - type: string - type: array - required: - - participant_ids - - custom_participant_ids - type: object - description: >- - Request body for kicking participants from an active session. Only one - of `participant_id` or `custom_participant_id` is required. - responses: - '200': - content: - application/json: - schema: - properties: - data: - properties: - action: - type: string - participants: - items: - $ref: '#/components/schemas/realtimekitSessionParticipant' - type: array - type: object - success: - type: boolean - type: object - description: Kick participants success response - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/realtimekitGenericErrorResponse' - description: >- - No participant found for the given `participant_id` or - `custom_participant_id` - security: - - api_token: [] - summary: Kick participants from an active session - tags: - - Active session - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - active_session - method: kick_participants - /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session/kick-all: - post: - description: Kicks all participants from an active session for the given meeting ID. - operationId: KickAllParticipants - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - name: meeting_id - in: path - required: true - description: The Realtime Kit meeting ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - data: - properties: - action: - type: string - kicked_participants_count: - type: number - type: object - success: - type: boolean - type: object - description: Kick all participants from a meeting - security: - - api_token: [] - summary: Kick all participants - tags: - - Active session - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - active_session - method: kick_all_participants - /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session/mute: - post: - description: >- - Mutes one or more participants from an active session using user ID or - custom participant ID. - operationId: MuteParticipants - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - name: meeting_id - in: path - required: true - description: The Realtime Kit meeting ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - custom_participant_ids: - items: - type: string - type: array - participant_ids: - items: - type: string - type: array - required: - - participant_ids - - custom_participant_ids - type: object - description: >- - Request body for kicking participants from an active session. Only one - of `participant_id` or `custom_participant_id` is required. - responses: - '200': - content: - application/json: - schema: - properties: - data: - properties: - action: - type: string - participants: - items: - $ref: '#/components/schemas/realtimekitSessionParticipant' - type: array - type: object - success: - type: boolean - type: object - description: Mute one or more participants of a meeting - security: - - api_token: [] - summary: Mute participants of an active session - tags: - - Active session - x-api-token-group: - - Realtime Admin - - Realtime - /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session/mute-all: - post: - description: Mutes all participants of an active session for the given meeting ID. - operationId: MuteAllParticipants - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - name: meeting_id - in: path - required: true - description: The Realtime Kit meeting ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - allow_unmute: - description: >- - if false, participants won't be able to unmute themselves - after they are muted - type: boolean - required: - - allow_unmute - type: object - description: Request body for muting all participants in an active session. - responses: - '200': - content: - application/json: - schema: - properties: - data: - properties: - action: - type: string - muted_participants_count: - type: number - type: object - success: - type: boolean - type: object - description: Mute all participants of a meeting - security: - - api_token: [] - summary: Mute all participants - tags: - - Active session - x-api-token-group: - - Realtime Admin - - Realtime - /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session/poll: - post: - description: Creates a new poll in an active session for the given meeting ID. - operationId: CreatePoll - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - name: meeting_id - in: path - required: true - description: The Realtime Kit meeting ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - anonymous: - description: if voters on a poll are anonymous - type: boolean - hide_votes: - description: if votes on an option are visible before a person votes - type: boolean - options: - description: Different options for the question - items: - type: string - type: array - question: - description: Question of the poll - type: string - required: - - question - - options - type: object - description: Request body for creating a new poll - responses: - '201': - content: - application/json: - schema: - properties: - data: - properties: - action: - type: string - poll: - $ref: '#/components/schemas/realtimekitPoll' - type: object - success: - type: boolean - type: object - description: response for creating a poll - '400': - description: Bad Request - security: - - api_token: [] - summary: Create a poll - tags: - - Active session - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - active_session - method: create_poll - /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/livestream: - get: - description: >- - Returns livestream session details for the given meeting ID. Retreive - the meeting ID using the `Create a meeting` API. - operationId: livestream-session-details - parameters: - - description: >- - The page number from which you want your page search results to be - displayed. - in: query - name: page_no - schema: - type: integer - - description: Number of results per page. - in: query - name: per_page - schema: - type: integer - - name: meeting_id - in: path - required: true - description: The Realtime Kit meeting ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - data: - properties: - livestreams: - items: - properties: - created_at: - description: >- - The timestamp at which the livestream was - created. The time is returned in ISO format. - format: date-time - type: string - readOnly: true - disabled: - description: Specifies if the livestream was disabled. - type: boolean - id: - description: The livestream ID. - type: string - ingest_server: - description: >- - The server URL to which the RTMP encoder sends - the video and audio data. - type: string - meeting_id: - description: The ID of the meeting that was livestreamed. - type: string - name: - description: Name of the livestream. - nullable: true - type: string - playback_url: - description: >- - The web address that viewers can use to watch - the livestream. - type: string - status: - enum: - - LIVE - - INVOKED - - ERRORED - - IDLE - type: string - stream_key: - description: Unique key for accessing each livestream. - type: string - updated_at: - description: >- - The timestamp at which the livestream was - updated. The time is returned in ISO format. - format: date-time - type: string - readOnly: true - type: object - type: array - paging: - properties: - end_offset: - type: integer - start_offset: - type: integer - total_count: - type: integer - type: object - sessions: - properties: - created_at: - description: >- - The timestamp at which the livestream was created. - The time is returned in ISO format. - format: date-time - type: string - readOnly: true - err_message: - type: string - id: - description: The ID of the livestream session. - type: string - ingest_seconds: - description: >- - The time duration for which the input was given or - the meeting was streamed. - type: string - invoked_time: - description: The time at which the livestream was invoked. - format: date-time - type: string - livestream_id: - description: The ID of the livestream. - type: string - started_time: - description: The time at which the livestream was started. - format: date-time - type: string - stopped_time: - description: The time at which the livestream was stopped. - format: date-time - type: string - updated_at: - description: >- - The timestamp at which the livestream was updated. - The time is returned in ISO format. - format: date-time - type: string - readOnly: true - type: object - type: object - success: - type: boolean - type: object - description: OK - security: - - api_token: [] - summary: Fetch livestream session details for a meeting - tags: - - Live streams - x-api-token-group: - - Realtime Admin - - Realtime - /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/livestreams: - post: - description: >- - Starts livestream of a meeting associated with the given meeting ID. - Retreive the meeting ID using the `Create a meeting` API. - operationId: start-livestreaming - parameters: - - name: meeting_id - in: path - required: true - description: The Realtime Kit meeting ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - name: - nullable: true - type: string - video_config: - properties: - height: - description: Height of the livestreaming video in pixels - type: integer - width: - description: Width of the livestreaming video in pixels - type: integer - type: object - type: object - responses: - '201': - content: - application/json: - schema: - properties: - data: - properties: - id: - description: The livestream ID. - type: string - ingest_server: - description: >- - The server URL to which the RTMP encoder sends the - video and audio data. - type: string - playback_url: - description: >- - The web address that viewers can use to watch the - livestream. - type: string - status: - enum: - - LIVE - - IDLE - - ERRORED - - INVOKED - type: string - stream_key: - description: Unique key for accessing each livestream. - type: string - type: object - success: - type: boolean - type: object - description: Created - security: - - api_token: [] - summary: Start livestreaming a meeting - tags: - - Live streams - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - livestreams - method: start_livestreaming_a_meeting - /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/participants: - get: - description: Returns all participants detail for the given meeting ID. - operationId: get_meeting_participants - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - allowEmptyValue: true - description: >- - The page number from which you want your page search results to be - displayed. - in: query - name: page_no - schema: - minimum: 0 - type: number - - allowEmptyValue: true - description: Number of results per page - in: query - name: per_page - schema: - minimum: 0 - type: number - - name: meeting_id - in: path - required: true - description: The Realtime Kit meeting ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - data: - items: - type: object - $ref: '#/components/schemas/realtimekitParticipant' - type: array - paging: - properties: - end_offset: - type: number - start_offset: - type: number - total_count: - minimum: 0 - type: number - required: - - total_count - - start_offset - - end_offset - type: object - success: - type: boolean - required: - - success - - data - - paging - title: PagingResponse - type: object - description: Success response - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/realtimekitGenericErrorResponse' - description: Failure response - security: - - api_token: [] - summary: Fetch all participants of a meeting - tags: - - Meetings - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - meetings - method: get_meeting_participants - post: - description: Adds a participant to the given meeting ID. - operationId: add_participant - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - name: meeting_id - in: path - required: true - description: The Realtime Kit meeting ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - custom_participant_id: - description: >- - A unique participant ID. You must specify a unique ID for - the participant, for example, UUID, email address, and so - on. - type: string - name: - description: (Optional) Name of the participant. - nullable: true - type: string - picture: - description: >- - (Optional) A URL to a picture to be used for the - participant. - format: uri - nullable: true - type: string - preset_name: - default: group_call_host - description: Name of the preset to apply to this participant. - type: string - required: - - preset_name - - custom_participant_id - type: object - responses: - '201': - content: - application/json: - schema: - properties: - data: - description: Represents a participant. - type: object - properties: - created_at: - description: >- - When this object was created. The time is returned in - ISO format. - format: date-time - type: string - readOnly: true - custom_participant_id: - description: A unique participant ID generated by the client. - type: string - id: - description: ID of the participant. - format: uuid - type: string - name: - description: Name of the participant. - nullable: true - type: string - picture: - description: URL to a picture of the participant. - format: uri - nullable: true - type: string - preset_name: - description: Preset applied to the participant. - type: string - updated_at: - description: >- - When this object was updated. The time is returned in - ISO format. - format: date-time - type: string - readOnly: true - token: - description: >- - The participant's auth token that can be used for - joining a meeting from the client side. - type: string - required: - - id - - custom_participant_id - - preset_name - - created_at - - updated_at - - token - title: Participant - success: - default: true - description: Success status of the operation - type: boolean - required: - - success - title: GenericSuccessResponse - type: object - description: Success response - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/realtimekitGenericErrorResponse' - description: Failure response - security: - - api_token: [] - summary: Add a participant - tags: - - Meetings - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - meetings - method: add_participant - /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/participants/{participant_id}: - delete: - description: Deletes a participant for the given meeting and participant ID. - operationId: delete_meeting_participant - parameters: - - name: meeting_id - in: path - required: true - description: The Realtime Kit meeting ID. - schema: - type: string - - description: >- - ID of the participant. You can fetch the participant ID using the - add a participant API. - in: path - name: participant_id - schema: - type: string - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - data: - description: Data returned by the operation - type: object - properties: - created_at: - description: >- - Timestamp this object was created at. The time is - returned in ISO format. - format: date-time - type: string - readOnly: true - custom_participant_id: - description: A unique participant ID generated by the client. - type: string - preset_id: - description: ID of the preset applied to this participant. - format: uuid - type: string - updated_at: - description: >- - Timestamp this object was updated at. The time is - returned in ISO format. - format: date-time - type: string - readOnly: true - required: - - custom_participant_id - - preset_id - - created_at - - updated_at - success: - default: true - description: Success status of the operation - type: boolean - required: - - success - title: GenericSuccessResponse - type: object - description: Success response - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/realtimekitGenericErrorResponse' - description: Failure response - security: - - api_token: [] - summary: Delete a participant - tags: - - Meetings - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - meetings - method: delete_meeting_participant - get: - description: Returns a participant details for the given meeting and participant ID. - operationId: get_meeting_participant - parameters: - - name: meeting_id - in: path - required: true - description: The Realtime Kit meeting ID. - schema: - type: string - - description: >- - ID of the participant. You can fetch the participant ID using the - add a participant API. - in: path - name: participant_id - schema: - type: string - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - data: - description: Data returned by the operation - type: object - $ref: '#/components/schemas/realtimekitParticipant' - success: - default: true - description: Success status of the operation - type: boolean - required: - - success - - data - title: GenericSuccessResponse - type: object - description: Success response - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/realtimekitGenericErrorResponse' - description: Failure response - security: - - api_token: [] - summary: Fetch a participant's detail - tags: - - Meetings - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - meetings - method: get_meeting_participant - patch: - description: >- - Updates a participant's details for the given meeting and participant - ID. - operationId: edit_participant - parameters: - - name: meeting_id - in: path - required: true - description: The Realtime Kit meeting ID. - schema: - type: string - - description: >- - ID of the participant. You can fetch the participant ID using the - add a participant API. - in: path - name: participant_id - schema: - type: string - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - name: - description: (Optional) Name of the participant. - nullable: true - type: string - picture: - description: >- - (Optional) A URL to a picture to be used for the - participant. - format: uri - nullable: true - type: string - preset_name: - description: (Optional) Name of the preset to apply to this participant. - nullable: true - type: string - type: object - responses: - '200': - content: - application/json: - schema: - properties: - data: - description: Represents a participant. - type: object - properties: - created_at: - description: >- - When this object was created. The time is returned in - ISO format. - format: date-time - type: string - readOnly: true - custom_participant_id: - description: A unique participant ID generated by the client. - type: string - id: - description: ID of the participant. - format: uuid - type: string - name: - description: Name of the participant. - nullable: true - type: string - picture: - description: URL to a picture of the participant. - format: uri - nullable: true - type: string - preset_name: - description: Preset applied to the participant. - type: string - updated_at: - description: >- - When this object was updated. The time is returned in - ISO format. - format: date-time - type: string - readOnly: true - token: - description: >- - The participant's auth token that can be used for - joining a meeting from the client side. - type: string - required: - - id - - custom_participant_id - - preset_name - - created_at - - updated_at - - token - title: Participant - success: - default: true - description: Success status of the operation - type: boolean - required: - - success - title: GenericSuccessResponse - type: object - description: Success response - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/realtimekitGenericErrorResponse' - description: Failure response - security: - - api_token: [] - summary: Edit a participant's detail - tags: - - Meetings - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - meetings - method: edit_participant - /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/participants/{participant_id}/token: - post: - description: >- - Regenerates participant's authentication token for the given meeting and - participant ID. - operationId: regenerate_token - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - name: meeting_id - in: path - required: true - description: The Realtime Kit meeting ID. - schema: - type: string - - description: >- - ID of the participant. You can fetch the participant ID using the - add a participant API. - in: path - name: participant_id - schema: - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - data: - description: Data returned by the operation - type: object - properties: - token: - description: Regenerated participant's authentication token. - type: string - required: - - token - success: - default: true - description: Success status of the operation - type: boolean - required: - - success - - data - title: GenericSuccessResponse - type: object - description: Example response - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/realtimekitGenericErrorResponse' - description: Failure response - security: - - api_token: [] - summary: Refresh participant's authentication token - tags: - - Meetings - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - meetings - method: refresh_participant_token - /accounts/{account_id}/realtime/kit/{app_id}/presets: - get: - description: Fetches all the presets belonging to an App. - operationId: get-presets - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - allowEmptyValue: true - description: Number of results per page - in: query - name: per_page - schema: - minimum: 0 - type: number - - allowEmptyValue: true - description: >- - The page number from which you want your page search results to be - displayed. - in: query - name: page_no - schema: - minimum: 0 - type: number - responses: - '200': - content: - application/json: - schema: - properties: - data: - items: - type: object - $ref: '#/components/schemas/realtimekitPresetListItem' - type: array - paging: - properties: - end_offset: - type: number - start_offset: - type: number - total_count: - minimum: 0 - type: number - required: - - total_count - - start_offset - - end_offset - type: object - success: - type: boolean - required: - - success - - data - - paging - title: PagingResponse - type: object - description: Example response - security: - - api_token: [] - summary: Fetch all presets - tags: - - Presets - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - presets - method: get - post: - description: Creates a preset belonging to the current App - operationId: post-presets - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/realtimekitPreset' - responses: - '200': - content: - application/json: - schema: - properties: - data: - description: Data returned by the operation - type: object - properties: - id: - description: ID of the preset - format: uuid - type: string - config: - properties: - max_screenshare_count: - description: >- - Maximum number of screen shares that can be active - at a given time - type: integer - max_video_streams: - description: >- - Maximum number of streams that are visible on a - device - properties: - desktop: - description: >- - Maximum number of video streams visible on - desktop devices - type: integer - mobile: - description: >- - Maximum number of streams visible on mobile - devices - type: integer - required: - - mobile - - desktop - type: object - media: - description: 'Media configuration options. eg: Video quality' - properties: - audio: - description: Control options for Audio quality. - properties: - enable_high_bitrate: - default: false - description: >- - Enable High Quality Audio for your - meetings - type: boolean - enable_stereo: - default: false - description: Enable Stereo for your meetings - type: boolean - type: object - screenshare: - description: >- - Configuration options for participant screen - shares - properties: - frame_rate: - description: Frame rate of screen share - type: integer - quality: - description: Quality of screen share - enum: - - hd - - vga - - qvga - type: string - required: - - quality - - frame_rate - type: object - video: - description: Configuration options for participant videos - properties: - frame_rate: - description: Frame rate of participants' video - maximum: 30 - type: integer - quality: - description: Video quality of participants - enum: - - hd - - vga - - qvga - type: string - required: - - quality - - frame_rate - type: object - required: - - video - - screenshare - type: object - view_type: - description: Type of the meeting - enum: - - GROUP_CALL - - WEBINAR - - AUDIO_ROOM - type: string - required: - - view_type - - max_video_streams - - max_screenshare_count - - media - type: object - name: - description: Name of the preset - type: string - permissions: - properties: - accept_waiting_requests: - description: >- - Whether this participant can accept waiting - requests - type: boolean - can_accept_production_requests: - type: boolean - can_change_participant_permissions: - type: boolean - can_edit_display_name: - type: boolean - can_livestream: - type: boolean - can_record: - type: boolean - can_spotlight: - type: boolean - chat: - description: Chat permissions - properties: - private: - properties: - can_receive: - type: boolean - can_send: - type: boolean - files: - type: boolean - text: - type: boolean - required: - - can_send - - can_receive - - text - - files - type: object - public: - properties: - can_send: - description: Can send messages in general - type: boolean - files: - description: Can send file messages - type: boolean - text: - description: Can send text messages - type: boolean - required: - - can_send - - text - - files - type: object - required: - - public - - private - type: object - connected_meetings: - properties: - can_alter_connected_meetings: - type: boolean - can_switch_connected_meetings: - type: boolean - can_switch_to_parent_meeting: - type: boolean - required: - - can_alter_connected_meetings - - can_switch_connected_meetings - - can_switch_to_parent_meeting - type: object - disable_participant_audio: - type: boolean - disable_participant_screensharing: - type: boolean - disable_participant_video: - type: boolean - hidden_participant: - description: >- - Whether this participant is visible to others or - not - type: boolean - is_recorder: - default: false - type: boolean - kick_participant: - type: boolean - media: - description: Media permissions - properties: - audio: - description: Audio permissions - properties: - can_produce: - description: Can produce audio - enum: - - ALLOWED - - NOT_ALLOWED - - CAN_REQUEST - type: string - required: - - can_produce - type: object - screenshare: - description: Screenshare permissions - properties: - can_produce: - description: Can produce screen share video - enum: - - ALLOWED - - NOT_ALLOWED - - CAN_REQUEST - type: string - required: - - can_produce - type: object - video: - description: Video permissions - properties: - can_produce: - description: Can produce video - enum: - - ALLOWED - - NOT_ALLOWED - - CAN_REQUEST - type: string - required: - - can_produce - type: object - required: - - video - - audio - - screenshare - type: object - pin_participant: - type: boolean - plugins: - description: Plugin permissions - properties: - can_close: - description: Can close plugins that are already open - type: boolean - can_edit_config: - description: Can edit plugin config - type: boolean - can_start: - description: Can start plugins - type: boolean - config: - type: string - format: uuid - properties: - access_control: - enum: - - FULL_ACCESS - - VIEW_ONLY - type: string - handles_view_only: - type: boolean - required: - - access_control - - handles_view_only - required: - - can_close - - can_start - - can_edit_config - - config - type: object - polls: - description: Poll permissions - properties: - can_create: - description: Can create polls - type: boolean - can_view: - description: Can view polls - type: boolean - can_vote: - description: Can vote on polls - type: boolean - required: - - can_create - - can_vote - - can_view - type: object - recorder_type: - default: NONE - description: Type of the recording peer - enum: - - RECORDER - - LIVESTREAMER - - NONE - type: string - show_participant_list: - type: boolean - waiting_room_type: - description: Waiting room type - enum: - - SKIP - - ON_PRIVILEGED_USER_ENTRY - - SKIP_ON_ACCEPT - type: string - required: - - accept_waiting_requests - - can_accept_production_requests - - can_edit_display_name - - can_spotlight - - recorder_type - - disable_participant_audio - - disable_participant_screensharing - - disable_participant_video - - kick_participant - - pin_participant - - can_record - - can_livestream - - waiting_room_type - - plugins - - connected_meetings - - polls - - media - - chat - - hidden_participant - - show_participant_list - - can_change_participant_permissions - type: object - ui: - properties: - config_diff: - type: object - design_tokens: - properties: - border_radius: - enum: - - rounded - type: string - border_width: - enum: - - thin - type: string - colors: - properties: - background: - properties: - '600': - default: '#222222' - type: string - '700': - default: '#1f1f1f' - type: string - '800': - default: '#1b1b1b' - type: string - '900': - default: '#181818' - type: string - '1000': - default: '#141414' - type: string - required: - - '600' - - '700' - - '800' - - '900' - - '1000' - type: object - brand: - properties: - '300': - default: '#844d1c' - type: string - '400': - default: '#9d5b22' - type: string - '500': - default: '#b56927' - type: string - '600': - default: '#d37c30' - type: string - '700': - default: '#d9904f' - type: string - required: - - '300' - - '400' - - '500' - - '600' - - '700' - type: object - danger: - default: '#FF2D2D' - type: string - success: - default: '#62A504' - type: string - text: - default: '#EEEEEE' - type: string - text_on_brand: - default: '#EEEEEE' - type: string - video_bg: - default: '#191919' - type: string - warning: - default: '#FFCD07' - type: string - required: - - brand - - background - - danger - - text - - text_on_brand - - success - - video_bg - - warning - type: object - logo: - type: string - spacing_base: - default: 4 - type: number - theme: - enum: - - dark - type: string - required: - - border_radius - - border_width - - spacing_base - - theme - - colors - - logo - type: object - required: - - design_tokens - type: object - required: - - id - - name - - config - - ui - title: Preset - success: - default: true - description: Success status of the operation - type: boolean - required: - - success - - data - title: GenericSuccessResponse - type: object - description: Success response - security: - - api_token: [] - summary: Create a preset - tags: - - Presets - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - presets - method: create - /accounts/{account_id}/realtime/kit/{app_id}/presets/{preset_id}: - delete: - description: Deletes a preset using the provided preset ID - operationId: delete-presets-preset_id - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - description: ID of the preset to fetch - in: path - name: preset_id - schema: - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - data: - description: Data returned by the operation - type: object - properties: - id: - description: ID of the preset - format: uuid - type: string - config: - properties: - max_screenshare_count: - description: >- - Maximum number of screen shares that can be active - at a given time - type: integer - max_video_streams: - description: >- - Maximum number of streams that are visible on a - device - properties: - desktop: - description: >- - Maximum number of video streams visible on - desktop devices - type: integer - mobile: - description: >- - Maximum number of streams visible on mobile - devices - type: integer - required: - - mobile - - desktop - type: object - media: - description: 'Media configuration options. eg: Video quality' - properties: - audio: - description: Control options for Audio quality. - properties: - enable_high_bitrate: - default: false - description: >- - Enable High Quality Audio for your - meetings - type: boolean - enable_stereo: - default: false - description: Enable Stereo for your meetings - type: boolean - type: object - screenshare: - description: >- - Configuration options for participant screen - shares - properties: - frame_rate: - description: Frame rate of screen share - type: integer - quality: - description: Quality of screen share - enum: - - hd - - vga - - qvga - type: string - required: - - quality - - frame_rate - type: object - video: - description: Configuration options for participant videos - properties: - frame_rate: - description: Frame rate of participants' video - maximum: 30 - type: integer - quality: - description: Video quality of participants - enum: - - hd - - vga - - qvga - type: string - required: - - quality - - frame_rate - type: object - required: - - video - - screenshare - type: object - view_type: - description: Type of the meeting - enum: - - GROUP_CALL - - WEBINAR - - AUDIO_ROOM - type: string - required: - - view_type - - max_video_streams - - max_screenshare_count - - media - type: object - name: - description: Name of the preset - type: string - permissions: - properties: - accept_waiting_requests: - description: >- - Whether this participant can accept waiting - requests - type: boolean - can_accept_production_requests: - type: boolean - can_change_participant_permissions: - type: boolean - can_edit_display_name: - type: boolean - can_livestream: - type: boolean - can_record: - type: boolean - can_spotlight: - type: boolean - chat: - description: Chat permissions - properties: - private: - properties: - can_receive: - type: boolean - can_send: - type: boolean - files: - type: boolean - text: - type: boolean - required: - - can_send - - can_receive - - text - - files - type: object - public: - properties: - can_send: - description: Can send messages in general - type: boolean - files: - description: Can send file messages - type: boolean - text: - description: Can send text messages - type: boolean - required: - - can_send - - text - - files - type: object - required: - - public - - private - type: object - connected_meetings: - properties: - can_alter_connected_meetings: - type: boolean - can_switch_connected_meetings: - type: boolean - can_switch_to_parent_meeting: - type: boolean - required: - - can_alter_connected_meetings - - can_switch_connected_meetings - - can_switch_to_parent_meeting - type: object - disable_participant_audio: - type: boolean - disable_participant_screensharing: - type: boolean - disable_participant_video: - type: boolean - hidden_participant: - description: >- - Whether this participant is visible to others or - not - type: boolean - is_recorder: - default: false - type: boolean - kick_participant: - type: boolean - media: - description: Media permissions - properties: - audio: - description: Audio permissions - properties: - can_produce: - description: Can produce audio - enum: - - ALLOWED - - NOT_ALLOWED - - CAN_REQUEST - type: string - required: - - can_produce - type: object - screenshare: - description: Screenshare permissions - properties: - can_produce: - description: Can produce screen share video - enum: - - ALLOWED - - NOT_ALLOWED - - CAN_REQUEST - type: string - required: - - can_produce - type: object - video: - description: Video permissions - properties: - can_produce: - description: Can produce video - enum: - - ALLOWED - - NOT_ALLOWED - - CAN_REQUEST - type: string - required: - - can_produce - type: object - required: - - video - - audio - - screenshare - type: object - pin_participant: - type: boolean - plugins: - description: Plugin permissions - properties: - can_close: - description: Can close plugins that are already open - type: boolean - can_edit_config: - description: Can edit plugin config - type: boolean - can_start: - description: Can start plugins - type: boolean - config: - type: string - format: uuid - properties: - access_control: - enum: - - FULL_ACCESS - - VIEW_ONLY - type: string - handles_view_only: - type: boolean - required: - - access_control - - handles_view_only - required: - - can_close - - can_start - - can_edit_config - - config - type: object - polls: - description: Poll permissions - properties: - can_create: - description: Can create polls - type: boolean - can_view: - description: Can view polls - type: boolean - can_vote: - description: Can vote on polls - type: boolean - required: - - can_create - - can_vote - - can_view - type: object - recorder_type: - default: NONE - description: Type of the recording peer - enum: - - RECORDER - - LIVESTREAMER - - NONE - type: string - show_participant_list: - type: boolean - waiting_room_type: - description: Waiting room type - enum: - - SKIP - - ON_PRIVILEGED_USER_ENTRY - - SKIP_ON_ACCEPT - type: string - required: - - accept_waiting_requests - - can_accept_production_requests - - can_edit_display_name - - can_spotlight - - recorder_type - - disable_participant_audio - - disable_participant_screensharing - - disable_participant_video - - kick_participant - - pin_participant - - can_record - - can_livestream - - waiting_room_type - - plugins - - connected_meetings - - polls - - media - - chat - - hidden_participant - - show_participant_list - - can_change_participant_permissions - type: object - ui: - properties: - config_diff: - type: object - design_tokens: - properties: - border_radius: - enum: - - rounded - type: string - border_width: - enum: - - thin - type: string - colors: - properties: - background: - properties: - '600': - default: '#222222' - type: string - '700': - default: '#1f1f1f' - type: string - '800': - default: '#1b1b1b' - type: string - '900': - default: '#181818' - type: string - '1000': - default: '#141414' - type: string - required: - - '600' - - '700' - - '800' - - '900' - - '1000' - type: object - brand: - properties: - '300': - default: '#844d1c' - type: string - '400': - default: '#9d5b22' - type: string - '500': - default: '#b56927' - type: string - '600': - default: '#d37c30' - type: string - '700': - default: '#d9904f' - type: string - required: - - '300' - - '400' - - '500' - - '600' - - '700' - type: object - danger: - default: '#FF2D2D' - type: string - success: - default: '#62A504' - type: string - text: - default: '#EEEEEE' - type: string - text_on_brand: - default: '#EEEEEE' - type: string - video_bg: - default: '#191919' - type: string - warning: - default: '#FFCD07' - type: string - required: - - brand - - background - - danger - - text - - text_on_brand - - success - - video_bg - - warning - type: object - logo: - type: string - spacing_base: - default: 4 - type: number - theme: - enum: - - dark - type: string - required: - - border_radius - - border_width - - spacing_base - - theme - - colors - - logo - type: object - required: - - design_tokens - type: object - required: - - id - - name - - config - - ui - title: Preset - success: - default: true - description: Success status of the operation - type: boolean - required: - - success - - data - title: GenericSuccessResponse - type: object - description: Success response - security: - - api_token: [] - summary: Delete a preset - tags: - - Presets - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - presets - method: delete - get: - description: Fetches details of a preset using the provided preset ID - operationId: get-presets-preset_id - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - description: ID of the preset to fetch - in: path - name: preset_id - schema: - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - data: - description: Data returned by the operation - type: object - properties: - id: - description: ID of the preset - format: uuid - type: string - config: - properties: - max_screenshare_count: - description: >- - Maximum number of screen shares that can be active - at a given time - type: integer - max_video_streams: - description: >- - Maximum number of streams that are visible on a - device - properties: - desktop: - description: >- - Maximum number of video streams visible on - desktop devices - type: integer - mobile: - description: >- - Maximum number of streams visible on mobile - devices - type: integer - required: - - mobile - - desktop - type: object - media: - description: 'Media configuration options. eg: Video quality' - properties: - audio: - description: Control options for Audio quality. - properties: - enable_high_bitrate: - default: false - description: >- - Enable High Quality Audio for your - meetings - type: boolean - enable_stereo: - default: false - description: Enable Stereo for your meetings - type: boolean - type: object - screenshare: - description: >- - Configuration options for participant screen - shares - properties: - frame_rate: - description: Frame rate of screen share - type: integer - quality: - description: Quality of screen share - enum: - - hd - - vga - - qvga - type: string - required: - - quality - - frame_rate - type: object - video: - description: Configuration options for participant videos - properties: - frame_rate: - description: Frame rate of participants' video - maximum: 30 - type: integer - quality: - description: Video quality of participants - enum: - - hd - - vga - - qvga - type: string - required: - - quality - - frame_rate - type: object - required: - - video - - screenshare - type: object - view_type: - description: Type of the meeting - enum: - - GROUP_CALL - - WEBINAR - - AUDIO_ROOM - type: string - required: - - view_type - - max_video_streams - - max_screenshare_count - - media - type: object - name: - description: Name of the preset - type: string - permissions: - properties: - accept_waiting_requests: - description: >- - Whether this participant can accept waiting - requests - type: boolean - can_accept_production_requests: - type: boolean - can_change_participant_permissions: - type: boolean - can_edit_display_name: - type: boolean - can_livestream: - type: boolean - can_record: - type: boolean - can_spotlight: - type: boolean - chat: - description: Chat permissions - properties: - private: - properties: - can_receive: - type: boolean - can_send: - type: boolean - files: - type: boolean - text: - type: boolean - required: - - can_send - - can_receive - - text - - files - type: object - public: - properties: - can_send: - description: Can send messages in general - type: boolean - files: - description: Can send file messages - type: boolean - text: - description: Can send text messages - type: boolean - required: - - can_send - - text - - files - type: object - required: - - public - - private - type: object - connected_meetings: - properties: - can_alter_connected_meetings: - type: boolean - can_switch_connected_meetings: - type: boolean - can_switch_to_parent_meeting: - type: boolean - required: - - can_alter_connected_meetings - - can_switch_connected_meetings - - can_switch_to_parent_meeting - type: object - disable_participant_audio: - type: boolean - disable_participant_screensharing: - type: boolean - disable_participant_video: - type: boolean - hidden_participant: - description: >- - Whether this participant is visible to others or - not - type: boolean - is_recorder: - default: false - type: boolean - kick_participant: - type: boolean - media: - description: Media permissions - properties: - audio: - description: Audio permissions - properties: - can_produce: - description: Can produce audio - enum: - - ALLOWED - - NOT_ALLOWED - - CAN_REQUEST - type: string - required: - - can_produce - type: object - screenshare: - description: Screenshare permissions - properties: - can_produce: - description: Can produce screen share video - enum: - - ALLOWED - - NOT_ALLOWED - - CAN_REQUEST - type: string - required: - - can_produce - type: object - video: - description: Video permissions - properties: - can_produce: - description: Can produce video - enum: - - ALLOWED - - NOT_ALLOWED - - CAN_REQUEST - type: string - required: - - can_produce - type: object - required: - - video - - audio - - screenshare - type: object - pin_participant: - type: boolean - plugins: - description: Plugin permissions - properties: - can_close: - description: Can close plugins that are already open - type: boolean - can_edit_config: - description: Can edit plugin config - type: boolean - can_start: - description: Can start plugins - type: boolean - config: - type: string - format: uuid - properties: - access_control: - enum: - - FULL_ACCESS - - VIEW_ONLY - type: string - handles_view_only: - type: boolean - required: - - access_control - - handles_view_only - required: - - can_close - - can_start - - can_edit_config - - config - type: object - polls: - description: Poll permissions - properties: - can_create: - description: Can create polls - type: boolean - can_view: - description: Can view polls - type: boolean - can_vote: - description: Can vote on polls - type: boolean - required: - - can_create - - can_vote - - can_view - type: object - recorder_type: - default: NONE - description: Type of the recording peer - enum: - - RECORDER - - LIVESTREAMER - - NONE - type: string - show_participant_list: - type: boolean - waiting_room_type: - description: Waiting room type - enum: - - SKIP - - ON_PRIVILEGED_USER_ENTRY - - SKIP_ON_ACCEPT - type: string - required: - - accept_waiting_requests - - can_accept_production_requests - - can_edit_display_name - - can_spotlight - - recorder_type - - disable_participant_audio - - disable_participant_screensharing - - disable_participant_video - - kick_participant - - pin_participant - - can_record - - can_livestream - - waiting_room_type - - plugins - - connected_meetings - - polls - - media - - chat - - hidden_participant - - show_participant_list - - can_change_participant_permissions - type: object - ui: - properties: - config_diff: - type: object - design_tokens: - properties: - border_radius: - enum: - - rounded - type: string - border_width: - enum: - - thin - type: string - colors: - properties: - background: - properties: - '600': - default: '#222222' - type: string - '700': - default: '#1f1f1f' - type: string - '800': - default: '#1b1b1b' - type: string - '900': - default: '#181818' - type: string - '1000': - default: '#141414' - type: string - required: - - '600' - - '700' - - '800' - - '900' - - '1000' - type: object - brand: - properties: - '300': - default: '#844d1c' - type: string - '400': - default: '#9d5b22' - type: string - '500': - default: '#b56927' - type: string - '600': - default: '#d37c30' - type: string - '700': - default: '#d9904f' - type: string - required: - - '300' - - '400' - - '500' - - '600' - - '700' - type: object - danger: - default: '#FF2D2D' - type: string - success: - default: '#62A504' - type: string - text: - default: '#EEEEEE' - type: string - text_on_brand: - default: '#EEEEEE' - type: string - video_bg: - default: '#191919' - type: string - warning: - default: '#FFCD07' - type: string - required: - - brand - - background - - danger - - text - - text_on_brand - - success - - video_bg - - warning - type: object - logo: - type: string - spacing_base: - default: 4 - type: number - theme: - enum: - - dark - type: string - required: - - border_radius - - border_width - - spacing_base - - theme - - colors - - logo - type: object - required: - - design_tokens - type: object - required: - - id - - name - - config - - ui - title: Preset - success: - default: true - description: Success status of the operation - type: boolean - required: - - success - - data - title: GenericSuccessResponse - type: object - description: Success response - security: - - api_token: [] - summary: Fetch details of a preset - tags: - - Presets - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - presets - method: get_preset_by_id - patch: - description: Update a preset by the provided preset ID - operationId: patch-presets-preset_id - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - description: ID of the preset to fetch - in: path - name: preset_id - schema: - type: string - required: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/realtimekitUpdatePreset' - responses: - '200': - content: - application/json: - schema: - properties: - data: - description: Data returned by the operation - type: object - properties: - id: - description: ID of the preset - format: uuid - type: string - config: - properties: - max_screenshare_count: - description: >- - Maximum number of screen shares that can be active - at a given time - type: integer - max_video_streams: - description: >- - Maximum number of streams that are visible on a - device - properties: - desktop: - description: >- - Maximum number of video streams visible on - desktop devices - type: integer - mobile: - description: >- - Maximum number of streams visible on mobile - devices - type: integer - required: - - mobile - - desktop - type: object - media: - description: 'Media configuration options. eg: Video quality' - properties: - audio: - description: Control options for Audio quality. - properties: - enable_high_bitrate: - default: false - description: >- - Enable High Quality Audio for your - meetings - type: boolean - enable_stereo: - default: false - description: Enable Stereo for your meetings - type: boolean - type: object - screenshare: - description: >- - Configuration options for participant screen - shares - properties: - frame_rate: - description: Frame rate of screen share - type: integer - quality: - description: Quality of screen share - enum: - - hd - - vga - - qvga - type: string - required: - - quality - - frame_rate - type: object - video: - description: Configuration options for participant videos - properties: - frame_rate: - description: Frame rate of participants' video - maximum: 30 - type: integer - quality: - description: Video quality of participants - enum: - - hd - - vga - - qvga - type: string - required: - - quality - - frame_rate - type: object - required: - - video - - screenshare - type: object - view_type: - description: Type of the meeting - enum: - - GROUP_CALL - - WEBINAR - - AUDIO_ROOM - type: string - required: - - view_type - - max_video_streams - - max_screenshare_count - - media - type: object - name: - description: Name of the preset - type: string - permissions: - properties: - accept_waiting_requests: - description: >- - Whether this participant can accept waiting - requests - type: boolean - can_accept_production_requests: - type: boolean - can_change_participant_permissions: - type: boolean - can_edit_display_name: - type: boolean - can_livestream: - type: boolean - can_record: - type: boolean - can_spotlight: - type: boolean - chat: - description: Chat permissions - properties: - private: - properties: - can_receive: - type: boolean - can_send: - type: boolean - files: - type: boolean - text: - type: boolean - required: - - can_send - - can_receive - - text - - files - type: object - public: - properties: - can_send: - description: Can send messages in general - type: boolean - files: - description: Can send file messages - type: boolean - text: - description: Can send text messages - type: boolean - required: - - can_send - - text - - files - type: object - required: - - public - - private - type: object - connected_meetings: - properties: - can_alter_connected_meetings: - type: boolean - can_switch_connected_meetings: - type: boolean - can_switch_to_parent_meeting: - type: boolean - required: - - can_alter_connected_meetings - - can_switch_connected_meetings - - can_switch_to_parent_meeting - type: object - disable_participant_audio: - type: boolean - disable_participant_screensharing: - type: boolean - disable_participant_video: - type: boolean - hidden_participant: - description: >- - Whether this participant is visible to others or - not - type: boolean - is_recorder: - default: false - type: boolean - kick_participant: - type: boolean - media: - description: Media permissions - properties: - audio: - description: Audio permissions - properties: - can_produce: - description: Can produce audio - enum: - - ALLOWED - - NOT_ALLOWED - - CAN_REQUEST - type: string - required: - - can_produce - type: object - screenshare: - description: Screenshare permissions - properties: - can_produce: - description: Can produce screen share video - enum: - - ALLOWED - - NOT_ALLOWED - - CAN_REQUEST - type: string - required: - - can_produce - type: object - video: - description: Video permissions - properties: - can_produce: - description: Can produce video - enum: - - ALLOWED - - NOT_ALLOWED - - CAN_REQUEST - type: string - required: - - can_produce - type: object - required: - - video - - audio - - screenshare - type: object - pin_participant: - type: boolean - plugins: - description: Plugin permissions - properties: - can_close: - description: Can close plugins that are already open - type: boolean - can_edit_config: - description: Can edit plugin config - type: boolean - can_start: - description: Can start plugins - type: boolean - config: - type: string - format: uuid - properties: - access_control: - enum: - - FULL_ACCESS - - VIEW_ONLY - type: string - handles_view_only: - type: boolean - required: - - access_control - - handles_view_only - required: - - can_close - - can_start - - can_edit_config - - config - type: object - polls: - description: Poll permissions - properties: - can_create: - description: Can create polls - type: boolean - can_view: - description: Can view polls - type: boolean - can_vote: - description: Can vote on polls - type: boolean - required: - - can_create - - can_vote - - can_view - type: object - recorder_type: - default: NONE - description: Type of the recording peer - enum: - - RECORDER - - LIVESTREAMER - - NONE - type: string - show_participant_list: - type: boolean - waiting_room_type: - description: Waiting room type - enum: - - SKIP - - ON_PRIVILEGED_USER_ENTRY - - SKIP_ON_ACCEPT - type: string - required: - - accept_waiting_requests - - can_accept_production_requests - - can_edit_display_name - - can_spotlight - - recorder_type - - disable_participant_audio - - disable_participant_screensharing - - disable_participant_video - - kick_participant - - pin_participant - - can_record - - can_livestream - - waiting_room_type - - plugins - - connected_meetings - - polls - - media - - chat - - hidden_participant - - show_participant_list - - can_change_participant_permissions - type: object - ui: - properties: - config_diff: - type: object - design_tokens: - properties: - border_radius: - enum: - - rounded - type: string - border_width: - enum: - - thin - type: string - colors: - properties: - background: - properties: - '600': - default: '#222222' - type: string - '700': - default: '#1f1f1f' - type: string - '800': - default: '#1b1b1b' - type: string - '900': - default: '#181818' - type: string - '1000': - default: '#141414' - type: string - required: - - '600' - - '700' - - '800' - - '900' - - '1000' - type: object - brand: - properties: - '300': - default: '#844d1c' - type: string - '400': - default: '#9d5b22' - type: string - '500': - default: '#b56927' - type: string - '600': - default: '#d37c30' - type: string - '700': - default: '#d9904f' - type: string - required: - - '300' - - '400' - - '500' - - '600' - - '700' - type: object - danger: - default: '#FF2D2D' - type: string - success: - default: '#62A504' - type: string - text: - default: '#EEEEEE' - type: string - text_on_brand: - default: '#EEEEEE' - type: string - video_bg: - default: '#191919' - type: string - warning: - default: '#FFCD07' - type: string - required: - - brand - - background - - danger - - text - - text_on_brand - - success - - video_bg - - warning - type: object - logo: - type: string - spacing_base: - default: 4 - type: number - theme: - enum: - - dark - type: string - required: - - border_radius - - border_width - - spacing_base - - theme - - colors - - logo - type: object - required: - - design_tokens - type: object - required: - - id - - name - - config - - ui - title: Preset - success: - default: true - description: Success status of the operation - type: boolean - required: - - success - - data - title: GenericSuccessResponse - type: object - description: Success response - security: - - api_token: [] - summary: Update a preset - tags: - - Presets - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - presets - method: update - /accounts/{account_id}/realtime/kit/{app_id}/recordings: - get: - description: >- - Returns all recordings for an App. If the `meeting_id` parameter is - passed, returns all recordings for the given meeting ID. - operationId: get_all_recordings - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - description: >- - ID of a meeting. Optional. Will limit results to only this meeting - if passed. - in: query - name: meeting_id - schema: - format: uuid - type: string - - allowEmptyValue: true - description: >- - The page number from which you want your page search results to be - displayed. - in: query - name: page_no - schema: - minimum: 0 - type: number - - allowEmptyValue: true - description: Number of results per page - in: query - name: per_page - schema: - minimum: 0 - type: number - - description: >- - If passed, only shows expired/non-expired recordings on - RealtimeKit's bucket - in: query - name: expired - schema: - type: boolean - - description: >- - The search query string. You can search using the meeting ID or - title. - in: query - name: search - schema: - type: string - - in: query - name: sort_by - schema: - enum: - - invokedTime - type: string - - in: query - name: sort_order - schema: - enum: - - ASC - - DESC - type: string - - description: >- - The start time range for which you want to retrieve the meetings. - The time must be specified in ISO format. - in: query - name: start_time - schema: - format: date-time - type: string - - description: >- - The end time range for which you want to retrieve the meetings. The - time must be specified in ISO format. - in: query - name: end_time - schema: - format: date-time - type: string - - description: Filter by one or more recording status - explode: false - in: query - name: status - schema: - items: - enum: - - INVOKED - - RECORDING - - UPLOADING - - UPLOADED - type: string - type: array - responses: - '200': - content: - application/json: - schema: - properties: - data: - items: - type: object - properties: - audio_download_url: - description: >- - If the audio_config is passed, the URL for - downloading the audio recording is returned. - format: uri - nullable: true - readOnly: true - type: string - download_url: - description: URL where the recording can be downloaded. - format: uri - nullable: true - readOnly: true - type: string - download_url_expiry: - description: Timestamp when the download URL expires. - format: date-time - nullable: true - readOnly: true - type: string - file_size: - description: File size of the recording, in bytes. - nullable: true - readOnly: true - type: number - id: - description: ID of the recording - format: uuid - readOnly: true - type: string - invoked_time: - description: Timestamp when this recording was invoked. - format: date-time - type: string - output_file_name: - description: File name of the recording. - type: string - recording_duration: - description: Total recording time in seconds. - type: integer - session_id: - description: ID of the meeting session this recording is for. - format: uuid - nullable: true - readOnly: true - type: string - started_time: - description: >- - Timestamp when this recording actually started after - being invoked. Usually a few seconds after - `invoked_time`. - format: date-time - nullable: true - type: string - status: - description: Current status of the recording. - enum: - - INVOKED - - RECORDING - - UPLOADING - - UPLOADED - - ERRORED - - PAUSED - type: string - stopped_time: - description: >- - Timestamp when this recording was stopped. Optional; - is present only when the recording has actually been - stopped. - format: date-time - nullable: true - type: string - storage_config: - $ref: '#/components/schemas/realtimekitStorageConfig' - meeting: - $ref: '#/components/schemas/realtimekitMeeting' - required: - - id - - download_url - - download_url_expiry - - audio_download_url - - file_size - - session_id - - output_file_name - - status - - invoked_time - - started_time - - stopped_time - title: Recording - type: array - paging: - properties: - end_offset: - type: number - start_offset: - type: number - total_count: - minimum: 0 - type: number - required: - - total_count - - start_offset - - end_offset - type: object - success: - type: boolean - required: - - success - - data - - paging - title: PagingResponse - type: object - description: Success response - '201': - description: Created - security: - - api_token: [] - summary: Fetch all recordings for an App - tags: - - Recordings - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - recordings - method: get_recordings - post: - description: >- - Starts recording a meeting. The meeting can be started by an App admin - directly, or a participant with permissions to start a recording, based - on the type of authorization used. - operationId: start_recording - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - allow_multiple_recordings: - default: false - description: >- - By default, a meeting allows only one recording to run at a - time. Enabling the `allow_multiple_recordings` parameter to - true allows you to initiate multiple recordings concurrently - in the same meeting. This allows you to record separate - videos of the same meeting with different configurations, - such as portrait mode or landscape mode. - type: boolean - audio_config: - $ref: '#/components/schemas/realtimekitAudioConfig' - file_name_prefix: - description: Update the recording file name. - type: string - interactive_config: - $ref: '#/components/schemas/realtimekitInteractiveConfig' - max_seconds: - description: >- - Specifies the maximum duration for recording in seconds, - ranging from a minimum of 60 seconds to a maximum of 24 - hours. - maximum: 86400 - minimum: 60 - type: integer - meeting_id: - description: ID of the meeting to record. - format: uuid - type: string - realtimekit_bucket_config: - $ref: '#/components/schemas/realtimekitRealtimekitBucketConfig' - rtmp_out_config: - $ref: '#/components/schemas/realtimekitLivestreamingConfig' - storage_config: - $ref: '#/components/schemas/realtimekitStorageConfig' - url: - description: Pass a custom url to record arbitary screen - format: uri - type: string - video_config: - $ref: '#/components/schemas/realtimekitVideoConfig' - type: object - responses: - '200': - content: - application/json: - schema: - properties: - data: - description: Data returned by the operation - type: object - properties: - audio_download_url: - description: >- - If the audio_config is passed, the URL for downloading - the audio recording is returned. - format: uri - nullable: true - readOnly: true - type: string - download_url: - description: URL where the recording can be downloaded. - format: uri - nullable: true - readOnly: true - type: string - download_url_expiry: - description: Timestamp when the download URL expires. - format: date-time - nullable: true - readOnly: true - type: string - file_size: - description: File size of the recording, in bytes. - nullable: true - readOnly: true - type: number - id: - description: ID of the recording - format: uuid - readOnly: true - type: string - invoked_time: - description: Timestamp when this recording was invoked. - format: date-time - type: string - output_file_name: - description: File name of the recording. - type: string - recording_duration: - description: Total recording time in seconds. - type: integer - session_id: - description: ID of the meeting session this recording is for. - format: uuid - nullable: true - readOnly: true - type: string - started_time: - description: >- - Timestamp when this recording actually started after - being invoked. Usually a few seconds after - `invoked_time`. - format: date-time - nullable: true - type: string - status: - description: Current status of the recording. - enum: - - INVOKED - - RECORDING - - UPLOADING - - UPLOADED - - ERRORED - - PAUSED - type: string - stopped_time: - description: >- - Timestamp when this recording was stopped. Optional; - is present only when the recording has actually been - stopped. - format: date-time - nullable: true - type: string - start_reason: - $ref: '#/components/schemas/realtimekitStartReason' - stop_reason: - $ref: '#/components/schemas/realtimekitStopReason' - storage_config: - $ref: '#/components/schemas/realtimekitStorageConfig' - required: - - id - - download_url - - download_url_expiry - - audio_download_url - - file_size - - session_id - - output_file_name - - status - - invoked_time - - started_time - - stopped_time - title: Recording - success: - default: true - description: Success status of the operation - type: boolean - required: - - success - title: GenericSuccessResponse - type: object - description: Success response - security: - - api_token: [] - summary: Start recording a meeting - tags: - - Recordings - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - recordings - method: start_recordings - /accounts/{account_id}/realtime/kit/{app_id}/recordings/active-recording/{meeting_id}: - get: - description: Returns the active recording details for the given meeting ID. - operationId: get_active_recording - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - name: meeting_id - in: path - required: true - description: The Realtime Kit meeting ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - data: - description: Data returned by the operation - type: object - $ref: '#/components/schemas/realtimekitRecording' - success: - default: true - description: Success status of the operation - type: boolean - required: - - success - - data - title: GenericSuccessResponse - type: object - description: Success response - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/realtimekitGenericErrorResponse' - description: Failure response - security: - - api_token: [] - summary: Fetch active recording - tags: - - Recordings - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - recordings - method: get_active_recordings - /accounts/{account_id}/realtime/kit/{app_id}/recordings/track: - post: - description: >- - Starts a track recording in a meeting. Track recordings consist of - "layers". Layers are used to map audio/video tracks in a meeting to - output destinations. More information about track recordings is - available in the [Track Recordings Guide - Page](https://docs.realtime.cloudflare.com/guides/capabilities/recording/recording-overview). - operationId: startTrackRecordingForAMeeting - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - layers: - type: object - max_seconds: - description: Maximum seconds this recording should be active for (beta) - type: number - meeting_id: - description: ID of the meeting to record. - type: string - required: - - meeting_id - - layers - type: object - description: For now only "default" layer key is supported. - responses: - '200': - description: OK - security: - - api_token: [] - summary: Start recording audio and video tracks - tags: - - Recordings - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - recordings - method: start_track_recording - /accounts/{account_id}/realtime/kit/{app_id}/recordings/{recording_id}: - get: - description: Returns details of a recording for the given recording ID. - operationId: get_one_recording - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - description: ID of the recording - in: path - name: recording_id - schema: - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - data: - description: Data returned by the operation - type: object - properties: - audio_download_url: - description: >- - If the audio_config is passed, the URL for downloading - the audio recording is returned. - format: uri - nullable: true - readOnly: true - type: string - download_url: - description: URL where the recording can be downloaded. - format: uri - nullable: true - readOnly: true - type: string - download_url_expiry: - description: Timestamp when the download URL expires. - format: date-time - nullable: true - readOnly: true - type: string - file_size: - description: File size of the recording, in bytes. - nullable: true - readOnly: true - type: number - id: - description: ID of the recording - format: uuid - readOnly: true - type: string - invoked_time: - description: Timestamp when this recording was invoked. - format: date-time - type: string - output_file_name: - description: File name of the recording. - type: string - recording_duration: - description: Total recording time in seconds. - type: integer - session_id: - description: ID of the meeting session this recording is for. - format: uuid - nullable: true - readOnly: true - type: string - started_time: - description: >- - Timestamp when this recording actually started after - being invoked. Usually a few seconds after - `invoked_time`. - format: date-time - nullable: true - type: string - status: - description: Current status of the recording. - enum: - - INVOKED - - RECORDING - - UPLOADING - - UPLOADED - - ERRORED - - PAUSED - type: string - stopped_time: - description: >- - Timestamp when this recording was stopped. Optional; - is present only when the recording has actually been - stopped. - format: date-time - nullable: true - type: string - start_reason: - $ref: '#/components/schemas/realtimekitStartReason' - stop_reason: - $ref: '#/components/schemas/realtimekitStopReason' - storage_config: - $ref: '#/components/schemas/realtimekitStorageConfig' - required: - - id - - download_url - - download_url_expiry - - audio_download_url - - file_size - - session_id - - output_file_name - - status - - invoked_time - - started_time - - stopped_time - title: Recording - success: - default: true - description: Success status of the operation - type: boolean - required: - - success - title: GenericSuccessResponse - type: object - description: Success response - security: - - api_token: [] - summary: Fetch details of a recording - tags: - - Recordings - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - recordings - method: get_one_recording - put: - description: Pause/Resume/Stop a given recording ID. - operationId: pause_resume_stop_recording - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - description: ID of the recording - in: path - name: recording_id - schema: - type: string - required: true - requestBody: - content: - application/json: - schema: - properties: - action: - enum: - - stop - - pause - - resume - type: string - required: - - action - type: object - responses: - '200': - content: - application/json: - schema: - properties: - data: - description: Data returned by the operation - type: object - properties: - audio_download_url: - description: >- - If the audio_config is passed, the URL for downloading - the audio recording is returned. - format: uri - nullable: true - readOnly: true - type: string - download_url: - description: URL where the recording can be downloaded. - format: uri - nullable: true - readOnly: true - type: string - download_url_expiry: - description: Timestamp when the download URL expires. - format: date-time - nullable: true - readOnly: true - type: string - file_size: - description: File size of the recording, in bytes. - nullable: true - readOnly: true - type: number - id: - description: ID of the recording - format: uuid - readOnly: true - type: string - invoked_time: - description: Timestamp when this recording was invoked. - format: date-time - type: string - output_file_name: - description: File name of the recording. - type: string - recording_duration: - description: Total recording time in seconds. - type: integer - session_id: - description: ID of the meeting session this recording is for. - format: uuid - nullable: true - readOnly: true - type: string - started_time: - description: >- - Timestamp when this recording actually started after - being invoked. Usually a few seconds after - `invoked_time`. - format: date-time - nullable: true - type: string - status: - description: Current status of the recording. - enum: - - INVOKED - - RECORDING - - UPLOADING - - UPLOADED - - ERRORED - - PAUSED - type: string - stopped_time: - description: >- - Timestamp when this recording was stopped. Optional; - is present only when the recording has actually been - stopped. - format: date-time - nullable: true - type: string - start_reason: - $ref: '#/components/schemas/realtimekitStartReason' - stop_reason: - $ref: '#/components/schemas/realtimekitStopReason' - storage_config: - $ref: '#/components/schemas/realtimekitStorageConfig' - required: - - id - - download_url - - download_url_expiry - - audio_download_url - - file_size - - session_id - - output_file_name - - status - - invoked_time - - started_time - - stopped_time - title: Recording - success: - default: true - description: Success status of the operation - type: boolean - required: - - success - title: GenericSuccessResponse - type: object - description: Success response - security: - - api_token: [] - summary: Pause/Resume/Stop recording - tags: - - Recordings - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - recordings - method: pause_resume_stop_recording - /accounts/{account_id}/realtime/kit/{app_id}/sessions: - get: - description: Returns details of all sessions of an App. - operationId: GetSessions - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - allowEmptyValue: true - description: >- - The page number from which you want your page search results to be - displayed. - in: query - name: page_no - schema: - minimum: 0 - type: number - - allowEmptyValue: true - description: Number of results per page - in: query - name: per_page - schema: - minimum: 0 - type: number - - in: query - name: sort_by - schema: - enum: - - minutesConsumed - - createdAt - type: string - - in: query - name: sort_order - schema: - enum: - - ASC - - DESC - type: string - - description: >- - The start time range for which you want to retrieve the meetings. - The time must be specified in ISO format. - in: query - name: start_time - schema: - format: date-time - type: string - - description: >- - The end time range for which you want to retrieve the meetings. The - time must be specified in ISO format. - in: query - name: end_time - schema: - format: date-time - type: string - - in: query - name: participants - schema: - type: string - - in: query - name: status - schema: - enum: - - LIVE - - ENDED - type: string - - description: >- - Search string that matches sessions based on meeting title, meeting - ID, and session ID - in: query - name: search - schema: - type: string - - description: ID of the meeting that sessions should be associated with - in: query - name: associated_id - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - data: - properties: - sessions: - items: - $ref: '#/components/schemas/realtimekitActiveSession' - type: array - type: object - success: - type: boolean - type: object - description: Get all sessions success response - security: - - api_token: [] - summary: Fetch all sessions of an App - tags: - - Sessions - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - sessions - method: get_sessions - /accounts/{account_id}/realtime/kit/{app_id}/sessions/peer-report/{peer_id}: - get: - description: >- - Returns details of the given peer ID along with call statistics for the - given session ID. - operationId: GetParticipantDataFromPeerId - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - description: >- - Comma separated list of filters to apply. Note that there must be no - spaces between the filters. - in: query - name: filters - schema: - enum: - - device_info - - ip_information - - precall_network_information - - events - - quality_stats - type: string - - description: ID of the peer - in: path - name: peer_id - schema: - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - data: - properties: - participant: - properties: - created_at: - type: string - readOnly: true - custom_participant_id: - type: string - display_name: - type: string - duration: - type: number - id: - type: string - joined_at: - type: string - left_at: - type: string - peer_report: - properties: - metadata: - properties: - audio_devices_updates: - items: - type: object - type: array - browser_metadata: - properties: - browser: - type: string - browser_version: - type: string - engine: - type: string - user_agent: - type: string - webgl_support: - type: string - type: object - candidate_pairs: - properties: - consuming_transport: - items: - type: object - type: array - producing_transport: - items: - properties: - available_outgoing_bitrate: - type: integer - bytes_discarded_on_send: - type: integer - bytes_received: - type: integer - bytes_sent: - type: integer - current_round_trip_time: - type: number - last_packet_received_timestamp: - type: integer - last_packet_sent_timestamp: - type: integer - local_candidate_address: - type: string - local_candidate_id: - type: string - local_candidate_network_type: - type: string - local_candidate_port: - type: integer - local_candidate_protocol: - type: string - local_candidate_related_address: - type: string - local_candidate_related_port: - type: integer - local_candidate_type: - type: string - nominated: - type: boolean - packets_discarded_on_send: - type: integer - packets_received: - type: integer - packets_sent: - type: integer - remote_candidate_address: - type: string - remote_candidate_id: - type: string - remote_candidate_port: - type: integer - remote_candidate_protocol: - type: string - remote_candidate_type: - type: string - total_round_trip_time: - type: number - type: object - type: array - type: object - device_info: - properties: - cpus: - type: integer - is_mobile: - type: boolean - os: - type: string - os_version: - type: string - type: object - events: - items: - properties: - name: - type: string - timestamp: - type: string - type: object - type: array - ip_information: - properties: - asn: - properties: - asn: - type: string - type: object - city: - type: string - country: - type: string - ipv4: - type: string - region: - type: string - timezone: - type: string - type: object - pc_metadata: - items: - properties: - effective_network_type: - type: string - reflexive_connectivity: - type: boolean - relay_connectivity: - type: boolean - timestamp: - type: string - turn_connectivity: - type: boolean - type: object - type: array - room_view_type: - type: string - sdk_name: - type: string - sdk_version: - type: string - selected_device_updates: - items: - type: object - type: array - speaker_devices_updates: - items: - type: object - type: array - video_devices_updates: - items: - type: object - type: array - type: object - quality: - properties: - audio_consumer: - items: - type: object - type: array - audio_consumer_cumulative: - type: object - audio_producer: - items: - properties: - bytes_sent: - type: integer - jitter: - type: integer - mid: - type: string - mos_quality: - type: integer - packets_lost: - type: integer - packets_sent: - type: integer - producer_id: - type: string - rtt: - type: number - ssrc: - type: integer - timestamp: - type: string - type: object - type: array - audio_producer_cumulative: - properties: - packet_loss: - properties: - 10_or_greater_event_fraction: - type: integer - 25_or_greater_event_fraction: - type: integer - 50_or_greater_event_fraction: - type: integer - 5_or_greater_event_fraction: - type: integer - avg: - type: integer - type: object - quality_mos: - properties: - avg: - type: integer - p50: - type: integer - p75: - type: integer - p90: - type: integer - type: object - rtt: - properties: - 100ms_or_greater_event_fraction: - type: number - 250ms_or_greater_event_fraction: - type: number - 500ms_or_greater_event_fraction: - type: number - avg: - type: number - type: object - type: object - screenshare_audio_consumer: - items: - type: object - type: array - screenshare_audio_consumer_cumulative: - type: object - screenshare_audio_producer: - items: - type: object - type: array - screenshare_audio_producer_cumulative: - type: object - screenshare_video_consumer: - items: - type: object - type: array - screenshare_video_consumer_cumulative: - type: object - screenshare_video_producer: - items: - type: object - type: array - screenshare_video_producer_cumulative: - type: object - video_consumer: - items: - type: object - type: array - video_consumer_cumulative: - type: object - video_producer: - items: - type: object - type: array - video_producer_cumulative: - type: object - type: object - type: object - peer_stats: - properties: - device_info: - properties: - browser: - type: string - browser_version: - type: string - cpus: - type: integer - engine: - type: string - is_mobile: - type: boolean - os: - type: string - os_version: - type: string - sdk_name: - type: string - sdk_version: - type: string - user_agent: - type: string - webgl_support: - type: string - type: object - events: - items: - properties: - metadata: - properties: - connection_info: - properties: - backend_r_t_t: - type: number - connectivity: - properties: - host: - type: boolean - reflexive: - type: boolean - relay: - type: boolean - type: object - effective_network_type: - type: string - fractional_loss: - type: integer - ip_details: - properties: - asn: - properties: - asn: - type: string - type: object - city: - type: string - country: - type: string - ip: - type: string - loc: - type: string - postal: - type: string - region: - type: string - timezone: - type: string - type: object - jitter: - type: integer - location: - properties: - coords: - properties: - latitude: - type: number - longitude: - type: number - type: object - type: object - r_t_t: - type: number - throughput: - type: integer - turn_connectivity: - type: boolean - type: object - type: object - timestamp: - type: string - type: - type: string - type: object - type: array - ip_information: - properties: - asn: - properties: - asn: - type: string - type: object - city: - type: string - country: - type: string - ip_location: - type: string - ipv4: - type: string - org: - type: string - region: - type: string - timezone: - type: string - type: object - precall_network_information: - properties: - backend_rtt: - type: number - effective_networktype: - type: string - fractional_loss: - type: integer - jitter: - type: integer - reflexive_connectivity: - type: boolean - relay_connectivity: - type: boolean - rtt: - type: number - throughput: - type: integer - turn_connectivity: - type: boolean - type: object - type: object - quality_stats: - properties: - audio_bandwidth: - type: integer - audio_stats: - items: - type: object - type: array - average_quality: - type: integer - end: - nullable: true - type: string - first_audio_packet_received: - type: string - first_video_packet_received: - type: string - last_audio_packet_received: - type: string - last_video_packet_received: - type: string - peer_ids: - items: - type: string - type: array - start: - nullable: true - type: string - total_audio_packets: - type: integer - total_audio_packets_lost: - type: integer - total_video_packets: - type: integer - total_video_packets_lost: - type: integer - video_bandwidth: - type: integer - video_stats: - items: - type: object - type: array - type: object - role: - type: string - updated_at: - type: string - readOnly: true - user_id: - type: string - type: object - type: object - success: - type: boolean - type: object - description: >- - Returns details of a participant (using peer id) along with - callstats data. - security: - - api_token: [] - summary: Fetch details of peer - tags: - - Sessions - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - sessions - method: get_participant_data_from_peer_id - /accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}: - get: - description: Returns data of the given session ID including recording details. - operationId: GetSessionDetails - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - description: List all breakout rooms - in: query - name: include_breakout_rooms - schema: - default: false - type: boolean - - name: session_id - in: path - required: true - description: The session ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - data: - properties: - session: - $ref: '#/components/schemas/realtimekitActiveSession' - type: object - success: - type: boolean - type: object - description: Get details about a particular session - security: - - api_token: [] - summary: Fetch details of a session - tags: - - Sessions - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - sessions - method: get_session_details - /accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/chat: - get: - description: >- - Returns a URL to download all chat messages of the session ID in CSV - format. - operationId: GetSessionChat - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - name: session_id - in: path - required: true - description: The session ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - data: - $ref: '#/components/schemas/realtimekitChatMessage' - success: - type: boolean - type: object - description: Returns all chat messages of a session. - security: - - api_token: [] - summary: Fetch all chat messages of a session - tags: - - Sessions - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - sessions - method: get_session_chat - /accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/livestream-sessions: - get: - description: >- - Returns livestream session details for the given session ID. Retreive - the session ID using the `Fetch all sessions of an App` API. - operationId: get-v2-livestreamsession-session-meetingId-active-livestream - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - description: Number of results per page. - in: query - name: per_page - schema: - type: number - - description: >- - The page number from which you want your page search results to be - displayed. - in: query - name: page_no - schema: - type: number - - name: session_id - in: path - required: true - description: The session ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - data: - properties: - created_at: - description: >- - Timestamp the object was created at. The time is - returned in ISO format. - format: date-time - type: string - readOnly: true - err_message: - enum: - - LIVE - - IDLE - - ERRORED - - INVOKED - type: string - id: - description: The livestream session ID. - type: string - ingest_seconds: - description: >- - The time duration for which the input was given or the - meeting was streamed. - type: number - invoked_time: - description: Name of the livestream. - nullable: true - type: string - livestream_id: - description: The ID of the livestream. - type: string - paging: - properties: - end_offset: - type: number - start_offset: - type: number - total_count: - type: number - type: object - stopped_time: - description: Specifies if the livestream was disabled. - format: date-time - type: string - updated_at: - description: >- - Timestamp the object was updated at. The time is - returned in ISO format. - format: date-time - type: string - readOnly: true - viewer_seconds: - description: >- - The total view time for which the viewers watched the - stream. - type: number - type: object - success: - type: boolean - type: object - description: OK - security: - - api_token: [] - summary: Fetch livestream session details using a session ID - tags: - - Live streams - x-api-token-group: - - Realtime Admin - - Realtime - /accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/participants: - get: - description: Returns a list of participants for the given session ID. - operationId: GetSessionParticipants - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - description: >- - The search query string. You can search using the meeting ID or - title. - in: query - name: search - schema: - type: string - - allowEmptyValue: true - description: >- - The page number from which you want your page search results to be - displayed. - in: query - name: page_no - schema: - minimum: 0 - type: number - - allowEmptyValue: true - description: Number of results per page - in: query - name: per_page - schema: - minimum: 0 - type: number - - in: query - name: sort_order - schema: - enum: - - ASC - - DESC - type: string - - in: query - name: sort_by - schema: - enum: - - joinedAt - - duration - type: string - - description: if true, response includes all the peer events of participants. - in: query - name: include_peer_events - schema: - default: false - type: boolean - - description: >- - In breakout room sessions, the view parameter can be set to `raw` - for session specific duration for participants or `consolidated` to - accumulate breakout room durations. - in: query - name: view - schema: - default: raw - enum: - - raw - - consolidated - type: string - - name: session_id - in: path - required: true - description: The session ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - data: - properties: - participants: - items: - $ref: '#/components/schemas/realtimekitParticipantsList' - type: array - type: object - success: - type: boolean - type: object - description: Get participants list of a particular session - security: - - api_token: [] - summary: Fetch participants list of a session - tags: - - Sessions - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - sessions - method: get_session_participants - /accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/participants/{participant_id}: - get: - description: >- - Returns details of the given participant ID along with call statistics - for the given session ID. - operationId: GetParticipantDetails - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - allowEmptyValue: true - description: >- - Comma separated list of filters to apply. Note that there must be no - spaces between the filters. - in: query - name: filters - schema: - enum: - - device_info - - ip_information - - precall_network_information - - events - - quality_stats - type: string - - description: if true, response includes all the peer events of participant. - in: query - name: include_peer_events - schema: - default: false - type: boolean - - description: ID of the participant - in: path - name: participant_id - schema: - type: string - required: true - - name: session_id - in: path - required: true - description: The session ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - data: - properties: - participant: - properties: - created_at: - description: timestamp when this participant was created. - type: string - readOnly: true - custom_participant_id: - description: ID passed by client to create this participant. - type: string - display_name: - description: >- - Display name of participant when joining the - session. - type: string - duration: - description: >- - number of minutes for which the participant was in - the session. - type: number - id: - description: >- - Participant ID. This maps to the corresponding - peerId. - type: string - joined_at: - description: timestamp at which participant joined the session. - type: string - left_at: - description: timestamp at which participant left the session. - type: string - preset_name: - description: >- - Name of the preset associated with the - participant. - type: string - updated_at: - description: >- - timestamp when this participant's data was last - updated. - type: string - readOnly: true - user_id: - description: User id for this participant. - type: string - peer_stats: - properties: - config: - type: string - device_info: - properties: - browser: - type: string - browser_version: - type: string - cpus: - type: number - engine: - type: string - is_mobile: - type: boolean - memory: - type: number - os: - type: string - os_version: - type: string - sdk_name: - type: string - sdk_version: - type: string - user_agent: - type: string - webgl_support: - type: string - type: object - events: - items: - properties: - timestamp: - type: string - type: - type: string - type: object - type: array - ip_information: - properties: - city: - type: string - country: - type: string - ip_location: - type: string - ipv4: - type: string - org: - type: string - portal: - type: string - region: - type: string - timezone: - type: string - type: object - precall_network_information: - properties: - backend_rtt: - type: number - effective_networktype: - type: string - fractional_loss: - type: number - jitter: - type: number - reflexive_connectivity: - type: boolean - relay_connectivity: - type: boolean - rtt: - type: number - throughtput: - type: number - turn_connectivity: - type: boolean - type: object - status: - type: string - type: object - quality_stats: - items: - properties: - audio_bandwidth: - type: number - audio_packet_loss: - type: number - audio_stats: - items: - properties: - concealment_events: - type: number - jitter: - type: number - packets_lost: - type: number - quality: - type: number - timestamp: - type: string - type: object - type: array - average_quality: - type: number - end: - type: string - peer_id: - type: string - start: - type: string - video_bandwidth: - type: number - video_packet_loss: - type: number - video_stats: - items: - properties: - frame_height: - type: number - frame_width: - type: number - frames_dropped: - type: number - frames_per_second: - type: number - jitter: - type: number - packets_lost: - type: number - quality: - type: number - timestamp: - type: string - type: object - type: array - type: object - type: array - type: object - type: object - success: - type: boolean - type: object - description: Returns details of a participant along with callstats data. - security: - - api_token: [] - summary: Fetch details of a participant - tags: - - Sessions - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - sessions - method: get_session_participant_details - /accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/summary: - get: - description: >- - Returns a Summary URL to download the Summary of Transcripts for the - session ID as plain text. - operationId: GetSessionSummary - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - name: session_id - in: path - required: true - description: The session ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - data: - $ref: '#/components/schemas/realtimekitTranscriptSummary' - success: - type: boolean - type: object - description: Returns a complete summary of transcripts of a session. - security: - - api_token: [] - summary: Fetch summary of transcripts for a session - tags: - - Sessions - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - sessions - method: get_session_summary - post: - description: Trigger Summary generation of Transcripts for the session ID. - operationId: post-sessions-session_id-summary - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - name: session_id - in: path - required: true - description: The session ID. - schema: - type: string - responses: - 2XX: - content: - application/json: - schema: - properties: - data: - properties: - message: - type: string - success: - type: boolean - type: object - success: - type: boolean - type: object - description: Success - security: - - api_token: [] - summary: Generate summary of Transcripts for the session - tags: - - Sessions - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - sessions - method: generate_summary_of_transcripts - /accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/transcript: - get: - description: >- - Returns a URL to download the transcript for the session ID in CSV - format. - operationId: GetSessionTranscript - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - name: session_id - in: path - required: true - description: The session ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - data: - $ref: '#/components/schemas/realtimekitTranscript' - success: - type: boolean - type: object - description: Returns the complete transcript of a session. - security: - - api_token: [] - summary: Fetch the complete transcript for a session - tags: - - Sessions - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - sessions - method: get_session_transcripts - /accounts/{account_id}/realtime/kit/{app_id}/webhooks: - get: - description: Returns details of all webhooks for an App. - operationId: getAllWebhooks - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/realtimekitWebhooksListSuccessResponse' - description: Operation successful - '401': - content: - application/json: {} - description: Invalid credentials - security: - - api_token: [] - summary: Fetch all webhooks details - tags: - - Webhooks - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - webhooks - method: get_webhooks - post: - description: Adds a new webhook to an App. - operationId: addWebhook - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/realtimekitWebhookRequest' - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/realtimekitWebhookSuccessResponse' - description: Webhook registered successfully - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/realtimekitErrorResponse' - description: Error - malformed request - '401': - content: - application/json: {} - description: Invalid credentials - security: - - api_token: [] - summary: Add a webhook - tags: - - Webhooks - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - webhooks - method: create_webhook - /accounts/{account_id}/realtime/kit/{app_id}/webhooks/{webhook_id}: - delete: - description: Removes a webhook for the given webhook ID. - operationId: deleteWebhook - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - description: ID of the webhook - in: path - name: webhook_id - schema: - type: string - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/realtimekitWebhookSuccessResponse' - description: Operation successful - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/realtimekitErrorResponse' - description: Error - malformed request - '401': - content: - application/json: {} - description: Invalid credentials - security: - - api_token: [] - summary: Delete a webhook - tags: - - Webhooks - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - webhooks - method: delete_webhook - get: - description: Returns webhook details for the given webhook ID. - operationId: getWebhook - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - description: ID of the webhook - in: path - name: webhook_id - schema: - type: string - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/realtimekitWebhookSuccessResponse' - description: Operation successful - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/realtimekitErrorResponse' - description: Error - malformed request - '401': - content: - application/json: {} - description: Invalid credentials - security: - - api_token: [] - summary: Fetch details of a webhook - tags: - - Webhooks - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - webhooks - method: get_webhook_by_id - patch: - description: Edits the webhook details for the given webhook ID. - operationId: editWebhook - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - description: ID of the webhook - in: path - name: webhook_id - schema: - type: string - required: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/realtimekitPatchWebhookRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/realtimekitWebhookSuccessResponse' - description: Operation successful - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/realtimekitErrorResponse' - description: Error - malformed request - '401': - content: - application/json: {} - description: Invalid credentials - security: - - api_token: [] - summary: Edit a webhook - tags: - - Webhooks - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - webhooks - method: edit_webhook - put: - description: Replace all details for the given webhook ID. - operationId: replaceWebhook - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - description: ID of the webhook - in: path - name: webhook_id - schema: - type: string - required: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/realtimekitWebhookRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/realtimekitWebhookSuccessResponse' - description: Operation successful - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/realtimekitErrorResponse' - description: Error - malformed request - '401': - content: - application/json: {} - description: Invalid credentials - security: - - api_token: [] - summary: Replace a webhook - tags: - - Webhooks - x-api-token-group: - - Realtime Admin - - Realtime - x-stackql-sdk: - service: realtime_kit - resource_chain: - - webhooks - method: replace_webhook -components: - schemas: - moqApiResponseError: - properties: - errors: - example: - - code: 21007 - message: A MoQ relay with this ID was not found. - items: - properties: - code: - description: >- - Error codes: - 21001: Request body too large (HTTP 413) - - 21002: Request body too small / missing name (HTTP 400) - - 21003: Relay ID should be 32 hex characters (HTTP 400) - - 21004: Failed to decode body — invalid JSON (HTTP 400) - - 21005: Failed to read body (HTTP 400) - 21006: Unexpected - server error (HTTP 500) - 21007: Relay not found (HTTP 404) - - 21008: Relay limit exceeded for this account (HTTP 409) - - 21009: origin_fallback and lingering_subscribe are mutually - exclusive (HTTP 400) - 21010: Invalid token type — must be - "publish_subscribe" or "subscribe" (HTTP 400) - 21011: Invalid - relay name — name must not be empty (HTTP 400) - type: integer - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: object - type: array - result: - nullable: true - type: object - success: - example: false - type: boolean - required: - - success - - errors - - messages - type: object - moqLingeringSubscribeConfig: - properties: - enabled: - default: true - type: boolean - max_timeout_ms: - default: 30000 - description: >- - Relay-level ceiling on lingering subscribe timeout (ms). Default - 30000. - maximum: 300000 - minimum: 0 - type: integer - type: object - moqOriginFallbackConfig: - properties: - enabled: - default: false - type: boolean - urls: - default: [] - description: Ordered list of upstream origin relay URLs. - items: - type: string - type: array - type: object - moqRelay: - description: Full relay details (no tokens). - properties: - config: - $ref: '#/components/schemas/moqRelayConfig' - created: - format: date-time - type: string - modified: - format: date-time - type: string - name: - example: Production Live Stream - type: string - status: - description: '"connected" when active, omitted otherwise.' - enum: - - connected - type: string - uid: - example: a1b2c3d4e5f67890a1b2c3d4e5f67890 - type: string - required: - - uid - - created - - modified - - name - - config - type: object - moqRelayConfig: - description: origin_fallback and lingering_subscribe are mutually exclusive. - properties: - lingering_subscribe: - $ref: '#/components/schemas/moqLingeringSubscribeConfig' - origin_fallback: - $ref: '#/components/schemas/moqOriginFallbackConfig' - type: object - moqRelayCreateResponse: - description: Relay with auto-generated tokens (shown once). - properties: - config: - $ref: '#/components/schemas/moqRelayConfig' - created: - format: date-time - type: string - modified: - format: date-time - type: string - name: - example: Production Live Stream - type: string - token_publish_subscribe: - description: Full access token (publish + subscribe). Treat as sensitive. - example: eyJhbGciOiJFZDI1NTE5... - type: string - token_subscribe: - description: Subscribe-only token. Treat as sensitive. - example: eyJhbGciOiJFZDI1NTE5... - type: string - uid: - description: Server-generated unique identifier (32 hex chars). - example: a1b2c3d4e5f67890a1b2c3d4e5f67890 - type: string - required: - - uid - - created - - modified - - name - - token_publish_subscribe - - token_subscribe - - config - type: object - moqRelayListItem: - description: Abbreviated relay for list responses. - properties: - created: - format: date-time - type: string - modified: - format: date-time - type: string - name: - type: string - uid: - example: a1b2c3d4e5f67890a1b2c3d4e5f67890 - type: string - required: - - uid - - created - - modified - - name - type: object - moqResultInfo: - properties: - count: - type: integer - total: - type: integer - type: object - moqRotateTokenResponse: - properties: - token: - description: New token value (shown once). Treat as sensitive. - example: eyJhbGciOiJFZDI1NTE5... - type: string - type: - enum: - - publish_subscribe - - subscribe - type: string - required: - - type - - token - type: object - realtimekitAIConfig: - description: >- - The AI Config allows you to customize the behavior of meeting - transcriptions and summaries - properties: - summarization: - $ref: '#/components/schemas/realtimekitSummarizationConfig' - transcription: - $ref: '#/components/schemas/realtimekitTranscriptionConfig' - title: AIConfig - type: object - realtimekitActiveSession: - properties: - associated_id: - description: >- - ID of the meeting this session is associated with. In the case of V2 - meetings, it is always a UUID. In V1 meetings, it is a room name of - the form `abcdef-ghijkl` - type: string - breakout_rooms: - items: - $ref: '#/components/schemas/realtimekitActiveSession' - readOnly: true - type: array - created_at: - description: timestamp when session created - type: string - readOnly: true - ended_at: - description: timestamp when session ended - type: string - id: - description: ID of the session - readOnly: true - type: string - live_participants: - description: number of participants currently in the session - type: number - max_concurrent_participants: - description: number of maximum participants that were in the session - type: number - meeting_display_name: - description: Title of the meeting this session belongs to - type: string - meta: - description: Any meta data about session. - type: object - minutes_consumed: - description: number of minutes consumed since the session started - type: number - organization_id: - description: App id that hosted this session - type: string - started_at: - description: timestamp when session started - type: string - status: - description: current status of session - enum: - - LIVE - - ENDED - type: string - type: - description: type of session - enum: - - meeting - - livestream - - participant - type: string - updated_at: - description: timestamp when session was last updated - type: string - readOnly: true - required: - - id - - associated_id - - meeting_display_name - - type - - status - - live_participants - - max_concurrent_participants - - minutes_consumed - - organization_id - - started_at - - created_at - - updated_at - type: object - realtimekitAudioConfig: - description: >- - Object containing configuration regarding the audio that is being - recorded. - properties: - channel: - default: stereo - description: >- - Audio signal pathway within an audio file that carries a specific - sound source. - enum: - - mono - - stereo - type: string - codec: - default: AAC - description: >- - Codec using which the recording will be encoded. If VP8/VP9 is - selected for videoConfig, changing audioConfig is not allowed. In - this case, the codec in the audioConfig is automatically set to - vorbis. - enum: - - MP3 - - AAC - type: string - export_file: - default: true - description: Controls whether to export audio file seperately - type: boolean - title: AudioConfig - type: object - realtimekitChatMessage: - properties: - chat_download_url: - description: URL where the chat logs can be downloaded - type: string - chat_download_url_expiry: - description: Time when the download URL will expire - type: string - required: - - chat_download_url - - chat_download_url_expiry - type: object - realtimekitErrorResponse: - properties: - error: - description: Object containing details of the error that occurred - properties: - code: - description: Error code - example: 404 - type: number - message: - description: Error message - example: 'Error: resource not found' - type: string - required: - - code - - message - type: object - success: - description: Whether the operation succeeded or not - example: false - type: boolean - required: - - success - - error - type: object - realtimekitGenericErrorResponse: - properties: - error: - properties: - code: - description: HTTP status code of the error. - type: number - message: - description: Error message describing what went wrong. - type: string - required: - - code - - message - type: object - success: - default: false - description: Success status of the request. - type: boolean - required: - - success - - error - type: object - realtimekitInteractiveConfig: - description: >- - Allows you to add timed metadata to your recordings, which are digital - markers inserted into a video file to provide contextual information at - specific points in the content range. The ID3 tags containing this - information are available to clients on the playback timeline in HLS - format. The output files are generated in a compressed .tar format. - properties: - type: - description: The metadata is presented in the form of ID3 tags. - enum: - - ID3 - type: string - title: InteractiveConfig - type: object - realtimekitLivestreamingConfig: - properties: - rtmp_url: - description: RTMP URL to stream to - example: rtmp://a.rtmp.youtube.com/live2 - format: uri - type: string - title: LivestreamingConfig - type: object - realtimekitMeeting: - properties: - created_at: - description: >- - Timestamp the object was created at. The time is returned in ISO - format. - format: date-time - readOnly: true - type: string - id: - description: ID of the meeting. - format: uuid - readOnly: true - type: string - live_stream_on_start: - description: Specifies if the meeting should start getting livestreamed on start. - type: boolean - persist_chat: - description: Specifies if Chat within a meeting should persist for a week. - type: boolean - record_on_start: - description: >- - Specifies if the meeting should start getting recorded as soon as - someone joins the meeting. - type: boolean - session_keep_alive_time_in_secs: - default: 60 - description: >- - Time in seconds, for which a session remains active, after the last - participant has left the meeting. - maximum: 600 - minimum: 60 - type: number - status: - description: >- - Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be - able to join an `INACTIVE` meeting. - enum: - - ACTIVE - - INACTIVE - type: string - summarize_on_end: - description: >- - Automatically generate summary of meetings using transcripts. - Requires Transcriptions to be enabled, and can be retrieved via - Webhooks or summary API. - type: boolean - title: - description: Title of the meeting. - type: string - updated_at: - description: >- - Timestamp the object was updated at. The time is returned in ISO - format. - format: date-time - readOnly: true - type: string - required: - - id - - created_at - - updated_at - type: object - realtimekitParticipant: - description: Represents a participant. - properties: - created_at: - description: When this object was created. The time is returned in ISO format. - format: date-time - type: string - readOnly: true - custom_participant_id: - description: A unique participant ID generated by the client. - type: string - id: - description: ID of the participant. - format: uuid - type: string - name: - description: Name of the participant. - nullable: true - type: string - picture: - description: URL to a picture of the participant. - format: uri - nullable: true - type: string - preset_name: - description: Preset applied to the participant. - type: string - updated_at: - description: When this object was updated. The time is returned in ISO format. - format: date-time - type: string - readOnly: true - required: - - id - - custom_participant_id - - preset_name - - created_at - - updated_at - title: Participant - type: object - realtimekitParticipantsList: - properties: - created_at: - description: timestamp when this participant was created. - type: string - readOnly: true - custom_participant_id: - description: ID passed by client to create this participant. - type: string - display_name: - description: Display name of participant when joining the session. - type: string - duration: - description: number of minutes for which the participant was in the session. - type: number - id: - description: Participant ID. This maps to the corresponding peerId. - type: string - joined_at: - description: timestamp at which participant joined the session. - type: string - left_at: - description: timestamp at which participant left the session. - type: string - preset_name: - description: Name of the preset associated with the participant. - type: string - updated_at: - description: timestamp when this participant's data was last updated. - type: string - readOnly: true - user_id: - description: User id for this participant. - type: string - type: object - realtimekitPatchWebhookRequest: - properties: - enabled: - default: true - type: boolean - events: - description: Events that the webhook will get triggered by - items: - enum: - - meeting.started - - meeting.ended - - meeting.participantJoined - - meeting.participantLeft - - recording.statusUpdate - - livestreaming.statusUpdate - - meeting.chatSynced - - meeting.transcript - - meeting.summary - type: string - type: array - name: - description: Name of the webhook - type: string - url: - description: URL the webhook will send events to - example: https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e - format: uri - type: string - type: object - realtimekitPoll: - properties: - anonymous: - type: boolean - created_by: - type: string - hide_votes: - type: boolean - id: - description: ID of the poll - readOnly: true - type: string - options: - description: Answer options - items: - properties: - count: - type: number - text: - description: Text of the answer option - type: string - votes: - items: - properties: - id: - type: string - name: - type: string - required: - - id - - name - type: object - type: array - required: - - text - - count - - votes - type: object - type: array - question: - description: Question asked by the poll - type: string - voted: - items: - type: string - type: array - required: - - id - - question - - options - type: object - realtimekitPreset: - properties: - config: - properties: - max_screenshare_count: - description: >- - Maximum number of screen shares that can be active at a given - time - type: integer - max_video_streams: - description: Maximum number of streams that are visible on a device - properties: - desktop: - description: Maximum number of video streams visible on desktop devices - type: integer - mobile: - description: Maximum number of streams visible on mobile devices - type: integer - required: - - mobile - - desktop - type: object - media: - description: 'Media configuration options. eg: Video quality' - properties: - audio: - description: Control options for Audio quality. - properties: - enable_high_bitrate: - default: false - description: Enable High Quality Audio for your meetings - type: boolean - enable_stereo: - default: false - description: Enable Stereo for your meetings - type: boolean - type: object - screenshare: - description: Configuration options for participant screen shares - properties: - frame_rate: - description: Frame rate of screen share - type: integer - quality: - description: Quality of screen share - enum: - - hd - - vga - - qvga - type: string - required: - - quality - - frame_rate - type: object - video: - description: Configuration options for participant videos - properties: - frame_rate: - description: Frame rate of participants' video - maximum: 30 - type: integer - quality: - description: Video quality of participants - enum: - - hd - - vga - - qvga - type: string - required: - - quality - - frame_rate - type: object - required: - - video - - screenshare - type: object - view_type: - description: Type of the meeting - enum: - - GROUP_CALL - - WEBINAR - - AUDIO_ROOM - type: string - required: - - view_type - - max_video_streams - - max_screenshare_count - - media - type: object - name: - description: Name of the preset - type: string - permissions: - properties: - accept_waiting_requests: - description: Whether this participant can accept waiting requests - type: boolean - can_accept_production_requests: - type: boolean - can_change_participant_permissions: - type: boolean - can_edit_display_name: - type: boolean - can_livestream: - type: boolean - can_record: - type: boolean - can_spotlight: - type: boolean - chat: - description: Chat permissions - properties: - private: - properties: - can_receive: - type: boolean - can_send: - type: boolean - files: - type: boolean - text: - type: boolean - required: - - can_send - - can_receive - - text - - files - type: object - public: - properties: - can_send: - description: Can send messages in general - type: boolean - files: - description: Can send file messages - type: boolean - text: - description: Can send text messages - type: boolean - required: - - can_send - - text - - files - type: object - required: - - public - - private - type: object - connected_meetings: - properties: - can_alter_connected_meetings: - type: boolean - can_switch_connected_meetings: - type: boolean - can_switch_to_parent_meeting: - type: boolean - required: - - can_alter_connected_meetings - - can_switch_connected_meetings - - can_switch_to_parent_meeting - type: object - disable_participant_audio: - type: boolean - disable_participant_screensharing: - type: boolean - disable_participant_video: - type: boolean - hidden_participant: - description: Whether this participant is visible to others or not - type: boolean - is_recorder: - default: false - type: boolean - kick_participant: - type: boolean - media: - description: Media permissions - properties: - audio: - description: Audio permissions - properties: - can_produce: - description: Can produce audio - enum: - - ALLOWED - - NOT_ALLOWED - - CAN_REQUEST - type: string - required: - - can_produce - type: object - screenshare: - description: Screenshare permissions - properties: - can_produce: - description: Can produce screen share video - enum: - - ALLOWED - - NOT_ALLOWED - - CAN_REQUEST - type: string - required: - - can_produce - type: object - video: - description: Video permissions - properties: - can_produce: - description: Can produce video - enum: - - ALLOWED - - NOT_ALLOWED - - CAN_REQUEST - type: string - required: - - can_produce - type: object - required: - - video - - audio - - screenshare - type: object - pin_participant: - type: boolean - plugins: - description: Plugin permissions - properties: - can_close: - description: Can close plugins that are already open - type: boolean - can_edit_config: - description: Can edit plugin config - type: boolean - can_start: - description: Can start plugins - type: boolean - config: - type: string - format: uuid - properties: - access_control: - enum: - - FULL_ACCESS - - VIEW_ONLY - type: string - handles_view_only: - type: boolean - required: - - access_control - - handles_view_only - required: - - can_close - - can_start - - can_edit_config - - config - type: object - polls: - description: Poll permissions - properties: - can_create: - description: Can create polls - type: boolean - can_view: - description: Can view polls - type: boolean - can_vote: - description: Can vote on polls - type: boolean - required: - - can_create - - can_vote - - can_view - type: object - recorder_type: - default: NONE - description: Type of the recording peer - enum: - - RECORDER - - LIVESTREAMER - - NONE - type: string - show_participant_list: - type: boolean - waiting_room_type: - description: Waiting room type - enum: - - SKIP - - ON_PRIVILEGED_USER_ENTRY - - SKIP_ON_ACCEPT - type: string - required: - - accept_waiting_requests - - can_accept_production_requests - - can_edit_display_name - - can_spotlight - - recorder_type - - disable_participant_audio - - disable_participant_screensharing - - disable_participant_video - - kick_participant - - pin_participant - - can_record - - can_livestream - - waiting_room_type - - plugins - - connected_meetings - - polls - - media - - chat - - hidden_participant - - show_participant_list - - can_change_participant_permissions - type: object - ui: - properties: - config_diff: - type: object - design_tokens: - properties: - border_radius: - enum: - - rounded - type: string - border_width: - enum: - - thin - type: string - colors: - properties: - background: - properties: - '600': - default: '#222222' - type: string - '700': - default: '#1f1f1f' - type: string - '800': - default: '#1b1b1b' - type: string - '900': - default: '#181818' - type: string - '1000': - default: '#141414' - type: string - required: - - '600' - - '700' - - '800' - - '900' - - '1000' - type: object - brand: - properties: - '300': - default: '#844d1c' - type: string - '400': - default: '#9d5b22' - type: string - '500': - default: '#b56927' - type: string - '600': - default: '#d37c30' - type: string - '700': - default: '#d9904f' - type: string - required: - - '300' - - '400' - - '500' - - '600' - - '700' - type: object - danger: - default: '#FF2D2D' - type: string - success: - default: '#62A504' - type: string - text: - default: '#EEEEEE' - type: string - text_on_brand: - default: '#EEEEEE' - type: string - video_bg: - default: '#191919' - type: string - warning: - default: '#FFCD07' - type: string - required: - - brand - - background - - danger - - text - - text_on_brand - - success - - video_bg - - warning - type: object - logo: - type: string - spacing_base: - default: 4 - type: number - theme: - enum: - - dark - type: string - required: - - border_radius - - border_width - - spacing_base - - theme - - colors - - logo - type: object - required: - - design_tokens - type: object - required: - - name - - config - - ui - title: Preset - type: object - realtimekitPresetListItem: - description: Returned by Get All Presets route - properties: - created_at: - description: Timestamp this preset was created at - format: date-time - type: string - readOnly: true - id: - description: ID of the preset - format: uuid - type: string - name: - description: Name of the preset - type: string - updated_at: - description: Timestamp this preset was last updated - format: date-time - type: string - readOnly: true - title: PresetListItem - type: object - realtimekitRealtimekitBucketConfig: - properties: - enabled: - description: >- - Controls whether recordings are uploaded to RealtimeKit's bucket. If - set to false, `download_url`, `audio_download_url`, - `download_url_expiry` won't be generated for a recording. - type: boolean - required: - - enabled - title: realtimekitBucketConfig - type: object - realtimekitRecording: - properties: - audio_download_url: - description: >- - If the audio_config is passed, the URL for downloading the audio - recording is returned. - format: uri - nullable: true - readOnly: true - type: string - download_url: - description: URL where the recording can be downloaded. - format: uri - nullable: true - readOnly: true - type: string - download_url_expiry: - description: Timestamp when the download URL expires. - format: date-time - nullable: true - readOnly: true - type: string - file_size: - description: File size of the recording, in bytes. - nullable: true - readOnly: true - type: number - id: - description: ID of the recording - format: uuid - readOnly: true - type: string - invoked_time: - description: Timestamp when this recording was invoked. - format: date-time - type: string - output_file_name: - description: File name of the recording. - type: string - recording_duration: - description: Total recording time in seconds. - type: integer - session_id: - description: ID of the meeting session this recording is for. - format: uuid - nullable: true - readOnly: true - type: string - started_time: - description: >- - Timestamp when this recording actually started after being invoked. - Usually a few seconds after `invoked_time`. - format: date-time - nullable: true - type: string - status: - description: Current status of the recording. - enum: - - INVOKED - - RECORDING - - UPLOADING - - UPLOADED - - ERRORED - - PAUSED - type: string - stopped_time: - description: >- - Timestamp when this recording was stopped. Optional; is present only - when the recording has actually been stopped. - format: date-time - nullable: true - type: string - required: - - id - - download_url - - download_url_expiry - - audio_download_url - - file_size - - session_id - - output_file_name - - status - - invoked_time - - started_time - - stopped_time - title: Recording - type: object - realtimekitRecordingConfig: - description: >- - Recording Configurations to be used for this meeting. This level of - configs takes higher preference over App level configs on the - RealtimeKit developer portal. - properties: - audio_config: - $ref: '#/components/schemas/realtimekitAudioConfig' - file_name_prefix: - description: Adds a prefix to the beginning of the file name of the recording. - type: string - live_streaming_config: - $ref: '#/components/schemas/realtimekitLivestreamingConfig' - max_seconds: - description: >- - Specifies the maximum duration for recording in seconds, ranging - from a minimum of 60 seconds to a maximum of 24 hours. - maximum: 86400 - minimum: 60 - type: number - realtimekit_bucket_config: - $ref: '#/components/schemas/realtimekitRealtimekitBucketConfig' - storage_config: - $ref: '#/components/schemas/realtimekitStorageConfig' - video_config: - $ref: '#/components/schemas/realtimekitVideoConfig' - title: RecordingConfig - type: object - realtimekitSessionParticipant: - properties: - created_at: - type: string - readOnly: true - email: - description: Email of the session participant. - type: string - id: - description: ID of the session participant - type: string - name: - description: Name of the session participant. - type: string - picture: - description: A URL pointing to a picture of the participant. - type: string - updated_at: - type: string - readOnly: true - required: - - id - - created_at - - updated_at - title: SessionParticipant - type: object - realtimekitStartReason: - properties: - caller: - properties: - name: - description: Name of the user who started the recording. - example: RealtimeKit_test - type: string - type: - description: >- - The type can be an App or a user. If the type is `user`, then - only the `user_Id` and `name` are returned. - enum: - - ORGANIZATION - - USER - type: string - user_Id: - description: The user ID of the person who started the recording. - example: d61f6956-e68f-4375-bf10-c38a704d1bec - format: uuid - type: string - type: object - reason: - description: >- - Specifies if the recording was started using the "Start a - Recording"API or using the parameter RECORD_ON_START in the "Create - a meeting" API. If the recording is initiated using the - "RECORD_ON_START" parameter, the user details will not be populated. - enum: - - API_CALL - - RECORD_ON_START - type: string - title: startReason - type: object - realtimekitStopReason: - properties: - caller: - properties: - name: - description: Name of the user who stopped the recording. - example: RealtimeKit_test - type: string - type: - description: >- - The type can be an App or a user. If the type is `user`, then - only the `user_Id` and `name` are returned. - enum: - - ORGANIZATION - - USER - type: string - user_Id: - description: The user ID of the person who stopped the recording. - example: d61f6956-e68f-4375-bf10-c38a704d1bec - format: uuid - type: string - type: object - reason: - description: Specifies the reason why the recording stopped. - enum: - - API_CALL - - INTERNAL_ERROR - - ALL_PEERS_LEFT - type: string - title: stopReason - type: object - realtimekitStorageConfig: - nullable: true - properties: - access_key: - description: >- - Access key of the storage medium. Access key is not required for the - `gcs` storage media type. Note that this field is not readable by - clients, only writeable. - type: string - writeOnly: true - auth_method: - description: Authentication method used for "sftp" type storage medium - enum: - - KEY - - PASSWORD - type: string - bucket: - description: Name of the storage medium's bucket. - type: string - host: - description: SSH destination server host for SFTP type storage medium - type: string - password: - description: >- - SSH destination server password for SFTP type storage medium when - auth_method is "PASSWORD". If auth_method is "KEY", this specifies - the password for the ssh private key. - type: string - path: - description: >- - Path relative to the bucket root at which the recording will be - placed. - type: string - port: - description: SSH destination server port for SFTP type storage medium - type: number - private_key: - description: >- - Private key used to login to destination SSH server for SFTP type - storage medium, when auth_method used is "KEY" - type: string - region: - description: Region of the storage medium. - example: us-east-1 - type: string - secret: - description: >- - Secret key of the storage medium. Similar to `access_key`, it is - only writeable by clients, not readable. - type: string - type: - description: Type of storage media. - enum: - - aws - - azure - - digitalocean - - gcs - - sftp - type: string - username: - description: SSH destination server username for SFTP type storage medium - type: string - required: - - type - title: StorageConfig - type: object - realtimekitSummarizationConfig: - description: Summary Config - properties: - summary_type: - default: general - description: >- - Defines the style of the summary, such as general, team meeting, or - sales call. - enum: - - general - - team_meeting - - sales_call - - client_check_in - - interview - - daily_standup - - one_on_one_meeting - - lecture - - code_review - type: string - text_format: - default: markdown - description: >- - Determines the text format of the summary, such as plain text or - markdown. - enum: - - plain_text - - markdown - type: string - word_limit: - default: 500 - description: Sets the maximum number of words in the meeting summary. - maximum: 1000 - minimum: 150 - type: integer - title: SummarizationConfig - type: object - realtimekitTranscript: - properties: - sessionId: - type: string - transcript_download_url: - description: URL where the transcript can be downloaded - type: string - transcript_download_url_expiry: - description: Time when the download URL will expire - type: string - required: - - sessionId - - transcript_download_url - - transcript_download_url_expiry - type: object - realtimekitTranscriptSummary: - properties: - sessionId: - type: string - summaryDownloadUrl: - description: URL where the summary of transcripts can be downloaded - type: string - summaryDownloadUrlExpiry: - description: Time of Expiry before when you need to download the csv file. - type: string - required: - - sessionId - - summaryDownloadUrl - - summaryDownloadUrlExpiry - title: TranscriptSummary - type: object - realtimekitTranscriptionConfig: - description: Transcription Configurations - properties: - keywords: - description: >- - Adds specific terms to improve accurate detection during - transcription. - items: - type: string - type: array - language: - default: en-US - description: >- - Specifies the language code for transcription to ensure accurate - results. - enum: - - en-US - - en-IN - - de - - hi - - sv - - ru - - pl - - el - - fr - - nl - type: string - profanity_filter: - default: false - description: Control the inclusion of offensive language in transcriptions. - type: boolean - title: TranscriptionConfig - type: object - realtimekitUpdatePreset: - properties: - config: - properties: - max_screenshare_count: - description: >- - Maximum number of screen shares that can be active at a given - time - type: integer - max_video_streams: - description: Maximum number of streams that are visible on a device - properties: - desktop: - description: Maximum number of video streams visible on desktop devices - type: integer - mobile: - description: Maximum number of streams visible on mobile devices - type: integer - type: object - media: - description: 'Media configuration options. eg: Video quality' - properties: - screenshare: - description: Configuration options for participant screen shares - properties: - frame_rate: - description: Frame rate of screen share - type: integer - quality: - description: Quality of screen share - enum: - - hd - - vga - - qvga - type: string - type: object - video: - description: Configuration options for participant videos - properties: - frame_rate: - description: Frame rate of participants' video - maximum: 30 - type: integer - quality: - description: Video quality of participants - enum: - - hd - - vga - - qvga - type: string - type: object - type: object - view_type: - description: Type of the meeting - enum: - - GROUP_CALL - - WEBINAR - - AUDIO_ROOM - type: string - type: object - name: - description: Name of the preset - type: string - permissions: - properties: - accept_waiting_requests: - description: Whether this participant can accept waiting requests - type: boolean - can_accept_production_requests: - type: boolean - can_change_participant_permissions: - type: boolean - can_edit_display_name: - type: boolean - can_livestream: - type: boolean - can_record: - type: boolean - can_spotlight: - type: boolean - chat: - description: Chat permissions - properties: - private: - properties: - can_receive: - type: boolean - can_send: - type: boolean - files: - type: boolean - text: - type: boolean - type: object - public: - properties: - can_send: - description: Can send messages in general - type: boolean - files: - description: Can send file messages - type: boolean - text: - description: Can send text messages - type: boolean - type: object - type: object - connected_meetings: - properties: - can_alter_connected_meetings: - type: boolean - can_switch_connected_meetings: - type: boolean - can_switch_to_parent_meeting: - type: boolean - type: object - disable_participant_audio: - type: boolean - disable_participant_screensharing: - type: boolean - disable_participant_video: - type: boolean - hidden_participant: - description: Whether this participant is visible to others or not - type: boolean - is_recorder: - default: false - type: boolean - kick_participant: - type: boolean - media: - description: Media permissions - properties: - audio: - description: Audio permissions - properties: - can_produce: - description: Can produce audio - enum: - - ALLOWED - - NOT_ALLOWED - - CAN_REQUEST - type: string - type: object - screenshare: - description: Screenshare permissions - properties: - can_produce: - description: Can produce screen share video - enum: - - ALLOWED - - NOT_ALLOWED - - CAN_REQUEST - type: string - type: object - video: - description: Video permissions - properties: - can_produce: - description: Can produce video - enum: - - ALLOWED - - NOT_ALLOWED - - CAN_REQUEST - type: string - type: object - type: object - pin_participant: - type: boolean - plugins: - description: Plugin permissions - properties: - can_close: - description: Can close plugins that are already open - type: boolean - can_edit_config: - description: Can edit plugin config - type: boolean - can_start: - description: Can start plugins - type: boolean - config: - type: string - format: uuid - properties: - access_control: - enum: - - FULL_ACCESS - - VIEW_ONLY - type: string - handles_view_only: - type: boolean - type: object - polls: - description: Poll permissions - properties: - can_create: - description: Can create polls - type: boolean - can_view: - description: Can view polls - type: boolean - can_vote: - description: Can vote on polls - type: boolean - type: object - recorder_type: - default: NONE - description: Type of the recording peer - enum: - - RECORDER - - LIVESTREAMER - - NONE - type: string - show_participant_list: - type: boolean - waiting_room_type: - description: Waiting room type - enum: - - SKIP - - ON_PRIVILEGED_USER_ENTRY - - SKIP_ON_ACCEPT - type: string - type: object - ui: - properties: - config_diff: - type: object - design_tokens: - properties: - border_radius: - enum: - - rounded - type: string - border_width: - enum: - - thin - type: string - colors: - properties: - background: - properties: - '600': - default: '#222222' - type: string - '700': - default: '#1f1f1f' - type: string - '800': - default: '#1b1b1b' - type: string - '900': - default: '#181818' - type: string - '1000': - default: '#141414' - type: string - type: object - brand: - properties: - '300': - default: '#844d1c' - type: string - '400': - default: '#9d5b22' - type: string - '500': - default: '#b56927' - type: string - '600': - default: '#d37c30' - type: string - '700': - default: '#d9904f' - type: string - type: object - danger: - default: '#FF2D2D' - type: string - success: - default: '#62A504' - type: string - text: - default: '#EEEEEE' - type: string - text_on_brand: - default: '#EEEEEE' - type: string - video_bg: - default: '#191919' - type: string - warning: - default: '#FFCD07' - type: string - type: object - logo: - type: string - spacing_base: - default: 4 - type: number - theme: - enum: - - dark - type: string - type: object - type: object - title: UpdatePreset - type: object - realtimekitVideoConfig: - properties: - codec: - default: H264 - description: Codec using which the recording will be encoded. - enum: - - H264 - - VP8 - type: string - export_file: - default: true - description: Controls whether to export video file seperately - type: boolean - height: - default: 720 - description: Height of the recording video in pixels - example: 720 - maximum: 1920 - minimum: 1 - type: integer - watermark: - description: Watermark to be added to the recording - properties: - position: - default: left top - description: Position of the watermark - enum: - - left top - - right top - - left bottom - - right bottom - type: string - size: - description: Size of the watermark - properties: - height: - description: Height of the watermark in px - minimum: 1 - type: integer - width: - description: Width of the watermark in px - minimum: 1 - type: integer - type: object - url: - description: URL of the watermark image - format: uri - type: string - type: object - width: - default: 1280 - description: Width of the recording video in pixels - example: 1280 - maximum: 1920 - minimum: 1 - type: integer - title: VideoConfig - type: object - realtimekitWebhook: - properties: - created_at: - description: Timestamp when this webhook was created - example: '2022-05-28T07:01:53.075Z' - format: date-time - type: string - readOnly: true - enabled: - description: Set to true if the webhook is active - type: boolean - events: - description: Events this webhook will send updates for - example: - - meeting.started - - meeting.ended - - meeting.participantJoined - - meeting.participantLeft - - meeting.chatSynced - - recording.statusUpdate - - livestreaming.statusUpdate - - meeting.transcript - - meeting.summary - items: - enum: - - meeting.started - - meeting.ended - - meeting.participantJoined - - meeting.participantLeft - - meeting.chatSynced - - recording.statusUpdate - - livestreaming.statusUpdate - - meeting.transcript - - meeting.summary - type: string - type: array - id: - description: ID of the webhook - example: 0d1f069d-43bb-489a-ad8c-7eb95592ba8e - format: uuid - readOnly: true - type: string - name: - description: Name of the webhook - example: All events webhook - type: string - updated_at: - description: Timestamp when this webhook was updated - example: '2022-05-28T07:01:53.075Z' - format: date-time - type: string - readOnly: true - url: - description: URL the webhook will send events to - example: https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e - format: uri - type: string - required: - - id - - name - - url - - events - - created_at - - updated_at - - enabled - type: object - realtimekitWebhookRequest: - properties: - enabled: - default: true - description: Set whether or not the webhook should be active when created - type: boolean - events: - description: Events that this webhook will get triggered by - example: - - meeting.started - - meeting.ended - - meeting.participantJoined - - meeting.participantLeft - - meeting.chatSynced - - recording.statusUpdate - - livestreaming.statusUpdate - - meeting.transcript - - meeting.summary - items: - enum: - - meeting.started - - meeting.ended - - meeting.participantJoined - - meeting.participantLeft - - meeting.chatSynced - - recording.statusUpdate - - livestreaming.statusUpdate - - meeting.transcript - - meeting.summary - type: string - type: array - name: - description: Name of the webhook - example: All events webhook - type: string - url: - description: URL this webhook will send events to - example: https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e - format: uri - type: string - required: - - name - - url - - events - type: object - realtimekitWebhookSuccessResponse: - properties: - data: - $ref: '#/components/schemas/realtimekitWebhook' - success: - example: true - type: boolean - required: - - success - - data - type: object - realtimekitWebhooksListSuccessResponse: - properties: - data: - items: - $ref: '#/components/schemas/realtimekitWebhook' - type: array - success: - example: true - type: boolean - required: - - success - - data - type: object - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - relays: - id: cloudflare.realtime_kit.relays - name: relays - title: Relays - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1moq~1relays/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - post_accounts_account_id_moq_relays: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1moq~1relays/post' - response: - mediaType: application/json - openAPIDocKey: '201' - delete_accounts_account_id_moq_relays_relay_id: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1moq~1relays~1{relay_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1moq~1relays~1{relay_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - put_accounts_account_id_moq_relays_relay_id: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1moq~1relays~1{relay_id}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - rotate: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1moq~1relays~1{relay_id}~1tokens~1rotate/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/relays/methods/get' - - $ref: '#/components/x-stackQL-resources/relays/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/relays/methods/post_accounts_account_id_moq_relays - update: [] - delete: - - $ref: >- - #/components/x-stackQL-resources/relays/methods/delete_accounts_account_id_moq_relays_relay_id - replace: - - $ref: >- - #/components/x-stackQL-resources/relays/methods/put_accounts_account_id_moq_relays_relay_id - apps: - id: cloudflare.realtime_kit.apps - name: apps - title: Apps - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1apps/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.data - post: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1apps/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/apps/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/apps/methods/post' - update: [] - delete: [] - replace: [] - analytics: - id: cloudflare.realtime_kit.analytics - name: analytics - title: Analytics - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1analytics~1daywise/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/analytics/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - livestreams_overall: - id: cloudflare.realtime_kit.livestreams_overall - name: livestreams_overall - title: Livestreams Overall - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1analytics~1livestreams~1overall/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/livestreams_overall/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - kit_livestreams: - id: cloudflare.realtime_kit.kit_livestreams - name: kit_livestreams - title: Kit Livestreams - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1livestreams/get - response: - mediaType: application/json - openAPIDocKey: '200' - get_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1livestreams~1{livestream_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/kit_livestreams/methods/get_by_account - - $ref: '#/components/x-stackQL-resources/kit_livestreams/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - livestreams: - id: cloudflare.realtime_kit.livestreams - name: livestreams - title: Livestreams - methods: - create_independent_livestream: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1livestreams/post - response: - mediaType: application/json - openAPIDocKey: '201' - stop_livestreaming_a_meeting: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1active-livestream~1stop/post - response: - mediaType: application/json - openAPIDocKey: '200' - start_livestreaming_a_meeting: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1livestreams/post - response: - mediaType: application/json - openAPIDocKey: '201' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/livestreams/methods/start_livestreaming_a_meeting - - $ref: >- - #/components/x-stackQL-resources/livestreams/methods/create_independent_livestream - update: [] - delete: [] - replace: [] - livestreams_sessions: - id: cloudflare.realtime_kit.livestreams_sessions - name: livestreams_sessions - title: Livestreams Sessions - methods: - get_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1livestreams~1sessions~1{livestream_session_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/livestreams_sessions/methods/get_by_account - insert: [] - update: [] - delete: [] - replace: [] - livestreams_active_livestream_session: - id: cloudflare.realtime_kit.livestreams_active_livestream_session - name: livestreams_active_livestream_session - title: Livestreams Active Livestream Session - methods: - list_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1livestreams~1{livestream_id}~1active-livestream-session/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/livestreams_active_livestream_session/methods/list_by_account - insert: [] - update: [] - delete: [] - replace: [] - kit_meetings: - id: cloudflare.realtime_kit.kit_meetings - name: kit_meetings - title: Kit Meetings - methods: - list_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.data - get_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/kit_meetings/methods/get_by_account - - $ref: >- - #/components/x-stackQL-resources/kit_meetings/methods/list_by_account - insert: [] - update: [] - delete: [] - replace: [] - meetings: - id: cloudflare.realtime_kit.meetings - name: meetings - title: Meetings - methods: - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings/post - response: - mediaType: application/json - openAPIDocKey: '201' - update_meeting_by_id: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - replace_meeting_by_id: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - add_participant: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1participants/post - response: - mediaType: application/json - openAPIDocKey: '201' - delete_meeting_participant: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1participants~1{participant_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - edit_participant: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1participants~1{participant_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - refresh_participant_token: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1participants~1{participant_id}~1token/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/meetings/methods/refresh_participant_token - - $ref: '#/components/x-stackQL-resources/meetings/methods/add_participant' - - $ref: '#/components/x-stackQL-resources/meetings/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/meetings/methods/edit_participant' - - $ref: >- - #/components/x-stackQL-resources/meetings/methods/update_meeting_by_id - delete: - - $ref: >- - #/components/x-stackQL-resources/meetings/methods/delete_meeting_participant - replace: - - $ref: >- - #/components/x-stackQL-resources/meetings/methods/replace_meeting_by_id - livestreams_active_livestream: - id: cloudflare.realtime_kit.livestreams_active_livestream - name: livestreams_active_livestream - title: Livestreams Active Livestream - methods: - list_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1active-livestream/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/livestreams_active_livestream/methods/list_by_account - insert: [] - update: [] - delete: [] - replace: [] - active_session: - id: cloudflare.realtime_kit.active_session - name: active_session - title: Active Session - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1active-session/get - response: - mediaType: application/json - openAPIDocKey: '200' - kick: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1active-session~1kick/post - response: - mediaType: application/json - openAPIDocKey: '200' - kick_all: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1active-session~1kick-all/post - response: - mediaType: application/json - openAPIDocKey: '200' - mute: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1active-session~1mute/post - response: - mediaType: application/json - openAPIDocKey: '200' - mute_all: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1active-session~1mute-all/post - response: - mediaType: application/json - openAPIDocKey: '200' - create_poll: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1active-session~1poll/post - response: - mediaType: application/json - openAPIDocKey: '201' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/active_session/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - livestream: - id: cloudflare.realtime_kit.livestream - name: livestream - title: Livestream - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1livestream/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/livestream/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - meetings_participants: - id: cloudflare.realtime_kit.meetings_participants - name: meetings_participants - title: Meetings Participants - methods: - list_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1participants/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.data - get_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1participants~1{participant_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/meetings_participants/methods/get_by_account - - $ref: >- - #/components/x-stackQL-resources/meetings_participants/methods/list_by_account - insert: [] - update: [] - delete: [] - replace: [] - presets: - id: cloudflare.realtime_kit.presets - name: presets - title: Presets - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1presets/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.data - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1presets/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1presets~1{preset_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1presets~1{preset_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1presets~1{preset_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/presets/methods/get' - - $ref: '#/components/x-stackQL-resources/presets/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/presets/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/presets/methods/update' - delete: - - $ref: '#/components/x-stackQL-resources/presets/methods/delete' - replace: [] - recordings: - id: cloudflare.realtime_kit.recordings - name: recordings - title: Recordings - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1recordings/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.data - create_track: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1recordings~1track/post - response: - mediaType: application/json - openAPIDocKey: '200' - pause_resume_stop_recording: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1recordings~1{recording_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/recordings/methods/list' - insert: [] - update: [] - delete: [] - replace: - - $ref: >- - #/components/x-stackQL-resources/recordings/methods/pause_resume_stop_recording - kit_recordings: - id: cloudflare.realtime_kit.kit_recordings - name: kit_recordings - title: Kit Recordings - methods: - start_recordings: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1recordings/post - response: - mediaType: application/json - openAPIDocKey: '200' - get_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1recordings~1{recording_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/kit_recordings/methods/get_by_account - insert: - - $ref: >- - #/components/x-stackQL-resources/kit_recordings/methods/start_recordings - update: [] - delete: [] - replace: [] - recordings_active_recording: - id: cloudflare.realtime_kit.recordings_active_recording - name: recordings_active_recording - title: Recordings Active Recording - methods: - get_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1recordings~1active-recording~1{meeting_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/recordings_active_recording/methods/get_by_account - insert: [] - update: [] - delete: [] - replace: [] - sessions: - id: cloudflare.realtime_kit.sessions - name: sessions - title: Sessions - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1sessions/get - response: - mediaType: application/json - openAPIDocKey: '200' - generate_summary_of_transcripts: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1sessions~1{session_id}~1summary/post - response: - mediaType: application/json - openAPIDocKey: 2XX - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/sessions/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/sessions/methods/generate_summary_of_transcripts - update: [] - delete: [] - replace: [] - sessions_peer_report: - id: cloudflare.realtime_kit.sessions_peer_report - name: sessions_peer_report - title: Sessions Peer Report - methods: - get_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1sessions~1peer-report~1{peer_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/sessions_peer_report/methods/get_by_account - insert: [] - update: [] - delete: [] - replace: [] - kit_sessions: - id: cloudflare.realtime_kit.kit_sessions - name: kit_sessions - title: Kit Sessions - methods: - get_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1sessions~1{session_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/kit_sessions/methods/get_by_account - insert: [] - update: [] - delete: [] - replace: [] - sessions_chat: - id: cloudflare.realtime_kit.sessions_chat - name: sessions_chat - title: Sessions Chat - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1sessions~1{session_id}~1chat/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/sessions_chat/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - livestream_sessions: - id: cloudflare.realtime_kit.livestream_sessions - name: livestream_sessions - title: Livestream Sessions - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1sessions~1{session_id}~1livestream-sessions/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/livestream_sessions/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - sessions_participants: - id: cloudflare.realtime_kit.sessions_participants - name: sessions_participants - title: Sessions Participants - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1sessions~1{session_id}~1participants/get - response: - mediaType: application/json - openAPIDocKey: '200' - get_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1sessions~1{session_id}~1participants~1{participant_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/sessions_participants/methods/get_by_account - - $ref: >- - #/components/x-stackQL-resources/sessions_participants/methods/list - insert: [] - update: [] - delete: [] - replace: [] - sessions_summary: - id: cloudflare.realtime_kit.sessions_summary - name: sessions_summary - title: Sessions Summary - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1sessions~1{session_id}~1summary/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/sessions_summary/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - sessions_transcript: - id: cloudflare.realtime_kit.sessions_transcript - name: sessions_transcript - title: Sessions Transcript - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1sessions~1{session_id}~1transcript/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/sessions_transcript/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - webhooks: - id: cloudflare.realtime_kit.webhooks - name: webhooks - title: Webhooks - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1webhooks/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.data - create_webhook: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1webhooks/post - response: - mediaType: application/json - openAPIDocKey: '201' - delete_webhook: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1webhooks~1{webhook_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1webhooks~1{webhook_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - edit_webhook: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1webhooks~1{webhook_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - replace_webhook: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1webhooks~1{webhook_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/webhooks/methods/get' - - $ref: '#/components/x-stackQL-resources/webhooks/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/webhooks/methods/create_webhook' - update: - - $ref: '#/components/x-stackQL-resources/webhooks/methods/edit_webhook' - delete: - - $ref: '#/components/x-stackQL-resources/webhooks/methods/delete_webhook' - replace: - - $ref: '#/components/x-stackQL-resources/webhooks/methods/replace_webhook' +openapi: 3.0.3 +info: + title: realtime_kit API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/moq/relays: + get: + description: Lists all MoQ relays for the account. Returns only metadata. Config, status, and tokens are omitted. + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: integer + message: + type: string + type: object + type: array + messages: + items: + properties: + code: + type: integer + message: + type: string + type: object + type: array + success: + type: boolean + result: + items: + $ref: '#/components/schemas/moqRelayListItem' + type: array + result_info: + $ref: '#/components/schemas/moqResultInfo' + required: + - success + - errors + - messages + type: object + description: Relay list retrieved successfully. + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/moqApiResponseError' + description: 'Error 21006: Unexpected server error.' + security: + - api_token: [] + summary: List relays + tags: + - MoQ Relays + operationId: get_accounts_account_id_moq_relays + post: + description: Provisions a new MoQ relay instance. Auto-creates a publish+subscribe token and a subscribe-only token. Token values are included in the response (shown once). Config is set to defaults (lingering subscribe enabled, 30s ceiling, origin fallback off). Use PUT to modify. + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + name: + description: Human-readable name for the relay. + type: string + required: + - name + type: object + responses: + '201': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: integer + message: + type: string + type: object + type: array + messages: + items: + properties: + code: + type: integer + message: + type: string + type: object + type: array + success: + type: boolean + result: + $ref: '#/components/schemas/moqRelayCreateResponse' + required: + - success + - errors + - messages + type: object + description: Relay created successfully. + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/moqApiResponseError' + description: 'Bad request. Possible errors: - 21002: Request body too small (empty or missing name) - 21004: Failed to decode body (invalid JSON)' + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/moqApiResponseError' + description: 'Error 21008: Relay limit exceeded for this account.' + '413': + content: + application/json: + schema: + $ref: '#/components/schemas/moqApiResponseError' + description: 'Error 21001: Request body too large.' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/moqApiResponseError' + description: 'Error 21006: Unexpected server error.' + security: + - api_token: [] + summary: Create a relay + tags: + - MoQ Relays + operationId: post_accounts_account_id_moq_relays + /accounts/{account_id}/moq/relays/{relay_id}: + delete: + description: Soft-deletes a MoQ relay. + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Relay unique identifier (32 hex characters). + in: path + name: relay_id + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: integer + message: + type: string + type: object + type: array + messages: + items: + properties: + code: + type: integer + message: + type: string + type: object + type: array + success: + type: boolean + result: + nullable: true + type: object + required: + - success + - errors + - messages + type: object + description: Relay deleted successfully. + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/moqApiResponseError' + description: 'Error 21003: Relay ID should be 32 hex characters.' + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/moqApiResponseError' + description: 'Error 21007: Relay not found.' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/moqApiResponseError' + description: 'Error 21006: Unexpected server error.' + security: + - api_token: [] + summary: Delete a relay + tags: + - MoQ Relays + operationId: delete_accounts_account_id_moq_relays_relay_id + get: + description: Retrieves a single MoQ relay including config and status. Tokens are NOT included. + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Relay unique identifier (32 hex characters). + in: path + name: relay_id + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: integer + message: + type: string + type: object + type: array + messages: + items: + properties: + code: + type: integer + message: + type: string + type: object + type: array + success: + type: boolean + result: + $ref: '#/components/schemas/moqRelay' + required: + - success + - errors + - messages + type: object + description: Relay retrieved successfully. + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/moqApiResponseError' + description: 'Error 21003: Relay ID should be 32 hex characters.' + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/moqApiResponseError' + description: 'Error 21007: Relay not found.' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/moqApiResponseError' + description: 'Error 21006: Unexpected server error.' + security: + - api_token: [] + summary: Get a relay + tags: + - MoQ Relays + operationId: get_accounts_account_id_moq_relays_relay_id + put: + description: 'Updates a relay''s name and/or configuration. Partial updates: omitted fields are preserved. Config sub-objects replace as whole objects when present. origin_fallback and lingering_subscribe are mutually exclusive.' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Relay unique identifier (32 hex characters). + in: path + name: relay_id + schema: + type: string + required: true + requestBody: + content: + application/json: + schema: + properties: + config: + $ref: '#/components/schemas/moqRelayConfig' + name: + type: string + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: integer + message: + type: string + type: object + type: array + messages: + items: + properties: + code: + type: integer + message: + type: string + type: object + type: array + success: + type: boolean + result: + $ref: '#/components/schemas/moqRelay' + required: + - success + - errors + - messages + type: object + description: Relay updated successfully. + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/moqApiResponseError' + description: 'Bad request. Possible errors: 21003 (relay ID should be 32 hex characters), 21004 (failed to decode body, invalid JSON), 21009 (origin_fallback and lingering_subscribe are mutually exclusive), 21011 (name must not be empty).' + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/moqApiResponseError' + description: 'Error 21007: Relay not found.' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/moqApiResponseError' + description: 'Error 21006: Unexpected server error.' + security: + - api_token: [] + summary: Update a relay + tags: + - MoQ Relays + operationId: put_accounts_account_id_moq_relays_relay_id + /accounts/{account_id}/moq/relays/{relay_id}/tokens/rotate: + post: + description: Generates a new token for the specified type. The old token is immediately invalidated. Token value is shown once in the response. + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Relay unique identifier (32 hex characters). + in: path + name: relay_id + schema: + type: string + required: true + requestBody: + content: + application/json: + schema: + properties: + type: + description: Which token type to rotate. + enum: + - publish_subscribe + - subscribe + type: string + required: + - type + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: integer + message: + type: string + type: object + type: array + messages: + items: + properties: + code: + type: integer + message: + type: string + type: object + type: array + success: + type: boolean + result: + $ref: '#/components/schemas/moqRotateTokenResponse' + required: + - success + - errors + - messages + type: object + description: Token rotated successfully. + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/moqApiResponseError' + description: 'Bad request. Possible errors: 21003 (relay ID should be 32 hex characters), 21004 (failed to decode body, invalid JSON), 21010 (invalid token type).' + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/moqApiResponseError' + description: 'Error 21007: Relay not found.' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/moqApiResponseError' + description: 'Error 21006: Unexpected server error.' + security: + - api_token: [] + summary: Rotate a token + tags: + - MoQ Relays + operationId: post_accounts_account_id_moq_relays_relay_id_tokens_rotate + /accounts/{account_id}/realtime/kit/apps: + get: + description: Fetch all apps for your account + operationId: get_apps + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + data: + items: + properties: + created_at: + type: string + readOnly: true + id: + type: string + name: + type: string + type: object + type: array + success: + type: boolean + type: object + description: OK + security: + - api_token: [] + summary: Fetch all apps + tags: + - Apps + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - apps + method: get + post: + description: Create new app for your account + operationId: create_app + requestBody: + content: + application/json: + schema: + properties: + name: + type: string + required: + - name + type: object + responses: + '200': + content: + application/json: + schema: + properties: + data: + properties: + app: + properties: + created_at: + type: string + readOnly: true + id: + type: string + name: + type: string + type: object + type: object + success: + type: boolean + type: object + description: OK + security: + - api_token: [] + summary: Create App + tags: + - Apps + x-api-token-group: + - Realtime Admin + - Realtime + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + x-stackql-sdk: + service: realtime_kit + resource_chain: + - apps + method: post + /accounts/{account_id}/realtime/kit/{app_id}/analytics/daywise: + get: + description: Returns day-wise session and recording analytics data of an App for the specified time range start_date to end_date. If start_date and end_date are not provided, the default time range is set from 30 days ago to the current date. + operationId: get-org-analytics + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - description: start date in YYYY-MM-DD format + in: query + name: start_date + schema: + type: string + - description: end date in YYYY-MM-DD format + in: query + name: end_date + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + data: + properties: + recording_stats: + description: Recording statistics of an App during the range specified + properties: + day_stats: + description: Day wise recording stats + items: + properties: + day: + type: string + total_recording_minutes: + description: Total recording minutes for a specific day + type: integer + total_recordings: + description: Total number of recordings for a specific day + type: integer + type: object + type: array + recording_count: + description: Total number of recordings during the range specified + type: integer + recording_minutes_consumed: + description: Total recording minutes during the range specified + type: number + type: object + session_stats: + description: Session statistics of an App during the range specified + properties: + day_stats: + description: Day wise session stats + items: + properties: + day: + type: string + total_session_minutes: + description: Total session minutes for a specific day + type: number + total_sessions: + description: Total number of sessions for a specific day + type: integer + type: object + type: array + sessions_count: + description: Total number of sessions during the range specified + type: integer + sessions_minutes_consumed: + description: Total session minutes during the range specified + type: number + type: object + type: object + success: + type: boolean + type: object + description: OK + security: + - api_token: [] + summary: Fetch day-wise session and recording analytics data for an App + tags: + - Analytics + - Organizations + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - analytics + method: get_org_analytics + /accounts/{account_id}/realtime/kit/{app_id}/analytics/livestreams/overall: + get: + description: Returns livestream analytics for the specified time range. + operationId: get-livestream-analytics-complete + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - description: Specify the start time range in ISO format to access the livestream analytics. + in: query + name: start_time + schema: + format: date-time + type: string + - description: Specify the end time range in ISO format to access the livestream analytics. + in: query + name: end_time + schema: + format: date-time + type: string + responses: + '200': + content: + application/json: + schema: + properties: + data: + properties: + count: + description: Count of total livestreams. + type: integer + total_ingest_seconds: + description: Total time duration for which the input was given or the meeting was streamed. + type: integer + total_viewer_seconds: + description: Total view time for which the viewers watched the stream. + type: integer + type: object + success: + type: boolean + type: object + description: OK + security: + - api_token: [] + summary: Fetch complete analytics data for your livestreams + tags: + - Live streams + - LivestreamAnalytics + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - livestreams + method: get_livestream_analytics_complete + /accounts/{account_id}/realtime/kit/{app_id}/livestreams: + get: + description: Returns details of livestreams associated with the given App ID. It includes livestreams created by your App and RealtimeKit meetings that are livestreamed by your App. If you only want details of livestreams created by your App and not RealtimeKit meetings, you can use the `exclude_meetings` query parameter. + operationId: fetch_all_livestreams + parameters: + - description: Exclude the RealtimeKit meetings that are livestreamed. + in: query + name: exclude_meetings + schema: + default: false + type: boolean + - description: Number of results per page. + in: query + name: per_page + schema: + type: integer + - description: The page number from which you want your page search results to be displayed. + in: query + name: page_no + schema: + type: integer + - description: Specifies the status of the operation. + in: query + name: status + schema: + enum: + - LIVE + - IDLE + - ERRORED + - INVOKED + type: string + - description: Specify the start time range in ISO format to access the live stream. + in: query + name: start_time + schema: + format: date-time + type: string + - description: Specify the end time range in ISO format to access the live stream. + in: query + name: end_time + schema: + format: date-time + type: string + - description: Specifies the sorting order for the results. + in: query + name: sort_order + schema: + enum: + - ASC + - DSC + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + data: + properties: + created_at: + description: Timestamp the object was created at. The time is returned in ISO format. + format: date-time + type: string + readOnly: true + disabled: + description: Specifies if the livestream was disabled. + type: string + id: + description: The ID of the livestream. + format: uuid + type: string + ingest_server: + description: The server URL to which the RTMP encoder sends the video and audio data. + type: string + meeting_id: + description: ID of the meeting. + type: string + name: + description: Name of the livestream. + type: string + paging: + properties: + end_offset: + type: integer + start_offset: + type: integer + total_count: + type: integer + type: object + playback_url: + description: The web address that viewers can use to watch the livestream. + type: string + status: + enum: + - LIVE + - IDLE + - ERRORED + - INVOKED + type: string + stream_key: + description: Unique key for accessing each livestream. + type: string + updated_at: + description: Timestamp the object was updated at. The time is returned in ISO format. + format: date-time + type: string + readOnly: true + type: object + success: + type: boolean + type: object + description: OK + security: + - api_token: [] + summary: Fetch all livestreams + tags: + - Live streams + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - livestreams + method: get_all_livestreams + post: + description: Creates a livestream for the given App ID and returns ingest server, stream key, and playback URL. You can pass custom input to the ingest server and stream key, and freely distribute the content using the playback URL on any player that supports HLS/LHLS. + requestBody: + content: + application/json: + schema: + properties: + name: + description: Name of the livestream + nullable: true + type: string + type: object + responses: + '201': + content: + application/json: + schema: + properties: + data: + properties: + disabled: + description: Specifies if the livestream was disabled. + type: boolean + id: + description: The livestream ID. + type: string + ingest_server: + description: The server URL to which the RTMP encoder should send the video and audio data. + type: string + meeting_id: + nullable: true + type: string + name: + type: string + playback_url: + description: The web address that viewers can use to watch the livestream. + type: string + status: + enum: + - LIVE + - IDLE + - ERRORED + - INVOKED + type: string + stream_key: + description: Unique key for accessing each livestream. + type: string + type: object + success: + type: boolean + type: object + description: Successful response + security: + - api_token: [] + summary: Create an independent livestream + tags: + - Live streams + x-api-token-group: + - Realtime Admin + - Realtime + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + x-stackql-sdk: + service: realtime_kit + resource_chain: + - livestreams + method: create_independent_livestream + operationId: post_accounts_account_id_realtime_kit_app_id_livestreams + /accounts/{account_id}/realtime/kit/{app_id}/livestreams/sessions/{livestream_session_id}: + get: + description: Returns livestream session details for the given livestream session ID. Retrieve the `livestream_session_id`using the `Fetch livestream session details using a session ID` API. + operationId: get-v2-livestreams-livestream-session-id + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - in: path + name: livestream_session_id + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + data: + properties: + created_at: + description: Timestamp the object was created at. The time is returned in ISO format. + format: date-time + type: string + readOnly: true + err_message: + description: The server URL to which the RTMP encoder sends the video and audio data. + type: string + id: + description: The livestream ID. + type: string + ingest_seconds: + description: Name of the livestream. + type: integer + livestream_id: + type: string + started_time: + description: Unique key for accessing each livestream. + type: string + stopped_time: + description: The web address that viewers can use to watch the livestream. + type: string + updated_at: + description: Timestamp the object was updated at. The time is returned in ISO format. + type: string + readOnly: true + viewer_seconds: + description: Specifies if the livestream was disabled. + type: integer + type: object + success: + type: boolean + type: object + description: OK + security: + - api_token: [] + summary: Fetch livestream session details using livestream session ID + tags: + - Live streams + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - livestreams + method: get_livestream_session_details_for_session_id + /accounts/{account_id}/realtime/kit/{app_id}/livestreams/{livestream_id}: + get: + description: Returns details of a livestream with sessions for the given livestream ID. Retreive the livestream ID using the `Start livestreaming a meeting` API. + operationId: get-v2-livestream-session-livestream-id + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - description: The page number from which you want your page search results to be displayed. + in: query + name: page_no + schema: + type: integer + - description: Number of results per page. + in: query + name: per_page + schema: + type: integer + - in: path + name: livestream_id + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + data: + properties: + livestream: + properties: + created_at: + description: Timestamp the object was created at. The time is returned in ISO format. + type: string + readOnly: true + disabled: + description: Specifies if the livestream was disabled. + type: string + id: + description: ID of the livestream. + type: string + ingest_server: + description: The server URL to which the RTMP encoder sends the video and audio data. + type: string + meeting_id: + description: The ID of the meeting. + type: string + name: + description: Name of the livestream. + type: string + playback_url: + description: The web address that viewers can use to watch the livestream. + type: string + status: + enum: + - LIVE + - IDLE + - ERRORED + - INVOKED + type: string + stream_key: + description: Unique key for accessing each livestream. + type: string + updated_at: + description: Timestamp the object was updated at. The time is returned in ISO format. + type: string + readOnly: true + type: object + paging: + properties: + end_offset: + type: integer + start_offset: + type: integer + total_count: + type: integer + type: object + session: + properties: + created_at: + description: Timestamp the object was created at. The time is returned in ISO format. + format: date-time + type: string + readOnly: true + err_message: + type: string + id: + description: ID of the session. + type: string + ingest_seconds: + description: The time duration for which the input was given or the meeting was streamed. + type: number + invoked_time: + description: Timestamp the object was invoked. The time is returned in ISO format. + format: date-time + type: string + livestream_id: + type: string + started_time: + description: Timestamp the object was started. The time is returned in ISO format. + format: date-time + type: string + stopped_time: + description: Timestamp the object was stopped. The time is returned in ISO format. + format: date-time + type: string + updated_at: + description: Timestamp the object was updated at. The time is returned in ISO format. + format: date-time + type: string + readOnly: true + viewer_seconds: + description: The total view time for which the viewers watched the stream. + type: number + type: object + type: object + success: + type: boolean + type: object + description: OK + security: + - api_token: [] + summary: Fetch livestream details using livestream ID + tags: + - Live streams + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - livestreams + method: get_livestream_session_for_livestream_id + /accounts/{account_id}/realtime/kit/{app_id}/livestreams/{livestream_id}/active-livestream-session: + get: + description: Returns details of all active livestreams for the given livestream ID. Retreive the livestream ID using the `Start livestreaming a meeting` API. + operationId: get-v2-active-livestream-session-details + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - in: path + name: livestream_id + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + data: + properties: + livestream: + properties: + created_at: + description: Timestamp the object was created at. The time is returned in ISO format. + format: date-time + type: string + readOnly: true + disabled: + description: Specifies if the livestream was disabled. + type: string + id: + type: string + ingest_server: + description: The server URL to which the RTMP encoder sends the video and audio data. + type: string + meeting_id: + description: ID of the meeting. + type: string + name: + description: Name of the livestream. + type: string + playback_url: + description: The web address that viewers can use to watch the livestream. + type: string + status: + enum: + - LIVE + - IDLE + - ERRORED + - INVOKED + type: string + stream_key: + description: Unique key for accessing each livestream. + type: string + updated_at: + description: Timestamp the object was updated at. The time is returned in ISO format. + format: date-time + type: string + readOnly: true + type: object + session: + properties: + created_at: + description: Timestamp the object was created at. The time is returned in ISO format. + format: date-time + type: string + readOnly: true + err_message: + type: string + id: + type: string + ingest_seconds: + description: The time duration for which the input was given or the meeting was streamed. + type: string + invoked_time: + description: Timestamp the object was invoked. The time is returned in ISO format. + format: date-time + type: string + livestream_id: + type: string + started_time: + description: Timestamp the object was started. The time is returned in ISO format. + format: date-time + type: string + stopped_time: + description: Timestamp the object was stopped. The time is returned in ISO format. + format: date-time + type: string + updated_at: + description: Timestamp the object was updated at. The time is returned in ISO format. + format: date-time + type: string + readOnly: true + viewer_seconds: + description: The total view time for which the viewers watched the stream. + type: string + type: object + type: object + success: + type: boolean + type: object + description: OK + security: + - api_token: [] + summary: Fetch active livestream session details + tags: + - Live streams + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - livestreams + method: get_active_livestreams_for_livestream_id + /accounts/{account_id}/realtime/kit/{app_id}/meetings: + get: + description: Returns all meetings for the given App ID. + operationId: get_all_meetings + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - allowEmptyValue: true + description: The page number from which you want your page search results to be displayed. + in: query + name: page_no + schema: + minimum: 0 + type: number + - allowEmptyValue: true + description: Number of results per page + in: query + name: per_page + schema: + minimum: 0 + type: number + - description: The start time range for which you want to retrieve the meetings. The time must be specified in ISO format. + in: query + name: start_time + schema: + format: date-time + type: string + - description: The end time range for which you want to retrieve the meetings. The time must be specified in ISO format. + in: query + name: end_time + schema: + format: date-time + type: string + - description: The search query string. You can search using the meeting ID or title. + in: query + name: search + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + data: + items: + type: object + $ref: '#/components/schemas/realtimekitMeeting' + type: array + paging: + properties: + end_offset: + type: number + start_offset: + type: number + total_count: + minimum: 0 + type: number + required: + - total_count + - start_offset + - end_offset + type: object + success: + type: boolean + required: + - success + - data + - paging + title: PagingResponse + type: object + description: Success response + security: + - api_token: [] + summary: Fetch all meetings for an App + tags: + - Meetings + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - meetings + method: get + post: + description: Create a meeting for the given App ID. + operationId: create_meeting + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + ai_config: + $ref: '#/components/schemas/realtimekitAIConfig' + live_stream_on_start: + default: false + description: Specifies if the meeting should start getting livestreamed on start. + nullable: true + type: boolean + persist_chat: + default: false + description: If a meeting is set to persist_chat, meeting chat would remain for a week within the meeting space. + type: boolean + record_on_start: + default: false + description: Specifies if the meeting should start getting recorded as soon as someone joins the meeting. + nullable: true + type: boolean + recording_config: + $ref: '#/components/schemas/realtimekitRecordingConfig' + session_keep_alive_time_in_secs: + default: 60 + description: Time in seconds, for which a session remains active, after the last participant has left the meeting. + maximum: 600 + minimum: 60 + type: number + summarize_on_end: + default: false + description: Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. + type: boolean + title: + description: Title of the meeting + nullable: true + type: string + type: object + description: Create meeting body + responses: + '201': + content: + application/json: + schema: + properties: + data: + description: Data returned by the operation + type: object + properties: + created_at: + description: Timestamp the object was created at. The time is returned in ISO format. + format: date-time + readOnly: true + type: string + id: + description: ID of the meeting. + format: uuid + readOnly: true + type: string + live_stream_on_start: + description: Specifies if the meeting should start getting livestreamed on start. + type: boolean + persist_chat: + description: Specifies if Chat within a meeting should persist for a week. + type: boolean + record_on_start: + description: Specifies if the meeting should start getting recorded as soon as someone joins the meeting. + type: boolean + session_keep_alive_time_in_secs: + default: 60 + description: Time in seconds, for which a session remains active, after the last participant has left the meeting. + maximum: 600 + minimum: 60 + type: number + status: + description: Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. + enum: + - ACTIVE + - INACTIVE + type: string + summarize_on_end: + description: Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. + type: boolean + title: + description: Title of the meeting. + type: string + updated_at: + description: Timestamp the object was updated at. The time is returned in ISO format. + format: date-time + readOnly: true + type: string + recording_config: + $ref: '#/components/schemas/realtimekitRecordingConfig' + ai_config: + $ref: '#/components/schemas/realtimekitAIConfig' + required: + - id + - created_at + - updated_at + success: + default: true + description: Success status of the operation + type: boolean + required: + - success + title: GenericSuccessResponse + type: object + description: Success Response + security: + - api_token: [] + summary: Create a meeting + tags: + - Meetings + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - meetings + method: create + /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}: + get: + description: Returns a meeting details in an App for the given meeting ID. + operationId: get_meeting + parameters: + - in: query + name: name + schema: + type: string + - name: meeting_id + in: path + required: true + description: The Realtime Kit meeting ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + data: + description: Data returned by the operation + type: object + properties: + created_at: + description: Timestamp the object was created at. The time is returned in ISO format. + format: date-time + readOnly: true + type: string + id: + description: ID of the meeting. + format: uuid + readOnly: true + type: string + live_stream_on_start: + description: Specifies if the meeting should start getting livestreamed on start. + type: boolean + persist_chat: + description: Specifies if Chat within a meeting should persist for a week. + type: boolean + record_on_start: + description: Specifies if the meeting should start getting recorded as soon as someone joins the meeting. + type: boolean + session_keep_alive_time_in_secs: + default: 60 + description: Time in seconds, for which a session remains active, after the last participant has left the meeting. + maximum: 600 + minimum: 60 + type: number + status: + description: Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. + enum: + - ACTIVE + - INACTIVE + type: string + summarize_on_end: + description: Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. + type: boolean + title: + description: Title of the meeting. + type: string + updated_at: + description: Timestamp the object was updated at. The time is returned in ISO format. + format: date-time + readOnly: true + type: string + recording_config: + $ref: '#/components/schemas/realtimekitRecordingConfig' + ai_config: + $ref: '#/components/schemas/realtimekitAIConfig' + required: + - id + - created_at + - updated_at + success: + default: true + description: Success status of the operation + type: boolean + required: + - success + title: GenericSuccessResponse + type: object + description: Success Response + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/realtimekitGenericErrorResponse' + description: Failure response + security: + - api_token: [] + summary: Fetch a meeting for an App + tags: + - Meetings + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - meetings + method: get_meeting_by_id + patch: + description: Updates a meeting in an App for the given meeting ID. + operationId: update_meeting + parameters: + - name: meeting_id + in: path + required: true + description: The Realtime Kit meeting ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + ai_config: + $ref: '#/components/schemas/realtimekitAIConfig' + live_stream_on_start: + default: false + description: Specifies if the meeting should start getting livestreamed on start. + type: boolean + persist_chat: + default: false + description: If a meeting is updated to persist_chat, meeting chat would remain for a week within the meeting space. + type: boolean + record_on_start: + default: false + description: Specifies if the meeting should start getting recorded as soon as someone joins the meeting. + type: boolean + session_keep_alive_time_in_secs: + default: 60 + description: Time in seconds, for which a session remains active, after the last participant has left the meeting. + maximum: 600 + minimum: 60 + type: number + status: + description: Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. + enum: + - ACTIVE + - INACTIVE + type: string + summarize_on_end: + default: false + description: Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. + type: boolean + title: + description: Title of the meeting + type: string + type: object + description: Create meeting body + responses: + '200': + content: + application/json: + schema: + properties: + data: + description: Data returned by the operation + type: object + properties: + created_at: + description: Timestamp the object was created at. The time is returned in ISO format. + format: date-time + readOnly: true + type: string + id: + description: ID of the meeting. + format: uuid + readOnly: true + type: string + live_stream_on_start: + description: Specifies if the meeting should start getting livestreamed on start. + type: boolean + persist_chat: + description: Specifies if Chat within a meeting should persist for a week. + type: boolean + record_on_start: + description: Specifies if the meeting should start getting recorded as soon as someone joins the meeting. + type: boolean + session_keep_alive_time_in_secs: + default: 60 + description: Time in seconds, for which a session remains active, after the last participant has left the meeting. + maximum: 600 + minimum: 60 + type: number + status: + description: Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. + enum: + - ACTIVE + - INACTIVE + type: string + summarize_on_end: + description: Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. + type: boolean + title: + description: Title of the meeting. + type: string + updated_at: + description: Timestamp the object was updated at. The time is returned in ISO format. + format: date-time + readOnly: true + type: string + recording_config: + $ref: '#/components/schemas/realtimekitRecordingConfig' + ai_config: + $ref: '#/components/schemas/realtimekitAIConfig' + required: + - id + - created_at + - updated_at + success: + default: true + description: Success status of the operation + type: boolean + required: + - success + title: GenericSuccessResponse + type: object + description: Success Response + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/realtimekitGenericErrorResponse' + description: Failure response + security: + - api_token: [] + summary: Update a meeting + tags: + - Meetings + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - meetings + method: update_meeting_by_id + put: + description: Replaces all the details for the given meeting ID. + operationId: replace_meeting + parameters: + - name: meeting_id + in: path + required: true + description: The Realtime Kit meeting ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + ai_config: + $ref: '#/components/schemas/realtimekitAIConfig' + live_stream_on_start: + default: false + description: Specifies if the meeting should start getting livestreamed on start. + nullable: true + type: boolean + persist_chat: + default: false + description: If a meeting is set to persist_chat, meeting chat would remain for a week within the meeting space. + type: boolean + record_on_start: + default: false + description: Specifies if the meeting should start getting recorded as soon as someone joins the meeting. + nullable: true + type: boolean + recording_config: + $ref: '#/components/schemas/realtimekitRecordingConfig' + session_keep_alive_time_in_secs: + default: 60 + description: Time in seconds, for which a session remains active, after the last participant has left the meeting. + maximum: 600 + minimum: 60 + type: number + summarize_on_end: + default: false + description: Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. + type: boolean + title: + description: Title of the meeting + nullable: true + type: string + type: object + description: Create meeting body + responses: + '200': + content: + application/json: + schema: + properties: + data: + description: Data returned by the operation + type: object + properties: + created_at: + description: Timestamp the object was created at. The time is returned in ISO format. + format: date-time + readOnly: true + type: string + id: + description: ID of the meeting. + format: uuid + readOnly: true + type: string + live_stream_on_start: + description: Specifies if the meeting should start getting livestreamed on start. + type: boolean + persist_chat: + description: Specifies if Chat within a meeting should persist for a week. + type: boolean + record_on_start: + description: Specifies if the meeting should start getting recorded as soon as someone joins the meeting. + type: boolean + session_keep_alive_time_in_secs: + default: 60 + description: Time in seconds, for which a session remains active, after the last participant has left the meeting. + maximum: 600 + minimum: 60 + type: number + status: + description: Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. + enum: + - ACTIVE + - INACTIVE + type: string + summarize_on_end: + description: Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. + type: boolean + title: + description: Title of the meeting. + type: string + updated_at: + description: Timestamp the object was updated at. The time is returned in ISO format. + format: date-time + readOnly: true + type: string + recording_config: + $ref: '#/components/schemas/realtimekitRecordingConfig' + ai_config: + $ref: '#/components/schemas/realtimekitAIConfig' + required: + - id + - created_at + - updated_at + success: + default: true + description: Success status of the operation + type: boolean + required: + - success + title: GenericSuccessResponse + type: object + description: Success Response + security: + - api_token: [] + summary: Replace a meeting + tags: + - Meetings + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - meetings + method: replace_meeting_by_id + /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-livestream: + get: + description: Returns details of all active livestreams for the given meeting ID. + operationId: get-v2-meetings-meetingId-active-livestream + parameters: + - name: meeting_id + in: path + required: true + description: The Realtime Kit meeting ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + data: + properties: + created_at: + description: Timestamp the object was created at. The time is returned in ISO format. + format: date-time + type: string + readOnly: true + disabled: + description: Specifies if the livestream was disabled. + type: string + id: + description: The livestream ID. + type: string + ingest_server: + description: The server URL to which the RTMP encoder sends the video and audio data. + type: string + meeting_id: + type: string + name: + description: Name of the livestream. + nullable: true + type: string + playback_url: + description: The web address that viewers can use to watch the livestream. + type: string + status: + enum: + - LIVE + - IDLE + - ERRORED + - INVOKED + type: string + stream_key: + description: Unique key for accessing each livestream. + type: string + updated_at: + description: Timestamp the object was updated at. The time is returned in ISO format. + format: date-time + type: string + readOnly: true + type: object + success: + type: boolean + type: object + description: OK + security: + - api_token: [] + summary: Fetch active livestreams for a meeting + tags: + - Live streams + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - livestreams + method: get_meeting_active_livestreams + /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-livestream/stop: + post: + description: Stops the active livestream of a meeting associated with the given meeting ID. Retreive the meeting ID using the `Create a meeting` API. + operationId: stop_livestreaming + parameters: + - name: meeting_id + in: path + required: true + description: The Realtime Kit meeting ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + requestBody: + content: {} + responses: + '200': + content: + application/json: + schema: + properties: + data: + properties: + message: + type: string + type: object + success: + type: boolean + type: object + description: OK + security: + - api_token: [] + summary: Stop livestreaming a meeting + tags: + - Live streams + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - livestreams + method: stop_livestreaming_a_meeting + /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session: + get: + description: Returns details of an ongoing active session for the given meeting ID. + operationId: GetActiveSession + parameters: + - name: meeting_id + in: path + required: true + description: The Realtime Kit meeting ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + data: + $ref: '#/components/schemas/realtimekitActiveSession' + success: + type: boolean + type: object + description: Active Session Success response + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/realtimekitGenericErrorResponse' + description: Active Session is not found for the given meetingId + security: + - api_token: [] + summary: Fetch details of an active session + tags: + - Active session + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - active_session + method: get_active_session + /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session/kick: + post: + description: Kicks one or more participants from an active session using user ID or custom participant ID. + operationId: KickPartcipants + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - name: meeting_id + in: path + required: true + description: The Realtime Kit meeting ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + custom_participant_ids: + items: + type: string + type: array + participant_ids: + items: + type: string + type: array + required: + - participant_ids + - custom_participant_ids + type: object + description: Request body for kicking participants from an active session. Only one of `participant_id` or `custom_participant_id` is required. + responses: + '200': + content: + application/json: + schema: + properties: + data: + properties: + action: + type: string + participants: + items: + $ref: '#/components/schemas/realtimekitSessionParticipant' + type: array + type: object + success: + type: boolean + type: object + description: Kick participants success response + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/realtimekitGenericErrorResponse' + description: No participant found for the given `participant_id` or `custom_participant_id` + security: + - api_token: [] + summary: Kick participants from an active session + tags: + - Active session + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - active_session + method: kick_participants + /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session/kick-all: + post: + description: Kicks all participants from an active session for the given meeting ID. + operationId: KickAllParticipants + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - name: meeting_id + in: path + required: true + description: The Realtime Kit meeting ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + data: + properties: + action: + type: string + kicked_participants_count: + type: number + type: object + success: + type: boolean + type: object + description: Kick all participants from a meeting + security: + - api_token: [] + summary: Kick all participants + tags: + - Active session + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - active_session + method: kick_all_participants + /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session/mute: + post: + description: Mutes one or more participants from an active session using user ID or custom participant ID. + operationId: MuteParticipants + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - name: meeting_id + in: path + required: true + description: The Realtime Kit meeting ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + custom_participant_ids: + items: + type: string + type: array + participant_ids: + items: + type: string + type: array + required: + - participant_ids + - custom_participant_ids + type: object + description: Request body for kicking participants from an active session. Only one of `participant_id` or `custom_participant_id` is required. + responses: + '200': + content: + application/json: + schema: + properties: + data: + properties: + action: + type: string + participants: + items: + $ref: '#/components/schemas/realtimekitSessionParticipant' + type: array + type: object + success: + type: boolean + type: object + description: Mute one or more participants of a meeting + security: + - api_token: [] + summary: Mute participants of an active session + tags: + - Active session + x-api-token-group: + - Realtime Admin + - Realtime + /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session/mute-all: + post: + description: Mutes all participants of an active session for the given meeting ID. + operationId: MuteAllParticipants + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - name: meeting_id + in: path + required: true + description: The Realtime Kit meeting ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + allow_unmute: + description: if false, participants won't be able to unmute themselves after they are muted + type: boolean + required: + - allow_unmute + type: object + description: Request body for muting all participants in an active session. + responses: + '200': + content: + application/json: + schema: + properties: + data: + properties: + action: + type: string + muted_participants_count: + type: number + type: object + success: + type: boolean + type: object + description: Mute all participants of a meeting + security: + - api_token: [] + summary: Mute all participants + tags: + - Active session + x-api-token-group: + - Realtime Admin + - Realtime + /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session/poll: + post: + description: Creates a new poll in an active session for the given meeting ID. + operationId: CreatePoll + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - name: meeting_id + in: path + required: true + description: The Realtime Kit meeting ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + anonymous: + description: if voters on a poll are anonymous + type: boolean + hide_votes: + description: if votes on an option are visible before a person votes + type: boolean + options: + description: Different options for the question + items: + type: string + type: array + question: + description: Question of the poll + type: string + required: + - question + - options + type: object + description: Request body for creating a new poll + responses: + '201': + content: + application/json: + schema: + properties: + data: + properties: + action: + type: string + poll: + $ref: '#/components/schemas/realtimekitPoll' + type: object + success: + type: boolean + type: object + description: response for creating a poll + '400': + description: Bad Request + security: + - api_token: [] + summary: Create a poll + tags: + - Active session + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - active_session + method: create_poll + /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/livestream: + get: + description: Returns livestream session details for the given meeting ID. Retreive the meeting ID using the `Create a meeting` API. + operationId: livestream-session-details + parameters: + - description: The page number from which you want your page search results to be displayed. + in: query + name: page_no + schema: + type: integer + - description: Number of results per page. + in: query + name: per_page + schema: + type: integer + - name: meeting_id + in: path + required: true + description: The Realtime Kit meeting ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + data: + properties: + livestreams: + items: + properties: + created_at: + description: The timestamp at which the livestream was created. The time is returned in ISO format. + format: date-time + type: string + readOnly: true + disabled: + description: Specifies if the livestream was disabled. + type: boolean + id: + description: The livestream ID. + type: string + ingest_server: + description: The server URL to which the RTMP encoder sends the video and audio data. + type: string + meeting_id: + description: The ID of the meeting that was livestreamed. + type: string + name: + description: Name of the livestream. + nullable: true + type: string + playback_url: + description: The web address that viewers can use to watch the livestream. + type: string + status: + enum: + - LIVE + - INVOKED + - ERRORED + - IDLE + type: string + stream_key: + description: Unique key for accessing each livestream. + type: string + updated_at: + description: The timestamp at which the livestream was updated. The time is returned in ISO format. + format: date-time + type: string + readOnly: true + type: object + type: array + paging: + properties: + end_offset: + type: integer + start_offset: + type: integer + total_count: + type: integer + type: object + sessions: + properties: + created_at: + description: The timestamp at which the livestream was created. The time is returned in ISO format. + format: date-time + type: string + readOnly: true + err_message: + type: string + id: + description: The ID of the livestream session. + type: string + ingest_seconds: + description: The time duration for which the input was given or the meeting was streamed. + type: string + invoked_time: + description: The time at which the livestream was invoked. + format: date-time + type: string + livestream_id: + description: The ID of the livestream. + type: string + started_time: + description: The time at which the livestream was started. + format: date-time + type: string + stopped_time: + description: The time at which the livestream was stopped. + format: date-time + type: string + updated_at: + description: The timestamp at which the livestream was updated. The time is returned in ISO format. + format: date-time + type: string + readOnly: true + type: object + type: object + success: + type: boolean + type: object + description: OK + security: + - api_token: [] + summary: Fetch livestream session details for a meeting + tags: + - Live streams + x-api-token-group: + - Realtime Admin + - Realtime + /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/livestreams: + post: + description: Starts livestream of a meeting associated with the given meeting ID. Retreive the meeting ID using the `Create a meeting` API. + operationId: start-livestreaming + parameters: + - name: meeting_id + in: path + required: true + description: The Realtime Kit meeting ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + name: + nullable: true + type: string + video_config: + properties: + height: + description: Height of the livestreaming video in pixels + type: integer + width: + description: Width of the livestreaming video in pixels + type: integer + type: object + type: object + responses: + '201': + content: + application/json: + schema: + properties: + data: + properties: + id: + description: The livestream ID. + type: string + ingest_server: + description: The server URL to which the RTMP encoder sends the video and audio data. + type: string + playback_url: + description: The web address that viewers can use to watch the livestream. + type: string + status: + enum: + - LIVE + - IDLE + - ERRORED + - INVOKED + type: string + stream_key: + description: Unique key for accessing each livestream. + type: string + type: object + success: + type: boolean + type: object + description: Created + security: + - api_token: [] + summary: Start livestreaming a meeting + tags: + - Live streams + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - livestreams + method: start_livestreaming_a_meeting + /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/participants: + get: + description: Returns all participants detail for the given meeting ID. + operationId: get_meeting_participants + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - allowEmptyValue: true + description: The page number from which you want your page search results to be displayed. + in: query + name: page_no + schema: + minimum: 0 + type: number + - allowEmptyValue: true + description: Number of results per page + in: query + name: per_page + schema: + minimum: 0 + type: number + - name: meeting_id + in: path + required: true + description: The Realtime Kit meeting ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + data: + items: + type: object + $ref: '#/components/schemas/realtimekitParticipant' + type: array + paging: + properties: + end_offset: + type: number + start_offset: + type: number + total_count: + minimum: 0 + type: number + required: + - total_count + - start_offset + - end_offset + type: object + success: + type: boolean + required: + - success + - data + - paging + title: PagingResponse + type: object + description: Success response + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/realtimekitGenericErrorResponse' + description: Failure response + security: + - api_token: [] + summary: Fetch all participants of a meeting + tags: + - Meetings + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - meetings + method: get_meeting_participants + post: + description: Adds a participant to the given meeting ID. + operationId: add_participant + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - name: meeting_id + in: path + required: true + description: The Realtime Kit meeting ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + custom_participant_id: + description: A unique participant ID. You must specify a unique ID for the participant, for example, UUID, email address, and so on. + type: string + name: + description: (Optional) Name of the participant. + nullable: true + type: string + picture: + description: (Optional) A URL to a picture to be used for the participant. + format: uri + nullable: true + type: string + preset_name: + default: group_call_host + description: Name of the preset to apply to this participant. + type: string + required: + - preset_name + - custom_participant_id + type: object + responses: + '201': + content: + application/json: + schema: + properties: + data: + description: Represents a participant. + type: object + properties: + created_at: + description: When this object was created. The time is returned in ISO format. + format: date-time + type: string + readOnly: true + custom_participant_id: + description: A unique participant ID generated by the client. + type: string + id: + description: ID of the participant. + format: uuid + type: string + name: + description: Name of the participant. + nullable: true + type: string + picture: + description: URL to a picture of the participant. + format: uri + nullable: true + type: string + preset_name: + description: Preset applied to the participant. + type: string + updated_at: + description: When this object was updated. The time is returned in ISO format. + format: date-time + type: string + readOnly: true + token: + description: The participant's auth token that can be used for joining a meeting from the client side. + type: string + required: + - id + - custom_participant_id + - preset_name + - created_at + - updated_at + - token + title: Participant + success: + default: true + description: Success status of the operation + type: boolean + required: + - success + title: GenericSuccessResponse + type: object + description: Success response + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/realtimekitGenericErrorResponse' + description: Failure response + security: + - api_token: [] + summary: Add a participant + tags: + - Meetings + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - meetings + method: add_participant + /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/participants/{participant_id}: + delete: + description: Deletes a participant for the given meeting and participant ID. + operationId: delete_meeting_participant + parameters: + - name: meeting_id + in: path + required: true + description: The Realtime Kit meeting ID. + schema: + type: string + - description: ID of the participant. You can fetch the participant ID using the add a participant API. + in: path + name: participant_id + schema: + type: string + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + data: + description: Data returned by the operation + type: object + properties: + created_at: + description: Timestamp this object was created at. The time is returned in ISO format. + format: date-time + type: string + readOnly: true + custom_participant_id: + description: A unique participant ID generated by the client. + type: string + preset_id: + description: ID of the preset applied to this participant. + format: uuid + type: string + updated_at: + description: Timestamp this object was updated at. The time is returned in ISO format. + format: date-time + type: string + readOnly: true + required: + - custom_participant_id + - preset_id + - created_at + - updated_at + success: + default: true + description: Success status of the operation + type: boolean + required: + - success + title: GenericSuccessResponse + type: object + description: Success response + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/realtimekitGenericErrorResponse' + description: Failure response + security: + - api_token: [] + summary: Delete a participant + tags: + - Meetings + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - meetings + method: delete_meeting_participant + get: + description: Returns a participant details for the given meeting and participant ID. + operationId: get_meeting_participant + parameters: + - name: meeting_id + in: path + required: true + description: The Realtime Kit meeting ID. + schema: + type: string + - description: ID of the participant. You can fetch the participant ID using the add a participant API. + in: path + name: participant_id + schema: + type: string + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + data: + description: Data returned by the operation + type: object + $ref: '#/components/schemas/realtimekitParticipant' + success: + default: true + description: Success status of the operation + type: boolean + required: + - success + - data + title: GenericSuccessResponse + type: object + description: Success response + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/realtimekitGenericErrorResponse' + description: Failure response + security: + - api_token: [] + summary: Fetch a participant's detail + tags: + - Meetings + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - meetings + method: get_meeting_participant + patch: + description: Updates a participant's details for the given meeting and participant ID. + operationId: edit_participant + parameters: + - name: meeting_id + in: path + required: true + description: The Realtime Kit meeting ID. + schema: + type: string + - description: ID of the participant. You can fetch the participant ID using the add a participant API. + in: path + name: participant_id + schema: + type: string + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + name: + description: (Optional) Name of the participant. + nullable: true + type: string + picture: + description: (Optional) A URL to a picture to be used for the participant. + format: uri + nullable: true + type: string + preset_name: + description: (Optional) Name of the preset to apply to this participant. + nullable: true + type: string + type: object + responses: + '200': + content: + application/json: + schema: + properties: + data: + description: Represents a participant. + type: object + properties: + created_at: + description: When this object was created. The time is returned in ISO format. + format: date-time + type: string + readOnly: true + custom_participant_id: + description: A unique participant ID generated by the client. + type: string + id: + description: ID of the participant. + format: uuid + type: string + name: + description: Name of the participant. + nullable: true + type: string + picture: + description: URL to a picture of the participant. + format: uri + nullable: true + type: string + preset_name: + description: Preset applied to the participant. + type: string + updated_at: + description: When this object was updated. The time is returned in ISO format. + format: date-time + type: string + readOnly: true + token: + description: The participant's auth token that can be used for joining a meeting from the client side. + type: string + required: + - id + - custom_participant_id + - preset_name + - created_at + - updated_at + - token + title: Participant + success: + default: true + description: Success status of the operation + type: boolean + required: + - success + title: GenericSuccessResponse + type: object + description: Success response + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/realtimekitGenericErrorResponse' + description: Failure response + security: + - api_token: [] + summary: Edit a participant's detail + tags: + - Meetings + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - meetings + method: edit_participant + /accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/participants/{participant_id}/token: + post: + description: Regenerates participant's authentication token for the given meeting and participant ID. + operationId: regenerate_token + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - name: meeting_id + in: path + required: true + description: The Realtime Kit meeting ID. + schema: + type: string + - description: ID of the participant. You can fetch the participant ID using the add a participant API. + in: path + name: participant_id + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + data: + description: Data returned by the operation + type: object + properties: + token: + description: Regenerated participant's authentication token. + type: string + required: + - token + success: + default: true + description: Success status of the operation + type: boolean + required: + - success + - data + title: GenericSuccessResponse + type: object + description: Example response + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/realtimekitGenericErrorResponse' + description: Failure response + security: + - api_token: [] + summary: Refresh participant's authentication token + tags: + - Meetings + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - meetings + method: refresh_participant_token + /accounts/{account_id}/realtime/kit/{app_id}/presets: + get: + description: Fetches all the presets belonging to an App. + operationId: get-presets + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - allowEmptyValue: true + description: Number of results per page + in: query + name: per_page + schema: + minimum: 0 + type: number + - allowEmptyValue: true + description: The page number from which you want your page search results to be displayed. + in: query + name: page_no + schema: + minimum: 0 + type: number + responses: + '200': + content: + application/json: + schema: + properties: + data: + items: + type: object + $ref: '#/components/schemas/realtimekitPresetListItem' + type: array + paging: + properties: + end_offset: + type: number + start_offset: + type: number + total_count: + minimum: 0 + type: number + required: + - total_count + - start_offset + - end_offset + type: object + success: + type: boolean + required: + - success + - data + - paging + title: PagingResponse + type: object + description: Example response + security: + - api_token: [] + summary: Fetch all presets + tags: + - Presets + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - presets + method: get + post: + description: Creates a preset belonging to the current App + operationId: post-presets + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/realtimekitPreset' + responses: + '200': + content: + application/json: + schema: + properties: + data: + description: Data returned by the operation + type: object + properties: + id: + description: ID of the preset + format: uuid + type: string + config: + properties: + max_screenshare_count: + description: Maximum number of screen shares that can be active at a given time + type: integer + max_video_streams: + description: Maximum number of streams that are visible on a device + properties: + desktop: + description: Maximum number of video streams visible on desktop devices + type: integer + mobile: + description: Maximum number of streams visible on mobile devices + type: integer + required: + - mobile + - desktop + type: object + media: + description: 'Media configuration options. eg: Video quality' + properties: + audio: + description: Control options for Audio quality. + properties: + enable_high_bitrate: + default: false + description: Enable High Quality Audio for your meetings + type: boolean + enable_stereo: + default: false + description: Enable Stereo for your meetings + type: boolean + type: object + screenshare: + description: Configuration options for participant screen shares + properties: + frame_rate: + description: Frame rate of screen share + type: integer + quality: + description: Quality of screen share + enum: + - hd + - vga + - qvga + type: string + required: + - quality + - frame_rate + type: object + video: + description: Configuration options for participant videos + properties: + frame_rate: + description: Frame rate of participants' video + maximum: 30 + type: integer + quality: + description: Video quality of participants + enum: + - hd + - vga + - qvga + type: string + required: + - quality + - frame_rate + type: object + required: + - video + - screenshare + type: object + view_type: + description: Type of the meeting + enum: + - GROUP_CALL + - WEBINAR + - AUDIO_ROOM + type: string + required: + - view_type + - max_video_streams + - max_screenshare_count + - media + type: object + name: + description: Name of the preset + type: string + permissions: + properties: + accept_waiting_requests: + description: Whether this participant can accept waiting requests + type: boolean + can_accept_production_requests: + type: boolean + can_change_participant_permissions: + type: boolean + can_edit_display_name: + type: boolean + can_livestream: + type: boolean + can_record: + type: boolean + can_spotlight: + type: boolean + chat: + description: Chat permissions + properties: + private: + properties: + can_receive: + type: boolean + can_send: + type: boolean + files: + type: boolean + text: + type: boolean + required: + - can_send + - can_receive + - text + - files + type: object + public: + properties: + can_send: + description: Can send messages in general + type: boolean + files: + description: Can send file messages + type: boolean + text: + description: Can send text messages + type: boolean + required: + - can_send + - text + - files + type: object + required: + - public + - private + type: object + connected_meetings: + properties: + can_alter_connected_meetings: + type: boolean + can_switch_connected_meetings: + type: boolean + can_switch_to_parent_meeting: + type: boolean + required: + - can_alter_connected_meetings + - can_switch_connected_meetings + - can_switch_to_parent_meeting + type: object + disable_participant_audio: + type: boolean + disable_participant_screensharing: + type: boolean + disable_participant_video: + type: boolean + hidden_participant: + description: Whether this participant is visible to others or not + type: boolean + is_recorder: + default: false + type: boolean + kick_participant: + type: boolean + media: + description: Media permissions + properties: + audio: + description: Audio permissions + properties: + can_produce: + description: Can produce audio + enum: + - ALLOWED + - NOT_ALLOWED + - CAN_REQUEST + type: string + required: + - can_produce + type: object + screenshare: + description: Screenshare permissions + properties: + can_produce: + description: Can produce screen share video + enum: + - ALLOWED + - NOT_ALLOWED + - CAN_REQUEST + type: string + required: + - can_produce + type: object + video: + description: Video permissions + properties: + can_produce: + description: Can produce video + enum: + - ALLOWED + - NOT_ALLOWED + - CAN_REQUEST + type: string + required: + - can_produce + type: object + required: + - video + - audio + - screenshare + type: object + pin_participant: + type: boolean + plugins: + description: Plugin permissions + properties: + can_close: + description: Can close plugins that are already open + type: boolean + can_edit_config: + description: Can edit plugin config + type: boolean + can_start: + description: Can start plugins + type: boolean + config: + type: string + format: uuid + properties: + access_control: + enum: + - FULL_ACCESS + - VIEW_ONLY + type: string + handles_view_only: + type: boolean + required: + - handles_view_only + - access_control + required: + - can_close + - can_start + - can_edit_config + - config + type: object + polls: + description: Poll permissions + properties: + can_create: + description: Can create polls + type: boolean + can_view: + description: Can view polls + type: boolean + can_vote: + description: Can vote on polls + type: boolean + required: + - can_create + - can_vote + - can_view + type: object + recorder_type: + default: NONE + description: Type of the recording peer + enum: + - RECORDER + - LIVESTREAMER + - NONE + type: string + show_participant_list: + type: boolean + waiting_room_type: + description: Waiting room type + enum: + - SKIP + - ON_PRIVILEGED_USER_ENTRY + - SKIP_ON_ACCEPT + type: string + required: + - accept_waiting_requests + - can_accept_production_requests + - can_edit_display_name + - can_spotlight + - recorder_type + - disable_participant_audio + - disable_participant_screensharing + - disable_participant_video + - kick_participant + - pin_participant + - can_record + - can_livestream + - waiting_room_type + - plugins + - connected_meetings + - polls + - media + - chat + - hidden_participant + - show_participant_list + - can_change_participant_permissions + type: object + ui: + properties: + config_diff: + type: object + design_tokens: + properties: + border_radius: + enum: + - rounded + type: string + border_width: + enum: + - thin + type: string + colors: + properties: + background: + properties: + '600': + default: '#222222' + type: string + '700': + default: '#1f1f1f' + type: string + '800': + default: '#1b1b1b' + type: string + '900': + default: '#181818' + type: string + '1000': + default: '#141414' + type: string + required: + - '600' + - '700' + - '800' + - '900' + - '1000' + type: object + brand: + properties: + '300': + default: '#844d1c' + type: string + '400': + default: '#9d5b22' + type: string + '500': + default: '#b56927' + type: string + '600': + default: '#d37c30' + type: string + '700': + default: '#d9904f' + type: string + required: + - '300' + - '400' + - '500' + - '600' + - '700' + type: object + danger: + default: '#FF2D2D' + type: string + success: + default: '#62A504' + type: string + text: + default: '#EEEEEE' + type: string + text_on_brand: + default: '#EEEEEE' + type: string + video_bg: + default: '#191919' + type: string + warning: + default: '#FFCD07' + type: string + required: + - brand + - background + - danger + - text + - text_on_brand + - success + - video_bg + - warning + type: object + logo: + type: string + spacing_base: + default: 4 + type: number + theme: + enum: + - dark + type: string + required: + - border_radius + - border_width + - spacing_base + - theme + - colors + - logo + type: object + required: + - design_tokens + type: object + required: + - id + - name + - config + - ui + title: Preset + success: + default: true + description: Success status of the operation + type: boolean + required: + - success + - data + title: GenericSuccessResponse + type: object + description: Success response + security: + - api_token: [] + summary: Create a preset + tags: + - Presets + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - presets + method: create + /accounts/{account_id}/realtime/kit/{app_id}/presets/{preset_id}: + delete: + description: Deletes a preset using the provided preset ID + operationId: delete-presets-preset_id + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - description: ID of the preset to fetch + in: path + name: preset_id + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + data: + description: Data returned by the operation + type: object + properties: + id: + description: ID of the preset + format: uuid + type: string + config: + properties: + max_screenshare_count: + description: Maximum number of screen shares that can be active at a given time + type: integer + max_video_streams: + description: Maximum number of streams that are visible on a device + properties: + desktop: + description: Maximum number of video streams visible on desktop devices + type: integer + mobile: + description: Maximum number of streams visible on mobile devices + type: integer + required: + - mobile + - desktop + type: object + media: + description: 'Media configuration options. eg: Video quality' + properties: + audio: + description: Control options for Audio quality. + properties: + enable_high_bitrate: + default: false + description: Enable High Quality Audio for your meetings + type: boolean + enable_stereo: + default: false + description: Enable Stereo for your meetings + type: boolean + type: object + screenshare: + description: Configuration options for participant screen shares + properties: + frame_rate: + description: Frame rate of screen share + type: integer + quality: + description: Quality of screen share + enum: + - hd + - vga + - qvga + type: string + required: + - quality + - frame_rate + type: object + video: + description: Configuration options for participant videos + properties: + frame_rate: + description: Frame rate of participants' video + maximum: 30 + type: integer + quality: + description: Video quality of participants + enum: + - hd + - vga + - qvga + type: string + required: + - quality + - frame_rate + type: object + required: + - video + - screenshare + type: object + view_type: + description: Type of the meeting + enum: + - GROUP_CALL + - WEBINAR + - AUDIO_ROOM + type: string + required: + - view_type + - max_video_streams + - max_screenshare_count + - media + type: object + name: + description: Name of the preset + type: string + permissions: + properties: + accept_waiting_requests: + description: Whether this participant can accept waiting requests + type: boolean + can_accept_production_requests: + type: boolean + can_change_participant_permissions: + type: boolean + can_edit_display_name: + type: boolean + can_livestream: + type: boolean + can_record: + type: boolean + can_spotlight: + type: boolean + chat: + description: Chat permissions + properties: + private: + properties: + can_receive: + type: boolean + can_send: + type: boolean + files: + type: boolean + text: + type: boolean + required: + - can_send + - can_receive + - text + - files + type: object + public: + properties: + can_send: + description: Can send messages in general + type: boolean + files: + description: Can send file messages + type: boolean + text: + description: Can send text messages + type: boolean + required: + - can_send + - text + - files + type: object + required: + - public + - private + type: object + connected_meetings: + properties: + can_alter_connected_meetings: + type: boolean + can_switch_connected_meetings: + type: boolean + can_switch_to_parent_meeting: + type: boolean + required: + - can_alter_connected_meetings + - can_switch_connected_meetings + - can_switch_to_parent_meeting + type: object + disable_participant_audio: + type: boolean + disable_participant_screensharing: + type: boolean + disable_participant_video: + type: boolean + hidden_participant: + description: Whether this participant is visible to others or not + type: boolean + is_recorder: + default: false + type: boolean + kick_participant: + type: boolean + media: + description: Media permissions + properties: + audio: + description: Audio permissions + properties: + can_produce: + description: Can produce audio + enum: + - ALLOWED + - NOT_ALLOWED + - CAN_REQUEST + type: string + required: + - can_produce + type: object + screenshare: + description: Screenshare permissions + properties: + can_produce: + description: Can produce screen share video + enum: + - ALLOWED + - NOT_ALLOWED + - CAN_REQUEST + type: string + required: + - can_produce + type: object + video: + description: Video permissions + properties: + can_produce: + description: Can produce video + enum: + - ALLOWED + - NOT_ALLOWED + - CAN_REQUEST + type: string + required: + - can_produce + type: object + required: + - video + - audio + - screenshare + type: object + pin_participant: + type: boolean + plugins: + description: Plugin permissions + properties: + can_close: + description: Can close plugins that are already open + type: boolean + can_edit_config: + description: Can edit plugin config + type: boolean + can_start: + description: Can start plugins + type: boolean + config: + type: string + format: uuid + properties: + access_control: + enum: + - FULL_ACCESS + - VIEW_ONLY + type: string + handles_view_only: + type: boolean + required: + - handles_view_only + - access_control + required: + - can_close + - can_start + - can_edit_config + - config + type: object + polls: + description: Poll permissions + properties: + can_create: + description: Can create polls + type: boolean + can_view: + description: Can view polls + type: boolean + can_vote: + description: Can vote on polls + type: boolean + required: + - can_create + - can_vote + - can_view + type: object + recorder_type: + default: NONE + description: Type of the recording peer + enum: + - RECORDER + - LIVESTREAMER + - NONE + type: string + show_participant_list: + type: boolean + waiting_room_type: + description: Waiting room type + enum: + - SKIP + - ON_PRIVILEGED_USER_ENTRY + - SKIP_ON_ACCEPT + type: string + required: + - accept_waiting_requests + - can_accept_production_requests + - can_edit_display_name + - can_spotlight + - recorder_type + - disable_participant_audio + - disable_participant_screensharing + - disable_participant_video + - kick_participant + - pin_participant + - can_record + - can_livestream + - waiting_room_type + - plugins + - connected_meetings + - polls + - media + - chat + - hidden_participant + - show_participant_list + - can_change_participant_permissions + type: object + ui: + properties: + config_diff: + type: object + design_tokens: + properties: + border_radius: + enum: + - rounded + type: string + border_width: + enum: + - thin + type: string + colors: + properties: + background: + properties: + '600': + default: '#222222' + type: string + '700': + default: '#1f1f1f' + type: string + '800': + default: '#1b1b1b' + type: string + '900': + default: '#181818' + type: string + '1000': + default: '#141414' + type: string + required: + - '600' + - '700' + - '800' + - '900' + - '1000' + type: object + brand: + properties: + '300': + default: '#844d1c' + type: string + '400': + default: '#9d5b22' + type: string + '500': + default: '#b56927' + type: string + '600': + default: '#d37c30' + type: string + '700': + default: '#d9904f' + type: string + required: + - '300' + - '400' + - '500' + - '600' + - '700' + type: object + danger: + default: '#FF2D2D' + type: string + success: + default: '#62A504' + type: string + text: + default: '#EEEEEE' + type: string + text_on_brand: + default: '#EEEEEE' + type: string + video_bg: + default: '#191919' + type: string + warning: + default: '#FFCD07' + type: string + required: + - brand + - background + - danger + - text + - text_on_brand + - success + - video_bg + - warning + type: object + logo: + type: string + spacing_base: + default: 4 + type: number + theme: + enum: + - dark + type: string + required: + - border_radius + - border_width + - spacing_base + - theme + - colors + - logo + type: object + required: + - design_tokens + type: object + required: + - id + - name + - config + - ui + title: Preset + success: + default: true + description: Success status of the operation + type: boolean + required: + - success + - data + title: GenericSuccessResponse + type: object + description: Success response + security: + - api_token: [] + summary: Delete a preset + tags: + - Presets + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - presets + method: delete + get: + description: Fetches details of a preset using the provided preset ID + operationId: get-presets-preset_id + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - description: ID of the preset to fetch + in: path + name: preset_id + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + data: + description: Data returned by the operation + type: object + properties: + id: + description: ID of the preset + format: uuid + type: string + config: + properties: + max_screenshare_count: + description: Maximum number of screen shares that can be active at a given time + type: integer + max_video_streams: + description: Maximum number of streams that are visible on a device + properties: + desktop: + description: Maximum number of video streams visible on desktop devices + type: integer + mobile: + description: Maximum number of streams visible on mobile devices + type: integer + required: + - mobile + - desktop + type: object + media: + description: 'Media configuration options. eg: Video quality' + properties: + audio: + description: Control options for Audio quality. + properties: + enable_high_bitrate: + default: false + description: Enable High Quality Audio for your meetings + type: boolean + enable_stereo: + default: false + description: Enable Stereo for your meetings + type: boolean + type: object + screenshare: + description: Configuration options for participant screen shares + properties: + frame_rate: + description: Frame rate of screen share + type: integer + quality: + description: Quality of screen share + enum: + - hd + - vga + - qvga + type: string + required: + - quality + - frame_rate + type: object + video: + description: Configuration options for participant videos + properties: + frame_rate: + description: Frame rate of participants' video + maximum: 30 + type: integer + quality: + description: Video quality of participants + enum: + - hd + - vga + - qvga + type: string + required: + - quality + - frame_rate + type: object + required: + - video + - screenshare + type: object + view_type: + description: Type of the meeting + enum: + - GROUP_CALL + - WEBINAR + - AUDIO_ROOM + type: string + required: + - view_type + - max_video_streams + - max_screenshare_count + - media + type: object + name: + description: Name of the preset + type: string + permissions: + properties: + accept_waiting_requests: + description: Whether this participant can accept waiting requests + type: boolean + can_accept_production_requests: + type: boolean + can_change_participant_permissions: + type: boolean + can_edit_display_name: + type: boolean + can_livestream: + type: boolean + can_record: + type: boolean + can_spotlight: + type: boolean + chat: + description: Chat permissions + properties: + private: + properties: + can_receive: + type: boolean + can_send: + type: boolean + files: + type: boolean + text: + type: boolean + required: + - can_send + - can_receive + - text + - files + type: object + public: + properties: + can_send: + description: Can send messages in general + type: boolean + files: + description: Can send file messages + type: boolean + text: + description: Can send text messages + type: boolean + required: + - can_send + - text + - files + type: object + required: + - public + - private + type: object + connected_meetings: + properties: + can_alter_connected_meetings: + type: boolean + can_switch_connected_meetings: + type: boolean + can_switch_to_parent_meeting: + type: boolean + required: + - can_alter_connected_meetings + - can_switch_connected_meetings + - can_switch_to_parent_meeting + type: object + disable_participant_audio: + type: boolean + disable_participant_screensharing: + type: boolean + disable_participant_video: + type: boolean + hidden_participant: + description: Whether this participant is visible to others or not + type: boolean + is_recorder: + default: false + type: boolean + kick_participant: + type: boolean + media: + description: Media permissions + properties: + audio: + description: Audio permissions + properties: + can_produce: + description: Can produce audio + enum: + - ALLOWED + - NOT_ALLOWED + - CAN_REQUEST + type: string + required: + - can_produce + type: object + screenshare: + description: Screenshare permissions + properties: + can_produce: + description: Can produce screen share video + enum: + - ALLOWED + - NOT_ALLOWED + - CAN_REQUEST + type: string + required: + - can_produce + type: object + video: + description: Video permissions + properties: + can_produce: + description: Can produce video + enum: + - ALLOWED + - NOT_ALLOWED + - CAN_REQUEST + type: string + required: + - can_produce + type: object + required: + - video + - audio + - screenshare + type: object + pin_participant: + type: boolean + plugins: + description: Plugin permissions + properties: + can_close: + description: Can close plugins that are already open + type: boolean + can_edit_config: + description: Can edit plugin config + type: boolean + can_start: + description: Can start plugins + type: boolean + config: + type: string + format: uuid + properties: + access_control: + enum: + - FULL_ACCESS + - VIEW_ONLY + type: string + handles_view_only: + type: boolean + required: + - handles_view_only + - access_control + required: + - can_close + - can_start + - can_edit_config + - config + type: object + polls: + description: Poll permissions + properties: + can_create: + description: Can create polls + type: boolean + can_view: + description: Can view polls + type: boolean + can_vote: + description: Can vote on polls + type: boolean + required: + - can_create + - can_vote + - can_view + type: object + recorder_type: + default: NONE + description: Type of the recording peer + enum: + - RECORDER + - LIVESTREAMER + - NONE + type: string + show_participant_list: + type: boolean + waiting_room_type: + description: Waiting room type + enum: + - SKIP + - ON_PRIVILEGED_USER_ENTRY + - SKIP_ON_ACCEPT + type: string + required: + - accept_waiting_requests + - can_accept_production_requests + - can_edit_display_name + - can_spotlight + - recorder_type + - disable_participant_audio + - disable_participant_screensharing + - disable_participant_video + - kick_participant + - pin_participant + - can_record + - can_livestream + - waiting_room_type + - plugins + - connected_meetings + - polls + - media + - chat + - hidden_participant + - show_participant_list + - can_change_participant_permissions + type: object + ui: + properties: + config_diff: + type: object + design_tokens: + properties: + border_radius: + enum: + - rounded + type: string + border_width: + enum: + - thin + type: string + colors: + properties: + background: + properties: + '600': + default: '#222222' + type: string + '700': + default: '#1f1f1f' + type: string + '800': + default: '#1b1b1b' + type: string + '900': + default: '#181818' + type: string + '1000': + default: '#141414' + type: string + required: + - '600' + - '700' + - '800' + - '900' + - '1000' + type: object + brand: + properties: + '300': + default: '#844d1c' + type: string + '400': + default: '#9d5b22' + type: string + '500': + default: '#b56927' + type: string + '600': + default: '#d37c30' + type: string + '700': + default: '#d9904f' + type: string + required: + - '300' + - '400' + - '500' + - '600' + - '700' + type: object + danger: + default: '#FF2D2D' + type: string + success: + default: '#62A504' + type: string + text: + default: '#EEEEEE' + type: string + text_on_brand: + default: '#EEEEEE' + type: string + video_bg: + default: '#191919' + type: string + warning: + default: '#FFCD07' + type: string + required: + - brand + - background + - danger + - text + - text_on_brand + - success + - video_bg + - warning + type: object + logo: + type: string + spacing_base: + default: 4 + type: number + theme: + enum: + - dark + type: string + required: + - border_radius + - border_width + - spacing_base + - theme + - colors + - logo + type: object + required: + - design_tokens + type: object + required: + - id + - name + - config + - ui + title: Preset + success: + default: true + description: Success status of the operation + type: boolean + required: + - success + - data + title: GenericSuccessResponse + type: object + description: Success response + security: + - api_token: [] + summary: Fetch details of a preset + tags: + - Presets + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - presets + method: get_preset_by_id + patch: + description: Update a preset by the provided preset ID + operationId: patch-presets-preset_id + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - description: ID of the preset to fetch + in: path + name: preset_id + schema: + type: string + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/realtimekitUpdatePreset' + responses: + '200': + content: + application/json: + schema: + properties: + data: + description: Data returned by the operation + type: object + properties: + id: + description: ID of the preset + format: uuid + type: string + config: + properties: + max_screenshare_count: + description: Maximum number of screen shares that can be active at a given time + type: integer + max_video_streams: + description: Maximum number of streams that are visible on a device + properties: + desktop: + description: Maximum number of video streams visible on desktop devices + type: integer + mobile: + description: Maximum number of streams visible on mobile devices + type: integer + required: + - mobile + - desktop + type: object + media: + description: 'Media configuration options. eg: Video quality' + properties: + audio: + description: Control options for Audio quality. + properties: + enable_high_bitrate: + default: false + description: Enable High Quality Audio for your meetings + type: boolean + enable_stereo: + default: false + description: Enable Stereo for your meetings + type: boolean + type: object + screenshare: + description: Configuration options for participant screen shares + properties: + frame_rate: + description: Frame rate of screen share + type: integer + quality: + description: Quality of screen share + enum: + - hd + - vga + - qvga + type: string + required: + - quality + - frame_rate + type: object + video: + description: Configuration options for participant videos + properties: + frame_rate: + description: Frame rate of participants' video + maximum: 30 + type: integer + quality: + description: Video quality of participants + enum: + - hd + - vga + - qvga + type: string + required: + - quality + - frame_rate + type: object + required: + - video + - screenshare + type: object + view_type: + description: Type of the meeting + enum: + - GROUP_CALL + - WEBINAR + - AUDIO_ROOM + type: string + required: + - view_type + - max_video_streams + - max_screenshare_count + - media + type: object + name: + description: Name of the preset + type: string + permissions: + properties: + accept_waiting_requests: + description: Whether this participant can accept waiting requests + type: boolean + can_accept_production_requests: + type: boolean + can_change_participant_permissions: + type: boolean + can_edit_display_name: + type: boolean + can_livestream: + type: boolean + can_record: + type: boolean + can_spotlight: + type: boolean + chat: + description: Chat permissions + properties: + private: + properties: + can_receive: + type: boolean + can_send: + type: boolean + files: + type: boolean + text: + type: boolean + required: + - can_send + - can_receive + - text + - files + type: object + public: + properties: + can_send: + description: Can send messages in general + type: boolean + files: + description: Can send file messages + type: boolean + text: + description: Can send text messages + type: boolean + required: + - can_send + - text + - files + type: object + required: + - public + - private + type: object + connected_meetings: + properties: + can_alter_connected_meetings: + type: boolean + can_switch_connected_meetings: + type: boolean + can_switch_to_parent_meeting: + type: boolean + required: + - can_alter_connected_meetings + - can_switch_connected_meetings + - can_switch_to_parent_meeting + type: object + disable_participant_audio: + type: boolean + disable_participant_screensharing: + type: boolean + disable_participant_video: + type: boolean + hidden_participant: + description: Whether this participant is visible to others or not + type: boolean + is_recorder: + default: false + type: boolean + kick_participant: + type: boolean + media: + description: Media permissions + properties: + audio: + description: Audio permissions + properties: + can_produce: + description: Can produce audio + enum: + - ALLOWED + - NOT_ALLOWED + - CAN_REQUEST + type: string + required: + - can_produce + type: object + screenshare: + description: Screenshare permissions + properties: + can_produce: + description: Can produce screen share video + enum: + - ALLOWED + - NOT_ALLOWED + - CAN_REQUEST + type: string + required: + - can_produce + type: object + video: + description: Video permissions + properties: + can_produce: + description: Can produce video + enum: + - ALLOWED + - NOT_ALLOWED + - CAN_REQUEST + type: string + required: + - can_produce + type: object + required: + - video + - audio + - screenshare + type: object + pin_participant: + type: boolean + plugins: + description: Plugin permissions + properties: + can_close: + description: Can close plugins that are already open + type: boolean + can_edit_config: + description: Can edit plugin config + type: boolean + can_start: + description: Can start plugins + type: boolean + config: + type: string + format: uuid + properties: + access_control: + enum: + - FULL_ACCESS + - VIEW_ONLY + type: string + handles_view_only: + type: boolean + required: + - handles_view_only + - access_control + required: + - can_close + - can_start + - can_edit_config + - config + type: object + polls: + description: Poll permissions + properties: + can_create: + description: Can create polls + type: boolean + can_view: + description: Can view polls + type: boolean + can_vote: + description: Can vote on polls + type: boolean + required: + - can_create + - can_vote + - can_view + type: object + recorder_type: + default: NONE + description: Type of the recording peer + enum: + - RECORDER + - LIVESTREAMER + - NONE + type: string + show_participant_list: + type: boolean + waiting_room_type: + description: Waiting room type + enum: + - SKIP + - ON_PRIVILEGED_USER_ENTRY + - SKIP_ON_ACCEPT + type: string + required: + - accept_waiting_requests + - can_accept_production_requests + - can_edit_display_name + - can_spotlight + - recorder_type + - disable_participant_audio + - disable_participant_screensharing + - disable_participant_video + - kick_participant + - pin_participant + - can_record + - can_livestream + - waiting_room_type + - plugins + - connected_meetings + - polls + - media + - chat + - hidden_participant + - show_participant_list + - can_change_participant_permissions + type: object + ui: + properties: + config_diff: + type: object + design_tokens: + properties: + border_radius: + enum: + - rounded + type: string + border_width: + enum: + - thin + type: string + colors: + properties: + background: + properties: + '600': + default: '#222222' + type: string + '700': + default: '#1f1f1f' + type: string + '800': + default: '#1b1b1b' + type: string + '900': + default: '#181818' + type: string + '1000': + default: '#141414' + type: string + required: + - '600' + - '700' + - '800' + - '900' + - '1000' + type: object + brand: + properties: + '300': + default: '#844d1c' + type: string + '400': + default: '#9d5b22' + type: string + '500': + default: '#b56927' + type: string + '600': + default: '#d37c30' + type: string + '700': + default: '#d9904f' + type: string + required: + - '300' + - '400' + - '500' + - '600' + - '700' + type: object + danger: + default: '#FF2D2D' + type: string + success: + default: '#62A504' + type: string + text: + default: '#EEEEEE' + type: string + text_on_brand: + default: '#EEEEEE' + type: string + video_bg: + default: '#191919' + type: string + warning: + default: '#FFCD07' + type: string + required: + - brand + - background + - danger + - text + - text_on_brand + - success + - video_bg + - warning + type: object + logo: + type: string + spacing_base: + default: 4 + type: number + theme: + enum: + - dark + type: string + required: + - border_radius + - border_width + - spacing_base + - theme + - colors + - logo + type: object + required: + - design_tokens + type: object + required: + - id + - name + - config + - ui + title: Preset + success: + default: true + description: Success status of the operation + type: boolean + required: + - success + - data + title: GenericSuccessResponse + type: object + description: Success response + security: + - api_token: [] + summary: Update a preset + tags: + - Presets + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - presets + method: update + /accounts/{account_id}/realtime/kit/{app_id}/recordings: + get: + description: Returns all recordings for an App. If the `meeting_id` parameter is passed, returns all recordings for the given meeting ID. + operationId: get_all_recordings + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - description: ID of a meeting. Optional. Will limit results to only this meeting if passed. + in: query + name: meeting_id + schema: + format: uuid + type: string + - allowEmptyValue: true + description: The page number from which you want your page search results to be displayed. + in: query + name: page_no + schema: + minimum: 0 + type: number + - allowEmptyValue: true + description: Number of results per page + in: query + name: per_page + schema: + minimum: 0 + type: number + - description: If passed, only shows expired/non-expired recordings on RealtimeKit's bucket + in: query + name: expired + schema: + type: boolean + - description: The search query string. You can search using the meeting ID or title. + in: query + name: search + schema: + type: string + - in: query + name: sort_by + schema: + enum: + - invokedTime + type: string + - in: query + name: sort_order + schema: + enum: + - ASC + - DESC + type: string + - description: The start time range for which you want to retrieve the meetings. The time must be specified in ISO format. + in: query + name: start_time + schema: + format: date-time + type: string + - description: The end time range for which you want to retrieve the meetings. The time must be specified in ISO format. + in: query + name: end_time + schema: + format: date-time + type: string + - description: Filter by one or more recording status + explode: false + in: query + name: status + schema: + items: + enum: + - INVOKED + - RECORDING + - UPLOADING + - UPLOADED + type: string + type: array + responses: + '200': + content: + application/json: + schema: + properties: + data: + items: + type: object + properties: + audio_download_url: + description: If the audio_config is passed, the URL for downloading the audio recording is returned. + format: uri + nullable: true + readOnly: true + type: string + download_url: + description: URL where the recording can be downloaded. + format: uri + nullable: true + readOnly: true + type: string + download_url_expiry: + description: Timestamp when the download URL expires. + format: date-time + nullable: true + readOnly: true + type: string + file_size: + description: File size of the recording, in bytes. + nullable: true + readOnly: true + type: number + id: + description: ID of the recording + format: uuid + readOnly: true + type: string + invoked_time: + description: Timestamp when this recording was invoked. + format: date-time + type: string + output_file_name: + description: File name of the recording. + type: string + recording_duration: + description: Total recording time in seconds. + type: integer + session_id: + description: ID of the meeting session this recording is for. + format: uuid + nullable: true + readOnly: true + type: string + started_time: + description: Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. + format: date-time + nullable: true + type: string + status: + description: Current status of the recording. + enum: + - INVOKED + - RECORDING + - UPLOADING + - UPLOADED + - ERRORED + - PAUSED + type: string + stopped_time: + description: Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. + format: date-time + nullable: true + type: string + storage_config: + $ref: '#/components/schemas/realtimekitStorageConfig' + meeting: + $ref: '#/components/schemas/realtimekitMeeting' + required: + - id + - download_url + - download_url_expiry + - audio_download_url + - file_size + - session_id + - output_file_name + - status + - invoked_time + - started_time + - stopped_time + title: Recording + type: array + paging: + properties: + end_offset: + type: number + start_offset: + type: number + total_count: + minimum: 0 + type: number + required: + - total_count + - start_offset + - end_offset + type: object + success: + type: boolean + required: + - success + - data + - paging + title: PagingResponse + type: object + description: Success response + '201': + description: Created + security: + - api_token: [] + summary: Fetch all recordings for an App + tags: + - Recordings + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - recordings + method: get_recordings + post: + description: Starts recording a meeting. The meeting can be started by an App admin directly, or a participant with permissions to start a recording, based on the type of authorization used. + operationId: start_recording + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + allow_multiple_recordings: + default: false + description: By default, a meeting allows only one recording to run at a time. Enabling the `allow_multiple_recordings` parameter to true allows you to initiate multiple recordings concurrently in the same meeting. This allows you to record separate videos of the same meeting with different configurations, such as portrait mode or landscape mode. + type: boolean + audio_config: + $ref: '#/components/schemas/realtimekitAudioConfig' + file_name_prefix: + description: Update the recording file name. + type: string + interactive_config: + $ref: '#/components/schemas/realtimekitInteractiveConfig' + max_seconds: + description: Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. + maximum: 86400 + minimum: 60 + type: integer + meeting_id: + description: ID of the meeting to record. + format: uuid + type: string + realtimekit_bucket_config: + $ref: '#/components/schemas/realtimekitRealtimekitBucketConfig' + rtmp_out_config: + $ref: '#/components/schemas/realtimekitLivestreamingConfig' + storage_config: + $ref: '#/components/schemas/realtimekitStorageConfig' + url: + description: Pass a custom url to record arbitary screen + format: uri + type: string + video_config: + $ref: '#/components/schemas/realtimekitVideoConfig' + type: object + responses: + '200': + content: + application/json: + schema: + properties: + data: + description: Data returned by the operation + type: object + properties: + audio_download_url: + description: If the audio_config is passed, the URL for downloading the audio recording is returned. + format: uri + nullable: true + readOnly: true + type: string + download_url: + description: URL where the recording can be downloaded. + format: uri + nullable: true + readOnly: true + type: string + download_url_expiry: + description: Timestamp when the download URL expires. + format: date-time + nullable: true + readOnly: true + type: string + file_size: + description: File size of the recording, in bytes. + nullable: true + readOnly: true + type: number + id: + description: ID of the recording + format: uuid + readOnly: true + type: string + invoked_time: + description: Timestamp when this recording was invoked. + format: date-time + type: string + output_file_name: + description: File name of the recording. + type: string + recording_duration: + description: Total recording time in seconds. + type: integer + session_id: + description: ID of the meeting session this recording is for. + format: uuid + nullable: true + readOnly: true + type: string + started_time: + description: Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. + format: date-time + nullable: true + type: string + status: + description: Current status of the recording. + enum: + - INVOKED + - RECORDING + - UPLOADING + - UPLOADED + - ERRORED + - PAUSED + type: string + stopped_time: + description: Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. + format: date-time + nullable: true + type: string + start_reason: + $ref: '#/components/schemas/realtimekitStartReason' + stop_reason: + $ref: '#/components/schemas/realtimekitStopReason' + storage_config: + $ref: '#/components/schemas/realtimekitStorageConfig' + required: + - id + - download_url + - download_url_expiry + - audio_download_url + - file_size + - session_id + - output_file_name + - status + - invoked_time + - started_time + - stopped_time + title: Recording + success: + default: true + description: Success status of the operation + type: boolean + required: + - success + title: GenericSuccessResponse + type: object + description: Success response + security: + - api_token: [] + summary: Start recording a meeting + tags: + - Recordings + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - recordings + method: start_recordings + /accounts/{account_id}/realtime/kit/{app_id}/recordings/active-recording/{meeting_id}: + get: + description: Returns the active recording details for the given meeting ID. + operationId: get_active_recording + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - name: meeting_id + in: path + required: true + description: The Realtime Kit meeting ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + data: + description: Data returned by the operation + type: object + $ref: '#/components/schemas/realtimekitRecording' + success: + default: true + description: Success status of the operation + type: boolean + required: + - success + - data + title: GenericSuccessResponse + type: object + description: Success response + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/realtimekitGenericErrorResponse' + description: Failure response + security: + - api_token: [] + summary: Fetch active recording + tags: + - Recordings + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - recordings + method: get_active_recordings + /accounts/{account_id}/realtime/kit/{app_id}/recordings/track: + post: + description: Starts a track recording in a meeting. Track recordings consist of "layers". Layers are used to map audio/video tracks in a meeting to output destinations. More information about track recordings is available in the [Track Recordings Guide Page](https://docs.realtime.cloudflare.com/guides/capabilities/recording/recording-overview). + operationId: startTrackRecordingForAMeeting + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + layers: + type: object + max_seconds: + description: Maximum seconds this recording should be active for (beta) + type: number + meeting_id: + description: ID of the meeting to record. + type: string + required: + - meeting_id + - layers + type: object + description: For now only "default" layer key is supported. + responses: + '200': + description: OK + security: + - api_token: [] + summary: Start recording audio and video tracks + tags: + - Recordings + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - recordings + method: start_track_recording + /accounts/{account_id}/realtime/kit/{app_id}/recordings/{recording_id}: + get: + description: Returns details of a recording for the given recording ID. + operationId: get_one_recording + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - description: ID of the recording + in: path + name: recording_id + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + data: + description: Data returned by the operation + type: object + properties: + audio_download_url: + description: If the audio_config is passed, the URL for downloading the audio recording is returned. + format: uri + nullable: true + readOnly: true + type: string + download_url: + description: URL where the recording can be downloaded. + format: uri + nullable: true + readOnly: true + type: string + download_url_expiry: + description: Timestamp when the download URL expires. + format: date-time + nullable: true + readOnly: true + type: string + file_size: + description: File size of the recording, in bytes. + nullable: true + readOnly: true + type: number + id: + description: ID of the recording + format: uuid + readOnly: true + type: string + invoked_time: + description: Timestamp when this recording was invoked. + format: date-time + type: string + output_file_name: + description: File name of the recording. + type: string + recording_duration: + description: Total recording time in seconds. + type: integer + session_id: + description: ID of the meeting session this recording is for. + format: uuid + nullable: true + readOnly: true + type: string + started_time: + description: Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. + format: date-time + nullable: true + type: string + status: + description: Current status of the recording. + enum: + - INVOKED + - RECORDING + - UPLOADING + - UPLOADED + - ERRORED + - PAUSED + type: string + stopped_time: + description: Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. + format: date-time + nullable: true + type: string + start_reason: + $ref: '#/components/schemas/realtimekitStartReason' + stop_reason: + $ref: '#/components/schemas/realtimekitStopReason' + storage_config: + $ref: '#/components/schemas/realtimekitStorageConfig' + required: + - id + - download_url + - download_url_expiry + - audio_download_url + - file_size + - session_id + - output_file_name + - status + - invoked_time + - started_time + - stopped_time + title: Recording + success: + default: true + description: Success status of the operation + type: boolean + required: + - success + title: GenericSuccessResponse + type: object + description: Success response + security: + - api_token: [] + summary: Fetch details of a recording + tags: + - Recordings + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - recordings + method: get_one_recording + put: + description: Pause/Resume/Stop a given recording ID. + operationId: pause_resume_stop_recording + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - description: ID of the recording + in: path + name: recording_id + schema: + type: string + required: true + requestBody: + content: + application/json: + schema: + properties: + action: + enum: + - stop + - pause + - resume + type: string + required: + - action + type: object + responses: + '200': + content: + application/json: + schema: + properties: + data: + description: Data returned by the operation + type: object + properties: + audio_download_url: + description: If the audio_config is passed, the URL for downloading the audio recording is returned. + format: uri + nullable: true + readOnly: true + type: string + download_url: + description: URL where the recording can be downloaded. + format: uri + nullable: true + readOnly: true + type: string + download_url_expiry: + description: Timestamp when the download URL expires. + format: date-time + nullable: true + readOnly: true + type: string + file_size: + description: File size of the recording, in bytes. + nullable: true + readOnly: true + type: number + id: + description: ID of the recording + format: uuid + readOnly: true + type: string + invoked_time: + description: Timestamp when this recording was invoked. + format: date-time + type: string + output_file_name: + description: File name of the recording. + type: string + recording_duration: + description: Total recording time in seconds. + type: integer + session_id: + description: ID of the meeting session this recording is for. + format: uuid + nullable: true + readOnly: true + type: string + started_time: + description: Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. + format: date-time + nullable: true + type: string + status: + description: Current status of the recording. + enum: + - INVOKED + - RECORDING + - UPLOADING + - UPLOADED + - ERRORED + - PAUSED + type: string + stopped_time: + description: Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. + format: date-time + nullable: true + type: string + start_reason: + $ref: '#/components/schemas/realtimekitStartReason' + stop_reason: + $ref: '#/components/schemas/realtimekitStopReason' + storage_config: + $ref: '#/components/schemas/realtimekitStorageConfig' + required: + - id + - download_url + - download_url_expiry + - audio_download_url + - file_size + - session_id + - output_file_name + - status + - invoked_time + - started_time + - stopped_time + title: Recording + success: + default: true + description: Success status of the operation + type: boolean + required: + - success + title: GenericSuccessResponse + type: object + description: Success response + security: + - api_token: [] + summary: Pause/Resume/Stop recording + tags: + - Recordings + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - recordings + method: pause_resume_stop_recording + /accounts/{account_id}/realtime/kit/{app_id}/sessions: + get: + description: Returns details of all sessions of an App. + operationId: GetSessions + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - allowEmptyValue: true + description: The page number from which you want your page search results to be displayed. + in: query + name: page_no + schema: + minimum: 0 + type: number + - allowEmptyValue: true + description: Number of results per page + in: query + name: per_page + schema: + minimum: 0 + type: number + - in: query + name: sort_by + schema: + enum: + - minutesConsumed + - createdAt + type: string + - in: query + name: sort_order + schema: + enum: + - ASC + - DESC + type: string + - description: The start time range for which you want to retrieve the meetings. The time must be specified in ISO format. + in: query + name: start_time + schema: + format: date-time + type: string + - description: The end time range for which you want to retrieve the meetings. The time must be specified in ISO format. + in: query + name: end_time + schema: + format: date-time + type: string + - in: query + name: participants + schema: + type: string + - in: query + name: status + schema: + enum: + - LIVE + - ENDED + type: string + - description: Search string that matches sessions based on meeting title, meeting ID, and session ID + in: query + name: search + schema: + type: string + - description: ID of the meeting that sessions should be associated with + in: query + name: associated_id + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + data: + properties: + sessions: + items: + $ref: '#/components/schemas/realtimekitActiveSession' + type: array + type: object + success: + type: boolean + type: object + description: Get all sessions success response + security: + - api_token: [] + summary: Fetch all sessions of an App + tags: + - Sessions + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - sessions + method: get_sessions + /accounts/{account_id}/realtime/kit/{app_id}/sessions/peer-report/{peer_id}: + get: + description: Returns details of the given peer ID along with call statistics for the given session ID. + operationId: GetParticipantDataFromPeerId + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - description: Comma separated list of filters to apply. Note that there must be no spaces between the filters. + in: query + name: filters + schema: + enum: + - device_info + - ip_information + - precall_network_information + - events + - quality_stats + type: string + - description: ID of the peer + in: path + name: peer_id + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + data: + properties: + participant: + properties: + created_at: + type: string + readOnly: true + custom_participant_id: + type: string + display_name: + type: string + duration: + type: number + id: + type: string + joined_at: + type: string + left_at: + type: string + peer_report: + properties: + metadata: + properties: + audio_devices_updates: + items: + type: object + type: array + browser_metadata: + properties: + browser: + type: string + browser_version: + type: string + engine: + type: string + user_agent: + type: string + webgl_support: + type: string + type: object + candidate_pairs: + properties: + consuming_transport: + items: + type: object + type: array + producing_transport: + items: + properties: + available_outgoing_bitrate: + type: integer + bytes_discarded_on_send: + type: integer + bytes_received: + type: integer + bytes_sent: + type: integer + current_round_trip_time: + type: number + last_packet_received_timestamp: + type: integer + last_packet_sent_timestamp: + type: integer + local_candidate_address: + type: string + local_candidate_id: + type: string + local_candidate_network_type: + type: string + local_candidate_port: + type: integer + local_candidate_protocol: + type: string + local_candidate_related_address: + type: string + local_candidate_related_port: + type: integer + local_candidate_type: + type: string + nominated: + type: boolean + packets_discarded_on_send: + type: integer + packets_received: + type: integer + packets_sent: + type: integer + remote_candidate_address: + type: string + remote_candidate_id: + type: string + remote_candidate_port: + type: integer + remote_candidate_protocol: + type: string + remote_candidate_type: + type: string + total_round_trip_time: + type: number + type: object + type: array + type: object + device_info: + properties: + cpus: + type: integer + is_mobile: + type: boolean + os: + type: string + os_version: + type: string + type: object + events: + items: + properties: + name: + type: string + timestamp: + type: string + type: object + type: array + ip_information: + properties: + asn: + properties: + asn: + type: string + type: object + city: + type: string + country: + type: string + ipv4: + type: string + region: + type: string + timezone: + type: string + type: object + pc_metadata: + items: + properties: + effective_network_type: + type: string + reflexive_connectivity: + type: boolean + relay_connectivity: + type: boolean + timestamp: + type: string + turn_connectivity: + type: boolean + type: object + type: array + room_view_type: + type: string + sdk_name: + type: string + sdk_version: + type: string + selected_device_updates: + items: + type: object + type: array + speaker_devices_updates: + items: + type: object + type: array + video_devices_updates: + items: + type: object + type: array + type: object + quality: + properties: + audio_consumer: + items: + type: object + type: array + audio_consumer_cumulative: + type: object + audio_producer: + items: + properties: + bytes_sent: + type: integer + jitter: + type: integer + mid: + type: string + mos_quality: + type: integer + packets_lost: + type: integer + packets_sent: + type: integer + producer_id: + type: string + rtt: + type: number + ssrc: + type: integer + timestamp: + type: string + type: object + type: array + audio_producer_cumulative: + properties: + packet_loss: + properties: + 10_or_greater_event_fraction: + type: integer + 25_or_greater_event_fraction: + type: integer + 50_or_greater_event_fraction: + type: integer + 5_or_greater_event_fraction: + type: integer + avg: + type: integer + type: object + quality_mos: + properties: + avg: + type: integer + p50: + type: integer + p75: + type: integer + p90: + type: integer + type: object + rtt: + properties: + 100ms_or_greater_event_fraction: + type: number + 250ms_or_greater_event_fraction: + type: number + 500ms_or_greater_event_fraction: + type: number + avg: + type: number + type: object + type: object + screenshare_audio_consumer: + items: + type: object + type: array + screenshare_audio_consumer_cumulative: + type: object + screenshare_audio_producer: + items: + type: object + type: array + screenshare_audio_producer_cumulative: + type: object + screenshare_video_consumer: + items: + type: object + type: array + screenshare_video_consumer_cumulative: + type: object + screenshare_video_producer: + items: + type: object + type: array + screenshare_video_producer_cumulative: + type: object + video_consumer: + items: + type: object + type: array + video_consumer_cumulative: + type: object + video_producer: + items: + type: object + type: array + video_producer_cumulative: + type: object + type: object + type: object + peer_stats: + properties: + device_info: + properties: + browser: + type: string + browser_version: + type: string + cpus: + type: integer + engine: + type: string + is_mobile: + type: boolean + os: + type: string + os_version: + type: string + sdk_name: + type: string + sdk_version: + type: string + user_agent: + type: string + webgl_support: + type: string + type: object + events: + items: + properties: + metadata: + properties: + connection_info: + properties: + backend_r_t_t: + type: number + connectivity: + properties: + host: + type: boolean + reflexive: + type: boolean + relay: + type: boolean + type: object + effective_network_type: + type: string + fractional_loss: + type: integer + ip_details: + properties: + asn: + properties: + asn: + type: string + type: object + city: + type: string + country: + type: string + ip: + type: string + loc: + type: string + postal: + type: string + region: + type: string + timezone: + type: string + type: object + jitter: + type: integer + location: + properties: + coords: + properties: + latitude: + type: number + longitude: + type: number + type: object + type: object + r_t_t: + type: number + throughput: + type: integer + turn_connectivity: + type: boolean + type: object + type: object + timestamp: + type: string + type: + type: string + type: object + type: array + ip_information: + properties: + asn: + properties: + asn: + type: string + type: object + city: + type: string + country: + type: string + ip_location: + type: string + ipv4: + type: string + org: + type: string + region: + type: string + timezone: + type: string + type: object + precall_network_information: + properties: + backend_rtt: + type: number + effective_networktype: + type: string + fractional_loss: + type: integer + jitter: + type: integer + reflexive_connectivity: + type: boolean + relay_connectivity: + type: boolean + rtt: + type: number + throughput: + type: integer + turn_connectivity: + type: boolean + type: object + type: object + quality_stats: + properties: + audio_bandwidth: + type: integer + audio_stats: + items: + type: object + type: array + average_quality: + type: integer + end: + nullable: true + type: string + first_audio_packet_received: + type: string + first_video_packet_received: + type: string + last_audio_packet_received: + type: string + last_video_packet_received: + type: string + peer_ids: + items: + type: string + type: array + start: + nullable: true + type: string + total_audio_packets: + type: integer + total_audio_packets_lost: + type: integer + total_video_packets: + type: integer + total_video_packets_lost: + type: integer + video_bandwidth: + type: integer + video_stats: + items: + type: object + type: array + type: object + role: + type: string + updated_at: + type: string + readOnly: true + user_id: + type: string + type: object + type: object + success: + type: boolean + type: object + description: Returns details of a participant (using peer id) along with callstats data. + security: + - api_token: [] + summary: Fetch details of peer + tags: + - Sessions + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - sessions + method: get_participant_data_from_peer_id + /accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}: + get: + description: Returns data of the given session ID including recording details. + operationId: GetSessionDetails + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - description: List all breakout rooms + in: query + name: include_breakout_rooms + schema: + default: false + type: boolean + - name: session_id + in: path + required: true + description: The session ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + data: + properties: + session: + $ref: '#/components/schemas/realtimekitActiveSession' + type: object + success: + type: boolean + type: object + description: Get details about a particular session + security: + - api_token: [] + summary: Fetch details of a session + tags: + - Sessions + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - sessions + method: get_session_details + /accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/chat: + get: + description: Returns a URL to download all chat messages of the session ID in CSV format. + operationId: GetSessionChat + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - name: session_id + in: path + required: true + description: The session ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + data: + $ref: '#/components/schemas/realtimekitChatMessage' + success: + type: boolean + type: object + description: Returns all chat messages of a session. + security: + - api_token: [] + summary: Fetch all chat messages of a session + tags: + - Sessions + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - sessions + method: get_session_chat + /accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/livestream-sessions: + get: + description: Returns livestream session details for the given session ID. Retreive the session ID using the `Fetch all sessions of an App` API. + operationId: get-v2-livestreamsession-session-meetingId-active-livestream + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - description: Number of results per page. + in: query + name: per_page + schema: + type: number + - description: The page number from which you want your page search results to be displayed. + in: query + name: page_no + schema: + type: number + - name: session_id + in: path + required: true + description: The session ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + data: + properties: + created_at: + description: Timestamp the object was created at. The time is returned in ISO format. + format: date-time + type: string + readOnly: true + err_message: + enum: + - LIVE + - IDLE + - ERRORED + - INVOKED + type: string + id: + description: The livestream session ID. + type: string + ingest_seconds: + description: The time duration for which the input was given or the meeting was streamed. + type: number + invoked_time: + description: Name of the livestream. + nullable: true + type: string + livestream_id: + description: The ID of the livestream. + type: string + paging: + properties: + end_offset: + type: number + start_offset: + type: number + total_count: + type: number + type: object + stopped_time: + description: Specifies if the livestream was disabled. + format: date-time + type: string + updated_at: + description: Timestamp the object was updated at. The time is returned in ISO format. + format: date-time + type: string + readOnly: true + viewer_seconds: + description: The total view time for which the viewers watched the stream. + type: number + type: object + success: + type: boolean + type: object + description: OK + security: + - api_token: [] + summary: Fetch livestream session details using a session ID + tags: + - Live streams + x-api-token-group: + - Realtime Admin + - Realtime + /accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/participants: + get: + description: Returns a list of participants for the given session ID. + operationId: GetSessionParticipants + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - description: The search query string. You can search using the meeting ID or title. + in: query + name: search + schema: + type: string + - allowEmptyValue: true + description: The page number from which you want your page search results to be displayed. + in: query + name: page_no + schema: + minimum: 0 + type: number + - allowEmptyValue: true + description: Number of results per page + in: query + name: per_page + schema: + minimum: 0 + type: number + - in: query + name: sort_order + schema: + enum: + - ASC + - DESC + type: string + - in: query + name: sort_by + schema: + enum: + - joinedAt + - duration + type: string + - description: if true, response includes all the peer events of participants. + in: query + name: include_peer_events + schema: + default: false + type: boolean + - description: In breakout room sessions, the view parameter can be set to `raw` for session specific duration for participants or `consolidated` to accumulate breakout room durations. + in: query + name: view + schema: + default: raw + enum: + - raw + - consolidated + type: string + - name: session_id + in: path + required: true + description: The session ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + data: + properties: + participants: + items: + $ref: '#/components/schemas/realtimekitParticipantsList' + type: array + type: object + success: + type: boolean + type: object + description: Get participants list of a particular session + security: + - api_token: [] + summary: Fetch participants list of a session + tags: + - Sessions + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - sessions + method: get_session_participants + /accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/participants/{participant_id}: + get: + description: Returns details of the given participant ID along with call statistics for the given session ID. + operationId: GetParticipantDetails + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - allowEmptyValue: true + description: Comma separated list of filters to apply. Note that there must be no spaces between the filters. + in: query + name: filters + schema: + enum: + - device_info + - ip_information + - precall_network_information + - events + - quality_stats + type: string + - description: if true, response includes all the peer events of participant. + in: query + name: include_peer_events + schema: + default: false + type: boolean + - description: ID of the participant + in: path + name: participant_id + schema: + type: string + required: true + - name: session_id + in: path + required: true + description: The session ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + data: + properties: + participant: + properties: + created_at: + description: timestamp when this participant was created. + type: string + readOnly: true + custom_participant_id: + description: ID passed by client to create this participant. + type: string + display_name: + description: Display name of participant when joining the session. + type: string + duration: + description: number of minutes for which the participant was in the session. + type: number + id: + description: Participant ID. This maps to the corresponding peerId. + type: string + joined_at: + description: timestamp at which participant joined the session. + type: string + left_at: + description: timestamp at which participant left the session. + type: string + preset_name: + description: Name of the preset associated with the participant. + type: string + updated_at: + description: timestamp when this participant's data was last updated. + type: string + readOnly: true + user_id: + description: User id for this participant. + type: string + peer_stats: + properties: + config: + type: string + device_info: + properties: + browser: + type: string + browser_version: + type: string + cpus: + type: number + engine: + type: string + is_mobile: + type: boolean + memory: + type: number + os: + type: string + os_version: + type: string + sdk_name: + type: string + sdk_version: + type: string + user_agent: + type: string + webgl_support: + type: string + type: object + events: + items: + properties: + timestamp: + type: string + type: + type: string + type: object + type: array + ip_information: + properties: + city: + type: string + country: + type: string + ip_location: + type: string + ipv4: + type: string + org: + type: string + portal: + type: string + region: + type: string + timezone: + type: string + type: object + precall_network_information: + properties: + backend_rtt: + type: number + effective_networktype: + type: string + fractional_loss: + type: number + jitter: + type: number + reflexive_connectivity: + type: boolean + relay_connectivity: + type: boolean + rtt: + type: number + throughtput: + type: number + turn_connectivity: + type: boolean + type: object + status: + type: string + type: object + quality_stats: + items: + properties: + audio_bandwidth: + type: number + audio_packet_loss: + type: number + audio_stats: + items: + properties: + concealment_events: + type: number + jitter: + type: number + packets_lost: + type: number + quality: + type: number + timestamp: + type: string + type: object + type: array + average_quality: + type: number + end: + type: string + peer_id: + type: string + start: + type: string + video_bandwidth: + type: number + video_packet_loss: + type: number + video_stats: + items: + properties: + frame_height: + type: number + frame_width: + type: number + frames_dropped: + type: number + frames_per_second: + type: number + jitter: + type: number + packets_lost: + type: number + quality: + type: number + timestamp: + type: string + type: object + type: array + type: object + type: array + type: object + type: object + success: + type: boolean + type: object + description: Returns details of a participant along with callstats data. + security: + - api_token: [] + summary: Fetch details of a participant + tags: + - Sessions + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - sessions + method: get_session_participant_details + /accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/summary: + get: + description: Returns a Summary URL to download the Summary of Transcripts for the session ID as plain text. + operationId: GetSessionSummary + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - name: session_id + in: path + required: true + description: The session ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + data: + $ref: '#/components/schemas/realtimekitTranscriptSummary' + success: + type: boolean + type: object + description: Returns a complete summary of transcripts of a session. + security: + - api_token: [] + summary: Fetch summary of transcripts for a session + tags: + - Sessions + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - sessions + method: get_session_summary + post: + description: Trigger Summary generation of Transcripts for the session ID. + operationId: post-sessions-session_id-summary + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - name: session_id + in: path + required: true + description: The session ID. + schema: + type: string + responses: + 2XX: + content: + application/json: + schema: + properties: + data: + properties: + message: + type: string + success: + type: boolean + type: object + success: + type: boolean + type: object + description: Success + security: + - api_token: [] + summary: Generate summary of Transcripts for the session + tags: + - Sessions + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - sessions + method: generate_summary_of_transcripts + /accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/transcript: + get: + description: Returns a URL to download the transcript for the session ID in CSV format. + operationId: GetSessionTranscript + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - name: session_id + in: path + required: true + description: The session ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + data: + $ref: '#/components/schemas/realtimekitTranscript' + success: + type: boolean + type: object + description: Returns the complete transcript of a session. + security: + - api_token: [] + summary: Fetch the complete transcript for a session + tags: + - Sessions + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - sessions + method: get_session_transcripts + /accounts/{account_id}/realtime/kit/{app_id}/webhooks: + get: + description: Returns details of all webhooks for an App. + operationId: getAllWebhooks + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/realtimekitWebhooksListSuccessResponse' + description: Operation successful + '401': + content: + application/json: {} + description: Invalid credentials + security: + - api_token: [] + summary: Fetch all webhooks details + tags: + - Webhooks + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - webhooks + method: get_webhooks + post: + description: Adds a new webhook to an App. + operationId: addWebhook + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/realtimekitWebhookRequest' + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/realtimekitWebhookSuccessResponse' + description: Webhook registered successfully + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/realtimekitErrorResponse' + description: Error - malformed request + '401': + content: + application/json: {} + description: Invalid credentials + security: + - api_token: [] + summary: Add a webhook + tags: + - Webhooks + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - webhooks + method: create_webhook + /accounts/{account_id}/realtime/kit/{app_id}/webhooks/{webhook_id}: + delete: + description: Removes a webhook for the given webhook ID. + operationId: deleteWebhook + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - description: ID of the webhook + in: path + name: webhook_id + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/realtimekitWebhookSuccessResponse' + description: Operation successful + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/realtimekitErrorResponse' + description: Error - malformed request + '401': + content: + application/json: {} + description: Invalid credentials + security: + - api_token: [] + summary: Delete a webhook + tags: + - Webhooks + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - webhooks + method: delete_webhook + get: + description: Returns webhook details for the given webhook ID. + operationId: getWebhook + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - description: ID of the webhook + in: path + name: webhook_id + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/realtimekitWebhookSuccessResponse' + description: Operation successful + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/realtimekitErrorResponse' + description: Error - malformed request + '401': + content: + application/json: {} + description: Invalid credentials + security: + - api_token: [] + summary: Fetch details of a webhook + tags: + - Webhooks + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - webhooks + method: get_webhook_by_id + patch: + description: Edits the webhook details for the given webhook ID. + operationId: editWebhook + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - description: ID of the webhook + in: path + name: webhook_id + schema: + type: string + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/realtimekitPatchWebhookRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/realtimekitWebhookSuccessResponse' + description: Operation successful + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/realtimekitErrorResponse' + description: Error - malformed request + '401': + content: + application/json: {} + description: Invalid credentials + security: + - api_token: [] + summary: Edit a webhook + tags: + - Webhooks + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - webhooks + method: edit_webhook + put: + description: Replace all details for the given webhook ID. + operationId: replaceWebhook + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - description: ID of the webhook + in: path + name: webhook_id + schema: + type: string + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/realtimekitWebhookRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/realtimekitWebhookSuccessResponse' + description: Operation successful + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/realtimekitErrorResponse' + description: Error - malformed request + '401': + content: + application/json: {} + description: Invalid credentials + security: + - api_token: [] + summary: Replace a webhook + tags: + - Webhooks + x-api-token-group: + - Realtime Admin + - Realtime + x-stackql-sdk: + service: realtime_kit + resource_chain: + - webhooks + method: replace_webhook +components: + schemas: + moqApiResponseError: + properties: + errors: + example: + - code: 21007 + message: A MoQ relay with this ID was not found. + items: + properties: + code: + description: "Error codes: - 21001: Request body too large (HTTP 413) - 21002: Request body too small / missing name (HTTP 400) - 21003: Relay ID should be 32 hex characters (HTTP 400) - 21004: Failed to decode body \u2014 invalid JSON (HTTP 400) - 21005: Failed to read body (HTTP 400) - 21006: Unexpected server error (HTTP 500) - 21007: Relay not found (HTTP 404) - 21008: Relay limit exceeded for this account (HTTP 409) - 21009: origin_fallback and lingering_subscribe are mutually exclusive (HTTP 400) - 21010: Invalid token type \u2014 must be \"publish_subscribe\" or \"subscribe\" (HTTP 400) - 21011: Invalid relay name \u2014 name must not be empty (HTTP 400)" + type: integer + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: object + type: array + result: + nullable: true + type: object + success: + example: false + type: boolean + required: + - success + - errors + - messages + type: object + moqLingeringSubscribeConfig: + properties: + enabled: + default: true + type: boolean + max_timeout_ms: + default: 30000 + description: Relay-level ceiling on lingering subscribe timeout (ms). Default 30000. + maximum: 300000 + minimum: 0 + type: integer + type: object + moqOriginFallbackConfig: + properties: + enabled: + default: false + type: boolean + urls: + default: [] + description: Ordered list of upstream origin relay URLs. + items: + type: string + type: array + type: object + moqRelay: + description: Full relay details (no tokens). + properties: + config: + $ref: '#/components/schemas/moqRelayConfig' + created: + format: date-time + type: string + modified: + format: date-time + type: string + name: + example: Production Live Stream + type: string + status: + description: '"connected" when active, omitted otherwise.' + enum: + - connected + type: string + uid: + example: a1b2c3d4e5f67890a1b2c3d4e5f67890 + type: string + required: + - uid + - created + - modified + - name + - config + type: object + moqRelayConfig: + description: origin_fallback and lingering_subscribe are mutually exclusive. + properties: + lingering_subscribe: + $ref: '#/components/schemas/moqLingeringSubscribeConfig' + origin_fallback: + $ref: '#/components/schemas/moqOriginFallbackConfig' + type: object + moqRelayCreateResponse: + description: Relay with auto-generated tokens (shown once). + properties: + config: + $ref: '#/components/schemas/moqRelayConfig' + created: + format: date-time + type: string + modified: + format: date-time + type: string + name: + example: Production Live Stream + type: string + token_publish_subscribe: + description: Full access token (publish + subscribe). Treat as sensitive. + example: eyJhbGciOiJFZDI1NTE5... + type: string + token_subscribe: + description: Subscribe-only token. Treat as sensitive. + example: eyJhbGciOiJFZDI1NTE5... + type: string + uid: + description: Server-generated unique identifier (32 hex chars). + example: a1b2c3d4e5f67890a1b2c3d4e5f67890 + type: string + required: + - uid + - created + - modified + - name + - token_publish_subscribe + - token_subscribe + - config + type: object + moqRelayListItem: + description: Abbreviated relay for list responses. + properties: + created: + format: date-time + type: string + modified: + format: date-time + type: string + name: + type: string + uid: + example: a1b2c3d4e5f67890a1b2c3d4e5f67890 + type: string + required: + - uid + - created + - modified + - name + type: object + moqResultInfo: + properties: + count: + type: integer + total: + type: integer + type: object + moqRotateTokenResponse: + properties: + token: + description: New token value (shown once). Treat as sensitive. + example: eyJhbGciOiJFZDI1NTE5... + type: string + type: + enum: + - publish_subscribe + - subscribe + type: string + required: + - type + - token + type: object + realtimekitAIConfig: + description: The AI Config allows you to customize the behavior of meeting transcriptions and summaries + properties: + summarization: + $ref: '#/components/schemas/realtimekitSummarizationConfig' + transcription: + $ref: '#/components/schemas/realtimekitTranscriptionConfig' + title: AIConfig + type: object + realtimekitActiveSession: + properties: + associated_id: + description: ID of the meeting this session is associated with. In the case of V2 meetings, it is always a UUID. In V1 meetings, it is a room name of the form `abcdef-ghijkl` + type: string + breakout_rooms: + items: + $ref: '#/components/schemas/realtimekitActiveSession' + readOnly: true + type: array + created_at: + description: timestamp when session created + type: string + readOnly: true + ended_at: + description: timestamp when session ended + type: string + id: + description: ID of the session + readOnly: true + type: string + live_participants: + description: number of participants currently in the session + type: number + max_concurrent_participants: + description: number of maximum participants that were in the session + type: number + meeting_display_name: + description: Title of the meeting this session belongs to + type: string + meta: + description: Any meta data about session. + type: object + minutes_consumed: + description: number of minutes consumed since the session started + type: number + organization_id: + description: App id that hosted this session + type: string + started_at: + description: timestamp when session started + type: string + status: + description: current status of session + enum: + - LIVE + - ENDED + type: string + type: + description: type of session + enum: + - meeting + - livestream + - participant + type: string + updated_at: + description: timestamp when session was last updated + type: string + readOnly: true + required: + - id + - associated_id + - meeting_display_name + - type + - status + - live_participants + - max_concurrent_participants + - minutes_consumed + - organization_id + - started_at + - created_at + - updated_at + type: object + realtimekitAudioConfig: + description: Object containing configuration regarding the audio that is being recorded. + properties: + channel: + default: stereo + description: Audio signal pathway within an audio file that carries a specific sound source. + enum: + - mono + - stereo + type: string + codec: + default: AAC + description: Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. + enum: + - MP3 + - AAC + type: string + export_file: + default: true + description: Controls whether to export audio file seperately + type: boolean + title: AudioConfig + type: object + realtimekitChatMessage: + properties: + chat_download_url: + description: URL where the chat logs can be downloaded + type: string + chat_download_url_expiry: + description: Time when the download URL will expire + type: string + required: + - chat_download_url + - chat_download_url_expiry + type: object + realtimekitErrorResponse: + properties: + error: + description: Object containing details of the error that occurred + properties: + code: + description: Error code + example: 404 + type: number + message: + description: Error message + example: 'Error: resource not found' + type: string + required: + - code + - message + type: object + success: + description: Whether the operation succeeded or not + example: false + type: boolean + required: + - success + - error + type: object + realtimekitGenericErrorResponse: + properties: + error: + properties: + code: + description: HTTP status code of the error. + type: number + message: + description: Error message describing what went wrong. + type: string + required: + - code + - message + type: object + success: + default: false + description: Success status of the request. + type: boolean + required: + - success + - error + type: object + realtimekitInteractiveConfig: + description: Allows you to add timed metadata to your recordings, which are digital markers inserted into a video file to provide contextual information at specific points in the content range. The ID3 tags containing this information are available to clients on the playback timeline in HLS format. The output files are generated in a compressed .tar format. + properties: + type: + description: The metadata is presented in the form of ID3 tags. + enum: + - ID3 + type: string + title: InteractiveConfig + type: object + realtimekitLivestreamingConfig: + properties: + rtmp_url: + description: RTMP URL to stream to + example: rtmp://a.rtmp.youtube.com/live2 + format: uri + type: string + title: LivestreamingConfig + type: object + realtimekitMeeting: + properties: + created_at: + description: Timestamp the object was created at. The time is returned in ISO format. + format: date-time + readOnly: true + type: string + id: + description: ID of the meeting. + format: uuid + readOnly: true + type: string + live_stream_on_start: + description: Specifies if the meeting should start getting livestreamed on start. + type: boolean + persist_chat: + description: Specifies if Chat within a meeting should persist for a week. + type: boolean + record_on_start: + description: Specifies if the meeting should start getting recorded as soon as someone joins the meeting. + type: boolean + session_keep_alive_time_in_secs: + default: 60 + description: Time in seconds, for which a session remains active, after the last participant has left the meeting. + maximum: 600 + minimum: 60 + type: number + status: + description: Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. + enum: + - ACTIVE + - INACTIVE + type: string + summarize_on_end: + description: Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. + type: boolean + title: + description: Title of the meeting. + type: string + updated_at: + description: Timestamp the object was updated at. The time is returned in ISO format. + format: date-time + readOnly: true + type: string + required: + - id + - created_at + - updated_at + type: object + realtimekitParticipant: + description: Represents a participant. + properties: + created_at: + description: When this object was created. The time is returned in ISO format. + format: date-time + type: string + readOnly: true + custom_participant_id: + description: A unique participant ID generated by the client. + type: string + id: + description: ID of the participant. + format: uuid + type: string + name: + description: Name of the participant. + nullable: true + type: string + picture: + description: URL to a picture of the participant. + format: uri + nullable: true + type: string + preset_name: + description: Preset applied to the participant. + type: string + updated_at: + description: When this object was updated. The time is returned in ISO format. + format: date-time + type: string + readOnly: true + required: + - id + - custom_participant_id + - preset_name + - created_at + - updated_at + title: Participant + type: object + realtimekitParticipantsList: + properties: + created_at: + description: timestamp when this participant was created. + type: string + readOnly: true + custom_participant_id: + description: ID passed by client to create this participant. + type: string + display_name: + description: Display name of participant when joining the session. + type: string + duration: + description: number of minutes for which the participant was in the session. + type: number + id: + description: Participant ID. This maps to the corresponding peerId. + type: string + joined_at: + description: timestamp at which participant joined the session. + type: string + left_at: + description: timestamp at which participant left the session. + type: string + preset_name: + description: Name of the preset associated with the participant. + type: string + updated_at: + description: timestamp when this participant's data was last updated. + type: string + readOnly: true + user_id: + description: User id for this participant. + type: string + type: object + realtimekitPatchWebhookRequest: + properties: + enabled: + default: true + type: boolean + events: + description: Events that the webhook will get triggered by + items: + enum: + - meeting.started + - meeting.ended + - meeting.participantJoined + - meeting.participantLeft + - recording.statusUpdate + - livestreaming.statusUpdate + - meeting.chatSynced + - meeting.transcript + - meeting.summary + type: string + type: array + name: + description: Name of the webhook + type: string + url: + description: URL the webhook will send events to + example: https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e + format: uri + type: string + type: object + realtimekitPoll: + properties: + anonymous: + type: boolean + created_by: + type: string + hide_votes: + type: boolean + id: + description: ID of the poll + readOnly: true + type: string + options: + description: Answer options + items: + properties: + count: + type: number + text: + description: Text of the answer option + type: string + votes: + items: + properties: + id: + type: string + name: + type: string + required: + - id + - name + type: object + type: array + required: + - text + - count + - votes + type: object + type: array + question: + description: Question asked by the poll + type: string + voted: + items: + type: string + type: array + required: + - id + - question + - options + type: object + realtimekitPreset: + properties: + config: + properties: + max_screenshare_count: + description: Maximum number of screen shares that can be active at a given time + type: integer + max_video_streams: + description: Maximum number of streams that are visible on a device + properties: + desktop: + description: Maximum number of video streams visible on desktop devices + type: integer + mobile: + description: Maximum number of streams visible on mobile devices + type: integer + required: + - mobile + - desktop + type: object + media: + description: 'Media configuration options. eg: Video quality' + properties: + audio: + description: Control options for Audio quality. + properties: + enable_high_bitrate: + default: false + description: Enable High Quality Audio for your meetings + type: boolean + enable_stereo: + default: false + description: Enable Stereo for your meetings + type: boolean + type: object + screenshare: + description: Configuration options for participant screen shares + properties: + frame_rate: + description: Frame rate of screen share + type: integer + quality: + description: Quality of screen share + enum: + - hd + - vga + - qvga + type: string + required: + - quality + - frame_rate + type: object + video: + description: Configuration options for participant videos + properties: + frame_rate: + description: Frame rate of participants' video + maximum: 30 + type: integer + quality: + description: Video quality of participants + enum: + - hd + - vga + - qvga + type: string + required: + - quality + - frame_rate + type: object + required: + - video + - screenshare + type: object + view_type: + description: Type of the meeting + enum: + - GROUP_CALL + - WEBINAR + - AUDIO_ROOM + type: string + required: + - view_type + - max_video_streams + - max_screenshare_count + - media + type: object + name: + description: Name of the preset + type: string + permissions: + properties: + accept_waiting_requests: + description: Whether this participant can accept waiting requests + type: boolean + can_accept_production_requests: + type: boolean + can_change_participant_permissions: + type: boolean + can_edit_display_name: + type: boolean + can_livestream: + type: boolean + can_record: + type: boolean + can_spotlight: + type: boolean + chat: + description: Chat permissions + properties: + private: + properties: + can_receive: + type: boolean + can_send: + type: boolean + files: + type: boolean + text: + type: boolean + required: + - can_send + - can_receive + - text + - files + type: object + public: + properties: + can_send: + description: Can send messages in general + type: boolean + files: + description: Can send file messages + type: boolean + text: + description: Can send text messages + type: boolean + required: + - can_send + - text + - files + type: object + required: + - public + - private + type: object + connected_meetings: + properties: + can_alter_connected_meetings: + type: boolean + can_switch_connected_meetings: + type: boolean + can_switch_to_parent_meeting: + type: boolean + required: + - can_alter_connected_meetings + - can_switch_connected_meetings + - can_switch_to_parent_meeting + type: object + disable_participant_audio: + type: boolean + disable_participant_screensharing: + type: boolean + disable_participant_video: + type: boolean + hidden_participant: + description: Whether this participant is visible to others or not + type: boolean + is_recorder: + default: false + type: boolean + kick_participant: + type: boolean + media: + description: Media permissions + properties: + audio: + description: Audio permissions + properties: + can_produce: + description: Can produce audio + enum: + - ALLOWED + - NOT_ALLOWED + - CAN_REQUEST + type: string + required: + - can_produce + type: object + screenshare: + description: Screenshare permissions + properties: + can_produce: + description: Can produce screen share video + enum: + - ALLOWED + - NOT_ALLOWED + - CAN_REQUEST + type: string + required: + - can_produce + type: object + video: + description: Video permissions + properties: + can_produce: + description: Can produce video + enum: + - ALLOWED + - NOT_ALLOWED + - CAN_REQUEST + type: string + required: + - can_produce + type: object + required: + - video + - audio + - screenshare + type: object + pin_participant: + type: boolean + plugins: + description: Plugin permissions + properties: + can_close: + description: Can close plugins that are already open + type: boolean + can_edit_config: + description: Can edit plugin config + type: boolean + can_start: + description: Can start plugins + type: boolean + config: + type: string + format: uuid + properties: + access_control: + enum: + - FULL_ACCESS + - VIEW_ONLY + type: string + handles_view_only: + type: boolean + required: + - handles_view_only + - access_control + required: + - can_close + - can_start + - can_edit_config + - config + type: object + polls: + description: Poll permissions + properties: + can_create: + description: Can create polls + type: boolean + can_view: + description: Can view polls + type: boolean + can_vote: + description: Can vote on polls + type: boolean + required: + - can_create + - can_vote + - can_view + type: object + recorder_type: + default: NONE + description: Type of the recording peer + enum: + - RECORDER + - LIVESTREAMER + - NONE + type: string + show_participant_list: + type: boolean + waiting_room_type: + description: Waiting room type + enum: + - SKIP + - ON_PRIVILEGED_USER_ENTRY + - SKIP_ON_ACCEPT + type: string + required: + - accept_waiting_requests + - can_accept_production_requests + - can_edit_display_name + - can_spotlight + - recorder_type + - disable_participant_audio + - disable_participant_screensharing + - disable_participant_video + - kick_participant + - pin_participant + - can_record + - can_livestream + - waiting_room_type + - plugins + - connected_meetings + - polls + - media + - chat + - hidden_participant + - show_participant_list + - can_change_participant_permissions + type: object + ui: + properties: + config_diff: + type: object + design_tokens: + properties: + border_radius: + enum: + - rounded + type: string + border_width: + enum: + - thin + type: string + colors: + properties: + background: + properties: + '600': + default: '#222222' + type: string + '700': + default: '#1f1f1f' + type: string + '800': + default: '#1b1b1b' + type: string + '900': + default: '#181818' + type: string + '1000': + default: '#141414' + type: string + required: + - '600' + - '700' + - '800' + - '900' + - '1000' + type: object + brand: + properties: + '300': + default: '#844d1c' + type: string + '400': + default: '#9d5b22' + type: string + '500': + default: '#b56927' + type: string + '600': + default: '#d37c30' + type: string + '700': + default: '#d9904f' + type: string + required: + - '300' + - '400' + - '500' + - '600' + - '700' + type: object + danger: + default: '#FF2D2D' + type: string + success: + default: '#62A504' + type: string + text: + default: '#EEEEEE' + type: string + text_on_brand: + default: '#EEEEEE' + type: string + video_bg: + default: '#191919' + type: string + warning: + default: '#FFCD07' + type: string + required: + - brand + - background + - danger + - text + - text_on_brand + - success + - video_bg + - warning + type: object + logo: + type: string + spacing_base: + default: 4 + type: number + theme: + enum: + - dark + type: string + required: + - border_radius + - border_width + - spacing_base + - theme + - colors + - logo + type: object + required: + - design_tokens + type: object + required: + - name + - config + - ui + title: Preset + type: object + realtimekitPresetListItem: + description: Returned by Get All Presets route + properties: + created_at: + description: Timestamp this preset was created at + format: date-time + type: string + readOnly: true + id: + description: ID of the preset + format: uuid + type: string + name: + description: Name of the preset + type: string + updated_at: + description: Timestamp this preset was last updated + format: date-time + type: string + readOnly: true + title: PresetListItem + type: object + realtimekitRealtimekitBucketConfig: + properties: + enabled: + description: Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. + type: boolean + required: + - enabled + title: realtimekitBucketConfig + type: object + realtimekitRecording: + properties: + audio_download_url: + description: If the audio_config is passed, the URL for downloading the audio recording is returned. + format: uri + nullable: true + readOnly: true + type: string + download_url: + description: URL where the recording can be downloaded. + format: uri + nullable: true + readOnly: true + type: string + download_url_expiry: + description: Timestamp when the download URL expires. + format: date-time + nullable: true + readOnly: true + type: string + file_size: + description: File size of the recording, in bytes. + nullable: true + readOnly: true + type: number + id: + description: ID of the recording + format: uuid + readOnly: true + type: string + invoked_time: + description: Timestamp when this recording was invoked. + format: date-time + type: string + output_file_name: + description: File name of the recording. + type: string + recording_duration: + description: Total recording time in seconds. + type: integer + session_id: + description: ID of the meeting session this recording is for. + format: uuid + nullable: true + readOnly: true + type: string + started_time: + description: Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. + format: date-time + nullable: true + type: string + status: + description: Current status of the recording. + enum: + - INVOKED + - RECORDING + - UPLOADING + - UPLOADED + - ERRORED + - PAUSED + type: string + stopped_time: + description: Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. + format: date-time + nullable: true + type: string + required: + - id + - download_url + - download_url_expiry + - audio_download_url + - file_size + - session_id + - output_file_name + - status + - invoked_time + - started_time + - stopped_time + title: Recording + type: object + realtimekitRecordingConfig: + description: Recording Configurations to be used for this meeting. This level of configs takes higher preference over App level configs on the RealtimeKit developer portal. + properties: + audio_config: + $ref: '#/components/schemas/realtimekitAudioConfig' + file_name_prefix: + description: Adds a prefix to the beginning of the file name of the recording. + type: string + live_streaming_config: + $ref: '#/components/schemas/realtimekitLivestreamingConfig' + max_seconds: + description: Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. + maximum: 86400 + minimum: 60 + type: number + realtimekit_bucket_config: + $ref: '#/components/schemas/realtimekitRealtimekitBucketConfig' + storage_config: + $ref: '#/components/schemas/realtimekitStorageConfig' + video_config: + $ref: '#/components/schemas/realtimekitVideoConfig' + title: RecordingConfig + type: object + realtimekitSessionParticipant: + properties: + created_at: + type: string + readOnly: true + email: + description: Email of the session participant. + type: string + id: + description: ID of the session participant + type: string + name: + description: Name of the session participant. + type: string + picture: + description: A URL pointing to a picture of the participant. + type: string + updated_at: + type: string + readOnly: true + required: + - id + - created_at + - updated_at + title: SessionParticipant + type: object + realtimekitStartReason: + properties: + caller: + properties: + name: + description: Name of the user who started the recording. + example: RealtimeKit_test + type: string + type: + description: The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. + enum: + - ORGANIZATION + - USER + type: string + user_Id: + description: The user ID of the person who started the recording. + example: d61f6956-e68f-4375-bf10-c38a704d1bec + format: uuid + type: string + type: object + reason: + description: Specifies if the recording was started using the "Start a Recording"API or using the parameter RECORD_ON_START in the "Create a meeting" API. If the recording is initiated using the "RECORD_ON_START" parameter, the user details will not be populated. + enum: + - API_CALL + - RECORD_ON_START + type: string + title: startReason + type: object + realtimekitStopReason: + properties: + caller: + properties: + name: + description: Name of the user who stopped the recording. + example: RealtimeKit_test + type: string + type: + description: The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. + enum: + - ORGANIZATION + - USER + type: string + user_Id: + description: The user ID of the person who stopped the recording. + example: d61f6956-e68f-4375-bf10-c38a704d1bec + format: uuid + type: string + type: object + reason: + description: Specifies the reason why the recording stopped. + enum: + - API_CALL + - INTERNAL_ERROR + - ALL_PEERS_LEFT + type: string + title: stopReason + type: object + realtimekitStorageConfig: + nullable: true + properties: + access_key: + description: Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. + type: string + writeOnly: true + auth_method: + description: Authentication method used for "sftp" type storage medium + enum: + - KEY + - PASSWORD + type: string + bucket: + description: Name of the storage medium's bucket. + type: string + host: + description: SSH destination server host for SFTP type storage medium + type: string + password: + description: SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. + type: string + path: + description: Path relative to the bucket root at which the recording will be placed. + type: string + port: + description: SSH destination server port for SFTP type storage medium + type: number + private_key: + description: Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" + type: string + region: + description: Region of the storage medium. + example: us-east-1 + type: string + secret: + description: Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. + type: string + type: + description: Type of storage media. + enum: + - aws + - azure + - digitalocean + - gcs + - sftp + type: string + username: + description: SSH destination server username for SFTP type storage medium + type: string + required: + - type + title: StorageConfig + type: object + realtimekitSummarizationConfig: + description: Summary Config + properties: + summary_type: + default: general + description: Defines the style of the summary, such as general, team meeting, or sales call. + enum: + - general + - team_meeting + - sales_call + - client_check_in + - interview + - daily_standup + - one_on_one_meeting + - lecture + - code_review + type: string + text_format: + default: markdown + description: Determines the text format of the summary, such as plain text or markdown. + enum: + - plain_text + - markdown + type: string + word_limit: + default: 500 + description: Sets the maximum number of words in the meeting summary. + maximum: 1000 + minimum: 150 + type: integer + title: SummarizationConfig + type: object + realtimekitTranscript: + properties: + sessionId: + type: string + transcript_download_url: + description: URL where the transcript can be downloaded + type: string + transcript_download_url_expiry: + description: Time when the download URL will expire + type: string + required: + - sessionId + - transcript_download_url + - transcript_download_url_expiry + type: object + realtimekitTranscriptSummary: + properties: + sessionId: + type: string + summaryDownloadUrl: + description: URL where the summary of transcripts can be downloaded + type: string + summaryDownloadUrlExpiry: + description: Time of Expiry before when you need to download the csv file. + type: string + required: + - sessionId + - summaryDownloadUrl + - summaryDownloadUrlExpiry + title: TranscriptSummary + type: object + realtimekitTranscriptionConfig: + description: Transcription Configurations + properties: + keywords: + description: Adds specific terms to improve accurate detection during transcription. + items: + type: string + type: array + language: + default: en-US + description: Specifies the language code for transcription to ensure accurate results. + enum: + - en-US + - en-IN + - de + - hi + - sv + - ru + - pl + - el + - fr + - nl + type: string + profanity_filter: + default: false + description: Control the inclusion of offensive language in transcriptions. + type: boolean + title: TranscriptionConfig + type: object + realtimekitUpdatePreset: + properties: + config: + properties: + max_screenshare_count: + description: Maximum number of screen shares that can be active at a given time + type: integer + max_video_streams: + description: Maximum number of streams that are visible on a device + properties: + desktop: + description: Maximum number of video streams visible on desktop devices + type: integer + mobile: + description: Maximum number of streams visible on mobile devices + type: integer + type: object + media: + description: 'Media configuration options. eg: Video quality' + properties: + screenshare: + description: Configuration options for participant screen shares + properties: + frame_rate: + description: Frame rate of screen share + type: integer + quality: + description: Quality of screen share + enum: + - hd + - vga + - qvga + type: string + type: object + video: + description: Configuration options for participant videos + properties: + frame_rate: + description: Frame rate of participants' video + maximum: 30 + type: integer + quality: + description: Video quality of participants + enum: + - hd + - vga + - qvga + type: string + type: object + type: object + view_type: + description: Type of the meeting + enum: + - GROUP_CALL + - WEBINAR + - AUDIO_ROOM + type: string + type: object + name: + description: Name of the preset + type: string + permissions: + properties: + accept_waiting_requests: + description: Whether this participant can accept waiting requests + type: boolean + can_accept_production_requests: + type: boolean + can_change_participant_permissions: + type: boolean + can_edit_display_name: + type: boolean + can_livestream: + type: boolean + can_record: + type: boolean + can_spotlight: + type: boolean + chat: + description: Chat permissions + properties: + private: + properties: + can_receive: + type: boolean + can_send: + type: boolean + files: + type: boolean + text: + type: boolean + type: object + public: + properties: + can_send: + description: Can send messages in general + type: boolean + files: + description: Can send file messages + type: boolean + text: + description: Can send text messages + type: boolean + type: object + type: object + connected_meetings: + properties: + can_alter_connected_meetings: + type: boolean + can_switch_connected_meetings: + type: boolean + can_switch_to_parent_meeting: + type: boolean + type: object + disable_participant_audio: + type: boolean + disable_participant_screensharing: + type: boolean + disable_participant_video: + type: boolean + hidden_participant: + description: Whether this participant is visible to others or not + type: boolean + is_recorder: + default: false + type: boolean + kick_participant: + type: boolean + media: + description: Media permissions + properties: + audio: + description: Audio permissions + properties: + can_produce: + description: Can produce audio + enum: + - ALLOWED + - NOT_ALLOWED + - CAN_REQUEST + type: string + type: object + screenshare: + description: Screenshare permissions + properties: + can_produce: + description: Can produce screen share video + enum: + - ALLOWED + - NOT_ALLOWED + - CAN_REQUEST + type: string + type: object + video: + description: Video permissions + properties: + can_produce: + description: Can produce video + enum: + - ALLOWED + - NOT_ALLOWED + - CAN_REQUEST + type: string + type: object + type: object + pin_participant: + type: boolean + plugins: + description: Plugin permissions + properties: + can_close: + description: Can close plugins that are already open + type: boolean + can_edit_config: + description: Can edit plugin config + type: boolean + can_start: + description: Can start plugins + type: boolean + config: + type: string + format: uuid + properties: + access_control: + enum: + - FULL_ACCESS + - VIEW_ONLY + type: string + handles_view_only: + type: boolean + type: object + polls: + description: Poll permissions + properties: + can_create: + description: Can create polls + type: boolean + can_view: + description: Can view polls + type: boolean + can_vote: + description: Can vote on polls + type: boolean + type: object + recorder_type: + default: NONE + description: Type of the recording peer + enum: + - RECORDER + - LIVESTREAMER + - NONE + type: string + show_participant_list: + type: boolean + waiting_room_type: + description: Waiting room type + enum: + - SKIP + - ON_PRIVILEGED_USER_ENTRY + - SKIP_ON_ACCEPT + type: string + type: object + ui: + properties: + config_diff: + type: object + design_tokens: + properties: + border_radius: + enum: + - rounded + type: string + border_width: + enum: + - thin + type: string + colors: + properties: + background: + properties: + '600': + default: '#222222' + type: string + '700': + default: '#1f1f1f' + type: string + '800': + default: '#1b1b1b' + type: string + '900': + default: '#181818' + type: string + '1000': + default: '#141414' + type: string + type: object + brand: + properties: + '300': + default: '#844d1c' + type: string + '400': + default: '#9d5b22' + type: string + '500': + default: '#b56927' + type: string + '600': + default: '#d37c30' + type: string + '700': + default: '#d9904f' + type: string + type: object + danger: + default: '#FF2D2D' + type: string + success: + default: '#62A504' + type: string + text: + default: '#EEEEEE' + type: string + text_on_brand: + default: '#EEEEEE' + type: string + video_bg: + default: '#191919' + type: string + warning: + default: '#FFCD07' + type: string + type: object + logo: + type: string + spacing_base: + default: 4 + type: number + theme: + enum: + - dark + type: string + type: object + type: object + title: UpdatePreset + type: object + realtimekitVideoConfig: + properties: + codec: + default: H264 + description: Codec using which the recording will be encoded. + enum: + - H264 + - VP8 + type: string + export_file: + default: true + description: Controls whether to export video file seperately + type: boolean + height: + default: 720 + description: Height of the recording video in pixels + example: 720 + maximum: 1920 + minimum: 1 + type: integer + watermark: + description: Watermark to be added to the recording + properties: + position: + default: left top + description: Position of the watermark + enum: + - left top + - right top + - left bottom + - right bottom + type: string + size: + description: Size of the watermark + properties: + height: + description: Height of the watermark in px + minimum: 1 + type: integer + width: + description: Width of the watermark in px + minimum: 1 + type: integer + type: object + url: + description: URL of the watermark image + format: uri + type: string + type: object + width: + default: 1280 + description: Width of the recording video in pixels + example: 1280 + maximum: 1920 + minimum: 1 + type: integer + title: VideoConfig + type: object + realtimekitWebhook: + properties: + created_at: + description: Timestamp when this webhook was created + example: '2022-05-28T07:01:53.075Z' + format: date-time + type: string + readOnly: true + enabled: + description: Set to true if the webhook is active + type: boolean + events: + description: Events this webhook will send updates for + example: + - meeting.started + - meeting.ended + - meeting.participantJoined + - meeting.participantLeft + - meeting.chatSynced + - recording.statusUpdate + - livestreaming.statusUpdate + - meeting.transcript + - meeting.summary + items: + enum: + - meeting.started + - meeting.ended + - meeting.participantJoined + - meeting.participantLeft + - meeting.chatSynced + - recording.statusUpdate + - livestreaming.statusUpdate + - meeting.transcript + - meeting.summary + type: string + type: array + id: + description: ID of the webhook + example: 0d1f069d-43bb-489a-ad8c-7eb95592ba8e + format: uuid + readOnly: true + type: string + name: + description: Name of the webhook + example: All events webhook + type: string + updated_at: + description: Timestamp when this webhook was updated + example: '2022-05-28T07:01:53.075Z' + format: date-time + type: string + readOnly: true + url: + description: URL the webhook will send events to + example: https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e + format: uri + type: string + required: + - id + - name + - url + - events + - created_at + - updated_at + - enabled + type: object + realtimekitWebhookRequest: + properties: + enabled: + default: true + description: Set whether or not the webhook should be active when created + type: boolean + events: + description: Events that this webhook will get triggered by + example: + - meeting.started + - meeting.ended + - meeting.participantJoined + - meeting.participantLeft + - meeting.chatSynced + - recording.statusUpdate + - livestreaming.statusUpdate + - meeting.transcript + - meeting.summary + items: + enum: + - meeting.started + - meeting.ended + - meeting.participantJoined + - meeting.participantLeft + - meeting.chatSynced + - recording.statusUpdate + - livestreaming.statusUpdate + - meeting.transcript + - meeting.summary + type: string + type: array + name: + description: Name of the webhook + example: All events webhook + type: string + url: + description: URL this webhook will send events to + example: https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e + format: uri + type: string + required: + - name + - url + - events + type: object + realtimekitWebhookSuccessResponse: + properties: + data: + $ref: '#/components/schemas/realtimekitWebhook' + success: + example: true + type: boolean + required: + - success + - data + type: object + realtimekitWebhooksListSuccessResponse: + properties: + data: + items: + $ref: '#/components/schemas/realtimekitWebhook' + type: array + success: + example: true + type: boolean + required: + - success + - data + type: object + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + relays: + id: cloudflare.realtime_kit.relays + name: relays + title: Relays + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1moq~1relays/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + post_accounts_account_id_moq_relays: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1moq~1relays/post' + response: + mediaType: application/json + openAPIDocKey: '201' + delete_accounts_account_id_moq_relays_relay_id: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1moq~1relays~1{relay_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1moq~1relays~1{relay_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + put_accounts_account_id_moq_relays_relay_id: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1moq~1relays~1{relay_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .config }}{{ $sep }}"config": {{ if eq (kindOf .config) "string" }}{{ .config }}{{ else }}{{ toJson .config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + } + + ' + rotate: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1moq~1relays~1{relay_id}~1tokens~1rotate/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/relays/methods/get' + - $ref: '#/components/x-stackQL-resources/relays/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/relays/methods/post_accounts_account_id_moq_relays' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/relays/methods/delete_accounts_account_id_moq_relays_relay_id' + replace: + - $ref: '#/components/x-stackQL-resources/relays/methods/put_accounts_account_id_moq_relays_relay_id' + apps: + id: cloudflare.realtime_kit.apps + name: apps + title: Apps + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1apps/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + post: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1apps/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/apps/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/apps/methods/post' + update: [] + delete: [] + replace: [] + analytics: + id: cloudflare.realtime_kit.analytics + name: analytics + title: Analytics + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1analytics~1daywise/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/analytics/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + livestreams_overall: + id: cloudflare.realtime_kit.livestreams_overall + name: livestreams_overall + title: Livestreams Overall + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1analytics~1livestreams~1overall/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/livestreams_overall/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + kit_livestreams: + id: cloudflare.realtime_kit.kit_livestreams + name: kit_livestreams + title: Kit Livestreams + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1livestreams/get' + response: + mediaType: application/json + openAPIDocKey: '200' + get_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1livestreams~1{livestream_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/kit_livestreams/methods/get_by_account' + - $ref: '#/components/x-stackQL-resources/kit_livestreams/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + livestreams: + id: cloudflare.realtime_kit.livestreams + name: livestreams + title: Livestreams + methods: + create_independent_livestream: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1livestreams/post' + response: + mediaType: application/json + openAPIDocKey: '201' + stop_livestreaming_a_meeting: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1active-livestream~1stop/post' + response: + mediaType: application/json + openAPIDocKey: '200' + start_livestreaming_a_meeting: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1livestreams/post' + response: + mediaType: application/json + openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .video_config }}{{ $sep }}"video_config": {{ if eq (kindOf .video_config) "string" }}{{ .video_config }}{{ else }}{{ toJson .video_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/livestreams/methods/start_livestreaming_a_meeting' + - $ref: '#/components/x-stackQL-resources/livestreams/methods/create_independent_livestream' + update: [] + delete: [] + replace: [] + livestreams_sessions: + id: cloudflare.realtime_kit.livestreams_sessions + name: livestreams_sessions + title: Livestreams Sessions + methods: + get_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1livestreams~1sessions~1{livestream_session_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/livestreams_sessions/methods/get_by_account' + insert: [] + update: [] + delete: [] + replace: [] + livestreams_active_livestream_session: + id: cloudflare.realtime_kit.livestreams_active_livestream_session + name: livestreams_active_livestream_session + title: Livestreams Active Livestream Session + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1livestreams~1{livestream_id}~1active-livestream-session/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/livestreams_active_livestream_session/methods/list_by_account' + insert: [] + update: [] + delete: [] + replace: [] + kit_meetings: + id: cloudflare.realtime_kit.kit_meetings + name: kit_meetings + title: Kit Meetings + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + get_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/kit_meetings/methods/get_by_account' + - $ref: '#/components/x-stackQL-resources/kit_meetings/methods/list_by_account' + insert: [] + update: [] + delete: [] + replace: [] + meetings: + id: cloudflare.realtime_kit.meetings + name: meetings + title: Meetings + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings/post' + response: + mediaType: application/json + openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ai_config }}{{ $sep }}"ai_config": {{ if eq (kindOf .ai_config) "string" }}{{ .ai_config }}{{ else }}{{ toJson .ai_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .live_stream_on_start }}{{ $sep }}"live_stream_on_start": {{ toJson .live_stream_on_start }}{{- $sep = "," -}}{{ end }} + + {{- if .persist_chat }}{{ $sep }}"persist_chat": {{ toJson .persist_chat }}{{- $sep = "," -}}{{ end }} + + {{- if .record_on_start }}{{ $sep }}"record_on_start": {{ toJson .record_on_start }}{{- $sep = "," -}}{{ end }} + + {{- if .recording_config }}{{ $sep }}"recording_config": {{ if eq (kindOf .recording_config) "string" }}{{ .recording_config }}{{ else }}{{ toJson .recording_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .session_keep_alive_time_in_secs }}{{ $sep }}"session_keep_alive_time_in_secs": {{ toJson .session_keep_alive_time_in_secs }}{{- $sep = "," -}}{{ end }} + + {{- if .summarize_on_end }}{{ $sep }}"summarize_on_end": {{ toJson .summarize_on_end }}{{- $sep = "," -}}{{ end }} + + {{- if .title }}{{ $sep }}"title": {{ toJson .title }}{{- $sep = "," -}}{{ end }} + + } + + ' + update_meeting_by_id: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ai_config }}{{ $sep }}"ai_config": {{ if eq (kindOf .ai_config) "string" }}{{ .ai_config }}{{ else }}{{ toJson .ai_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .live_stream_on_start }}{{ $sep }}"live_stream_on_start": {{ toJson .live_stream_on_start }}{{- $sep = "," -}}{{ end }} + + {{- if .persist_chat }}{{ $sep }}"persist_chat": {{ toJson .persist_chat }}{{- $sep = "," -}}{{ end }} + + {{- if .record_on_start }}{{ $sep }}"record_on_start": {{ toJson .record_on_start }}{{- $sep = "," -}}{{ end }} + + {{- if .session_keep_alive_time_in_secs }}{{ $sep }}"session_keep_alive_time_in_secs": {{ toJson .session_keep_alive_time_in_secs }}{{- $sep = "," -}}{{ end }} + + {{- if .status }}{{ $sep }}"status": {{ toJson .status }}{{- $sep = "," -}}{{ end }} + + {{- if .summarize_on_end }}{{ $sep }}"summarize_on_end": {{ toJson .summarize_on_end }}{{- $sep = "," -}}{{ end }} + + {{- if .title }}{{ $sep }}"title": {{ toJson .title }}{{- $sep = "," -}}{{ end }} + + } + + ' + replace_meeting_by_id: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ai_config }}{{ $sep }}"ai_config": {{ if eq (kindOf .ai_config) "string" }}{{ .ai_config }}{{ else }}{{ toJson .ai_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .live_stream_on_start }}{{ $sep }}"live_stream_on_start": {{ toJson .live_stream_on_start }}{{- $sep = "," -}}{{ end }} + + {{- if .persist_chat }}{{ $sep }}"persist_chat": {{ toJson .persist_chat }}{{- $sep = "," -}}{{ end }} + + {{- if .record_on_start }}{{ $sep }}"record_on_start": {{ toJson .record_on_start }}{{- $sep = "," -}}{{ end }} + + {{- if .recording_config }}{{ $sep }}"recording_config": {{ if eq (kindOf .recording_config) "string" }}{{ .recording_config }}{{ else }}{{ toJson .recording_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .session_keep_alive_time_in_secs }}{{ $sep }}"session_keep_alive_time_in_secs": {{ toJson .session_keep_alive_time_in_secs }}{{- $sep = "," -}}{{ end }} + + {{- if .summarize_on_end }}{{ $sep }}"summarize_on_end": {{ toJson .summarize_on_end }}{{- $sep = "," -}}{{ end }} + + {{- if .title }}{{ $sep }}"title": {{ toJson .title }}{{- $sep = "," -}}{{ end }} + + } + + ' + add_participant: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1participants/post' + response: + mediaType: application/json + openAPIDocKey: '201' + delete_meeting_participant: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1participants~1{participant_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + edit_participant: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1participants~1{participant_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + refresh_participant_token: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1participants~1{participant_id}~1token/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/meetings/methods/refresh_participant_token' + - $ref: '#/components/x-stackQL-resources/meetings/methods/add_participant' + - $ref: '#/components/x-stackQL-resources/meetings/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/meetings/methods/edit_participant' + - $ref: '#/components/x-stackQL-resources/meetings/methods/update_meeting_by_id' + delete: + - $ref: '#/components/x-stackQL-resources/meetings/methods/delete_meeting_participant' + replace: + - $ref: '#/components/x-stackQL-resources/meetings/methods/replace_meeting_by_id' + livestreams_active_livestream: + id: cloudflare.realtime_kit.livestreams_active_livestream + name: livestreams_active_livestream + title: Livestreams Active Livestream + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1active-livestream/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/livestreams_active_livestream/methods/list_by_account' + insert: [] + update: [] + delete: [] + replace: [] + active_session: + id: cloudflare.realtime_kit.active_session + name: active_session + title: Active Session + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1active-session/get' + response: + mediaType: application/json + openAPIDocKey: '200' + kick: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1active-session~1kick/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .custom_participant_ids }}{{ $sep }}"custom_participant_ids": {{ if eq (kindOf .custom_participant_ids) "string" }}{{ .custom_participant_ids }}{{ else }}{{ toJson .custom_participant_ids }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .participant_ids }}{{ $sep }}"participant_ids": {{ if eq (kindOf .participant_ids) "string" }}{{ .participant_ids }}{{ else }}{{ toJson .participant_ids }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + kick_all: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1active-session~1kick-all/post' + response: + mediaType: application/json + openAPIDocKey: '200' + mute: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1active-session~1mute/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .custom_participant_ids }}{{ $sep }}"custom_participant_ids": {{ if eq (kindOf .custom_participant_ids) "string" }}{{ .custom_participant_ids }}{{ else }}{{ toJson .custom_participant_ids }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .participant_ids }}{{ $sep }}"participant_ids": {{ if eq (kindOf .participant_ids) "string" }}{{ .participant_ids }}{{ else }}{{ toJson .participant_ids }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + mute_all: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1active-session~1mute-all/post' + response: + mediaType: application/json + openAPIDocKey: '200' + create_poll: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1active-session~1poll/post' + response: + mediaType: application/json + openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .anonymous }}{{ $sep }}"anonymous": {{ toJson .anonymous }}{{- $sep = "," -}}{{ end }} + + {{- if .hide_votes }}{{ $sep }}"hide_votes": {{ toJson .hide_votes }}{{- $sep = "," -}}{{ end }} + + {{- if .options }}{{ $sep }}"options": {{ if eq (kindOf .options) "string" }}{{ .options }}{{ else }}{{ toJson .options }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .question }}{{ $sep }}"question": {{ toJson .question }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/active_session/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + livestream: + id: cloudflare.realtime_kit.livestream + name: livestream + title: Livestream + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1livestream/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/livestream/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + meetings_participants: + id: cloudflare.realtime_kit.meetings_participants + name: meetings_participants + title: Meetings Participants + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1participants/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + get_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1meetings~1{meeting_id}~1participants~1{participant_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/meetings_participants/methods/get_by_account' + - $ref: '#/components/x-stackQL-resources/meetings_participants/methods/list_by_account' + insert: [] + update: [] + delete: [] + replace: [] + presets: + id: cloudflare.realtime_kit.presets + name: presets + title: Presets + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1presets/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1presets/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .config }}{{ $sep }}"config": {{ if eq (kindOf .config) "string" }}{{ .config }}{{ else }}{{ toJson .config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .permissions }}{{ $sep }}"permissions": {{ if eq (kindOf .permissions) "string" }}{{ .permissions }}{{ else }}{{ toJson .permissions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ui }}{{ $sep }}"ui": {{ if eq (kindOf .ui) "string" }}{{ .ui }}{{ else }}{{ toJson .ui }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1presets~1{preset_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1presets~1{preset_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1presets~1{preset_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .config }}{{ $sep }}"config": {{ if eq (kindOf .config) "string" }}{{ .config }}{{ else }}{{ toJson .config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .permissions }}{{ $sep }}"permissions": {{ if eq (kindOf .permissions) "string" }}{{ .permissions }}{{ else }}{{ toJson .permissions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ui }}{{ $sep }}"ui": {{ if eq (kindOf .ui) "string" }}{{ .ui }}{{ else }}{{ toJson .ui }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/presets/methods/get' + - $ref: '#/components/x-stackQL-resources/presets/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/presets/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/presets/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/presets/methods/delete' + replace: [] + recordings: + id: cloudflare.realtime_kit.recordings + name: recordings + title: Recordings + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1recordings/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + create_track: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1recordings~1track/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .layers }}{{ $sep }}"layers": {{ if eq (kindOf .layers) "string" }}{{ .layers }}{{ else }}{{ toJson .layers }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .max_seconds }}{{ $sep }}"max_seconds": {{ toJson .max_seconds }}{{- $sep = "," -}}{{ end }} + + {{- if .meeting_id }}{{ $sep }}"meeting_id": {{ toJson .meeting_id }}{{- $sep = "," -}}{{ end }} + + } + + ' + pause_resume_stop_recording: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1recordings~1{recording_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/recordings/methods/list' + insert: [] + update: [] + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/recordings/methods/pause_resume_stop_recording' + kit_recordings: + id: cloudflare.realtime_kit.kit_recordings + name: kit_recordings + title: Kit Recordings + methods: + start_recordings: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1recordings/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allow_multiple_recordings }}{{ $sep }}"allow_multiple_recordings": {{ toJson .allow_multiple_recordings }}{{- $sep = "," -}}{{ end }} + + {{- if .audio_config }}{{ $sep }}"audio_config": {{ if eq (kindOf .audio_config) "string" }}{{ .audio_config }}{{ else }}{{ toJson .audio_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .file_name_prefix }}{{ $sep }}"file_name_prefix": {{ toJson .file_name_prefix }}{{- $sep = "," -}}{{ end }} + + {{- if .interactive_config }}{{ $sep }}"interactive_config": {{ if eq (kindOf .interactive_config) "string" }}{{ .interactive_config }}{{ else }}{{ toJson .interactive_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .max_seconds }}{{ $sep }}"max_seconds": {{ toJson .max_seconds }}{{- $sep = "," -}}{{ end }} + + {{- if .meeting_id }}{{ $sep }}"meeting_id": {{ toJson .meeting_id }}{{- $sep = "," -}}{{ end }} + + {{- if .realtimekit_bucket_config }}{{ $sep }}"realtimekit_bucket_config": {{ if eq (kindOf .realtimekit_bucket_config) "string" }}{{ .realtimekit_bucket_config }}{{ else }}{{ toJson .realtimekit_bucket_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .rtmp_out_config }}{{ $sep }}"rtmp_out_config": {{ if eq (kindOf .rtmp_out_config) "string" }}{{ .rtmp_out_config }}{{ else }}{{ toJson .rtmp_out_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .storage_config }}{{ $sep }}"storage_config": {{ if eq (kindOf .storage_config) "string" }}{{ .storage_config }}{{ else }}{{ toJson .storage_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .url }}{{ $sep }}"url": {{ toJson .url }}{{- $sep = "," -}}{{ end }} + + {{- if .video_config }}{{ $sep }}"video_config": {{ if eq (kindOf .video_config) "string" }}{{ .video_config }}{{ else }}{{ toJson .video_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + get_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1recordings~1{recording_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/kit_recordings/methods/get_by_account' + insert: + - $ref: '#/components/x-stackQL-resources/kit_recordings/methods/start_recordings' + update: [] + delete: [] + replace: [] + recordings_active_recording: + id: cloudflare.realtime_kit.recordings_active_recording + name: recordings_active_recording + title: Recordings Active Recording + methods: + get_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1recordings~1active-recording~1{meeting_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/recordings_active_recording/methods/get_by_account' + insert: [] + update: [] + delete: [] + replace: [] + sessions: + id: cloudflare.realtime_kit.sessions + name: sessions + title: Sessions + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1sessions/get' + response: + mediaType: application/json + openAPIDocKey: '200' + generate_summary_of_transcripts: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1sessions~1{session_id}~1summary/post' + response: + mediaType: application/json + openAPIDocKey: 2XX + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/sessions/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/sessions/methods/generate_summary_of_transcripts' + update: [] + delete: [] + replace: [] + sessions_peer_report: + id: cloudflare.realtime_kit.sessions_peer_report + name: sessions_peer_report + title: Sessions Peer Report + methods: + get_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1sessions~1peer-report~1{peer_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/sessions_peer_report/methods/get_by_account' + insert: [] + update: [] + delete: [] + replace: [] + kit_sessions: + id: cloudflare.realtime_kit.kit_sessions + name: kit_sessions + title: Kit Sessions + methods: + get_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1sessions~1{session_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/kit_sessions/methods/get_by_account' + insert: [] + update: [] + delete: [] + replace: [] + sessions_chat: + id: cloudflare.realtime_kit.sessions_chat + name: sessions_chat + title: Sessions Chat + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1sessions~1{session_id}~1chat/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/sessions_chat/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + livestream_sessions: + id: cloudflare.realtime_kit.livestream_sessions + name: livestream_sessions + title: Livestream Sessions + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1sessions~1{session_id}~1livestream-sessions/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/livestream_sessions/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + sessions_participants: + id: cloudflare.realtime_kit.sessions_participants + name: sessions_participants + title: Sessions Participants + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1sessions~1{session_id}~1participants/get' + response: + mediaType: application/json + openAPIDocKey: '200' + get_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1sessions~1{session_id}~1participants~1{participant_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/sessions_participants/methods/get_by_account' + - $ref: '#/components/x-stackQL-resources/sessions_participants/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + sessions_summary: + id: cloudflare.realtime_kit.sessions_summary + name: sessions_summary + title: Sessions Summary + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1sessions~1{session_id}~1summary/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/sessions_summary/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + sessions_transcript: + id: cloudflare.realtime_kit.sessions_transcript + name: sessions_transcript + title: Sessions Transcript + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1sessions~1{session_id}~1transcript/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/sessions_transcript/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + webhooks: + id: cloudflare.realtime_kit.webhooks + name: webhooks + title: Webhooks + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1webhooks/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + create_webhook: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1webhooks/post' + response: + mediaType: application/json + openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .events }}{{ $sep }}"events": {{ if eq (kindOf .events) "string" }}{{ .events }}{{ else }}{{ toJson .events }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .url }}{{ $sep }}"url": {{ toJson .url }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete_webhook: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1webhooks~1{webhook_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1webhooks~1{webhook_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + edit_webhook: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1webhooks~1{webhook_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .events }}{{ $sep }}"events": {{ if eq (kindOf .events) "string" }}{{ .events }}{{ else }}{{ toJson .events }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .url }}{{ $sep }}"url": {{ toJson .url }}{{- $sep = "," -}}{{ end }} + + } + + ' + replace_webhook: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1realtime~1kit~1{app_id}~1webhooks~1{webhook_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .events }}{{ $sep }}"events": {{ if eq (kindOf .events) "string" }}{{ .events }}{{ else }}{{ toJson .events }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .url }}{{ $sep }}"url": {{ toJson .url }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/webhooks/methods/get' + - $ref: '#/components/x-stackQL-resources/webhooks/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/webhooks/methods/create_webhook' + update: + - $ref: '#/components/x-stackQL-resources/webhooks/methods/edit_webhook' + delete: + - $ref: '#/components/x-stackQL-resources/webhooks/methods/delete_webhook' + replace: + - $ref: '#/components/x-stackQL-resources/webhooks/methods/replace_webhook' diff --git a/providers/src/cloudflare/v00.00.00000/services/registrar.yaml b/providers/src/cloudflare/v00.00.00000/services/registrar.yaml index 4c409983..66e7451c 100644 --- a/providers/src/cloudflare/v00.00.00000/services/registrar.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/registrar.yaml @@ -1,2152 +1,1748 @@ -openapi: 3.0.3 -info: - title: registrar API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/registrar/domain-check: - post: - description: >- - Performs real-time, authoritative availability checks directly against - domain registries. Use this endpoint to verify a domain is available - before attempting registration via `POST /registrations`. **Important:** - Unlike the Search endpoint, these results are authoritative and reflect - current registry status. Always check availability immediately before - registration as domain status can change rapidly. **Note:** This - endpoint uses POST to accept a list of domains in the request body. It - is a read-only operation — it does not create, modify, or reserve any - domains. **Extension support:** Only domains on extensions supported for - programmatic registration by this API can be registered. If you check a - domain on an unsupported extension, the response will include - `registrable: false` with a `reason` field explaining why: - - `extension_not_supported_via_api` — Cloudflare Registrar supports this - extension in the dashboard, but it is not yet available for programmatic - registration via this API. Register via - `https://dash.cloudflare.com/{account_id}/domains/registrations` - instead. - `extension_not_supported` — This extension is not supported - by Cloudflare Registrar. - `extension_disallows_registration` — The - extension's registry has temporarily or permanently frozen new - registrations. No registrar can register domains on this extension at - this time. - `domain_premium` — The domain is premium priced. Premium - registration is not currently supported by this API. - - `domain_unavailable` — The domain is already registered, reserved, or - otherwise not available for registration on a supported extension. The - `reason` field is only present when `registrable` is `false`. - **Behavior:** - Maximum 20 domains per request - Pricing is only - returned for domains where `registrable: true` - Results are not cached; - each request queries the registry **Workflow:** 1. Call this endpoint - with domains the user wants to register. 2. For each domain where - `registrable: true`, present pricing to the user. 3. If `tier: premium`, - note that premium registration is not currently supported by this API - and do not proceed to `POST /registrations`. 4. Proceed to `POST - /registrations` only for supported non-premium domains. - operationId: registrar-domain-discovery-check - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/registrarApiDomainCheckRequest' - description: >- - List of fully qualified domain names (FQDNs) to check. Each domain - must include the extension (e.g., "example.com", not "example"). - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/registrarApiDomainCheckResponse' - description: >- - Successfully returned availability results. Each requested domain - appears in the `domains` array with its current availability status - and pricing (if available). - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/registrarApiApiResponseCommonFailure' - description: >- - Invalid request parameters. Common causes: - Empty `domains` array - - Exceeds maximum of 20 domains per request - Malformed request body - - None of the provided domains are valid - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Check domain availability - tags: - - Domain Discovery - x-stackql-sdk: - service: registrar - resource_chain: [] - method: check - /accounts/{account_id}/registrar/domain-search: - get: - description: >- - Searches for domain name suggestions based on a keyword, phrase, or - partial domain name. Returns a list of potentially available domains - with pricing information. **Important:** Results are non-authoritative - and based on cached data. Always use the `/domain-check` endpoint to - verify real-time availability before attempting registration. - Suggestions are scoped to extensions supported for programmatic - registration via this API (`POST /registrations`). Domains on - unsupported extensions will not appear in results, even if they are - available at the registry level. **Use cases:** - Brand name discovery - (e.g., "acme corp" → acmecorp.com, acmecorp.dev) - Keyword-based - suggestions (e.g., "coffee shop" → coffeeshop.com, mycoffeeshop.net) - - Alternative extension discovery (e.g., "example.com" → example.com, - example.app, example.xyz) **Workflow:** 1. Call this endpoint with a - keyword or domain name. 2. Present suggestions to the user. 3. Call - `/domain-check` with the user's chosen domains to confirm real-time - availability and pricing. 4. Proceed to `POST /registrations` only for - supported non-premium domains where the Check response returns - `registrable: true`. **Note:** Searching with just a domain extension - (e.g., "com" or ".app") is not supported. Provide a keyword or domain - name. - operationId: registrar-domain-discovery-search - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: >- - The search term to find domain suggestions. Accepts keywords, - phrases, or full domain names. - Phrases: "coffee shop" returns - coffeeshop.com, mycoffeeshop.net, etc. - Domain names: "example.com" - returns example.com and variations across extensions - in: query - name: q - schema: - maxLength: 100 - minLength: 1 - type: string - - description: >- - Limits results to specific domain extensions from the supported set. - If not specified, returns results across all supported extensions. - Extensions not in the supported set are silently ignored. - explode: false - in: query - name: extensions - schema: - items: - type: string - maxItems: 20 - type: array - style: form - - description: >- - Maximum number of domain suggestions to return. Defaults to 20 if - not specified. - in: query - name: limit - schema: - default: 20 - maximum: 50 - minimum: 1 - type: integer - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/registrarApiDomainSearchResponse' - description: Successfully returned domain search results. - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/registrarApiApiResponseCommonFailure' - description: >- - Invalid request parameters. Common causes: - Missing required `q` - parameter - Query exceeds 100 character limit - Invalid extension - format - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Search for available domains - tags: - - Domain Discovery - x-stackql-sdk: - service: registrar - resource_chain: [] - method: search - /accounts/{account_id}/registrar/domains: - get: - deprecated: true - description: List domains handled by Registrar. - operationId: registrar-domains-list-domains - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/registrarApiDomainResponseCollection' - description: List domains response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/registrarApiMessages' - messages: - $ref: '#/components/schemas/registrarApiMessages' - result: - items: - $ref: '#/components/schemas/registrarApiDomains' - nullable: true - type: array - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/registrarApiResultInfo' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: List domains response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List domains - tags: - - Registrar Domains - x-api-token-group: null - x-stainless-deprecation-message: >- - This operation is deprecated and will be removed in a future release. A - replacement Registrar API will be announced separately. - x-stackql-sdk: - service: registrar - resource_chain: - - domains - method: list - /accounts/{account_id}/registrar/domains/{domain_name}: - get: - deprecated: true - description: Show individual domain. - operationId: registrar-domains-get-domain - parameters: - - in: path - name: domain_name - schema: - $ref: '#/components/schemas/registrarApiDomainName' - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/registrarApiDomainResponseSingle' - description: Get domain response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/registrarApiMessages' - messages: - $ref: '#/components/schemas/registrarApiMessages' - result: - nullable: true - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Get domain response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get domain - tags: - - Registrar Domains - x-api-token-group: null - x-stainless-deprecation-message: >- - This operation is deprecated and will be removed in a future release. A - replacement Registrar API will be announced separately. - x-stackql-sdk: - service: registrar - resource_chain: - - domains - method: get - put: - deprecated: true - description: Update individual domain. - operationId: registrar-domains-update-domain - parameters: - - in: path - name: domain_name - schema: - $ref: '#/components/schemas/registrarApiDomainName' - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/registrarApiDomainUpdateProperties' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/registrarApiDomainResponseSingle' - description: Update domain response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/registrarApiMessages' - messages: - $ref: '#/components/schemas/registrarApiMessages' - result: - nullable: true - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Update domain response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update domain - tags: - - Registrar Domains - x-api-token-group: null - x-stainless-deprecation-message: >- - This operation is deprecated and will be removed in a future release. A - replacement Registrar API will be announced separately. - x-stackql-sdk: - service: registrar - resource_chain: - - domains - method: update - /accounts/{account_id}/registrar/registrations: - get: - description: >- - Returns a paginated list of domain registrations owned by the account. - This endpoint uses cursor-based pagination. Results are ordered by - registration date by default. To fetch the next page, pass the `cursor` - value from the `result_info` object in the response as the `cursor` - query parameter in your next request. An empty `cursor` string indicates - there are no more pages. - operationId: registrar-domain-registration-list - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: >- - Opaque token from a previous response's `result_info.cursor`. Pass - this value to fetch the next page of results. Omit (or pass an empty - string) for the first page. - in: query - name: cursor - schema: - maxLength: 256 - type: string - - description: Number of items to return per page. - in: query - name: per_page - schema: - default: 20 - maximum: 50 - minimum: 1 - type: integer - - description: Sort direction for results. Defaults to ascending order. - in: query - name: direction - schema: - default: asc - enum: - - asc - - desc - type: string - - description: >- - Column to sort results by. Defaults to registration date - (`registry_created_at`) when omitted. - in: query - name: sort_by - schema: - default: registry_created_at - enum: - - registry_created_at - - registry_expires_at - - name - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/registrarApiRegistrationResponseCollection - description: List of registrations for the account. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/registrarApiApiResponseCommonFailure' - description: List registrations failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Registrations - tags: - - Registrar Registration - x-stackql-sdk: - service: registrar - resource_chain: - - registrations - method: list - post: - description: >- - Starts a domain registration workflow. This is a billable operation — - successful registration charges the account's default payment method. - All successful domain registrations are non-refundable — once the - workflow completes with `state: succeeded`, the charge cannot be - reversed. **Prerequisites:** - The account must have a billing profile - with a valid default payment method. Set this up at - `https://dash.cloudflare.com/{account_id}/billing/payment-info`. - The - account must not already be at the maximum supported domain limit. A - single account may own up to 100 domains in total across registrations - created through either the dashboard or this API. - The domain must be - on a supported extension for programmatic registration. - Use `POST - /domain-check` immediately before calling this endpoint to confirm - real-time availability and pricing. **Supported extensions:** In this - API, "extension" means the full registrable suffix after the domain - label. For example, in `example.co.uk`, the extension is `co.uk`. - Programmatic registration is currently supported for: `com`, `org`, - `net`, `app`, `dev`, `cc`, `xyz`, `info`, `cloud`, `studio`, `live`, - `link`, `pro`, `tech`, `fyi`, `shop`, `online`, `tools`, `run`, `games`, - `build`, `systems`, `world`, `news`, `site`, `network`, `chat`, `space`, - `family`, `page`, `life`, `group`, `email`, `solutions`, `day`, `blog`, - `ing`, `icu`, `academy`, `today` Cloudflare Registrar supports 400+ - extensions in the dashboard. Extensions not listed above can still be - registered at - `https://dash.cloudflare.com/{account_id}/domains/registrations`. - **Express mode:** The only required field is `domain_name`. If - `contacts` is omitted, the system uses the account's default address - book entry as the registrant. If no default exists and no contact is - provided, the request fails. Set up a default address book entry and - accept the required agreement at - `https://dash.cloudflare.com/{account_id}/domains/registrations`. - **Defaults:** - `years`: defaults to the extension's minimum - registration period (1 year for most extensions, but varies — for - example, `.ai` (if supported) requires a minimum of 2 years). - - `auto_renew`: defaults to `false`. Setting it to `true` is an explicit - opt-in authorizing Cloudflare to charge the account's default payment - method up to 30 days before domain expiry to renew the registration. - Renewal pricing may change over time based on registry pricing. - - `privacy_mode`: defaults to `redaction`. **Premium domains:** Premium - domain registration is not currently supported by this API. If `POST - /domain-check` returns `tier: premium`, do not call this endpoint for - that domain. **Response behavior:** By default, the server holds the - connection for a bounded, server-defined amount of time while the - registration completes. Most registrations finish within this window and - return `201 Created` with a completed workflow status. If the - registration is still processing after this synchronous wait window, the - server returns `202 Accepted`. Poll the URL in `links.self` to track - progress. To skip the wait and receive an immediate `202`, send `Prefer: - respond-async`. - operationId: registrar-domain-registration-create - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: >- - Set to `respond-async` to receive an immediate `202 Accepted` - without waiting for the operation to complete (RFC 7240). The header - may be combined with other preferences using standard - comma-separated syntax. - in: header - name: Prefer - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/registrarApiRegistrationCreateRequest' - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/registrarApiWorkflowStatusResponseSingle' - description: >- - Registration completed successfully within the synchronous wait - window. The workflow status will have `state: succeeded` and - `completed: true`. - headers: - Preference-Applied: - description: Echoed when the server honored a `Prefer` header. - schema: - type: string - '202': - content: - application/json: - schema: - $ref: '#/components/schemas/registrarApiWorkflowStatusResponseSingle' - description: >- - Registration is still processing. This occurs when the operation did - not complete within the synchronous wait window, or when `Prefer: - respond-async` was sent. Poll the URL in `links.self` to track - progress. - headers: - Location: - description: URL of the workflow status resource (same as `links.self`). - schema: - type: string - Preference-Applied: - description: Set to `respond-async` when the server honored the preference. - schema: - type: string - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/registrarApiApiResponseCommonFailure' - description: Create registration failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Registration - tags: - - Registrar Registration - x-stackql-sdk: - service: registrar - resource_chain: - - registrations - method: create - /accounts/{account_id}/registrar/registrations/{domain_name}: - get: - description: >- - Returns the current state of a domain registration. This is the - canonical read endpoint for a domain you own. It returns the full - registration resource including current settings and expiration. When - the registration resource is ready, both `created_at` and `expires_at` - are present in the response. - operationId: registrar-domain-registration-get - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Domain name to retrieve. - in: path - name: domain_name - schema: - $ref: '#/components/schemas/registrarApiDomainName' - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/registrarApiRegistrationResponseSingle' - description: Registration details. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/registrarApiApiResponseCommonFailure' - description: Get registration failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Registration - tags: - - Registrar Registration - x-stackql-sdk: - service: registrar - resource_chain: - - registrations - method: get - patch: - description: >- - Updates an existing domain registration. By default, the server holds - the connection for a bounded, server-defined amount of time while the - update completes. Most updates finish within this window and return `200 - OK` with a completed workflow status. If the update is still processing - after this synchronous wait window, the server returns `202 Accepted`. - Poll the URL in `links.self` to track progress. To skip the wait and - receive an immediate `202`, send `Prefer: respond-async`. This endpoint - currently supports updating `auto_renew` only. - operationId: registrar-domain-registration-update - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Domain name to update. - in: path - name: domain_name - schema: - $ref: '#/components/schemas/registrarApiDomainName' - required: true - - description: >- - Set to `respond-async` to receive an immediate `202 Accepted` - without waiting for the operation to complete (RFC 7240). - in: header - name: Prefer - schema: - enum: - - respond-async - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/registrarApiRegistrationUpdateRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/registrarApiWorkflowStatusResponseSingle' - description: >- - Update completed successfully within the synchronous wait window. - The workflow status will have `state: succeeded` and `completed: - true`. - headers: - Preference-Applied: - description: Echoed when the server honored a `Prefer` header. - schema: - type: string - '202': - content: - application/json: - schema: - $ref: '#/components/schemas/registrarApiWorkflowStatusResponseSingle' - description: >- - Update is still processing. This occurs when the operation did not - complete within the synchronous wait window, or when `Prefer: - respond-async` was sent. Poll the URL in `links.self` to track - progress. - headers: - Location: - description: URL of the workflow status resource (same as `links.self`). - schema: - type: string - Preference-Applied: - description: Set to `respond-async` when the server honored the preference. - schema: - type: string - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/registrarApiApiResponseCommonFailure' - description: Update registration failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Registration - tags: - - Registrar Registration - x-stackql-sdk: - service: registrar - resource_chain: - - registrations - method: edit - /accounts/{account_id}/registrar/registrations/{domain_name}/registration-status: - get: - description: >- - Returns the current status of a domain registration workflow. Use this - endpoint to poll for completion when the POST response returned `202 - Accepted`. The URL is provided in the `links.self` field of the workflow - status response. Poll this endpoint until the workflow reaches a - terminal state or a state that requires user attention. **Terminal - states:** `succeeded` and `failed` are terminal and always have - `completed: true`. **Non-terminal states:** - `action_required` has - `completed: false` and will not resolve on its own. The workflow is - paused pending user intervention. - `blocked` has `completed: false` and - indicates the workflow is waiting on a third party such as the extension - registry or losing registrar. Continue polling while informing the user - of the delay. Use increasing backoff between polls. When `state: - blocked`, use a longer polling interval and do not poll indefinitely. A - naive polling loop that only checks `completed` can run indefinitely - when `state: action_required`. Break explicitly on `action_required`: - ```js let status; do { await new Promise(r => setTimeout(r, 2000)); - status = await cloudflare.request({ method: 'GET', path: - reg.result.links.self, }); } while ( !status.result.completed && - status.result.state !== 'action_required' ); if (status.result.state === - 'action_required') { // Surface context.action and - context.confirmation_sent_to to the user. // Do not re-submit the - registration request. } ``` - operationId: registrar-domain-registration-get-status - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: domain_name - schema: - $ref: '#/components/schemas/registrarApiDomainName' - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/registrarApiWorkflowStatusResponseSingle' - description: Registration workflow status. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/registrarApiApiResponseCommonFailure' - description: Get status failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Registration Status - tags: - - Registrar Registration - x-stackql-sdk: - service: registrar - resource_chain: - - registration_status - method: get - /accounts/{account_id}/registrar/registrations/{domain_name}/update-status: - get: - description: >- - Returns the current status of a domain update workflow. Use this - endpoint to poll for completion when the PATCH response returned `202 - Accepted`. The URL is provided in the `links.self` field of the workflow - status response. Poll this endpoint until the workflow reaches a - terminal state or a state that requires user attention. Use increasing - backoff between polls. When the workflow remains blocked on a third - party, use a longer polling interval and do not poll indefinitely. - operationId: registrar-domain-registration-get-update-status - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: domain_name - schema: - $ref: '#/components/schemas/registrarApiDomainName' - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/registrarApiWorkflowStatusResponseSingle' - description: Update workflow status. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/registrarApiApiResponseCommonFailure' - description: Get update status failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Update Status - tags: - - Registrar Registration - x-stackql-sdk: - service: registrar - resource_chain: - - update_status - method: get -components: - schemas: - registrarApiAddress: - description: Address. - example: 123 Sesame St. - type: string - registrarApiAddress2: - description: Optional address line for unit, floor, suite, etc. - example: Suite 430 - type: string - registrarApiApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minItems: 1 - $ref: '#/components/schemas/registrarApiMessages' - messages: - example: [] - $ref: '#/components/schemas/registrarApiMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - registrarApiAutoRenew: - description: >- - Auto-renew controls whether subscription is automatically renewed upon - domain expiration. - example: true - type: boolean - x-auditable: true - registrarApiAvailable: - description: >- - Shows if a domain is available for transferring into Cloudflare - Registrar. - example: false - type: boolean - registrarApiCanRegister: - description: Indicates if the domain can be registered as a new domain. - example: false - type: boolean - registrarApiCity: - description: City. - example: Austin - type: string - registrarApiContactIdentifier: - description: Contact Identifier. - example: ea95132c15732412d22c1476fa83f27a - maxLength: 32 - readOnly: true - type: string - registrarApiContactProperties: - properties: - address: - $ref: '#/components/schemas/registrarApiAddress' - address2: - $ref: '#/components/schemas/registrarApiAddress2' - city: - $ref: '#/components/schemas/registrarApiCity' - country: - $ref: '#/components/schemas/registrarApiCountry' - email: - $ref: '#/components/schemas/registrarApiEmail' - fax: - $ref: '#/components/schemas/registrarApiFax' - first_name: - $ref: '#/components/schemas/registrarApiFirstName' - id: - $ref: '#/components/schemas/registrarApiContactIdentifier' - last_name: - $ref: '#/components/schemas/registrarApiLastName' - organization: - $ref: '#/components/schemas/registrarApiOrganization' - phone: - $ref: '#/components/schemas/registrarApiTelephone' - state: - $ref: '#/components/schemas/registrarApiState' - zip: - $ref: '#/components/schemas/registrarApiZipcode' - required: - - first_name - - last_name - - address - - city - - state - - zip - - country - - phone - - organization - type: object - registrarApiContacts: - type: object - $ref: '#/components/schemas/registrarApiContactProperties' - registrarApiCountry: - description: The country in which the user lives. - example: US - maxLength: 30 - nullable: true - type: string - registrarApiCreatedAt: - description: Shows time of creation. - example: '2018-08-28T17:26:26Z' - format: date-time - type: string - registrarApiCurrentRegistrar: - description: Shows name of current registrar. - example: Cloudflare - type: string - registrarApiCursorResultInfo: - description: >- - Cursor-based pagination metadata. Used by list endpoints that support - cursor pagination. Pass the `cursor` value as a query parameter in the - next request to fetch the next page. An empty string indicates there are - no more pages. - properties: - count: - description: Number of items in the current result set. - example: 20 - type: integer - cursor: - description: >- - Opaque cursor for fetching the next page. Pass this value as the - `cursor` query parameter in a subsequent request. An empty string - indicates there are no more pages. - example: eyJ0IjoiMjAyNS0wNi0xNVQxMjowMDowMC4wMDAwMDBaIiwibiI6ImJyYXZvLm5ldCJ9 - type: string - per_page: - description: Maximum number of items per page. - example: 20 - type: integer - required: - - cursor - - per_page - - count - type: object - registrarApiDomainCheckRequest: - description: Request body for checking domain availability. - properties: - domains: - description: >- - List of fully qualified domain names (FQDNs) to check for - availability. Each domain must include the extension. - Minimum: 1 - domain - Maximum: 20 domains per request - Domains on unsupported - extensions are returned with `registrable: false` and a `reason` - field - Malformed domain names (e.g., missing extension) may be - omitted from the response - example: - - example.com - - example.net - items: - type: string - maxItems: 20 - minItems: 1 - type: array - required: - - domains - type: object - registrarApiDomainCheckResponse: - properties: - errors: - $ref: '#/components/schemas/registrarApiMessages' - messages: - $ref: '#/components/schemas/registrarApiMessages' - result: - description: Contains the availability check results. - properties: - domains: - description: >- - Array of domain availability results. Domains on unsupported - extensions are included with `registrable: false` and a `reason` - field. Malformed domain names may be omitted. - items: - $ref: '#/components/schemas/registrarApiDomainCheckResult' - type: array - required: - - domains - type: object - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - - result - type: object - registrarApiDomainCheckResult: - description: >- - Represents a single authoritative domain availability result returned by - the Check endpoint. Check results reflect current registry status and - should be used immediately before registration. - properties: - name: - description: >- - The fully qualified domain name (FQDN) in punycode format for - internationalized domain names (IDNs). - example: example.com - type: string - pricing: - $ref: '#/components/schemas/registrarApiPricing' - reason: - description: >- - Present only when `registrable` is `false`. Explains why the domain - cannot be registered via this API. - - `extension_not_supported_via_api`: Cloudflare Registrar supports - this extension in the dashboard but it is not yet available for - programmatic registration via this API. The user can register via - `https://dash.cloudflare.com/{account_id}/domains/registrations`. - - `extension_not_supported`: This extension is not supported by - Cloudflare Registrar at all. - `extension_disallows_registration`: - The extension's registry has temporarily or permanently frozen new - registrations. No registrar can register domains on this extension - at this time. - `domain_premium`: The domain is premium priced. - Premium registration is not currently supported by this API. - - `domain_unavailable`: The domain is already registered, reserved, or - otherwise not available on a supported extension. - enum: - - extension_not_supported_via_api - - extension_not_supported - - extension_disallows_registration - - domain_premium - - domain_unavailable - example: domain_unavailable - type: string - registrable: - description: >- - Indicates whether this domain can be registered programmatically - through this API based on a real-time registry check. - `true`: - Domain is available for registration. The `pricing` object will be - included. - `false`: Domain is not available. See the `reason` field - for why. `tier` may still be present on some non-registrable - results, such as premium domains. - example: true - type: boolean - tier: - description: >- - The pricing tier for this domain. Always present when `registrable` - is `true`; defaults to `standard` for most domains. May be absent - when `registrable` is `false`. - `standard`: Standard registry - pricing - `premium`: Premium domain with higher pricing set by the - registry - enum: - - standard - - premium - example: standard - type: string - required: - - name - - registrable - type: object - registrarApiDomainIdentifier: - description: Domain identifier. - example: ea95132c15732412d22c1476fa83f27a - maxLength: 32 - readOnly: true - type: string - registrarApiDomainName: - description: >- - Fully qualified domain name (FQDN) including the extension (e.g., - `example.com`, `mybrand.app`). The domain name uniquely identifies a - registration — the same domain cannot be registered twice, making it a - natural idempotency key for registration requests. - example: example.com - type: string - x-auditable: true - registrarApiDomainProperties: - properties: - available: - $ref: '#/components/schemas/registrarApiAvailable' - can_register: - $ref: '#/components/schemas/registrarApiCanRegister' - created_at: - $ref: '#/components/schemas/registrarApiCreatedAt' - readOnly: true - current_registrar: - $ref: '#/components/schemas/registrarApiCurrentRegistrar' - expires_at: - $ref: '#/components/schemas/registrarApiExpiresAt' - id: - $ref: '#/components/schemas/registrarApiDomainIdentifier' - locked: - $ref: '#/components/schemas/registrarApiLocked' - registrant_contact: - $ref: '#/components/schemas/registrarApiRegistrantContact' - registry_statuses: - $ref: '#/components/schemas/registrarApiRegistryStatuses' - supported_tld: - $ref: '#/components/schemas/registrarApiSupportedTld' - transfer_in: - $ref: '#/components/schemas/registrarApiTransferIn' - updated_at: - $ref: '#/components/schemas/registrarApiUpdatedAt' - readOnly: true - type: object - registrarApiDomainResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/registrarApiMessages' - messages: - $ref: '#/components/schemas/registrarApiMessages' - result: - items: - $ref: '#/components/schemas/registrarApiDomains' - nullable: true - type: array - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/registrarApiResultInfo' - required: - - success - - errors - - messages - - result - registrarApiDomainResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/registrarApiMessages' - messages: - $ref: '#/components/schemas/registrarApiMessages' - result: - nullable: true - type: object - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - registrarApiDomainSearchResponse: - properties: - errors: - $ref: '#/components/schemas/registrarApiMessages' - messages: - $ref: '#/components/schemas/registrarApiMessages' - result: - description: Contains the search results. - properties: - domains: - description: >- - Array of domain suggestions sorted by relevance. May be empty if - no domains match the search criteria. - items: - $ref: '#/components/schemas/registrarApiDomainSearchResult' - type: array - required: - - domains - type: object - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - - result - type: object - registrarApiDomainSearchResult: - description: >- - Represents a single domain suggestion returned by the Search endpoint. - Search results are non-authoritative and may be based on cached data. - Use POST /domain-check to confirm real-time availability and pricing - before registration. - properties: - name: - description: >- - The fully qualified domain name (FQDN) in punycode format for - internationalized domain names (IDNs). - example: example.com - type: string - pricing: - $ref: '#/components/schemas/registrarApiPricing' - reason: - description: >- - Present only when `registrable` is `false` on search results. - Explains why the domain does not appear registrable through this - API. These values are advisory; use POST /domain-check for - authoritative status. - `extension_not_supported_via_api`: - Cloudflare Registrar supports this extension in the dashboard but it - is not yet available for programmatic registration via this API. - - `extension_not_supported`: This extension is not supported by - Cloudflare Registrar at all. - `extension_disallows_registration`: - The extension's registry has temporarily or permanently frozen new - registrations. - `domain_premium`: The domain is premium priced. - Premium registration is not currently supported by this API. - - `domain_unavailable`: The domain appears unavailable. - enum: - - extension_not_supported_via_api - - extension_not_supported - - extension_disallows_registration - - domain_premium - - domain_unavailable - example: domain_unavailable - type: string - registrable: - description: >- - Indicates whether this domain appears available based on search - data. Search results are non-authoritative and may be stale. - - `true`: The domain appears available. Use POST /domain-check to - confirm before registration. - `false`: The domain does not appear - available in search results. - example: true - type: boolean - tier: - description: >- - The pricing tier for this domain. Always present when `registrable` - is `true`; defaults to `standard` for most domains. May be absent - when `registrable` is `false`. - `standard`: Standard registry - pricing - `premium`: Premium domain with higher pricing set by the - registry - enum: - - standard - - premium - example: standard - type: string - required: - - name - - registrable - type: object - registrarApiDomainUpdateProperties: - properties: - auto_renew: - $ref: '#/components/schemas/registrarApiAutoRenew' - locked: - $ref: '#/components/schemas/registrarApiLocked' - privacy: - $ref: '#/components/schemas/registrarApiPrivacy' - type: object - registrarApiDomains: - type: object - $ref: '#/components/schemas/registrarApiDomainProperties' - registrarApiEmail: - description: The contact email address of the user. - example: user@example.com - maxLength: 90 - type: string - registrarApiExpiresAt: - description: Shows when domain name registration expires. - example: '2019-08-28T23:59:59Z' - format: date-time - type: string - registrarApiFax: - description: Contact fax number. - example: 123-867-5309 - type: string - registrarApiFirstName: - description: User's first name - example: John - maxLength: 60 - nullable: true - type: string - registrarApiLastName: - description: User's last name - example: Appleseed - maxLength: 60 - nullable: true - type: string - registrarApiLocked: - description: Shows whether a registrar lock is in place for a domain. - example: false - type: boolean - x-auditable: true - registrarApiMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - registrarApiOrganization: - description: Name of organization. - example: Cloudflare, Inc. - type: string - registrarApiPricing: - description: >- - Annual pricing information for a registrable domain. This object is only - present when `registrable` is `true`. All prices are per year and - returned as strings to preserve decimal precision. `registration_cost` - and `renewal_cost` are frequently the same value, but may differ — - especially for premium domains where registries set different rates for - initial registration vs. renewal. For a multi-year registration (e.g., 4 - years), the first year is charged at `registration_cost` and each - subsequent year at `renewal_cost`. Registry pricing may change over - time; the values returned here reflect the current registry rate. - Premium pricing may be surfaced by Search and Check, but premium - registration is not currently supported by this API. - properties: - currency: - description: ISO-4217 currency code for the prices (e.g., "USD", "EUR", "GBP"). - example: USD - type: string - registration_cost: - description: >- - The first-year cost to register this domain. For premium domains - (`tier: premium`), this price is set by the registry and may be - significantly higher than standard pricing. For multi-year - registrations, this cost applies to the first year only; subsequent - years are charged at `renewal_cost`. - example: '8.57' - type: string - renewal_cost: - description: >- - Per-year renewal cost for this domain. Applied to each year beyond - the first year of a multi-year registration, and to each annual - auto-renewal thereafter. May differ from `registration_cost`, - especially for premium domains where initial registration often - costs more than renewals. - example: '8.57' - type: string - required: - - currency - - registration_cost - - renewal_cost - type: object - registrarApiPrivacy: - description: Privacy option controls redacting WHOIS information. - example: true - type: boolean - x-auditable: true - registrarApiRegistrantContact: - description: Shows contact information for domain registrant. - $ref: '#/components/schemas/registrarApiContacts' - registrarApiRegistration: - description: >- - A domain registration resource representing the current state of a - registered domain. - properties: - auto_renew: - description: Whether the domain will be automatically renewed before expiration. - example: true - type: boolean - created_at: - description: >- - When the domain was registered. Present when the registration - resource exists. - example: '2025-01-15T10:00:00Z' - format: date-time - type: string - readOnly: true - domain_name: - $ref: '#/components/schemas/registrarApiDomainName' - expires_at: - description: >- - When the domain registration expires. Present when the registration - is ready; may be null only while `status` is `registration_pending`. - example: '2026-01-15T10:00:00Z' - format: date-time - nullable: true - type: string - locked: - description: Whether the domain is locked for transfer. - example: true - type: boolean - privacy_mode: - description: Current WHOIS privacy mode for the registration. - enum: - - false - - redaction - example: redaction - type: string - status: - description: >- - Current registration status. - `active`: Domain is registered and - operational - `registration_pending`: Registration is in progress - - `expired`: Domain has expired - `suspended`: Domain is suspended by - the registry - `redemption_period`: Domain is in the redemption - grace period - `pending_delete`: Domain is pending deletion by the - registry - enum: - - active - - registration_pending - - expired - - suspended - - redemption_period - - pending_delete - example: active - type: string - required: - - domain_name - - status - - created_at - - expires_at - - auto_renew - - privacy_mode - - locked - type: object - registrarApiRegistrationContact: - description: >- - Registrant contact data for the domain registration. This information is - submitted to the domain registry and, depending on extension and privacy - settings, may appear in public WHOIS records. - properties: - email: - description: >- - Email address for the registrant. Used for domain-related - communications from the registry, including ownership verification - and renewal notices. - example: ada@example.com - format: email - type: string - fax: - description: >- - Fax number in E.164 format (e.g., `+1.5555555555`). Optional. Most - registrations do not require a fax number. - example: '+1.5555555555' - type: string - phone: - description: >- - Phone number in E.164 format: `+{country_code}.{number}` with no - spaces or dashes. Examples: `+1.5555555555` (US), `+44.2071234567` - (UK), `+81.312345678` (Japan). - example: '+1.5555555555' - type: string - postal_info: - $ref: '#/components/schemas/registrarApiRegistrationContactPostalInfo' - required: - - phone - - email - - postal_info - type: object - registrarApiRegistrationContactAddress: - description: Physical mailing address for the registrant contact. - properties: - city: - description: City or locality name. - example: Austin - type: string - country_code: - description: >- - Two-letter country code per ISO 3166-1 alpha-2 (e.g., `US`, `GB`, - `CA`, `DE`). - example: US - type: string - postal_code: - description: Postal or ZIP code. - example: '78701' - type: string - state: - description: >- - State, province, or region. Use the standard abbreviation where - applicable (e.g., `TX` for Texas, `ON` for Ontario). - example: TX - type: string - street: - description: Street address including building/suite number. - example: 123 Main St - type: string - required: - - street - - city - - state - - postal_code - - country_code - type: object - registrarApiRegistrationContactPostalInfo: - description: Postal/mailing information for the registrant contact. - properties: - address: - $ref: '#/components/schemas/registrarApiRegistrationContactAddress' - name: - description: >- - Full legal name of the registrant (individual or authorized - representative). - example: Ada Lovelace - type: string - organization: - description: Organization or company name. Optional for individual registrants. - example: Example Inc - type: string - required: - - name - - address - type: object - registrarApiRegistrationContacts: - description: >- - Contact data for the registration request. If the `contacts` object is - omitted entirely from the request, or if `contacts.registrant` is not - provided, the system will use the account's default address book entry - as the registrant contact. This default must be pre-configured by the - account owner at - `https://dash.cloudflare.com/{account_id}/domains/registrations`, where - they can create or update the address book entry and accept the required - agreement. No API exists for managing address book entries at this time. - If no default address book entry exists and no registrant contact is - provided, the registration request will fail with a validation error. - properties: - registrant: - $ref: '#/components/schemas/registrarApiRegistrationContact' - type: object - registrarApiRegistrationCreateRequest: - properties: - auto_renew: - default: false - description: >- - Enable or disable automatic renewal. Defaults to `false` if omitted. - Setting this field to `true` is an explicit opt-in authorizing - Cloudflare to charge the account's default payment method up to 30 - days before domain expiry to renew the domain automatically. Renewal - pricing may change over time based on registry pricing. - example: false - type: boolean - contacts: - $ref: '#/components/schemas/registrarApiRegistrationContacts' - domain_name: - $ref: '#/components/schemas/registrarApiDomainName' - privacy_mode: - default: redaction - description: >- - WHOIS privacy mode for the registration. Defaults to `redaction`. - - `off`: Do not request WHOIS privacy. - `redaction`: Request WHOIS - redaction where supported by the extension. Some extensions do not - support privacy/redaction. - enum: - - false - - redaction - example: redaction - type: string - years: - description: >- - Number of years to register (1–10). If omitted, defaults to the - minimum registration period required by the registry for this - extension. For most extensions this is 1 year, but some extensions - require longer minimum terms (e.g., `.ai` requires a minimum of 2 - years). The registry for each extension may also enforce its own - maximum registration term. If the requested value exceeds the - registry's maximum, the registration will be rejected. When in - doubt, use the default by omitting this field. - example: 1 - maximum: 10 - minimum: 1 - type: integer - required: - - domain_name - type: object - registrarApiRegistrationResponseCollection: - properties: - errors: - $ref: '#/components/schemas/registrarApiMessages' - messages: - $ref: '#/components/schemas/registrarApiMessages' - result: - items: - $ref: '#/components/schemas/registrarApiRegistration' - type: array - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/registrarApiCursorResultInfo' - required: - - success - - errors - - messages - - result - - result - - result_info - type: object - registrarApiRegistrationResponseSingle: - properties: - errors: - $ref: '#/components/schemas/registrarApiMessages' - messages: - $ref: '#/components/schemas/registrarApiMessages' - result: - $ref: '#/components/schemas/registrarApiRegistration' - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - type: object - registrarApiRegistrationUpdateRequest: - description: >- - Request to update an existing domain registration. This endpoint - currently supports updating `auto_renew` only. - minProperties: 1 - properties: - auto_renew: - description: >- - Enable or disable automatic renewal. Setting this field to `true` - authorizes Cloudflare to charge the account's default payment method - up to 30 days before domain expiry to renew the domain - automatically. Renewal pricing may change over time based on - registry pricing. - example: true - type: boolean - type: object - registrarApiRegistryStatuses: - description: >- - A comma-separated list of registry status codes. A full list of status - codes can be found at [EPP Status - Codes](https://www.icann.org/resources/pages/epp-status-codes-2014-06-16-en). - example: ok,serverTransferProhibited - type: string - registrarApiResultInfo: - properties: - count: - description: Total number of results for the requested service - example: 1 - type: number - page: - description: Current page within paginated list of results - example: 1 - type: number - per_page: - description: Number of results per page of results - example: 20 - type: number - total_count: - description: Total results available without any search parameters - example: 2000 - type: number - type: object - registrarApiState: - description: State. - example: TX - type: string - registrarApiSupportedTld: - description: >- - Whether a particular TLD is currently supported by Cloudflare Registrar. - Refer to [TLD Policies](https://www.cloudflare.com/tld-policies/) for a - list of supported TLDs. - example: true - type: boolean - registrarApiTelephone: - description: User's telephone number - example: +1 123-123-1234 - maxLength: 20 - nullable: true - type: string - registrarApiTransferIn: - description: Statuses for domain transfers into Cloudflare Registrar. - properties: - accept_foa: - description: Form of authorization has been accepted by the registrant. - enum: - - needed - - ok - example: needed - type: string - approve_transfer: - description: Shows transfer status with the registry. - enum: - - needed - - ok - - pending - - trying - - rejected - - unknown - example: unknown - type: string - can_cancel_transfer: - description: Indicates if cancellation is still possible. - example: true - type: boolean - disable_privacy: - description: Privacy guards are disabled at the foreign registrar. - enum: - - needed - - ok - - unknown - example: ok - type: string - enter_auth_code: - description: Auth code has been entered and verified. - enum: - - needed - - ok - - pending - - trying - - rejected - example: needed - type: string - unlock_domain: - description: Domain is unlocked at the foreign registrar. - enum: - - needed - - ok - - pending - - trying - - unknown - example: ok - type: string - type: object - registrarApiUpdatedAt: - description: Last updated. - example: '2018-08-28T17:26:26Z' - format: date-time - type: string - registrarApiWorkflowError: - description: >- - Error details when a workflow reaches the `failed` state. The specific - error codes and messages depend on the workflow type (registration, - update, etc.) and the underlying registry response. These workflow error - codes are separate from immediate HTTP error `errors[].code` values - returned by non-2xx responses. Surface `error.message` to the user for - context. - properties: - code: - description: Machine-readable error code identifying the failure reason. - example: registry_rejected - type: string - message: - description: >- - Human-readable explanation of the failure. May include - registry-specific details. - example: Registry rejected the request. - type: string - required: - - code - - message - type: object - registrarApiWorkflowLinks: - properties: - resource: - description: URL to the domain resource. - example: /accounts/{account_id}/registrar/registrations/example.com - type: string - self: - description: URL to this status resource. - example: >- - /accounts/{account_id}/registrar/registrations/example.com/registration-status - type: string - required: - - self - type: object - registrarApiWorkflowStatus: - description: Status of an async registration workflow. - properties: - completed: - description: >- - Whether the workflow has reached a terminal state. `true` when - `state` is `succeeded` or `failed`. `false` for `pending`, - `in_progress`, `action_required`, and `blocked`. - example: false - type: boolean - context: - description: >- - Workflow-specific data for this workflow. The workflow subject is - identified by `context.domain_name` for domain-centric workflows. - type: object - created_at: - format: date-time - type: string - readOnly: true - error: - nullable: true - $ref: '#/components/schemas/registrarApiWorkflowError' - links: - $ref: '#/components/schemas/registrarApiWorkflowLinks' - state: - description: >- - Workflow lifecycle state. - `pending`: Workflow has been created but - not yet started processing. - `in_progress`: Actively processing. - Continue polling `links.self`. The workflow has an internal deadline - and will not remain in this state indefinitely. - `action_required`: - Paused — requires action by the user (not the system). See - `context.action` for what is needed. An automated polling loop must - break on this state; it will not resolve on its own without user - intervention. - `blocked`: The workflow cannot make progress due to - a third party such as the domain extension's registry or a losing - registrar. No user action will help. Continue polling — the block - may resolve when the third party responds. - `succeeded`: Terminal. - The operation completed successfully. `completed` will be `true`. - For registrations, `context.registration` contains the resulting - registration resource. - `failed`: Terminal. The operation failed. - `completed` will be `true`. See `error.code` and `error.message` for - the reason. Do not auto-retry without user review. - enum: - - pending - - in_progress - - action_required - - blocked - - succeeded - - failed - example: in_progress - type: string - updated_at: - format: date-time - type: string - readOnly: true - required: - - state - - completed - - created_at - - updated_at - - links - type: object - registrarApiWorkflowStatusResponseSingle: - properties: - errors: - $ref: '#/components/schemas/registrarApiMessages' - messages: - $ref: '#/components/schemas/registrarApiMessages' - result: - $ref: '#/components/schemas/registrarApiWorkflowStatus' - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - type: object - registrarApiZipcode: - description: The zipcode or postal code where the user lives. - example: '12345' - maxLength: 20 - nullable: true - type: string - responseInfo: - properties: - code: - minimum: 1000 - type: integer - message: - type: string - documentation_url: - type: string - source: - type: object - properties: - pointer: - type: string - required: - - code - - message - type: object - uniqueItems: true - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - registrar: - id: cloudflare.registrar.registrar - name: registrar - title: Registrar - methods: - create_domain_check: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1registrar~1domain-check/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] - domain_search: - id: cloudflare.registrar.domain_search - name: domain_search - title: Domain Search - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1registrar~1domain-search/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result.domains - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/domain_search/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - domains: - id: cloudflare.registrar.domains - name: domains - title: Domains - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1registrar~1domains/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1registrar~1domains~1{domain_name}/get - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1registrar~1domains~1{domain_name}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/domains/methods/get' - - $ref: '#/components/x-stackQL-resources/domains/methods/list' - insert: [] - update: [] - delete: [] - replace: - - $ref: '#/components/x-stackQL-resources/domains/methods/update' - registrations: - id: cloudflare.registrar.registrations - name: registrations - title: Registrations - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1registrar~1registrations/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1registrar~1registrations/post' - response: - mediaType: application/json - openAPIDocKey: '201' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1registrar~1registrations~1{domain_name}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1registrar~1registrations~1{domain_name}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/registrations/methods/get' - - $ref: '#/components/x-stackQL-resources/registrations/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/registrations/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/registrations/methods/edit' - delete: [] - replace: [] - registration_status: - id: cloudflare.registrar.registration_status - name: registration_status - title: Registration Status - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1registrar~1registrations~1{domain_name}~1registration-status/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/registration_status/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - update_status: - id: cloudflare.registrar.update_status - name: update_status - title: Update Status - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1registrar~1registrations~1{domain_name}~1update-status/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/update_status/methods/list' - insert: [] - update: [] - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: registrar API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/registrar/domain-check: + post: + description: "Performs real-time, authoritative availability checks directly against domain registries. Use this endpoint to verify a domain is available before attempting registration via `POST /registrations`. **Important:** Unlike the Search endpoint, these results are authoritative and reflect current registry status. Always check availability immediately before registration as domain status can change rapidly. **Note:** This endpoint uses POST to accept a list of domains in the request body. It is a read-only operation \u2014 it does not create, modify, or reserve any domains. **Extension support:** Only domains on extensions supported for programmatic registration by this API can be registered. If you check a domain on an unsupported extension, the response will include `registrable: false` with a `reason` field explaining why: - `extension_not_supported_via_api` \u2014 Cloudflare Registrar supports this extension in the dashboard, but it is not yet available for programmatic\ + \ registration via this API. Register via `https://dash.cloudflare.com/{account_id}/domains/registrations` instead. - `extension_not_supported` \u2014 This extension is not supported by Cloudflare Registrar. - `extension_disallows_registration` \u2014 The extension's registry has temporarily or permanently frozen new registrations. No registrar can register domains on this extension at this time. - `domain_premium` \u2014 The domain is premium priced. Premium registration is not currently supported by this API. - `domain_unavailable` \u2014 The domain is already registered, reserved, or otherwise not available for registration on a supported extension. The `reason` field is only present when `registrable` is `false`. **Behavior:** - Maximum 20 domains per request - Pricing is only returned for domains where `registrable: true` - Results are not cached; each request queries the registry **Workflow:** 1. Call this endpoint with domains the user wants to register. 2. For each domain\ + \ where `registrable: true`, present pricing to the user. 3. If `tier: premium`, note that premium registration is not currently supported by this API and do not proceed to `POST /registrations`. 4. Proceed to `POST /registrations` only for supported non-premium domains." + operationId: registrar-domain-discovery-check + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/registrarApiDomainCheckRequest' + description: List of fully qualified domain names (FQDNs) to check. Each domain must include the extension (e.g., "example.com", not "example"). + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/registrarApiDomainCheckResponse' + description: Successfully returned availability results. Each requested domain appears in the `domains` array with its current availability status and pricing (if available). + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/registrarApiApiResponseCommonFailure' + description: 'Invalid request parameters. Common causes: - Empty `domains` array - Exceeds maximum of 20 domains per request - Malformed request body - None of the provided domains are valid' + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Check domain availability + tags: + - Domain Discovery + x-stackql-sdk: + service: registrar + resource_chain: [] + method: check + /accounts/{account_id}/registrar/domain-search: + get: + description: "Searches for domain name suggestions based on a keyword, phrase, or partial domain name. Returns a list of potentially available domains with pricing information. **Important:** Results are non-authoritative and based on cached data. Always use the `/domain-check` endpoint to verify real-time availability before attempting registration. Suggestions are scoped to extensions supported for programmatic registration via this API (`POST /registrations`). Domains on unsupported extensions will not appear in results, even if they are available at the registry level. **Use cases:** - Brand name discovery (e.g., \"acme corp\" \u2192 acmecorp.com, acmecorp.dev) - Keyword-based suggestions (e.g., \"coffee shop\" \u2192 coffeeshop.com, mycoffeeshop.net) - Alternative extension discovery (e.g., \"example.com\" \u2192 example.com, example.app, example.xyz) **Workflow:** 1. Call this endpoint with a keyword or domain name. 2. Present suggestions to the user. 3. Call `/domain-check`\ + \ with the user's chosen domains to confirm real-time availability and pricing. 4. Proceed to `POST /registrations` only for supported non-premium domains where the Check response returns `registrable: true`. **Note:** Searching with just a domain extension (e.g., \"com\" or \".app\") is not supported. Provide a keyword or domain name." + operationId: registrar-domain-discovery-search + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: 'The search term to find domain suggestions. Accepts keywords, phrases, or full domain names. - Phrases: "coffee shop" returns coffeeshop.com, mycoffeeshop.net, etc. - Domain names: "example.com" returns example.com and variations across extensions' + in: query + name: q + schema: + maxLength: 100 + minLength: 1 + type: string + - description: Limits results to specific domain extensions from the supported set. If not specified, returns results across all supported extensions. Extensions not in the supported set are silently ignored. + explode: false + in: query + name: extensions + schema: + items: + type: string + maxItems: 20 + type: array + style: form + - description: Maximum number of domain suggestions to return. Defaults to 20 if not specified. + in: query + name: limit + schema: + default: 20 + maximum: 50 + minimum: 1 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/registrarApiDomainSearchResponse' + description: Successfully returned domain search results. + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/registrarApiApiResponseCommonFailure' + description: 'Invalid request parameters. Common causes: - Missing required `q` parameter - Query exceeds 100 character limit - Invalid extension format' + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Search for available domains + tags: + - Domain Discovery + x-stackql-sdk: + service: registrar + resource_chain: [] + method: search + /accounts/{account_id}/registrar/domains: + get: + deprecated: true + description: List domains handled by Registrar. + operationId: registrar-domains-list-domains + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/registrarApiDomainResponseCollection' + description: List domains response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/registrarApiMessages' + messages: + $ref: '#/components/schemas/registrarApiMessages' + result: + items: + $ref: '#/components/schemas/registrarApiDomains' + nullable: true + type: array + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/registrarApiResultInfo' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: List domains response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List domains + tags: + - Registrar Domains + x-api-token-group: null + x-stainless-deprecation-message: This operation is deprecated and will be removed in a future release. A replacement Registrar API will be announced separately. + x-stackql-sdk: + service: registrar + resource_chain: + - domains + method: list + /accounts/{account_id}/registrar/domains/{domain_name}: + get: + deprecated: true + description: Show individual domain. + operationId: registrar-domains-get-domain + parameters: + - in: path + name: domain_name + schema: + $ref: '#/components/schemas/registrarApiDomainName' + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/registrarApiDomainResponseSingle' + description: Get domain response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/registrarApiMessages' + messages: + $ref: '#/components/schemas/registrarApiMessages' + result: + nullable: true + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Get domain response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get domain + tags: + - Registrar Domains + x-api-token-group: null + x-stainless-deprecation-message: This operation is deprecated and will be removed in a future release. A replacement Registrar API will be announced separately. + x-stackql-sdk: + service: registrar + resource_chain: + - domains + method: get + put: + deprecated: true + description: Update individual domain. + operationId: registrar-domains-update-domain + parameters: + - in: path + name: domain_name + schema: + $ref: '#/components/schemas/registrarApiDomainName' + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/registrarApiDomainUpdateProperties' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/registrarApiDomainResponseSingle' + description: Update domain response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/registrarApiMessages' + messages: + $ref: '#/components/schemas/registrarApiMessages' + result: + nullable: true + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Update domain response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update domain + tags: + - Registrar Domains + x-api-token-group: null + x-stainless-deprecation-message: This operation is deprecated and will be removed in a future release. A replacement Registrar API will be announced separately. + x-stackql-sdk: + service: registrar + resource_chain: + - domains + method: update + /accounts/{account_id}/registrar/registrations: + get: + description: Returns a paginated list of domain registrations owned by the account. This endpoint uses cursor-based pagination. Results are ordered by registration date by default. To fetch the next page, pass the `cursor` value from the `result_info` object in the response as the `cursor` query parameter in your next request. An empty `cursor` string indicates there are no more pages. + operationId: registrar-domain-registration-list + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Opaque token from a previous response's `result_info.cursor`. Pass this value to fetch the next page of results. Omit (or pass an empty string) for the first page. + in: query + name: cursor + schema: + maxLength: 256 + type: string + - description: Number of items to return per page. + in: query + name: per_page + schema: + default: 20 + maximum: 50 + minimum: 1 + type: integer + - description: Sort direction for results. Defaults to ascending order. + in: query + name: direction + schema: + default: asc + enum: + - asc + - desc + type: string + - description: Column to sort results by. Defaults to registration date (`registry_created_at`) when omitted. + in: query + name: sort_by + schema: + default: registry_created_at + enum: + - registry_created_at + - registry_expires_at + - name + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/registrarApiRegistrationResponseCollection' + description: List of registrations for the account. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/registrarApiApiResponseCommonFailure' + description: List registrations failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Registrations + tags: + - Registrar Registration + x-stackql-sdk: + service: registrar + resource_chain: + - registrations + method: list + post: + description: "Starts a domain registration workflow. This is a billable operation \u2014 successful registration charges the account's default payment method. All successful domain registrations are non-refundable \u2014 once the workflow completes with `state: succeeded`, the charge cannot be reversed. **Prerequisites:** - The account must have a billing profile with a valid default payment method. Set this up at `https://dash.cloudflare.com/{account_id}/billing/payment-info`. - The account must not already be at the maximum supported domain limit. A single account may own up to 100 domains in total across registrations created through either the dashboard or this API. - The domain must be on a supported extension for programmatic registration. - Use `POST /domain-check` immediately before calling this endpoint to confirm real-time availability and pricing. **Supported extensions:** In this API, \"extension\" means the full registrable suffix after the domain label. For example, in\ + \ `example.co.uk`, the extension is `co.uk`. Programmatic registration is currently supported for: `com`, `org`, `net`, `app`, `dev`, `cc`, `xyz`, `info`, `cloud`, `studio`, `live`, `link`, `pro`, `tech`, `fyi`, `shop`, `online`, `tools`, `run`, `games`, `build`, `systems`, `world`, `news`, `site`, `network`, `chat`, `space`, `family`, `page`, `life`, `group`, `email`, `solutions`, `day`, `blog`, `ing`, `icu`, `academy`, `today` Cloudflare Registrar supports 400+ extensions in the dashboard. Extensions not listed above can still be registered at `https://dash.cloudflare.com/{account_id}/domains/registrations`. **Express mode:** The only required field is `domain_name`. If `contacts` is omitted, the system uses the account's default address book entry as the registrant. If no default exists and no contact is provided, the request fails. Set up a default address book entry and accept the required agreement at `https://dash.cloudflare.com/{account_id}/domains/registrations`. **Defaults:**\ + \ - `years`: defaults to the extension's minimum registration period (1 year for most extensions, but varies \u2014 for example, `.ai` (if supported) requires a minimum of 2 years). - `auto_renew`: defaults to `false`. Setting it to `true` is an explicit opt-in authorizing Cloudflare to charge the account's default payment method up to 30 days before domain expiry to renew the registration. Renewal pricing may change over time based on registry pricing. - `privacy_mode`: defaults to `redaction`. **Premium domains:** Premium domain registration is not currently supported by this API. If `POST /domain-check` returns `tier: premium`, do not call this endpoint for that domain. **Response behavior:** By default, the server holds the connection for a bounded, server-defined amount of time while the registration completes. Most registrations finish within this window and return `201 Created` with a completed workflow status. If the registration is still processing after this synchronous\ + \ wait window, the server returns `202 Accepted`. Poll the URL in `links.self` to track progress. To skip the wait and receive an immediate `202`, send `Prefer: respond-async`." + operationId: registrar-domain-registration-create + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Set to `respond-async` to receive an immediate `202 Accepted` without waiting for the operation to complete (RFC 7240). The header may be combined with other preferences using standard comma-separated syntax. + in: header + name: Prefer + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/registrarApiRegistrationCreateRequest' + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/registrarApiWorkflowStatusResponseSingle' + description: 'Registration completed successfully within the synchronous wait window. The workflow status will have `state: succeeded` and `completed: true`.' + headers: + Preference-Applied: + description: Echoed when the server honored a `Prefer` header. + schema: + type: string + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/registrarApiWorkflowStatusResponseSingle' + description: 'Registration is still processing. This occurs when the operation did not complete within the synchronous wait window, or when `Prefer: respond-async` was sent. Poll the URL in `links.self` to track progress.' + headers: + Location: + description: URL of the workflow status resource (same as `links.self`). + schema: + type: string + Preference-Applied: + description: Set to `respond-async` when the server honored the preference. + schema: + type: string + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/registrarApiApiResponseCommonFailure' + description: Create registration failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Registration + tags: + - Registrar Registration + x-stackql-sdk: + service: registrar + resource_chain: + - registrations + method: create + /accounts/{account_id}/registrar/registrations/{domain_name}: + get: + description: Returns the current state of a domain registration. This is the canonical read endpoint for a domain you own. It returns the full registration resource including current settings and expiration. When the registration resource is ready, both `created_at` and `expires_at` are present in the response. + operationId: registrar-domain-registration-get + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Domain name to retrieve. + in: path + name: domain_name + schema: + $ref: '#/components/schemas/registrarApiDomainName' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/registrarApiRegistrationResponseSingle' + description: Registration details. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/registrarApiApiResponseCommonFailure' + description: Get registration failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Registration + tags: + - Registrar Registration + x-stackql-sdk: + service: registrar + resource_chain: + - registrations + method: get + patch: + description: 'Updates an existing domain registration. By default, the server holds the connection for a bounded, server-defined amount of time while the update completes. Most updates finish within this window and return `200 OK` with a completed workflow status. If the update is still processing after this synchronous wait window, the server returns `202 Accepted`. Poll the URL in `links.self` to track progress. To skip the wait and receive an immediate `202`, send `Prefer: respond-async`. This endpoint currently supports updating `auto_renew` only.' + operationId: registrar-domain-registration-update + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Domain name to update. + in: path + name: domain_name + schema: + $ref: '#/components/schemas/registrarApiDomainName' + required: true + - description: Set to `respond-async` to receive an immediate `202 Accepted` without waiting for the operation to complete (RFC 7240). + in: header + name: Prefer + schema: + enum: + - respond-async + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/registrarApiRegistrationUpdateRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/registrarApiWorkflowStatusResponseSingle' + description: 'Update completed successfully within the synchronous wait window. The workflow status will have `state: succeeded` and `completed: true`.' + headers: + Preference-Applied: + description: Echoed when the server honored a `Prefer` header. + schema: + type: string + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/registrarApiWorkflowStatusResponseSingle' + description: 'Update is still processing. This occurs when the operation did not complete within the synchronous wait window, or when `Prefer: respond-async` was sent. Poll the URL in `links.self` to track progress.' + headers: + Location: + description: URL of the workflow status resource (same as `links.self`). + schema: + type: string + Preference-Applied: + description: Set to `respond-async` when the server honored the preference. + schema: + type: string + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/registrarApiApiResponseCommonFailure' + description: Update registration failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Registration + tags: + - Registrar Registration + x-stackql-sdk: + service: registrar + resource_chain: + - registrations + method: edit + /accounts/{account_id}/registrar/registrations/{domain_name}/registration-status: + get: + description: 'Returns the current status of a domain registration workflow. Use this endpoint to poll for completion when the POST response returned `202 Accepted`. The URL is provided in the `links.self` field of the workflow status response. Poll this endpoint until the workflow reaches a terminal state or a state that requires user attention. **Terminal states:** `succeeded` and `failed` are terminal and always have `completed: true`. **Non-terminal states:** - `action_required` has `completed: false` and will not resolve on its own. The workflow is paused pending user intervention. - `blocked` has `completed: false` and indicates the workflow is waiting on a third party such as the extension registry or losing registrar. Continue polling while informing the user of the delay. Use increasing backoff between polls. When `state: blocked`, use a longer polling interval and do not poll indefinitely. A naive polling loop that only checks `completed` can run indefinitely when `state: + action_required`. Break explicitly on `action_required`: ```js let status; do { await new Promise(r => setTimeout(r, 2000)); status = await cloudflare.request({ method: ''GET'', path: reg.result.links.self, }); } while ( !status.result.completed && status.result.state !== ''action_required'' ); if (status.result.state === ''action_required'') { // Surface context.action and context.confirmation_sent_to to the user. // Do not re-submit the registration request. } ```' + operationId: registrar-domain-registration-get-status + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: domain_name + schema: + $ref: '#/components/schemas/registrarApiDomainName' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/registrarApiWorkflowStatusResponseSingle' + description: Registration workflow status. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/registrarApiApiResponseCommonFailure' + description: Get status failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Registration Status + tags: + - Registrar Registration + x-stackql-sdk: + service: registrar + resource_chain: + - registration_status + method: get + /accounts/{account_id}/registrar/registrations/{domain_name}/update-status: + get: + description: Returns the current status of a domain update workflow. Use this endpoint to poll for completion when the PATCH response returned `202 Accepted`. The URL is provided in the `links.self` field of the workflow status response. Poll this endpoint until the workflow reaches a terminal state or a state that requires user attention. Use increasing backoff between polls. When the workflow remains blocked on a third party, use a longer polling interval and do not poll indefinitely. + operationId: registrar-domain-registration-get-update-status + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: domain_name + schema: + $ref: '#/components/schemas/registrarApiDomainName' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/registrarApiWorkflowStatusResponseSingle' + description: Update workflow status. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/registrarApiApiResponseCommonFailure' + description: Get update status failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Update Status + tags: + - Registrar Registration + x-stackql-sdk: + service: registrar + resource_chain: + - update_status + method: get +components: + schemas: + registrarApiAddress: + description: Address. + example: 123 Sesame St. + type: string + registrarApiAddress2: + description: Optional address line for unit, floor, suite, etc. + example: Suite 430 + type: string + registrarApiApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minItems: 1 + $ref: '#/components/schemas/registrarApiMessages' + messages: + example: [] + $ref: '#/components/schemas/registrarApiMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + registrarApiAutoRenew: + description: Auto-renew controls whether subscription is automatically renewed upon domain expiration. + example: true + type: boolean + x-auditable: true + registrarApiAvailable: + description: Shows if a domain is available for transferring into Cloudflare Registrar. + example: false + type: boolean + registrarApiCanRegister: + description: Indicates if the domain can be registered as a new domain. + example: false + type: boolean + registrarApiCity: + description: City. + example: Austin + type: string + registrarApiContactIdentifier: + description: Contact Identifier. + example: ea95132c15732412d22c1476fa83f27a + maxLength: 32 + readOnly: true + type: string + registrarApiContactProperties: + properties: + address: + $ref: '#/components/schemas/registrarApiAddress' + address2: + $ref: '#/components/schemas/registrarApiAddress2' + city: + $ref: '#/components/schemas/registrarApiCity' + country: + $ref: '#/components/schemas/registrarApiCountry' + email: + $ref: '#/components/schemas/registrarApiEmail' + fax: + $ref: '#/components/schemas/registrarApiFax' + first_name: + $ref: '#/components/schemas/registrarApiFirstName' + id: + $ref: '#/components/schemas/registrarApiContactIdentifier' + last_name: + $ref: '#/components/schemas/registrarApiLastName' + organization: + $ref: '#/components/schemas/registrarApiOrganization' + phone: + $ref: '#/components/schemas/registrarApiTelephone' + state: + $ref: '#/components/schemas/registrarApiState' + zip: + $ref: '#/components/schemas/registrarApiZipcode' + required: + - first_name + - last_name + - address + - city + - state + - zip + - country + - phone + - organization + type: object + registrarApiContacts: + type: object + $ref: '#/components/schemas/registrarApiContactProperties' + registrarApiCountry: + description: The country in which the user lives. + example: US + maxLength: 30 + nullable: true + type: string + registrarApiCreatedAt: + description: Shows time of creation. + example: '2018-08-28T17:26:26Z' + format: date-time + type: string + registrarApiCurrentRegistrar: + description: Shows name of current registrar. + example: Cloudflare + type: string + registrarApiCursorResultInfo: + description: Cursor-based pagination metadata. Used by list endpoints that support cursor pagination. Pass the `cursor` value as a query parameter in the next request to fetch the next page. An empty string indicates there are no more pages. + properties: + count: + description: Number of items in the current result set. + example: 20 + type: integer + cursor: + description: Opaque cursor for fetching the next page. Pass this value as the `cursor` query parameter in a subsequent request. An empty string indicates there are no more pages. + example: eyJ0IjoiMjAyNS0wNi0xNVQxMjowMDowMC4wMDAwMDBaIiwibiI6ImJyYXZvLm5ldCJ9 + type: string + per_page: + description: Maximum number of items per page. + example: 20 + type: integer + required: + - cursor + - per_page + - count + type: object + registrarApiDomainCheckRequest: + description: Request body for checking domain availability. + properties: + domains: + description: 'List of fully qualified domain names (FQDNs) to check for availability. Each domain must include the extension. - Minimum: 1 domain - Maximum: 20 domains per request - Domains on unsupported extensions are returned with `registrable: false` and a `reason` field - Malformed domain names (e.g., missing extension) may be omitted from the response' + example: + - example.com + - example.net + items: + type: string + maxItems: 20 + minItems: 1 + type: array + required: + - domains + type: object + registrarApiDomainCheckResponse: + properties: + errors: + $ref: '#/components/schemas/registrarApiMessages' + messages: + $ref: '#/components/schemas/registrarApiMessages' + result: + description: Contains the availability check results. + properties: + domains: + description: 'Array of domain availability results. Domains on unsupported extensions are included with `registrable: false` and a `reason` field. Malformed domain names may be omitted.' + items: + $ref: '#/components/schemas/registrarApiDomainCheckResult' + type: array + required: + - domains + type: object + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + - result + type: object + registrarApiDomainCheckResult: + description: Represents a single authoritative domain availability result returned by the Check endpoint. Check results reflect current registry status and should be used immediately before registration. + properties: + name: + description: The fully qualified domain name (FQDN) in punycode format for internationalized domain names (IDNs). + example: example.com + type: string + pricing: + $ref: '#/components/schemas/registrarApiPricing' + reason: + description: 'Present only when `registrable` is `false`. Explains why the domain cannot be registered via this API. - `extension_not_supported_via_api`: Cloudflare Registrar supports this extension in the dashboard but it is not yet available for programmatic registration via this API. The user can register via `https://dash.cloudflare.com/{account_id}/domains/registrations`. - `extension_not_supported`: This extension is not supported by Cloudflare Registrar at all. - `extension_disallows_registration`: The extension''s registry has temporarily or permanently frozen new registrations. No registrar can register domains on this extension at this time. - `domain_premium`: The domain is premium priced. Premium registration is not currently supported by this API. - `domain_unavailable`: The domain is already registered, reserved, or otherwise not available on a supported extension.' + enum: + - extension_not_supported_via_api + - extension_not_supported + - extension_disallows_registration + - domain_premium + - domain_unavailable + example: domain_unavailable + type: string + registrable: + description: 'Indicates whether this domain can be registered programmatically through this API based on a real-time registry check. - `true`: Domain is available for registration. The `pricing` object will be included. - `false`: Domain is not available. See the `reason` field for why. `tier` may still be present on some non-registrable results, such as premium domains.' + example: true + type: boolean + tier: + description: 'The pricing tier for this domain. Always present when `registrable` is `true`; defaults to `standard` for most domains. May be absent when `registrable` is `false`. - `standard`: Standard registry pricing - `premium`: Premium domain with higher pricing set by the registry' + enum: + - standard + - premium + example: standard + type: string + required: + - name + - registrable + type: object + registrarApiDomainIdentifier: + description: Domain identifier. + example: ea95132c15732412d22c1476fa83f27a + maxLength: 32 + readOnly: true + type: string + registrarApiDomainName: + description: "Fully qualified domain name (FQDN) including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration \u2014 the same domain cannot be registered twice, making it a natural idempotency key for registration requests." + example: example.com + type: string + x-auditable: true + registrarApiDomainProperties: + properties: + available: + $ref: '#/components/schemas/registrarApiAvailable' + can_register: + $ref: '#/components/schemas/registrarApiCanRegister' + created_at: + $ref: '#/components/schemas/registrarApiCreatedAt' + readOnly: true + current_registrar: + $ref: '#/components/schemas/registrarApiCurrentRegistrar' + expires_at: + $ref: '#/components/schemas/registrarApiExpiresAt' + id: + $ref: '#/components/schemas/registrarApiDomainIdentifier' + locked: + $ref: '#/components/schemas/registrarApiLocked' + registrant_contact: + $ref: '#/components/schemas/registrarApiRegistrantContact' + registry_statuses: + $ref: '#/components/schemas/registrarApiRegistryStatuses' + supported_tld: + $ref: '#/components/schemas/registrarApiSupportedTld' + transfer_in: + $ref: '#/components/schemas/registrarApiTransferIn' + updated_at: + $ref: '#/components/schemas/registrarApiUpdatedAt' + readOnly: true + type: object + registrarApiDomainResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/registrarApiMessages' + messages: + $ref: '#/components/schemas/registrarApiMessages' + result: + items: + $ref: '#/components/schemas/registrarApiDomains' + nullable: true + type: array + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/registrarApiResultInfo' + required: + - success + - errors + - messages + - result + registrarApiDomainResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/registrarApiMessages' + messages: + $ref: '#/components/schemas/registrarApiMessages' + result: + nullable: true + type: object + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + registrarApiDomainSearchResponse: + properties: + errors: + $ref: '#/components/schemas/registrarApiMessages' + messages: + $ref: '#/components/schemas/registrarApiMessages' + result: + description: Contains the search results. + properties: + domains: + description: Array of domain suggestions sorted by relevance. May be empty if no domains match the search criteria. + items: + $ref: '#/components/schemas/registrarApiDomainSearchResult' + type: array + required: + - domains + type: object + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + - result + type: object + registrarApiDomainSearchResult: + description: Represents a single domain suggestion returned by the Search endpoint. Search results are non-authoritative and may be based on cached data. Use POST /domain-check to confirm real-time availability and pricing before registration. + properties: + name: + description: The fully qualified domain name (FQDN) in punycode format for internationalized domain names (IDNs). + example: example.com + type: string + pricing: + $ref: '#/components/schemas/registrarApiPricing' + reason: + description: 'Present only when `registrable` is `false` on search results. Explains why the domain does not appear registrable through this API. These values are advisory; use POST /domain-check for authoritative status. - `extension_not_supported_via_api`: Cloudflare Registrar supports this extension in the dashboard but it is not yet available for programmatic registration via this API. - `extension_not_supported`: This extension is not supported by Cloudflare Registrar at all. - `extension_disallows_registration`: The extension''s registry has temporarily or permanently frozen new registrations. - `domain_premium`: The domain is premium priced. Premium registration is not currently supported by this API. - `domain_unavailable`: The domain appears unavailable.' + enum: + - extension_not_supported_via_api + - extension_not_supported + - extension_disallows_registration + - domain_premium + - domain_unavailable + example: domain_unavailable + type: string + registrable: + description: 'Indicates whether this domain appears available based on search data. Search results are non-authoritative and may be stale. - `true`: The domain appears available. Use POST /domain-check to confirm before registration. - `false`: The domain does not appear available in search results.' + example: true + type: boolean + tier: + description: 'The pricing tier for this domain. Always present when `registrable` is `true`; defaults to `standard` for most domains. May be absent when `registrable` is `false`. - `standard`: Standard registry pricing - `premium`: Premium domain with higher pricing set by the registry' + enum: + - standard + - premium + example: standard + type: string + required: + - name + - registrable + type: object + registrarApiDomainUpdateProperties: + properties: + auto_renew: + $ref: '#/components/schemas/registrarApiAutoRenew' + locked: + $ref: '#/components/schemas/registrarApiLocked' + privacy: + $ref: '#/components/schemas/registrarApiPrivacy' + type: object + registrarApiDomains: + type: object + $ref: '#/components/schemas/registrarApiDomainProperties' + registrarApiEmail: + description: The contact email address of the user. + example: user@example.com + maxLength: 90 + type: string + registrarApiExpiresAt: + description: Shows when domain name registration expires. + example: '2019-08-28T23:59:59Z' + format: date-time + type: string + registrarApiFax: + description: Contact fax number. + example: 123-867-5309 + type: string + registrarApiFirstName: + description: User's first name + example: John + maxLength: 60 + nullable: true + type: string + registrarApiLastName: + description: User's last name + example: Appleseed + maxLength: 60 + nullable: true + type: string + registrarApiLocked: + description: Shows whether a registrar lock is in place for a domain. + example: false + type: boolean + x-auditable: true + registrarApiMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + registrarApiOrganization: + description: Name of organization. + example: Cloudflare, Inc. + type: string + registrarApiPricing: + description: "Annual pricing information for a registrable domain. This object is only present when `registrable` is `true`. All prices are per year and returned as strings to preserve decimal precision. `registration_cost` and `renewal_cost` are frequently the same value, but may differ \u2014 especially for premium domains where registries set different rates for initial registration vs. renewal. For a multi-year registration (e.g., 4 years), the first year is charged at `registration_cost` and each subsequent year at `renewal_cost`. Registry pricing may change over time; the values returned here reflect the current registry rate. Premium pricing may be surfaced by Search and Check, but premium registration is not currently supported by this API." + properties: + currency: + description: ISO-4217 currency code for the prices (e.g., "USD", "EUR", "GBP"). + example: USD + type: string + registration_cost: + description: 'The first-year cost to register this domain. For premium domains (`tier: premium`), this price is set by the registry and may be significantly higher than standard pricing. For multi-year registrations, this cost applies to the first year only; subsequent years are charged at `renewal_cost`.' + example: '8.57' + type: string + renewal_cost: + description: Per-year renewal cost for this domain. Applied to each year beyond the first year of a multi-year registration, and to each annual auto-renewal thereafter. May differ from `registration_cost`, especially for premium domains where initial registration often costs more than renewals. + example: '8.57' + type: string + required: + - currency + - registration_cost + - renewal_cost + type: object + registrarApiPrivacy: + description: Privacy option controls redacting WHOIS information. + example: true + type: boolean + x-auditable: true + registrarApiRegistrantContact: + description: Shows contact information for domain registrant. + $ref: '#/components/schemas/registrarApiContacts' + registrarApiRegistration: + description: A domain registration resource representing the current state of a registered domain. + properties: + auto_renew: + description: Whether the domain will be automatically renewed before expiration. + example: true + type: boolean + created_at: + description: When the domain was registered. Present when the registration resource exists. + example: '2025-01-15T10:00:00Z' + format: date-time + type: string + readOnly: true + domain_name: + $ref: '#/components/schemas/registrarApiDomainName' + expires_at: + description: When the domain registration expires. Present when the registration is ready; may be null only while `status` is `registration_pending`. + example: '2026-01-15T10:00:00Z' + format: date-time + nullable: true + type: string + locked: + description: Whether the domain is locked for transfer. + example: true + type: boolean + privacy_mode: + description: Current WHOIS privacy mode for the registration. + enum: + - false + - redaction + example: redaction + type: string + status: + description: 'Current registration status. - `active`: Domain is registered and operational - `registration_pending`: Registration is in progress - `expired`: Domain has expired - `suspended`: Domain is suspended by the registry - `redemption_period`: Domain is in the redemption grace period - `pending_delete`: Domain is pending deletion by the registry' + enum: + - active + - registration_pending + - expired + - suspended + - redemption_period + - pending_delete + example: active + type: string + required: + - domain_name + - status + - created_at + - expires_at + - auto_renew + - privacy_mode + - locked + type: object + registrarApiRegistrationContact: + description: Registrant contact data for the domain registration. This information is submitted to the domain registry and, depending on extension and privacy settings, may appear in public WHOIS records. + properties: + email: + description: Email address for the registrant. Used for domain-related communications from the registry, including ownership verification and renewal notices. + example: ada@example.com + format: email + type: string + fax: + description: Fax number in E.164 format (e.g., `+1.5555555555`). Optional. Most registrations do not require a fax number. + example: '+1.5555555555' + type: string + phone: + description: 'Phone number in E.164 format: `+{country_code}.{number}` with no spaces or dashes. Examples: `+1.5555555555` (US), `+44.2071234567` (UK), `+81.312345678` (Japan).' + example: '+1.5555555555' + type: string + postal_info: + $ref: '#/components/schemas/registrarApiRegistrationContactPostalInfo' + required: + - phone + - email + - postal_info + type: object + registrarApiRegistrationContactAddress: + description: Physical mailing address for the registrant contact. + properties: + city: + description: City or locality name. + example: Austin + type: string + country_code: + description: Two-letter country code per ISO 3166-1 alpha-2 (e.g., `US`, `GB`, `CA`, `DE`). + example: US + type: string + postal_code: + description: Postal or ZIP code. + example: '78701' + type: string + state: + description: State, province, or region. Use the standard abbreviation where applicable (e.g., `TX` for Texas, `ON` for Ontario). + example: TX + type: string + street: + description: Street address including building/suite number. + example: 123 Main St + type: string + required: + - street + - city + - state + - postal_code + - country_code + type: object + registrarApiRegistrationContactPostalInfo: + description: Postal/mailing information for the registrant contact. + properties: + address: + $ref: '#/components/schemas/registrarApiRegistrationContactAddress' + name: + description: Full legal name of the registrant (individual or authorized representative). + example: Ada Lovelace + type: string + organization: + description: Organization or company name. Optional for individual registrants. + example: Example Inc + type: string + required: + - name + - address + type: object + registrarApiRegistrationContacts: + description: Contact data for the registration request. If the `contacts` object is omitted entirely from the request, or if `contacts.registrant` is not provided, the system will use the account's default address book entry as the registrant contact. This default must be pre-configured by the account owner at `https://dash.cloudflare.com/{account_id}/domains/registrations`, where they can create or update the address book entry and accept the required agreement. No API exists for managing address book entries at this time. If no default address book entry exists and no registrant contact is provided, the registration request will fail with a validation error. + properties: + registrant: + $ref: '#/components/schemas/registrarApiRegistrationContact' + type: object + registrarApiRegistrationCreateRequest: + properties: + auto_renew: + default: false + description: Enable or disable automatic renewal. Defaults to `false` if omitted. Setting this field to `true` is an explicit opt-in authorizing Cloudflare to charge the account's default payment method up to 30 days before domain expiry to renew the domain automatically. Renewal pricing may change over time based on registry pricing. + example: false + type: boolean + contacts: + $ref: '#/components/schemas/registrarApiRegistrationContacts' + domain_name: + $ref: '#/components/schemas/registrarApiDomainName' + privacy_mode: + default: redaction + description: 'WHOIS privacy mode for the registration. Defaults to `redaction`. - `off`: Do not request WHOIS privacy. - `redaction`: Request WHOIS redaction where supported by the extension. Some extensions do not support privacy/redaction.' + enum: + - false + - redaction + example: redaction + type: string + years: + description: "Number of years to register (1\u201310). If omitted, defaults to the minimum registration period required by the registry for this extension. For most extensions this is 1 year, but some extensions require longer minimum terms (e.g., `.ai` requires a minimum of 2 years). The registry for each extension may also enforce its own maximum registration term. If the requested value exceeds the registry's maximum, the registration will be rejected. When in doubt, use the default by omitting this field." + example: 1 + maximum: 10 + minimum: 1 + type: integer + required: + - domain_name + type: object + registrarApiRegistrationResponseCollection: + properties: + errors: + $ref: '#/components/schemas/registrarApiMessages' + messages: + $ref: '#/components/schemas/registrarApiMessages' + result: + items: + $ref: '#/components/schemas/registrarApiRegistration' + type: array + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/registrarApiCursorResultInfo' + required: + - success + - errors + - messages + - result + - result + - result_info + type: object + registrarApiRegistrationResponseSingle: + properties: + errors: + $ref: '#/components/schemas/registrarApiMessages' + messages: + $ref: '#/components/schemas/registrarApiMessages' + result: + $ref: '#/components/schemas/registrarApiRegistration' + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + type: object + registrarApiRegistrationUpdateRequest: + description: Request to update an existing domain registration. This endpoint currently supports updating `auto_renew` only. + minProperties: 1 + properties: + auto_renew: + description: Enable or disable automatic renewal. Setting this field to `true` authorizes Cloudflare to charge the account's default payment method up to 30 days before domain expiry to renew the domain automatically. Renewal pricing may change over time based on registry pricing. + example: true + type: boolean + type: object + registrarApiRegistryStatuses: + description: A comma-separated list of registry status codes. A full list of status codes can be found at [EPP Status Codes](https://www.icann.org/resources/pages/epp-status-codes-2014-06-16-en). + example: ok,serverTransferProhibited + type: string + registrarApiResultInfo: + properties: + count: + description: Total number of results for the requested service + example: 1 + type: number + page: + description: Current page within paginated list of results + example: 1 + type: number + per_page: + description: Number of results per page of results + example: 20 + type: number + total_count: + description: Total results available without any search parameters + example: 2000 + type: number + type: object + registrarApiState: + description: State. + example: TX + type: string + registrarApiSupportedTld: + description: Whether a particular TLD is currently supported by Cloudflare Registrar. Refer to [TLD Policies](https://www.cloudflare.com/tld-policies/) for a list of supported TLDs. + example: true + type: boolean + registrarApiTelephone: + description: User's telephone number + example: +1 123-123-1234 + maxLength: 20 + nullable: true + type: string + registrarApiTransferIn: + description: Statuses for domain transfers into Cloudflare Registrar. + properties: + accept_foa: + description: Form of authorization has been accepted by the registrant. + enum: + - needed + - ok + example: needed + type: string + approve_transfer: + description: Shows transfer status with the registry. + enum: + - needed + - ok + - pending + - trying + - rejected + - unknown + example: unknown + type: string + can_cancel_transfer: + description: Indicates if cancellation is still possible. + example: true + type: boolean + disable_privacy: + description: Privacy guards are disabled at the foreign registrar. + enum: + - needed + - ok + - unknown + example: ok + type: string + enter_auth_code: + description: Auth code has been entered and verified. + enum: + - needed + - ok + - pending + - trying + - rejected + example: needed + type: string + unlock_domain: + description: Domain is unlocked at the foreign registrar. + enum: + - needed + - ok + - pending + - trying + - unknown + example: ok + type: string + type: object + registrarApiUpdatedAt: + description: Last updated. + example: '2018-08-28T17:26:26Z' + format: date-time + type: string + registrarApiWorkflowError: + description: Error details when a workflow reaches the `failed` state. The specific error codes and messages depend on the workflow type (registration, update, etc.) and the underlying registry response. These workflow error codes are separate from immediate HTTP error `errors[].code` values returned by non-2xx responses. Surface `error.message` to the user for context. + properties: + code: + description: Machine-readable error code identifying the failure reason. + example: registry_rejected + type: string + message: + description: Human-readable explanation of the failure. May include registry-specific details. + example: Registry rejected the request. + type: string + required: + - code + - message + type: object + registrarApiWorkflowLinks: + properties: + resource: + description: URL to the domain resource. + example: /accounts/{account_id}/registrar/registrations/example.com + type: string + self: + description: URL to this status resource. + example: /accounts/{account_id}/registrar/registrations/example.com/registration-status + type: string + required: + - self + type: object + registrarApiWorkflowStatus: + description: Status of an async registration workflow. + properties: + completed: + description: Whether the workflow has reached a terminal state. `true` when `state` is `succeeded` or `failed`. `false` for `pending`, `in_progress`, `action_required`, and `blocked`. + example: false + type: boolean + context: + description: Workflow-specific data for this workflow. The workflow subject is identified by `context.domain_name` for domain-centric workflows. + type: object + created_at: + format: date-time + type: string + readOnly: true + error: + nullable: true + $ref: '#/components/schemas/registrarApiWorkflowError' + links: + $ref: '#/components/schemas/registrarApiWorkflowLinks' + state: + description: "Workflow lifecycle state. - `pending`: Workflow has been created but not yet started processing. - `in_progress`: Actively processing. Continue polling `links.self`. The workflow has an internal deadline and will not remain in this state indefinitely. - `action_required`: Paused \u2014 requires action by the user (not the system). See `context.action` for what is needed. An automated polling loop must break on this state; it will not resolve on its own without user intervention. - `blocked`: The workflow cannot make progress due to a third party such as the domain extension's registry or a losing registrar. No user action will help. Continue polling \u2014 the block may resolve when the third party responds. - `succeeded`: Terminal. The operation completed successfully. `completed` will be `true`. For registrations, `context.registration` contains the resulting registration resource. - `failed`: Terminal. The operation failed. `completed` will be `true`. See `error.code`\ + \ and `error.message` for the reason. Do not auto-retry without user review." + enum: + - pending + - in_progress + - action_required + - blocked + - succeeded + - failed + example: in_progress + type: string + updated_at: + format: date-time + type: string + readOnly: true + required: + - state + - completed + - created_at + - updated_at + - links + type: object + registrarApiWorkflowStatusResponseSingle: + properties: + errors: + $ref: '#/components/schemas/registrarApiMessages' + messages: + $ref: '#/components/schemas/registrarApiMessages' + result: + $ref: '#/components/schemas/registrarApiWorkflowStatus' + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + type: object + registrarApiZipcode: + description: The zipcode or postal code where the user lives. + example: '12345' + maxLength: 20 + nullable: true + type: string + responseInfo: + properties: + code: + minimum: 1000 + type: integer + message: + type: string + documentation_url: + type: string + source: + type: object + properties: + pointer: + type: string + required: + - code + - message + type: object + uniqueItems: true + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + registrar: + id: cloudflare.registrar.registrar + name: registrar + title: Registrar + methods: + create_domain_check: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1registrar~1domain-check/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .domains }}{{ $sep }}"domains": {{ if eq (kindOf .domains) "string" }}{{ .domains }}{{ else }}{{ toJson .domains }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + domain_search: + id: cloudflare.registrar.domain_search + name: domain_search + title: Domain Search + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1registrar~1domain-search/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result.domains + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/domain_search/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + domains: + id: cloudflare.registrar.domains + name: domains + title: Domains + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1registrar~1domains/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1registrar~1domains~1{domain_name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1registrar~1domains~1{domain_name}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/domains/methods/get' + - $ref: '#/components/x-stackQL-resources/domains/methods/list' + insert: [] + update: [] + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/domains/methods/update' + registrations: + id: cloudflare.registrar.registrations + name: registrations + title: Registrations + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1registrar~1registrations/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1registrar~1registrations/post' + response: + mediaType: application/json + openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .auto_renew }}{{ $sep }}"auto_renew": {{ toJson .auto_renew }}{{- $sep = "," -}}{{ end }} + + {{- if .contacts }}{{ $sep }}"contacts": {{ if eq (kindOf .contacts) "string" }}{{ .contacts }}{{ else }}{{ toJson .contacts }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .domain_name }}{{ $sep }}"domain_name": {{ toJson .domain_name }}{{- $sep = "," -}}{{ end }} + + {{- if .privacy_mode }}{{ $sep }}"privacy_mode": {{ toJson .privacy_mode }}{{- $sep = "," -}}{{ end }} + + {{- if .years }}{{ $sep }}"years": {{ toJson .years }}{{- $sep = "," -}}{{ end }} + + } + + ' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1registrar~1registrations~1{domain_name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1registrar~1registrations~1{domain_name}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/registrations/methods/get' + - $ref: '#/components/x-stackQL-resources/registrations/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/registrations/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/registrations/methods/edit' + delete: [] + replace: [] + registration_status: + id: cloudflare.registrar.registration_status + name: registration_status + title: Registration Status + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1registrar~1registrations~1{domain_name}~1registration-status/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/registration_status/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + update_status: + id: cloudflare.registrar.update_status + name: update_status + title: Update Status + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1registrar~1registrations~1{domain_name}~1update-status/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/update_status/methods/list' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/request_tracers.yaml b/providers/src/cloudflare/v00.00.00000/services/request_tracers.yaml index ac5a0068..962f91e0 100644 --- a/providers/src/cloudflare/v00.00.00000/services/request_tracers.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/request_tracers.yaml @@ -1,362 +1,348 @@ -openapi: 3.0.3 -info: - title: request_tracers API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/request-tracer/trace: - post: - operationId: account-request-tracer-request-trace - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - body: - properties: - base64: - description: Base64 encoded request body - type: string - x-auditable: true - json: - description: Arbitrary json as request body - type: object - plain_text: - description: Request body as plain text - type: string - x-auditable: true - type: object - context: - description: Additional request parameters - properties: - bot_score: - description: Bot score used for evaluating tracing request processing - type: integer - x-auditable: true - geoloc: - description: Geodata for tracing request - properties: - city: - type: string - x-auditable: true - continent: - type: string - x-auditable: true - is_eu_country: - type: boolean - x-auditable: true - iso_code: - type: string - x-auditable: true - latitude: - type: number - x-auditable: true - longitude: - type: number - x-auditable: true - postal_code: - type: string - x-auditable: true - region_code: - type: string - x-auditable: true - subdivision_2_iso_code: - type: string - x-auditable: true - timezone: - type: string - x-auditable: true - type: object - skip_challenge: - description: >- - Whether to skip any challenges for tracing request - (e.g.: captcha) - type: boolean - x-auditable: true - threat_score: - description: >- - Threat score used for evaluating tracing request - processing - type: integer - x-auditable: true - type: object - cookies: - description: Cookies added to tracing request - type: object - headers: - description: Headers added to tracing request - type: object - method: - description: HTTP Method of tracing request - type: string - x-auditable: true - protocol: - description: HTTP Protocol of tracing request - type: string - x-auditable: true - skip_response: - description: >- - Skip sending the request to the Origin server after all - rules evaluation - type: boolean - x-auditable: true - url: - description: URL to which perform tracing request - type: string - x-auditable: true - required: - - url - - method - type: object - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/requestTracerMessages' - messages: - $ref: '#/components/schemas/requestTracerMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - description: Trace result with an origin status code - properties: - status_code: - description: HTTP Status code of zone response - type: integer - x-auditable: true - trace: - $ref: '#/components/schemas/requestTracerTrace' - type: object - required: - - success - - errors - - messages - description: Request Trace response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/requestTracerApiResponseCommonFailure' - description: Request Trace response failure - security: - - api_email: [] - api_key: [] - summary: Request Trace - tags: - - Account Request Tracer - x-api-token-group: - - Allow Request Tracer Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: request_tracers - resource_chain: - - traces - method: create -components: - schemas: - requestTracerApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/requestTracerMessages' - messages: - example: [] - $ref: '#/components/schemas/requestTracerMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - requestTracerMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - requestTracerTrace: - items: - description: List of steps acting on request/response - properties: - action: - description: If step type is rule, then action performed by this rule - example: execute - type: string - x-auditable: true - action_parameters: - description: If step type is rule, then action parameters of this rule as JSON - example: - id: 4814384a9e5d4991b9815dcfc25d2f1f - type: object - x-auditable: true - description: - description: If step type is rule or ruleset, the description of this entity - example: some rule - type: string - x-auditable: true - expression: - description: If step type is rule, then expression used to match for this rule - example: ip.src ne 1.1.1.1 - type: string - x-auditable: true - kind: - description: If step type is ruleset, then kind of this ruleset - example: zone - type: string - x-auditable: true - matched: - description: Whether tracing step affected tracing request/response - example: true - type: boolean - x-auditable: true - name: - description: If step type is ruleset, then name of this ruleset - example: some ruleset name - type: string - x-auditable: true - step_name: - description: Tracing step identifying name - example: rule_id01 - type: string - x-auditable: true - trace: - $ref: '#/components/schemas/requestTracerTrace' - type: - description: Tracing step type - example: rule - type: string - x-auditable: true - type: object - type: array - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - request_tracer: - id: cloudflare.request_tracers.request_tracer - name: request_tracer - title: Request Tracer - methods: - create_trace: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1request-tracer~1trace/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: request_tracers API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/request-tracer/trace: + post: + operationId: account-request-tracer-request-trace + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + body: + properties: + base64: + description: Base64 encoded request body + type: string + x-auditable: true + json: + description: Arbitrary json as request body + type: object + plain_text: + description: Request body as plain text + type: string + x-auditable: true + type: object + context: + description: Additional request parameters + properties: + bot_score: + description: Bot score used for evaluating tracing request processing + type: integer + x-auditable: true + geoloc: + description: Geodata for tracing request + properties: + city: + type: string + x-auditable: true + continent: + type: string + x-auditable: true + is_eu_country: + type: boolean + x-auditable: true + iso_code: + type: string + x-auditable: true + latitude: + type: number + x-auditable: true + longitude: + type: number + x-auditable: true + postal_code: + type: string + x-auditable: true + region_code: + type: string + x-auditable: true + subdivision_2_iso_code: + type: string + x-auditable: true + timezone: + type: string + x-auditable: true + type: object + skip_challenge: + description: 'Whether to skip any challenges for tracing request (e.g.: captcha)' + type: boolean + x-auditable: true + threat_score: + description: Threat score used for evaluating tracing request processing + type: integer + x-auditable: true + type: object + cookies: + description: Cookies added to tracing request + type: object + headers: + description: Headers added to tracing request + type: object + method: + description: HTTP Method of tracing request + type: string + x-auditable: true + protocol: + description: HTTP Protocol of tracing request + type: string + x-auditable: true + skip_response: + description: Skip sending the request to the Origin server after all rules evaluation + type: boolean + x-auditable: true + url: + description: URL to which perform tracing request + type: string + x-auditable: true + required: + - url + - method + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/requestTracerMessages' + messages: + $ref: '#/components/schemas/requestTracerMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + description: Trace result with an origin status code + properties: + status_code: + description: HTTP Status code of zone response + type: integer + x-auditable: true + trace: + $ref: '#/components/schemas/requestTracerTrace' + type: object + required: + - success + - errors + - messages + description: Request Trace response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/requestTracerApiResponseCommonFailure' + description: Request Trace response failure + security: + - api_email: [] + api_key: [] + summary: Request Trace + tags: + - Account Request Tracer + x-api-token-group: + - Allow Request Tracer Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: request_tracers + resource_chain: + - traces + method: create +components: + schemas: + requestTracerApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/requestTracerMessages' + messages: + example: [] + $ref: '#/components/schemas/requestTracerMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + requestTracerMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + requestTracerTrace: + items: + description: List of steps acting on request/response + properties: + action: + description: If step type is rule, then action performed by this rule + example: execute + type: string + x-auditable: true + action_parameters: + description: If step type is rule, then action parameters of this rule as JSON + example: + id: 4814384a9e5d4991b9815dcfc25d2f1f + type: object + x-auditable: true + description: + description: If step type is rule or ruleset, the description of this entity + example: some rule + type: string + x-auditable: true + expression: + description: If step type is rule, then expression used to match for this rule + example: ip.src ne 1.1.1.1 + type: string + x-auditable: true + kind: + description: If step type is ruleset, then kind of this ruleset + example: zone + type: string + x-auditable: true + matched: + description: Whether tracing step affected tracing request/response + example: true + type: boolean + x-auditable: true + name: + description: If step type is ruleset, then name of this ruleset + example: some ruleset name + type: string + x-auditable: true + step_name: + description: Tracing step identifying name + example: rule_id01 + type: string + x-auditable: true + trace: + $ref: '#/components/schemas/requestTracerTrace' + type: + description: Tracing step type + example: rule + type: string + x-auditable: true + type: object + type: array + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + request_tracer: + id: cloudflare.request_tracers.request_tracer + name: request_tracer + title: Request Tracer + methods: + create_trace: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1request-tracer~1trace/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .body }}{{ $sep }}"body": {{ if eq (kindOf .body) "string" }}{{ .body }}{{ else }}{{ toJson .body }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .context }}{{ $sep }}"context": {{ if eq (kindOf .context) "string" }}{{ .context }}{{ else }}{{ toJson .context }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .cookies }}{{ $sep }}"cookies": {{ if eq (kindOf .cookies) "string" }}{{ .cookies }}{{ else }}{{ toJson .cookies }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .headers }}{{ $sep }}"headers": {{ if eq (kindOf .headers) "string" }}{{ .headers }}{{ else }}{{ toJson .headers }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .method }}{{ $sep }}"method": {{ toJson .method }}{{- $sep = "," -}}{{ end }} + + {{- if .protocol }}{{ $sep }}"protocol": {{ toJson .protocol }}{{- $sep = "," -}}{{ end }} + + {{- if .skip_response }}{{ $sep }}"skip_response": {{ toJson .skip_response }}{{- $sep = "," -}}{{ end }} + + {{- if .url }}{{ $sep }}"url": {{ toJson .url }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/resource_sharing.yaml b/providers/src/cloudflare/v00.00.00000/services/resource_sharing.yaml index d52edcf7..7be93eba 100644 --- a/providers/src/cloudflare/v00.00.00000/services/resource_sharing.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/resource_sharing.yaml @@ -1,1682 +1,1643 @@ -openapi: 3.0.3 -info: - title: resource_sharing API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/shares: - get: - description: Lists all account shares. - operationId: shares-list - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Filter shares by status. - in: query - name: status - schema: - $ref: '#/components/schemas/resourceSharingShareStatus' - - description: Filter shares by kind. - in: query - name: kind - schema: - $ref: '#/components/schemas/resourceSharingShareKind' - - description: Filter shares by target_type. - in: query - name: target_type - schema: - $ref: '#/components/schemas/resourceSharingShareTargetType' - - description: Filter share resources by resource_types. - in: query - name: resource_types - schema: - items: - $ref: '#/components/schemas/resourceSharingResourceType' - type: array - explode: true - - description: Order shares by values in the given field. - in: query - name: order - schema: - default: created - enum: - - name - - created - type: string - - description: Direction to sort objects. - in: query - name: direction - schema: - default: asc - enum: - - asc - - desc - type: string - - description: Page number. - in: query - name: page - schema: - minimum: 0 - multipleOf: 1 - type: integer - - description: Number of objects to return per page. - in: query - name: per_page - schema: - maximum: 100 - minimum: 0 - multipleOf: 1 - type: integer - - description: Include resources in the response. - in: query - name: include_resources - schema: - type: boolean - - description: Include recipient counts in the response. - in: query - name: include_recipient_counts - schema: - type: boolean - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingShareResponseCollection' - description: List account shares response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: List account shares response failure. - 5XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: List account shares response failure. - security: - - api_email: [] - api_key: [] - summary: List account shares - tags: - - Resource Sharing - x-api-token-group: null - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: resource_sharing - resource_chain: [] - method: list - post: - description: >- - Creates a new resource share for sharing Cloudflare resources with other - accounts or organizations. - operationId: share-create - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingCreateShareRequest' - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingShareResponseSingle' - description: Share created. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: Create share failure. - 5XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: Create share failure. - security: - - api_email: [] - api_key: [] - summary: Create a new share - tags: - - Resource Sharing - x-api-token-group: null - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: resource_sharing - resource_chain: [] - method: create - /accounts/{account_id}/shares/{share_id}: - delete: - description: >- - Deletion is not immediate, an updated share object with a new status - will be returned. - operationId: share-delete - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: share_id - schema: - $ref: '#/components/schemas/resourceSharingShareId' - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingShareResponseSingle' - description: Share deleted. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: Delete share failure. - 5XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: Delete share failure. - security: - - api_email: [] - api_key: [] - summary: Delete a share - tags: - - Resource Sharing - x-api-token-group: null - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: resource_sharing - resource_chain: [] - method: delete - get: - description: Fetches share by ID. - operationId: shares-get-by-id - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: share_id - schema: - $ref: '#/components/schemas/resourceSharingShareId' - required: true - - description: Include resources in the response. - in: query - name: include_resources - schema: - type: boolean - - description: Include recipient counts in the response. - in: query - name: include_recipient_counts - schema: - type: boolean - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingShareResponseSingle' - description: Get account share response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: Get account share response failure. - 5XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: Get account share response failure. - security: - - api_email: [] - api_key: [] - summary: Get account share by ID - tags: - - Resource Sharing - x-api-token-group: null - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: resource_sharing - resource_chain: [] - method: get - put: - description: >- - Updating is not immediate, an updated share object with a new status - will be returned. - operationId: share-update - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: share_id - schema: - $ref: '#/components/schemas/resourceSharingShareId' - required: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingUpdateShareRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingShareResponseSingle' - description: Share updated. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: Update share failure. - 5XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: Update share failure. - security: - - api_email: [] - api_key: [] - summary: Update a share - tags: - - Resource Sharing - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: resource_sharing - resource_chain: [] - method: update - /accounts/{account_id}/shares/{share_id}/recipients: - get: - description: List share recipients by share ID. - operationId: share-recipients-list - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: share_id - schema: - $ref: '#/components/schemas/resourceSharingShareId' - required: true - - description: Include resources in the response. - in: query - name: include_resources - schema: - type: boolean - - description: Page number. - in: query - name: page - schema: - minimum: 0 - multipleOf: 1 - type: integer - - description: Number of objects to return per page. - in: query - name: per_page - schema: - maximum: 100 - minimum: 0 - multipleOf: 1 - type: integer - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/resourceSharingShareRecipientResponseCollection - description: List account share recipients response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: List account share recipients response failure. - 5XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: List account share recipients response failure. - security: - - api_email: [] - api_key: [] - summary: List share recipients by share ID - tags: - - Resource Sharing - x-api-token-group: null - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: resource_sharing - resource_chain: - - recipients - method: list - post: - description: >- - Adds a recipient to a resource share, granting them access to the shared - resources. - operationId: share-recipient-create - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: share_id - schema: - $ref: '#/components/schemas/resourceSharingShareId' - required: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingCreateShareRecipientRequest' - responses: - '201': - content: - application/json: - schema: - $ref: >- - #/components/schemas/resourceSharingShareRecipientResponseSingle - description: Share recipient created. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: Create share recipient failure. - 5XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: Create share recipient failure. - security: - - api_email: [] - api_key: [] - summary: Create a new share recipient - tags: - - Resource Sharing - x-api-token-group: null - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - put: - description: >- - Changes a share's recipients to match the given list. Returns an error - if the share targets an organization. - operationId: share-recipients-update - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: share_id - schema: - $ref: '#/components/schemas/resourceSharingShareId' - required: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingUpdateShareRecipientsRequest' - responses: - '204': - description: Empty body - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: Update share recipients failure. - 5XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: Update share recipients failure. - security: - - api_email: [] - api_key: [] - summary: Update a share's recipients - tags: - - Resource Sharing - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - /accounts/{account_id}/shares/{share_id}/recipients/{recipient_id}: - delete: - description: >- - Deletion is not immediate, an updated share recipient object with a new - status will be returned. - operationId: share-recipient-delete - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: share_id - schema: - $ref: '#/components/schemas/resourceSharingShareId' - required: true - - in: path - name: recipient_id - schema: - $ref: '#/components/schemas/resourceSharingRecipientId' - required: true - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/resourceSharingShareRecipientResponseSingle - description: Share recipient deleted. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: Delete share recipient failure. - 5XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: Delete share recipient failure. - security: - - api_email: [] - api_key: [] - summary: Delete a share recipient - tags: - - Resource Sharing - x-api-token-group: null - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: resource_sharing - resource_chain: - - recipients - method: delete - get: - description: Get share recipient by ID. - operationId: share-recipients-get-by-id - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: share_id - schema: - $ref: '#/components/schemas/resourceSharingShareId' - required: true - - in: path - name: recipient_id - schema: - $ref: '#/components/schemas/resourceSharingRecipientId' - required: true - - description: Include resources in the response. - in: query - name: include_resources - schema: - type: boolean - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/resourceSharingShareRecipientResponseSingle - description: Get account share recipient response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: Get account share recipient response failure. - 5XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: Get account share recipient response failure. - security: - - api_email: [] - api_key: [] - summary: Get share recipient by ID - tags: - - Resource Sharing - x-api-token-group: null - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: resource_sharing - resource_chain: - - recipients - method: get - /accounts/{account_id}/shares/{share_id}/resources: - get: - description: List share resources by share ID. - operationId: share-resources-list - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: share_id - schema: - $ref: '#/components/schemas/resourceSharingShareId' - required: true - - description: Filter share resources by status. - in: query - name: status - schema: - $ref: '#/components/schemas/resourceSharingResourceStatus' - - description: Filter share resources by resource_type. - in: query - name: resource_type - schema: - $ref: '#/components/schemas/resourceSharingResourceType' - - description: Page number. - in: query - name: page - schema: - minimum: 0 - multipleOf: 1 - type: integer - - description: Number of objects to return per page. - in: query - name: per_page - schema: - maximum: 100 - minimum: 0 - multipleOf: 1 - type: integer - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/resourceSharingShareResourceResponseCollection - description: List account share resources response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: List account share resources response failure. - 5XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: List account share resources response failure. - security: - - api_email: [] - api_key: [] - summary: List share resources by share ID - tags: - - Resource Sharing - x-api-token-group: null - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: resource_sharing - resource_chain: - - resources - method: list - post: - description: >- - Adds a resource to an existing share, making it available to share - recipients. - operationId: share-resource-create - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: share_id - schema: - $ref: '#/components/schemas/resourceSharingShareId' - required: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingCreateShareResourceRequest' - responses: - '201': - content: - application/json: - schema: - $ref: >- - #/components/schemas/resourceSharingShareResourceResponseSingle - description: Share resource created. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: Create share resource failure. - 5XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: Create share resource failure. - security: - - api_email: [] - api_key: [] - summary: Create a new share resource - tags: - - Resource Sharing - x-api-token-group: null - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: resource_sharing - resource_chain: - - resources - method: create - /accounts/{account_id}/shares/{share_id}/resources/{resource_id}: - delete: - description: >- - Deletion is not immediate, an updated share resource object with a new - status will be returned. - operationId: share-resource-delete - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: share_id - schema: - $ref: '#/components/schemas/resourceSharingShareId' - required: true - - in: path - name: resource_id - schema: - $ref: '#/components/schemas/resourceSharingResourceId' - required: true - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/resourceSharingShareResourceResponseSingle - description: Share resource deleted. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: Delete share resource failure. - 5XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: Delete share resource failure. - security: - - api_email: [] - api_key: [] - summary: Delete a share resource - tags: - - Resource Sharing - x-api-token-group: null - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: resource_sharing - resource_chain: - - resources - method: delete - get: - description: Get share resource by ID. - operationId: share-resources-get-by-id - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: share_id - schema: - $ref: '#/components/schemas/resourceSharingShareId' - required: true - - in: path - name: resource_id - schema: - $ref: '#/components/schemas/resourceSharingResourceId' - required: true - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/resourceSharingShareResourceResponseSingle - description: Get account share resource response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: Get account share resource response failure. - 5XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: Get account share resource response failure. - security: - - api_email: [] - api_key: [] - summary: Get share resource by ID - tags: - - Resource Sharing - x-api-token-group: null - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: resource_sharing - resource_chain: - - resources - method: get - put: - description: >- - Update is not immediate, an updated share resource object with a new - status will be returned. - operationId: share-resource-update - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: share_id - schema: - $ref: '#/components/schemas/resourceSharingShareId' - required: true - - in: path - name: resource_id - schema: - $ref: '#/components/schemas/resourceSharingResourceId' - required: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingUpdateShareResourceRequest' - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/resourceSharingShareResourceResponseSingle - description: Share resource updated. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: Update share resource failure. - 5XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' - description: Update share resource failure. - security: - - api_email: [] - api_key: [] - summary: Update a share resource - tags: - - Resource Sharing - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: resource_sharing - resource_chain: - - resources - method: update -components: - schemas: - resourceSharingAccountId: - description: Account identifier. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - type: string - x-auditable: true - resourceSharingAccountName: - description: The display name of an account. - example: Account A - type: string - x-auditable: true - resourceSharingApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/resourceSharingV4errors' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - example: false - type: boolean - x-auditable: true - required: - - success - - errors - - result - type: object - resourceSharingCreateShareRecipientRequest: - description: Account or organization ID must be provided. - properties: - account_id: - $ref: '#/components/schemas/resourceSharingAccountId' - organization_id: - $ref: '#/components/schemas/resourceSharingOrganizationId' - type: object - resourceSharingCreateShareRequest: - properties: - name: - $ref: '#/components/schemas/resourceSharingShareName' - recipients: - items: - $ref: '#/components/schemas/resourceSharingCreateShareRecipientRequest' - type: array - resources: - items: - $ref: '#/components/schemas/resourceSharingCreateShareResourceRequest' - type: array - required: - - name - - resources - - recipients - type: object - resourceSharingCreateShareResourceRequest: - properties: - meta: - $ref: '#/components/schemas/resourceSharingResourceMeta' - resource_account_id: - $ref: '#/components/schemas/resourceSharingAccountId' - resource_id: - $ref: '#/components/schemas/resourceSharingResourceResourceId' - resource_type: - $ref: '#/components/schemas/resourceSharingResourceType' - required: - - resource_id - - resource_type - - resource_account_id - - meta - type: object - resourceSharingCreated: - description: When the share was created. - example: '2023-09-21T18:56:32.624632Z' - format: date-time - type: string - x-auditable: true - resourceSharingModified: - description: When the share was modified. - example: '2023-09-21T18:56:32.624632Z' - format: date-time - type: string - x-auditable: true - resourceSharingOrganizationId: - description: Organization identifier. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - type: string - x-auditable: true - resourceSharingRecipientAssociationStatus: - description: Share Recipient association status. - enum: - - associating - - associated - - disassociating - - disassociated - type: string - x-auditable: true - resourceSharingRecipientId: - description: Share Recipient identifier tag. - example: 3fd85f74b32742f1bff64a85009dda07 - maxLength: 32 - type: string - x-auditable: true - resourceSharingRecipientResourceError: - description: Share Recipient error message. - example: Recipient is missing necessary entitlement - type: string - x-auditable: true - resourceSharingRecipientResourceErrorTerminal: - description: Whether the error is terminal or will be continually retried. - example: true - type: boolean - x-auditable: true - resourceSharingResourceId: - description: Share Resource identifier. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - type: string - x-auditable: true - resourceSharingResourceMeta: - description: Resource Metadata. - type: object - resourceSharingResourceResourceId: - description: Share Resource identifier. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - type: string - x-auditable: true - resourceSharingResourceStatus: - description: Resource Status. - enum: - - active - - deleting - - deleted - type: string - x-auditable: true - resourceSharingResourceType: - description: Resource Type. - enum: - - custom-ruleset - - gateway-policy - - gateway-destination-ip - - gateway-block-page-settings - - gateway-extended-email-matching - type: string - x-auditable: true - resourceSharingResourceVersion: - description: Resource Version. - type: integer - x-auditable: true - resourceSharingResultInfo: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 2000 - type: number - total_pages: - description: Total number of pages using the given per page. - example: 50 - type: number - type: object - resourceSharingShareId: - description: Share identifier tag. - example: 3fd85f74b32742f1bff64a85009dda07 - maxLength: 32 - type: string - x-auditable: true - resourceSharingShareKind: - enum: - - sent - - received - type: string - x-auditable: true - resourceSharingShareName: - description: The name of the share. - example: My Shared WAF Managed Rule - type: string - x-auditable: true - resourceSharingShareObject: - properties: - account_id: - $ref: '#/components/schemas/resourceSharingAccountId' - account_name: - $ref: '#/components/schemas/resourceSharingAccountName' - associated_recipient_count: - description: >- - The number of recipients in the 'associated' state. This field is - only included when requested via the 'include_recipient_counts' - parameter. - example: 10 - type: integer - associating_recipient_count: - description: >- - The number of recipients in the 'associating' state. This field is - only included when requested via the 'include_recipient_counts' - parameter. - example: 1 - type: integer - created: - $ref: '#/components/schemas/resourceSharingCreated' - disassociated_recipient_count: - description: >- - The number of recipients in the 'disassociated' state. This field is - only included when requested via the 'include_recipient_counts' - parameter. - example: 0 - type: integer - disassociating_recipient_count: - description: >- - The number of recipients in the 'disassociating' state. This field - is only included when requested via the 'include_recipient_counts' - parameter. - example: 0 - type: integer - id: - $ref: '#/components/schemas/resourceSharingShareId' - kind: - $ref: '#/components/schemas/resourceSharingShareKind' - modified: - $ref: '#/components/schemas/resourceSharingModified' - name: - $ref: '#/components/schemas/resourceSharingShareName' - organization_id: - $ref: '#/components/schemas/resourceSharingOrganizationId' - resources: - description: >- - A list of resources that are part of the share. This field is only - included when requested via the 'include_resources' parameter. - items: - $ref: '#/components/schemas/resourceSharingShareResourceObject' - type: array - status: - $ref: '#/components/schemas/resourceSharingShareStatus' - target_type: - $ref: '#/components/schemas/resourceSharingShareTargetType' - required: - - id - - name - - account_id - - account_name - - organization_id - - created - - modified - - status - - target_type - type: object - resourceSharingShareRecipientObject: - properties: - account_id: - $ref: '#/components/schemas/resourceSharingAccountId' - association_status: - $ref: '#/components/schemas/resourceSharingRecipientAssociationStatus' - created: - $ref: '#/components/schemas/resourceSharingCreated' - id: - $ref: '#/components/schemas/resourceSharingRecipientId' - modified: - $ref: '#/components/schemas/resourceSharingModified' - resources: - items: - $ref: '#/components/schemas/resourceSharingShareRecipientResourceObject' - type: array - required: - - id - - account_id - - association_status - - created - - modified - type: object - resourceSharingShareRecipientResourceObject: - properties: - error: - $ref: '#/components/schemas/resourceSharingRecipientResourceError' - resource_id: - $ref: '#/components/schemas/resourceSharingResourceResourceId' - resource_version: - $ref: '#/components/schemas/resourceSharingResourceVersion' - terminal: - $ref: '#/components/schemas/resourceSharingRecipientResourceErrorTerminal' - required: - - error - - terminal - - resource_id - - resource_version - type: object - resourceSharingShareRecipientResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/resourceSharingV4errors' - result: - items: - $ref: '#/components/schemas/resourceSharingShareRecipientObject' - nullable: true - type: array - success: - description: Whether the API call was successful. - example: true - type: boolean - result_info: - $ref: '#/components/schemas/resourceSharingResultInfo' - required: - - success - - errors - resourceSharingShareRecipientResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/resourceSharingV4errors' - result: - $ref: '#/components/schemas/resourceSharingShareRecipientObject' - success: - description: Whether the API call was successful. - example: true - type: boolean - required: - - success - - errors - resourceSharingShareResourceObject: - properties: - created: - $ref: '#/components/schemas/resourceSharingCreated' - id: - $ref: '#/components/schemas/resourceSharingResourceId' - meta: - $ref: '#/components/schemas/resourceSharingResourceMeta' - modified: - $ref: '#/components/schemas/resourceSharingModified' - resource_account_id: - $ref: '#/components/schemas/resourceSharingAccountId' - resource_id: - $ref: '#/components/schemas/resourceSharingResourceResourceId' - resource_type: - $ref: '#/components/schemas/resourceSharingResourceType' - resource_version: - $ref: '#/components/schemas/resourceSharingResourceVersion' - status: - $ref: '#/components/schemas/resourceSharingResourceStatus' - required: - - id - - resource_id - - resource_type - - resource_account_id - - meta - - status - - created - - modified - - resource_version - type: object - resourceSharingShareResourceResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/resourceSharingV4errors' - result: - items: - $ref: '#/components/schemas/resourceSharingShareResourceObject' - nullable: true - type: array - success: - description: Whether the API call was successful. - example: true - type: boolean - result_info: - $ref: '#/components/schemas/resourceSharingResultInfo' - required: - - success - - errors - resourceSharingShareResourceResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/resourceSharingV4errors' - result: - $ref: '#/components/schemas/resourceSharingShareResourceObject' - success: - description: Whether the API call was successful. - example: true - type: boolean - required: - - success - - errors - resourceSharingShareResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/resourceSharingV4errors' - result: - items: - $ref: '#/components/schemas/resourceSharingShareObject' - nullable: true - type: array - success: - description: Whether the API call was successful. - example: true - type: boolean - result_info: - $ref: '#/components/schemas/resourceSharingResultInfo' - required: - - success - - errors - resourceSharingShareResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/resourceSharingV4errors' - result: - $ref: '#/components/schemas/resourceSharingShareObject' - success: - description: Whether the API call was successful. - example: true - type: boolean - required: - - success - - errors - resourceSharingShareStatus: - enum: - - active - - deleting - - deleted - type: string - x-auditable: true - resourceSharingShareTargetType: - enum: - - account - - organization - type: string - x-auditable: true - resourceSharingUpdateShareRecipientsRequest: - items: - $ref: '#/components/schemas/resourceSharingCreateShareRecipientRequest' - type: array - resourceSharingUpdateShareRequest: - properties: - name: - $ref: '#/components/schemas/resourceSharingShareName' - required: - - name - type: object - resourceSharingUpdateShareResourceRequest: - properties: - meta: - $ref: '#/components/schemas/resourceSharingResourceMeta' - required: - - meta - type: object - resourceSharingV4error: - $ref: '#/components/schemas/responseInfo' - resourceSharingV4errors: - example: [] - items: - $ref: '#/components/schemas/resourceSharingV4error' - type: array - responseInfo: - properties: - code: - minimum: 1000 - type: integer - message: - type: string - documentation_url: - type: string - source: - type: object - properties: - pointer: - type: string - required: - - code - - message - type: object - uniqueItems: true - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - shares: - id: cloudflare.resource_sharing.shares - name: shares - title: Shares - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1shares/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1shares/post' - response: - mediaType: application/json - openAPIDocKey: '201' - delete: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1shares~1{share_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1shares~1{share_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1shares~1{share_id}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/shares/methods/get' - - $ref: '#/components/x-stackQL-resources/shares/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/shares/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/shares/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/shares/methods/update' - recipients: - id: cloudflare.resource_sharing.recipients - name: recipients - title: Recipients - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1shares~1{share_id}~1recipients/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - share_recipient_create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1shares~1{share_id}~1recipients/post - response: - mediaType: application/json - openAPIDocKey: '201' - share_recipients_update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1shares~1{share_id}~1recipients/put - response: - mediaType: application/json - openAPIDocKey: '204' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1shares~1{share_id}~1recipients~1{recipient_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1shares~1{share_id}~1recipients~1{recipient_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/recipients/methods/get' - - $ref: '#/components/x-stackQL-resources/recipients/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/recipients/methods/share_recipient_create - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/recipients/methods/delete' - replace: - - $ref: >- - #/components/x-stackQL-resources/recipients/methods/share_recipients_update - resources: - id: cloudflare.resource_sharing.resources - name: resources - title: Resources - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1shares~1{share_id}~1resources/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1shares~1{share_id}~1resources/post - response: - mediaType: application/json - openAPIDocKey: '201' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1shares~1{share_id}~1resources~1{resource_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1shares~1{share_id}~1resources~1{resource_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1shares~1{share_id}~1resources~1{resource_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/resources/methods/get' - - $ref: '#/components/x-stackQL-resources/resources/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/resources/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/resources/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/resources/methods/update' +openapi: 3.0.3 +info: + title: resource_sharing API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/shares: + get: + description: Lists all account shares. + operationId: shares-list + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Filter shares by status. + in: query + name: status + schema: + $ref: '#/components/schemas/resourceSharingShareStatus' + - description: Filter shares by kind. + in: query + name: kind + schema: + $ref: '#/components/schemas/resourceSharingShareKind' + - description: Filter shares by target_type. + in: query + name: target_type + schema: + $ref: '#/components/schemas/resourceSharingShareTargetType' + - description: Filter share resources by resource_types. + in: query + name: resource_types + schema: + items: + $ref: '#/components/schemas/resourceSharingResourceType' + type: array + explode: true + - description: Order shares by values in the given field. + in: query + name: order + schema: + default: created + enum: + - name + - created + type: string + - description: Direction to sort objects. + in: query + name: direction + schema: + default: asc + enum: + - asc + - desc + type: string + - description: Page number. + in: query + name: page + schema: + minimum: 0 + multipleOf: 1 + type: integer + - description: Number of objects to return per page. + in: query + name: per_page + schema: + maximum: 100 + minimum: 0 + multipleOf: 1 + type: integer + - description: Include resources in the response. + in: query + name: include_resources + schema: + type: boolean + - description: Include recipient counts in the response. + in: query + name: include_recipient_counts + schema: + type: boolean + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingShareResponseCollection' + description: List account shares response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: List account shares response failure. + 5XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: List account shares response failure. + security: + - api_email: [] + api_key: [] + summary: List account shares + tags: + - Resource Sharing + x-api-token-group: null + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: resource_sharing + resource_chain: [] + method: list + post: + description: Creates a new resource share for sharing Cloudflare resources with other accounts or organizations. + operationId: share-create + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingCreateShareRequest' + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingShareResponseSingle' + description: Share created. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: Create share failure. + 5XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: Create share failure. + security: + - api_email: [] + api_key: [] + summary: Create a new share + tags: + - Resource Sharing + x-api-token-group: null + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: resource_sharing + resource_chain: [] + method: create + /accounts/{account_id}/shares/{share_id}: + delete: + description: Deletion is not immediate, an updated share object with a new status will be returned. + operationId: share-delete + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: share_id + schema: + $ref: '#/components/schemas/resourceSharingShareId' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingShareResponseSingle' + description: Share deleted. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: Delete share failure. + 5XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: Delete share failure. + security: + - api_email: [] + api_key: [] + summary: Delete a share + tags: + - Resource Sharing + x-api-token-group: null + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: resource_sharing + resource_chain: [] + method: delete + get: + description: Fetches share by ID. + operationId: shares-get-by-id + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: share_id + schema: + $ref: '#/components/schemas/resourceSharingShareId' + required: true + - description: Include resources in the response. + in: query + name: include_resources + schema: + type: boolean + - description: Include recipient counts in the response. + in: query + name: include_recipient_counts + schema: + type: boolean + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingShareResponseSingle' + description: Get account share response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: Get account share response failure. + 5XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: Get account share response failure. + security: + - api_email: [] + api_key: [] + summary: Get account share by ID + tags: + - Resource Sharing + x-api-token-group: null + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: resource_sharing + resource_chain: [] + method: get + put: + description: Updating is not immediate, an updated share object with a new status will be returned. + operationId: share-update + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: share_id + schema: + $ref: '#/components/schemas/resourceSharingShareId' + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingUpdateShareRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingShareResponseSingle' + description: Share updated. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: Update share failure. + 5XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: Update share failure. + security: + - api_email: [] + api_key: [] + summary: Update a share + tags: + - Resource Sharing + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: resource_sharing + resource_chain: [] + method: update + /accounts/{account_id}/shares/{share_id}/recipients: + get: + description: List share recipients by share ID. + operationId: share-recipients-list + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: share_id + schema: + $ref: '#/components/schemas/resourceSharingShareId' + required: true + - description: Include resources in the response. + in: query + name: include_resources + schema: + type: boolean + - description: Page number. + in: query + name: page + schema: + minimum: 0 + multipleOf: 1 + type: integer + - description: Number of objects to return per page. + in: query + name: per_page + schema: + maximum: 100 + minimum: 0 + multipleOf: 1 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingShareRecipientResponseCollection' + description: List account share recipients response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: List account share recipients response failure. + 5XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: List account share recipients response failure. + security: + - api_email: [] + api_key: [] + summary: List share recipients by share ID + tags: + - Resource Sharing + x-api-token-group: null + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: resource_sharing + resource_chain: + - recipients + method: list + post: + description: Adds a recipient to a resource share, granting them access to the shared resources. + operationId: share-recipient-create + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: share_id + schema: + $ref: '#/components/schemas/resourceSharingShareId' + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingCreateShareRecipientRequest' + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingShareRecipientResponseSingle' + description: Share recipient created. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: Create share recipient failure. + 5XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: Create share recipient failure. + security: + - api_email: [] + api_key: [] + summary: Create a new share recipient + tags: + - Resource Sharing + x-api-token-group: null + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + put: + description: Changes a share's recipients to match the given list. Returns an error if the share targets an organization. + operationId: share-recipients-update + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: share_id + schema: + $ref: '#/components/schemas/resourceSharingShareId' + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingUpdateShareRecipientsRequest' + responses: + '204': + description: Empty body + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: Update share recipients failure. + 5XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: Update share recipients failure. + security: + - api_email: [] + api_key: [] + summary: Update a share's recipients + tags: + - Resource Sharing + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + /accounts/{account_id}/shares/{share_id}/recipients/{recipient_id}: + delete: + description: Deletion is not immediate, an updated share recipient object with a new status will be returned. + operationId: share-recipient-delete + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: share_id + schema: + $ref: '#/components/schemas/resourceSharingShareId' + required: true + - in: path + name: recipient_id + schema: + $ref: '#/components/schemas/resourceSharingRecipientId' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingShareRecipientResponseSingle' + description: Share recipient deleted. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: Delete share recipient failure. + 5XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: Delete share recipient failure. + security: + - api_email: [] + api_key: [] + summary: Delete a share recipient + tags: + - Resource Sharing + x-api-token-group: null + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: resource_sharing + resource_chain: + - recipients + method: delete + get: + description: Get share recipient by ID. + operationId: share-recipients-get-by-id + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: share_id + schema: + $ref: '#/components/schemas/resourceSharingShareId' + required: true + - in: path + name: recipient_id + schema: + $ref: '#/components/schemas/resourceSharingRecipientId' + required: true + - description: Include resources in the response. + in: query + name: include_resources + schema: + type: boolean + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingShareRecipientResponseSingle' + description: Get account share recipient response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: Get account share recipient response failure. + 5XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: Get account share recipient response failure. + security: + - api_email: [] + api_key: [] + summary: Get share recipient by ID + tags: + - Resource Sharing + x-api-token-group: null + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: resource_sharing + resource_chain: + - recipients + method: get + /accounts/{account_id}/shares/{share_id}/resources: + get: + description: List share resources by share ID. + operationId: share-resources-list + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: share_id + schema: + $ref: '#/components/schemas/resourceSharingShareId' + required: true + - description: Filter share resources by status. + in: query + name: status + schema: + $ref: '#/components/schemas/resourceSharingResourceStatus' + - description: Filter share resources by resource_type. + in: query + name: resource_type + schema: + $ref: '#/components/schemas/resourceSharingResourceType' + - description: Page number. + in: query + name: page + schema: + minimum: 0 + multipleOf: 1 + type: integer + - description: Number of objects to return per page. + in: query + name: per_page + schema: + maximum: 100 + minimum: 0 + multipleOf: 1 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingShareResourceResponseCollection' + description: List account share resources response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: List account share resources response failure. + 5XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: List account share resources response failure. + security: + - api_email: [] + api_key: [] + summary: List share resources by share ID + tags: + - Resource Sharing + x-api-token-group: null + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: resource_sharing + resource_chain: + - resources + method: list + post: + description: Adds a resource to an existing share, making it available to share recipients. + operationId: share-resource-create + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: share_id + schema: + $ref: '#/components/schemas/resourceSharingShareId' + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingCreateShareResourceRequest' + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingShareResourceResponseSingle' + description: Share resource created. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: Create share resource failure. + 5XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: Create share resource failure. + security: + - api_email: [] + api_key: [] + summary: Create a new share resource + tags: + - Resource Sharing + x-api-token-group: null + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: resource_sharing + resource_chain: + - resources + method: create + /accounts/{account_id}/shares/{share_id}/resources/{resource_id}: + delete: + description: Deletion is not immediate, an updated share resource object with a new status will be returned. + operationId: share-resource-delete + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: share_id + schema: + $ref: '#/components/schemas/resourceSharingShareId' + required: true + - in: path + name: resource_id + schema: + $ref: '#/components/schemas/resourceSharingResourceId' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingShareResourceResponseSingle' + description: Share resource deleted. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: Delete share resource failure. + 5XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: Delete share resource failure. + security: + - api_email: [] + api_key: [] + summary: Delete a share resource + tags: + - Resource Sharing + x-api-token-group: null + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: resource_sharing + resource_chain: + - resources + method: delete + get: + description: Get share resource by ID. + operationId: share-resources-get-by-id + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: share_id + schema: + $ref: '#/components/schemas/resourceSharingShareId' + required: true + - in: path + name: resource_id + schema: + $ref: '#/components/schemas/resourceSharingResourceId' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingShareResourceResponseSingle' + description: Get account share resource response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: Get account share resource response failure. + 5XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: Get account share resource response failure. + security: + - api_email: [] + api_key: [] + summary: Get share resource by ID + tags: + - Resource Sharing + x-api-token-group: null + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: resource_sharing + resource_chain: + - resources + method: get + put: + description: Update is not immediate, an updated share resource object with a new status will be returned. + operationId: share-resource-update + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: share_id + schema: + $ref: '#/components/schemas/resourceSharingShareId' + required: true + - in: path + name: resource_id + schema: + $ref: '#/components/schemas/resourceSharingResourceId' + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingUpdateShareResourceRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingShareResourceResponseSingle' + description: Share resource updated. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: Update share resource failure. + 5XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceSharingApiResponseCommonFailure' + description: Update share resource failure. + security: + - api_email: [] + api_key: [] + summary: Update a share resource + tags: + - Resource Sharing + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: resource_sharing + resource_chain: + - resources + method: update +components: + schemas: + resourceSharingAccountId: + description: Account identifier. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + type: string + x-auditable: true + resourceSharingAccountName: + description: The display name of an account. + example: Account A + type: string + x-auditable: true + resourceSharingApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/resourceSharingV4errors' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + example: false + type: boolean + x-auditable: true + required: + - success + - errors + - result + type: object + resourceSharingCreateShareRecipientRequest: + description: Account or organization ID must be provided. + properties: + account_id: + $ref: '#/components/schemas/resourceSharingAccountId' + organization_id: + $ref: '#/components/schemas/resourceSharingOrganizationId' + type: object + resourceSharingCreateShareRequest: + properties: + name: + $ref: '#/components/schemas/resourceSharingShareName' + recipients: + items: + $ref: '#/components/schemas/resourceSharingCreateShareRecipientRequest' + type: array + resources: + items: + $ref: '#/components/schemas/resourceSharingCreateShareResourceRequest' + type: array + required: + - name + - resources + - recipients + type: object + resourceSharingCreateShareResourceRequest: + properties: + meta: + $ref: '#/components/schemas/resourceSharingResourceMeta' + resource_account_id: + $ref: '#/components/schemas/resourceSharingAccountId' + resource_id: + $ref: '#/components/schemas/resourceSharingResourceResourceId' + resource_type: + $ref: '#/components/schemas/resourceSharingResourceType' + required: + - resource_id + - resource_type + - resource_account_id + - meta + type: object + resourceSharingCreated: + description: When the share was created. + example: '2023-09-21T18:56:32.624632Z' + format: date-time + type: string + x-auditable: true + resourceSharingModified: + description: When the share was modified. + example: '2023-09-21T18:56:32.624632Z' + format: date-time + type: string + x-auditable: true + resourceSharingOrganizationId: + description: Organization identifier. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + type: string + x-auditable: true + resourceSharingRecipientAssociationStatus: + description: Share Recipient association status. + enum: + - associating + - associated + - disassociating + - disassociated + type: string + x-auditable: true + resourceSharingRecipientId: + description: Share Recipient identifier tag. + example: 3fd85f74b32742f1bff64a85009dda07 + maxLength: 32 + type: string + x-auditable: true + resourceSharingRecipientResourceError: + description: Share Recipient error message. + example: Recipient is missing necessary entitlement + type: string + x-auditable: true + resourceSharingRecipientResourceErrorTerminal: + description: Whether the error is terminal or will be continually retried. + example: true + type: boolean + x-auditable: true + resourceSharingResourceId: + description: Share Resource identifier. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + type: string + x-auditable: true + resourceSharingResourceMeta: + description: Resource Metadata. + type: object + resourceSharingResourceResourceId: + description: Share Resource identifier. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + type: string + x-auditable: true + resourceSharingResourceStatus: + description: Resource Status. + enum: + - active + - deleting + - deleted + type: string + x-auditable: true + resourceSharingResourceType: + description: Resource Type. + enum: + - custom-ruleset + - gateway-policy + - gateway-destination-ip + - gateway-block-page-settings + - gateway-extended-email-matching + type: string + x-auditable: true + resourceSharingResourceVersion: + description: Resource Version. + type: integer + x-auditable: true + resourceSharingResultInfo: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 2000 + type: number + total_pages: + description: Total number of pages using the given per page. + example: 50 + type: number + type: object + resourceSharingShareId: + description: Share identifier tag. + example: 3fd85f74b32742f1bff64a85009dda07 + maxLength: 32 + type: string + x-auditable: true + resourceSharingShareKind: + enum: + - sent + - received + type: string + x-auditable: true + resourceSharingShareName: + description: The name of the share. + example: My Shared WAF Managed Rule + type: string + x-auditable: true + resourceSharingShareObject: + properties: + account_id: + $ref: '#/components/schemas/resourceSharingAccountId' + account_name: + $ref: '#/components/schemas/resourceSharingAccountName' + associated_recipient_count: + description: The number of recipients in the 'associated' state. This field is only included when requested via the 'include_recipient_counts' parameter. + example: 10 + type: integer + associating_recipient_count: + description: The number of recipients in the 'associating' state. This field is only included when requested via the 'include_recipient_counts' parameter. + example: 1 + type: integer + created: + $ref: '#/components/schemas/resourceSharingCreated' + disassociated_recipient_count: + description: The number of recipients in the 'disassociated' state. This field is only included when requested via the 'include_recipient_counts' parameter. + example: 0 + type: integer + disassociating_recipient_count: + description: The number of recipients in the 'disassociating' state. This field is only included when requested via the 'include_recipient_counts' parameter. + example: 0 + type: integer + id: + $ref: '#/components/schemas/resourceSharingShareId' + kind: + $ref: '#/components/schemas/resourceSharingShareKind' + modified: + $ref: '#/components/schemas/resourceSharingModified' + name: + $ref: '#/components/schemas/resourceSharingShareName' + organization_id: + $ref: '#/components/schemas/resourceSharingOrganizationId' + resources: + description: A list of resources that are part of the share. This field is only included when requested via the 'include_resources' parameter. + items: + $ref: '#/components/schemas/resourceSharingShareResourceObject' + type: array + status: + $ref: '#/components/schemas/resourceSharingShareStatus' + target_type: + $ref: '#/components/schemas/resourceSharingShareTargetType' + required: + - id + - name + - account_id + - account_name + - organization_id + - created + - modified + - status + - target_type + type: object + resourceSharingShareRecipientObject: + properties: + account_id: + $ref: '#/components/schemas/resourceSharingAccountId' + association_status: + $ref: '#/components/schemas/resourceSharingRecipientAssociationStatus' + created: + $ref: '#/components/schemas/resourceSharingCreated' + id: + $ref: '#/components/schemas/resourceSharingRecipientId' + modified: + $ref: '#/components/schemas/resourceSharingModified' + resources: + items: + $ref: '#/components/schemas/resourceSharingShareRecipientResourceObject' + type: array + required: + - id + - account_id + - association_status + - created + - modified + type: object + resourceSharingShareRecipientResourceObject: + properties: + error: + $ref: '#/components/schemas/resourceSharingRecipientResourceError' + resource_id: + $ref: '#/components/schemas/resourceSharingResourceResourceId' + resource_version: + $ref: '#/components/schemas/resourceSharingResourceVersion' + terminal: + $ref: '#/components/schemas/resourceSharingRecipientResourceErrorTerminal' + required: + - error + - terminal + - resource_id + - resource_version + type: object + resourceSharingShareRecipientResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/resourceSharingV4errors' + result: + items: + $ref: '#/components/schemas/resourceSharingShareRecipientObject' + nullable: true + type: array + success: + description: Whether the API call was successful. + example: true + type: boolean + result_info: + $ref: '#/components/schemas/resourceSharingResultInfo' + required: + - success + - errors + resourceSharingShareRecipientResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/resourceSharingV4errors' + result: + $ref: '#/components/schemas/resourceSharingShareRecipientObject' + success: + description: Whether the API call was successful. + example: true + type: boolean + required: + - success + - errors + resourceSharingShareResourceObject: + properties: + created: + $ref: '#/components/schemas/resourceSharingCreated' + id: + $ref: '#/components/schemas/resourceSharingResourceId' + meta: + $ref: '#/components/schemas/resourceSharingResourceMeta' + modified: + $ref: '#/components/schemas/resourceSharingModified' + resource_account_id: + $ref: '#/components/schemas/resourceSharingAccountId' + resource_id: + $ref: '#/components/schemas/resourceSharingResourceResourceId' + resource_type: + $ref: '#/components/schemas/resourceSharingResourceType' + resource_version: + $ref: '#/components/schemas/resourceSharingResourceVersion' + status: + $ref: '#/components/schemas/resourceSharingResourceStatus' + required: + - id + - resource_id + - resource_type + - resource_account_id + - meta + - status + - created + - modified + - resource_version + type: object + resourceSharingShareResourceResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/resourceSharingV4errors' + result: + items: + $ref: '#/components/schemas/resourceSharingShareResourceObject' + nullable: true + type: array + success: + description: Whether the API call was successful. + example: true + type: boolean + result_info: + $ref: '#/components/schemas/resourceSharingResultInfo' + required: + - success + - errors + resourceSharingShareResourceResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/resourceSharingV4errors' + result: + $ref: '#/components/schemas/resourceSharingShareResourceObject' + success: + description: Whether the API call was successful. + example: true + type: boolean + required: + - success + - errors + resourceSharingShareResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/resourceSharingV4errors' + result: + items: + $ref: '#/components/schemas/resourceSharingShareObject' + nullable: true + type: array + success: + description: Whether the API call was successful. + example: true + type: boolean + result_info: + $ref: '#/components/schemas/resourceSharingResultInfo' + required: + - success + - errors + resourceSharingShareResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/resourceSharingV4errors' + result: + $ref: '#/components/schemas/resourceSharingShareObject' + success: + description: Whether the API call was successful. + example: true + type: boolean + required: + - success + - errors + resourceSharingShareStatus: + enum: + - active + - deleting + - deleted + type: string + x-auditable: true + resourceSharingShareTargetType: + enum: + - account + - organization + type: string + x-auditable: true + resourceSharingUpdateShareRecipientsRequest: + items: + $ref: '#/components/schemas/resourceSharingCreateShareRecipientRequest' + type: array + resourceSharingUpdateShareRequest: + properties: + name: + $ref: '#/components/schemas/resourceSharingShareName' + required: + - name + type: object + resourceSharingUpdateShareResourceRequest: + properties: + meta: + $ref: '#/components/schemas/resourceSharingResourceMeta' + required: + - meta + type: object + resourceSharingV4error: + $ref: '#/components/schemas/responseInfo' + resourceSharingV4errors: + example: [] + items: + $ref: '#/components/schemas/resourceSharingV4error' + type: array + responseInfo: + properties: + code: + minimum: 1000 + type: integer + message: + type: string + documentation_url: + type: string + source: + type: object + properties: + pointer: + type: string + required: + - code + - message + type: object + uniqueItems: true + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + shares: + id: cloudflare.resource_sharing.shares + name: shares + title: Shares + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1shares/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1shares/post' + response: + mediaType: application/json + openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .recipients }}{{ $sep }}"recipients": {{ if eq (kindOf .recipients) "string" }}{{ .recipients }}{{ else }}{{ toJson .recipients }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .resources }}{{ $sep }}"resources": {{ if eq (kindOf .resources) "string" }}{{ .resources }}{{ else }}{{ toJson .resources }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1shares~1{share_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1shares~1{share_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1shares~1{share_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/shares/methods/get' + - $ref: '#/components/x-stackQL-resources/shares/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/shares/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/shares/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/shares/methods/update' + recipients: + id: cloudflare.resource_sharing.recipients + name: recipients + title: Recipients + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1shares~1{share_id}~1recipients/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + share_recipient_create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1shares~1{share_id}~1recipients/post' + response: + mediaType: application/json + openAPIDocKey: '201' + share_recipients_update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1shares~1{share_id}~1recipients/put' + response: + mediaType: application/json + openAPIDocKey: '204' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1shares~1{share_id}~1recipients~1{recipient_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1shares~1{share_id}~1recipients~1{recipient_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/recipients/methods/get' + - $ref: '#/components/x-stackQL-resources/recipients/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/recipients/methods/share_recipient_create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/recipients/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/recipients/methods/share_recipients_update' + resources: + id: cloudflare.resource_sharing.resources + name: resources + title: Resources + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1shares~1{share_id}~1resources/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1shares~1{share_id}~1resources/post' + response: + mediaType: application/json + openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .meta }}{{ $sep }}"meta": {{ if eq (kindOf .meta) "string" }}{{ .meta }}{{ else }}{{ toJson .meta }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .resource_account_id }}{{ $sep }}"resource_account_id": {{ toJson .resource_account_id }}{{- $sep = "," -}}{{ end }} + + {{- if .resource_id }}{{ $sep }}"resource_id": {{ toJson .resource_id }}{{- $sep = "," -}}{{ end }} + + {{- if .resource_type }}{{ $sep }}"resource_type": {{ toJson .resource_type }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1shares~1{share_id}~1resources~1{resource_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1shares~1{share_id}~1resources~1{resource_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1shares~1{share_id}~1resources~1{resource_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .meta }}{{ $sep }}"meta": {{ if eq (kindOf .meta) "string" }}{{ .meta }}{{ else }}{{ toJson .meta }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/resources/methods/get' + - $ref: '#/components/x-stackQL-resources/resources/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/resources/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/resources/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/resources/methods/update' diff --git a/providers/src/cloudflare/v00.00.00000/services/resource_tagging.yaml b/providers/src/cloudflare/v00.00.00000/services/resource_tagging.yaml index 0d49faa0..d1eeb0dc 100644 --- a/providers/src/cloudflare/v00.00.00000/services/resource_tagging.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/resource_tagging.yaml @@ -1,1160 +1,1096 @@ -openapi: 3.0.3 -info: - title: resource_tagging API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/tags: - delete: - description: Removes all tags from a specific account-level resource. - operationId: tags-delete - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: >- - ETag value for optimistic concurrency control. When provided, the - server will verify the current resource ETag matches before applying - the write. Returns 412 Precondition Failed if the resource has been - modified since the ETag was obtained. Omit this header for - unconditional writes. - in: header - name: If-Match - schema: - type: string - responses: - '204': - description: Tags successfully deleted (no content). - '412': - content: - application/json: - schema: - $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' - description: >- - Precondition failed. The resource has been modified since the - provided ETag was obtained. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' - description: Delete tags response failure. - 5XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' - description: Delete tags response failure. - security: - - api_email: [] - api_key: [] - summary: Delete tags from an account-level resource - tags: - - Resource Tagging - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: resource_tagging - resource_chain: - - account_tags - method: delete - get: - description: Retrieves tags for a specific account-level resource. - operationId: tags-get - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: The ID of the resource to retrieve tags for. - in: query - name: resource_id - schema: - $ref: '#/components/schemas/resourceTaggingResourceId' - - description: The type of the resource. - in: query - name: resource_type - schema: - $ref: '#/components/schemas/resourceTaggingAccountResourceType' - - description: Worker identifier. Required for worker_version resources. - in: query - name: worker_id - schema: - $ref: '#/components/schemas/resourceTaggingWorkerId' - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/resourceTaggingTaggedResourceResponseSingle - description: Get tags for single resource response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' - description: Get tags for single resource response failure. - 5XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' - description: Get tags for single resource response failure. - security: - - api_email: [] - api_key: [] - summary: Get tags for an account-level resource - tags: - - Resource Tagging - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: resource_tagging - resource_chain: - - account_tags - method: get - put: - description: Creates or updates tags for a specific account-level resource. - operationId: tags-set - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: >- - ETag value for optimistic concurrency control. When provided, the - server will verify the current resource ETag matches before applying - the write. Returns 412 Precondition Failed if the resource has been - modified since the ETag was obtained. Omit this header for - unconditional writes. - in: header - name: If-Match - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceTaggingSetTagsRequestAccountLevel' - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/resourceTaggingTaggedResourceResponseSingle - description: Set tags response. - '412': - content: - application/json: - schema: - $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' - description: >- - Precondition failed. The resource has been modified since the - provided ETag was obtained. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' - description: Set tags response failure. - 5XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' - description: Set tags response failure. - security: - - api_email: [] - api_key: [] - summary: Set tags for an account-level resource - tags: - - Resource Tagging - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: resource_tagging - resource_chain: - - account_tags - method: update - /accounts/{account_id}/tags/keys: - get: - description: Lists all distinct tag keys used across resources in an account. - operationId: tags-list-keys - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Cursor for pagination. - in: query - name: cursor - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/resourceTaggingTagKeysResponseCollection' - description: List tag keys response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' - description: List tag keys response failure. - 5XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' - description: List tag keys response failure. - security: - - api_email: [] - api_key: [] - summary: List tag keys - tags: - - Resource Tagging - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: resource_tagging - resource_chain: - - keys - method: list - /accounts/{account_id}/tags/resources: - get: - description: Lists all tagged resources for an account. - operationId: tags-list - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: >- - Filter by resource type. Can be repeated to filter by multiple types - (OR logic). Example: ?type=zone&type=worker - explode: true - in: query - name: type - schema: - items: - $ref: '#/components/schemas/resourceTaggingResourceType' - type: array - style: form - - description: >- - Filter resources by tag criteria. This parameter can be repeated - multiple times, with AND logic between parameters. Supported syntax: - - **Key-only**: `tag=` - Resource must have the tag key (e.g., - `tag=production`) - **Key-value**: `tag==` - Resource - must have the tag with specific value (e.g., `tag=env=prod`) - - **Multiple values (OR)**: `tag==,` - Resource must have - tag with any of the values (e.g., `tag=env=prod,staging`) - **Negate - key-only**: `tag=!` - Resource must not have the tag key (e.g., - `tag=!archived`) - **Negate key-value**: `tag=!=` - - Resource must not have the tag with specific value (e.g., - `tag=region!=us-west-1`) Multiple tag parameters are combined with - AND logic. - explode: true - in: query - name: tag - schema: - items: - type: string - type: array - - description: Cursor for pagination. - in: query - name: cursor - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/resourceTaggingTaggedResourceResponseCollection - description: List tagged resources response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' - description: List tagged resources response failure. - 5XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' - description: List tagged resources response failure. - security: - - api_email: [] - api_key: [] - summary: List tagged resources - tags: - - Resource Tagging - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: resource_tagging - resource_chain: [] - method: list - /accounts/{account_id}/tags/values/{tag_key}: - get: - description: >- - Lists all distinct values for a given tag key, optionally filtered by - resource type. - operationId: tags-list-values - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: The tag key to retrieve values for. - in: path - name: tag_key - schema: - type: string - required: true - - description: Filter by resource type. - in: query - name: type - schema: - $ref: '#/components/schemas/resourceTaggingResourceType' - - description: Cursor for pagination. - in: query - name: cursor - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/resourceTaggingTagValuesResponseCollection - description: List tag values response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' - description: List tag values response failure. - 5XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' - description: List tag values response failure. - security: - - api_email: [] - api_key: [] - summary: List tag values - tags: - - Resource Tagging - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: resource_tagging - resource_chain: - - values - method: list - /zones/{zone_id}/tags: - delete: - description: Removes all tags from a specific zone-level resource. - operationId: tags-zone-delete - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: >- - ETag value for optimistic concurrency control. When provided, the - server will verify the current resource ETag matches before applying - the write. Returns 412 Precondition Failed if the resource has been - modified since the ETag was obtained. Omit this header for - unconditional writes. - in: header - name: If-Match - schema: - type: string - responses: - '204': - description: Tags successfully deleted (no content). - '412': - content: - application/json: - schema: - $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' - description: >- - Precondition failed. The resource has been modified since the - provided ETag was obtained. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' - description: Delete tags response failure. - 5XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' - description: Delete tags response failure. - security: - - api_email: [] - api_key: [] - summary: Delete tags from a zone-level resource - tags: - - Resource Tagging - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: resource_tagging - resource_chain: - - zone_tags - method: delete - get: - description: Retrieves tags for a specific zone-level resource. - operationId: tags-zone-get - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: The ID of the resource to retrieve tags for. - in: query - name: resource_id - schema: - $ref: '#/components/schemas/resourceTaggingResourceId' - - description: The type of the resource. - in: query - name: resource_type - schema: - $ref: '#/components/schemas/resourceTaggingZoneResourceType' - - description: >- - Access application ID identifier. Required for - access_application_policy resources. - in: query - name: access_application_id - schema: - $ref: '#/components/schemas/resourceTaggingAccessApplicationId' - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/resourceTaggingTaggedResourceResponseSingle - description: Get tags for single resource response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' - description: Get tags for single resource response failure. - 5XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' - description: Get tags for single resource response failure. - security: - - api_email: [] - api_key: [] - summary: Get tags for a zone-level resource - tags: - - Resource Tagging - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: resource_tagging - resource_chain: - - zone_tags - method: get - put: - description: >- - Creates or updates tags for a specific zone-level resource. Replaces all - existing tags for the resource. - operationId: tags-zone-set - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: >- - ETag value for optimistic concurrency control. When provided, the - server will verify the current resource ETag matches before applying - the write. Returns 412 Precondition Failed if the resource has been - modified since the ETag was obtained. Omit this header for - unconditional writes. - in: header - name: If-Match - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceTaggingSetTagsRequestZoneLevel' - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/resourceTaggingTaggedResourceResponseSingle - description: Set tags response. - '412': - content: - application/json: - schema: - $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' - description: >- - Precondition failed. The resource has been modified since the - provided ETag was obtained. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' - description: Set tags response failure. - 5XX: - content: - application/json: - schema: - $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' - description: Set tags response failure. - security: - - api_email: [] - api_key: [] - summary: Set tags for a zone-level resource - tags: - - Resource Tagging - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: resource_tagging - resource_chain: - - zone_tags - method: update -components: - schemas: - resourceTaggingAccessApplicationId: - description: >- - Access application ID is required only for access_application_policy - resources - example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 - format: uuid - type: string - resourceTaggingAccountResourceType: - description: Identifies the type of account-level resource. - enum: - - access_application - - access_group - - account - - ai_gateway - - alerting_policy - - alerting_webhook - - cloudflared_tunnel - - d1_database - - durable_object_namespace - - gateway_list - - gateway_rule - - image - - kv_namespace - - queue - - r2_bucket - - resource_share - - stream_live_input - - stream_video - - worker - - worker_version - example: worker - type: string - x-auditable: true - resourceTaggingApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/resourceTaggingMessages' - messages: - example: [] - $ref: '#/components/schemas/resourceTaggingMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - resourceTaggingCursorResultInfo: - properties: - count: - description: Indicates the number of results returned in the current page. - example: 20 - type: integer - cursor: - description: >- - Provides a cursor for the next page of results. Include this value - in the next request to continue pagination. - example: eyJhY2NvdW50X2lkIjoxMjM0NTY3ODkwfQ - nullable: true - type: string - type: object - resourceTaggingEtag: - description: >- - ETag identifier for optimistic concurrency control. Formatted as - "v1:" where the hash is the base64url-encoded SHA-256 (truncated - to 128 bits) of the tags map canonicalized using RFC 8785 (JSON - Canonicalization Scheme). Clients should treat ETags as opaque strings - and pass them back via the If-Match header on write operations. - example: v1:RBNvo1WzZ4oRRq0W9-hkng - readOnly: true - type: string - resourceTaggingIdentifier: - description: Identifier. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - type: string - x-auditable: true - resourceTaggingMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - resourceTaggingResourceId: - description: Identifies the unique resource. - example: 023e105f4ecef8ad9ca31a8372d0c353 - type: string - x-auditable: true - resourceTaggingResourceName: - description: Human-readable name of the resource. - example: my-worker-script - type: string - resourceTaggingResourceType: - description: Identifies the type of resource. - enum: - - access_application - - access_application_policy - - access_group - - account - - ai_gateway - - alerting_policy - - alerting_webhook - - api_gateway_operation - - cloudflared_tunnel - - custom_certificate - - custom_hostname - - d1_database - - dns_record - - durable_object_namespace - - gateway_list - - gateway_rule - - image - - kv_namespace - - managed_client_certificate - - queue - - r2_bucket - - resource_share - - stream_live_input - - stream_video - - worker - - worker_version - - zone - example: zone - type: string - x-auditable: true - resourceTaggingSetTagsRequestAccountLevel: - description: Request body schema for setting tags on account-level resources. - type: object - properties: - resource_id: - $ref: '#/components/schemas/resourceTaggingResourceId' - resource_type: - description: >- - Enum for base account-level resource types (those with no extra - required fields). - enum: - - access_application - - access_group - - account - - ai_gateway - - alerting_policy - - alerting_webhook - - cloudflared_tunnel - - d1_database - - durable_object_namespace - - gateway_list - - gateway_rule - - image - - kv_namespace - - queue - - r2_bucket - - resource_share - - stream_live_input - - stream_video - - worker - - worker_version - example: worker - type: string - x-auditable: true - worker_id: - $ref: '#/components/schemas/resourceTaggingWorkerId' - tags: - $ref: '#/components/schemas/resourceTaggingTags' - required: - - resource_id - - resource_type - resourceTaggingSetTagsRequestZoneLevel: - description: Request body schema for setting tags on zone-level resources. - type: object - properties: - resource_id: - $ref: '#/components/schemas/resourceTaggingResourceId' - resource_type: - $ref: '#/components/schemas/resourceTaggingZoneResourceTypeBaseEnum' - tags: - $ref: '#/components/schemas/resourceTaggingTags' - access_application_id: - $ref: '#/components/schemas/resourceTaggingAccessApplicationId' - required: - - resource_id - - resource_type - resourceTaggingTagKeysResponseCollection: - properties: - errors: - $ref: '#/components/schemas/resourceTaggingMessages' - messages: - $ref: '#/components/schemas/resourceTaggingMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - description: Contains an array of distinct tag keys. - example: - - environment - - team - - region - items: - type: string - type: array - result_info: - $ref: '#/components/schemas/resourceTaggingCursorResultInfo' - required: - - success - - errors - - messages - type: object - resourceTaggingTagValuesResponseCollection: - properties: - errors: - $ref: '#/components/schemas/resourceTaggingMessages' - messages: - $ref: '#/components/schemas/resourceTaggingMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - example: - - production - - staging - items: - type: string - type: array - result_info: - $ref: '#/components/schemas/resourceTaggingCursorResultInfo' - required: - - success - - errors - - messages - type: object - resourceTaggingTaggedResourceObject: - type: object - description: Response for access_application resources - properties: - type: - enum: - - access_application - type: string - etag: - $ref: '#/components/schemas/resourceTaggingEtag' - id: - $ref: '#/components/schemas/resourceTaggingResourceId' - name: - $ref: '#/components/schemas/resourceTaggingResourceName' - tags: - $ref: '#/components/schemas/resourceTaggingTags' - access_application_id: - $ref: '#/components/schemas/resourceTaggingAccessApplicationId' - zone_id: - $ref: '#/components/schemas/resourceTaggingZoneId' - worker_id: - $ref: '#/components/schemas/resourceTaggingWorkerId' - required: - - etag - - id - - name - - tags - - type - resourceTaggingTaggedResourceResponseCollection: - properties: - errors: - $ref: '#/components/schemas/resourceTaggingMessages' - messages: - $ref: '#/components/schemas/resourceTaggingMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - items: - $ref: '#/components/schemas/resourceTaggingTaggedResourceObject' - type: array - result_info: - $ref: '#/components/schemas/resourceTaggingCursorResultInfo' - required: - - success - - errors - - messages - type: object - resourceTaggingTaggedResourceResponseSingle: - properties: - errors: - $ref: '#/components/schemas/resourceTaggingMessages' - messages: - $ref: '#/components/schemas/resourceTaggingMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/resourceTaggingTaggedResourceObject' - required: - - success - - errors - - messages - type: object - resourceTaggingTags: - description: Contains key-value pairs of tags. - example: - environment: production - team: engineering - type: object - x-auditable: true - resourceTaggingWorkerId: - description: Worker ID is required only for worker_version resources - example: 3f72a691-44b3-4c11-8642-c18a88ddaa5e - type: string - resourceTaggingZoneId: - description: Zone ID is required only for zone-level resources - minLength: 32 - $ref: '#/components/schemas/resourceTaggingIdentifier' - resourceTaggingZoneResourceType: - description: Identifies the type of zone-level resource. - enum: - - access_application_policy - - api_gateway_operation - - custom_certificate - - custom_hostname - - dns_record - - managed_client_certificate - - zone - example: zone - type: string - x-auditable: true - resourceTaggingZoneResourceTypeBaseEnum: - description: >- - Enum for base zone-level resource types (those with no extra required - fields). - enum: - - api_gateway_operation - - custom_certificate - - custom_hostname - - dns_record - - managed_client_certificate - - zone - example: zone - type: string - x-auditable: true - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - account_tags: - id: cloudflare.resource_tagging.account_tags - name: account_tags - title: Account Tags - methods: - delete: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1tags/delete' - response: - mediaType: application/json - openAPIDocKey: '204' - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1tags/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1tags/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/account_tags/methods/list' - insert: [] - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/account_tags/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/account_tags/methods/update' - keys: - id: cloudflare.resource_tagging.keys - name: keys - title: Keys - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1tags~1keys/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/keys/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - resources: - id: cloudflare.resource_tagging.resources - name: resources - title: Resources - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1tags~1resources/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/resources/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - values: - id: cloudflare.resource_tagging.values - name: values - title: Values - methods: - get: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1tags~1values~1{tag_key}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/values/methods/get' - insert: [] - update: [] - delete: [] - replace: [] - zone_tags: - id: cloudflare.resource_tagging.zone_tags - name: zone_tags - title: Zone Tags - methods: - delete: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1tags/delete' - response: - mediaType: application/json - openAPIDocKey: '204' - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1tags/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1tags/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/zone_tags/methods/list' - insert: [] - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/zone_tags/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/zone_tags/methods/update' +openapi: 3.0.3 +info: + title: resource_tagging API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/tags: + delete: + description: Removes all tags from a specific account-level resource. + operationId: tags-delete + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: ETag value for optimistic concurrency control. When provided, the server will verify the current resource ETag matches before applying the write. Returns 412 Precondition Failed if the resource has been modified since the ETag was obtained. Omit this header for unconditional writes. + in: header + name: If-Match + schema: + type: string + responses: + '204': + description: Tags successfully deleted (no content). + '412': + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' + description: Precondition failed. The resource has been modified since the provided ETag was obtained. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' + description: Delete tags response failure. + 5XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' + description: Delete tags response failure. + security: + - api_email: [] + api_key: [] + summary: Delete tags from an account-level resource + tags: + - Resource Tagging + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: resource_tagging + resource_chain: + - account_tags + method: delete + get: + description: Retrieves tags for a specific account-level resource. + operationId: tags-get + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: The ID of the resource to retrieve tags for. + in: query + name: resource_id + schema: + $ref: '#/components/schemas/resourceTaggingResourceId' + - description: The type of the resource. + in: query + name: resource_type + schema: + $ref: '#/components/schemas/resourceTaggingAccountResourceType' + - description: Worker identifier. Required for worker_version resources. + in: query + name: worker_id + schema: + $ref: '#/components/schemas/resourceTaggingWorkerId' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingTaggedResourceResponseSingle' + description: Get tags for single resource response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' + description: Get tags for single resource response failure. + 5XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' + description: Get tags for single resource response failure. + security: + - api_email: [] + api_key: [] + summary: Get tags for an account-level resource + tags: + - Resource Tagging + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: resource_tagging + resource_chain: + - account_tags + method: get + put: + description: Creates or updates tags for a specific account-level resource. + operationId: tags-set + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: ETag value for optimistic concurrency control. When provided, the server will verify the current resource ETag matches before applying the write. Returns 412 Precondition Failed if the resource has been modified since the ETag was obtained. Omit this header for unconditional writes. + in: header + name: If-Match + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingSetTagsRequestAccountLevel' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingTaggedResourceResponseSingle' + description: Set tags response. + '412': + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' + description: Precondition failed. The resource has been modified since the provided ETag was obtained. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' + description: Set tags response failure. + 5XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' + description: Set tags response failure. + security: + - api_email: [] + api_key: [] + summary: Set tags for an account-level resource + tags: + - Resource Tagging + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: resource_tagging + resource_chain: + - account_tags + method: update + /accounts/{account_id}/tags/keys: + get: + description: Lists all distinct tag keys used across resources in an account. + operationId: tags-list-keys + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Cursor for pagination. + in: query + name: cursor + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingTagKeysResponseCollection' + description: List tag keys response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' + description: List tag keys response failure. + 5XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' + description: List tag keys response failure. + security: + - api_email: [] + api_key: [] + summary: List tag keys + tags: + - Resource Tagging + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: resource_tagging + resource_chain: + - keys + method: list + /accounts/{account_id}/tags/resources: + get: + description: Lists all tagged resources for an account. + operationId: tags-list + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: 'Filter by resource type. Can be repeated to filter by multiple types (OR logic). Example: ?type=zone&type=worker' + explode: true + in: query + name: type + schema: + items: + $ref: '#/components/schemas/resourceTaggingResourceType' + type: array + style: form + - description: 'Filter resources by tag criteria. This parameter can be repeated multiple times, with AND logic between parameters. Supported syntax: - **Key-only**: `tag=` - Resource must have the tag key (e.g., `tag=production`) - **Key-value**: `tag==` - Resource must have the tag with specific value (e.g., `tag=env=prod`) - **Multiple values (OR)**: `tag==,` - Resource must have tag with any of the values (e.g., `tag=env=prod,staging`) - **Negate key-only**: `tag=!` - Resource must not have the tag key (e.g., `tag=!archived`) - **Negate key-value**: `tag=!=` - Resource must not have the tag with specific value (e.g., `tag=region!=us-west-1`) Multiple tag parameters are combined with AND logic.' + explode: true + in: query + name: tag + schema: + items: + type: string + type: array + - description: Cursor for pagination. + in: query + name: cursor + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingTaggedResourceResponseCollection' + description: List tagged resources response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' + description: List tagged resources response failure. + 5XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' + description: List tagged resources response failure. + security: + - api_email: [] + api_key: [] + summary: List tagged resources + tags: + - Resource Tagging + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: resource_tagging + resource_chain: [] + method: list + /accounts/{account_id}/tags/values/{tag_key}: + get: + description: Lists all distinct values for a given tag key, optionally filtered by resource type. + operationId: tags-list-values + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: The tag key to retrieve values for. + in: path + name: tag_key + schema: + type: string + required: true + - description: Filter by resource type. + in: query + name: type + schema: + $ref: '#/components/schemas/resourceTaggingResourceType' + - description: Cursor for pagination. + in: query + name: cursor + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingTagValuesResponseCollection' + description: List tag values response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' + description: List tag values response failure. + 5XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' + description: List tag values response failure. + security: + - api_email: [] + api_key: [] + summary: List tag values + tags: + - Resource Tagging + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: resource_tagging + resource_chain: + - values + method: list + /zones/{zone_id}/tags: + delete: + description: Removes all tags from a specific zone-level resource. + operationId: tags-zone-delete + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: ETag value for optimistic concurrency control. When provided, the server will verify the current resource ETag matches before applying the write. Returns 412 Precondition Failed if the resource has been modified since the ETag was obtained. Omit this header for unconditional writes. + in: header + name: If-Match + schema: + type: string + responses: + '204': + description: Tags successfully deleted (no content). + '412': + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' + description: Precondition failed. The resource has been modified since the provided ETag was obtained. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' + description: Delete tags response failure. + 5XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' + description: Delete tags response failure. + security: + - api_email: [] + api_key: [] + summary: Delete tags from a zone-level resource + tags: + - Resource Tagging + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: resource_tagging + resource_chain: + - zone_tags + method: delete + get: + description: Retrieves tags for a specific zone-level resource. + operationId: tags-zone-get + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: The ID of the resource to retrieve tags for. + in: query + name: resource_id + schema: + $ref: '#/components/schemas/resourceTaggingResourceId' + - description: The type of the resource. + in: query + name: resource_type + schema: + $ref: '#/components/schemas/resourceTaggingZoneResourceType' + - description: Access application ID identifier. Required for access_application_policy resources. + in: query + name: access_application_id + schema: + $ref: '#/components/schemas/resourceTaggingAccessApplicationId' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingTaggedResourceResponseSingle' + description: Get tags for single resource response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' + description: Get tags for single resource response failure. + 5XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' + description: Get tags for single resource response failure. + security: + - api_email: [] + api_key: [] + summary: Get tags for a zone-level resource + tags: + - Resource Tagging + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: resource_tagging + resource_chain: + - zone_tags + method: get + put: + description: Creates or updates tags for a specific zone-level resource. Replaces all existing tags for the resource. + operationId: tags-zone-set + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: ETag value for optimistic concurrency control. When provided, the server will verify the current resource ETag matches before applying the write. Returns 412 Precondition Failed if the resource has been modified since the ETag was obtained. Omit this header for unconditional writes. + in: header + name: If-Match + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingSetTagsRequestZoneLevel' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingTaggedResourceResponseSingle' + description: Set tags response. + '412': + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' + description: Precondition failed. The resource has been modified since the provided ETag was obtained. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' + description: Set tags response failure. + 5XX: + content: + application/json: + schema: + $ref: '#/components/schemas/resourceTaggingApiResponseCommonFailure' + description: Set tags response failure. + security: + - api_email: [] + api_key: [] + summary: Set tags for a zone-level resource + tags: + - Resource Tagging + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: resource_tagging + resource_chain: + - zone_tags + method: update +components: + schemas: + resourceTaggingAccessApplicationId: + description: Access application ID is required only for access_application_policy resources + example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 + format: uuid + type: string + resourceTaggingAccountResourceType: + description: Identifies the type of account-level resource. + enum: + - access_application + - access_group + - account + - ai_gateway + - alerting_policy + - alerting_webhook + - cloudflared_tunnel + - d1_database + - durable_object_namespace + - gateway_list + - gateway_rule + - image + - kv_namespace + - queue + - r2_bucket + - resource_share + - stream_live_input + - stream_video + - worker + - worker_version + example: worker + type: string + x-auditable: true + resourceTaggingApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/resourceTaggingMessages' + messages: + example: [] + $ref: '#/components/schemas/resourceTaggingMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + resourceTaggingCursorResultInfo: + properties: + count: + description: Indicates the number of results returned in the current page. + example: 20 + type: integer + cursor: + description: Provides a cursor for the next page of results. Include this value in the next request to continue pagination. + example: eyJhY2NvdW50X2lkIjoxMjM0NTY3ODkwfQ + nullable: true + type: string + type: object + resourceTaggingEtag: + description: ETag identifier for optimistic concurrency control. Formatted as "v1:" where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations. + example: v1:RBNvo1WzZ4oRRq0W9-hkng + readOnly: true + type: string + resourceTaggingIdentifier: + description: Identifier. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + type: string + x-auditable: true + resourceTaggingMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + resourceTaggingResourceId: + description: Identifies the unique resource. + example: 023e105f4ecef8ad9ca31a8372d0c353 + type: string + x-auditable: true + resourceTaggingResourceName: + description: Human-readable name of the resource. + example: my-worker-script + type: string + resourceTaggingResourceType: + description: Identifies the type of resource. + enum: + - access_application + - access_application_policy + - access_group + - account + - ai_gateway + - alerting_policy + - alerting_webhook + - api_gateway_operation + - cloudflared_tunnel + - custom_certificate + - custom_hostname + - d1_database + - dns_record + - durable_object_namespace + - gateway_list + - gateway_rule + - image + - kv_namespace + - managed_client_certificate + - queue + - r2_bucket + - resource_share + - stream_live_input + - stream_video + - worker + - worker_version + - zone + example: zone + type: string + x-auditable: true + resourceTaggingSetTagsRequestAccountLevel: + description: Request body schema for setting tags on account-level resources. + type: object + properties: + resource_id: + $ref: '#/components/schemas/resourceTaggingResourceId' + resource_type: + description: Enum for base account-level resource types (those with no extra required fields). + enum: + - access_application + - access_group + - account + - ai_gateway + - alerting_policy + - alerting_webhook + - cloudflared_tunnel + - d1_database + - durable_object_namespace + - gateway_list + - gateway_rule + - image + - kv_namespace + - queue + - r2_bucket + - resource_share + - stream_live_input + - stream_video + - worker + - worker_version + example: worker + type: string + x-auditable: true + worker_id: + $ref: '#/components/schemas/resourceTaggingWorkerId' + tags: + $ref: '#/components/schemas/resourceTaggingTags' + required: + - resource_id + - resource_type + resourceTaggingSetTagsRequestZoneLevel: + description: Request body schema for setting tags on zone-level resources. + type: object + properties: + resource_id: + $ref: '#/components/schemas/resourceTaggingResourceId' + resource_type: + $ref: '#/components/schemas/resourceTaggingZoneResourceTypeBaseEnum' + tags: + $ref: '#/components/schemas/resourceTaggingTags' + access_application_id: + $ref: '#/components/schemas/resourceTaggingAccessApplicationId' + required: + - resource_id + - resource_type + resourceTaggingTagKeysResponseCollection: + properties: + errors: + $ref: '#/components/schemas/resourceTaggingMessages' + messages: + $ref: '#/components/schemas/resourceTaggingMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + description: Contains an array of distinct tag keys. + example: + - environment + - team + - region + items: + type: string + type: array + result_info: + $ref: '#/components/schemas/resourceTaggingCursorResultInfo' + required: + - success + - errors + - messages + type: object + resourceTaggingTagValuesResponseCollection: + properties: + errors: + $ref: '#/components/schemas/resourceTaggingMessages' + messages: + $ref: '#/components/schemas/resourceTaggingMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + example: + - production + - staging + items: + type: string + type: array + result_info: + $ref: '#/components/schemas/resourceTaggingCursorResultInfo' + required: + - success + - errors + - messages + type: object + resourceTaggingTaggedResourceObject: + type: object + description: Response for access_application resources + properties: + type: + enum: + - access_application + type: string + etag: + $ref: '#/components/schemas/resourceTaggingEtag' + id: + $ref: '#/components/schemas/resourceTaggingResourceId' + name: + $ref: '#/components/schemas/resourceTaggingResourceName' + tags: + $ref: '#/components/schemas/resourceTaggingTags' + access_application_id: + $ref: '#/components/schemas/resourceTaggingAccessApplicationId' + zone_id: + $ref: '#/components/schemas/resourceTaggingZoneId' + worker_id: + $ref: '#/components/schemas/resourceTaggingWorkerId' + required: + - etag + - id + - name + - tags + - type + resourceTaggingTaggedResourceResponseCollection: + properties: + errors: + $ref: '#/components/schemas/resourceTaggingMessages' + messages: + $ref: '#/components/schemas/resourceTaggingMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + items: + $ref: '#/components/schemas/resourceTaggingTaggedResourceObject' + type: array + result_info: + $ref: '#/components/schemas/resourceTaggingCursorResultInfo' + required: + - success + - errors + - messages + type: object + resourceTaggingTaggedResourceResponseSingle: + properties: + errors: + $ref: '#/components/schemas/resourceTaggingMessages' + messages: + $ref: '#/components/schemas/resourceTaggingMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/resourceTaggingTaggedResourceObject' + required: + - success + - errors + - messages + type: object + resourceTaggingTags: + description: Contains key-value pairs of tags. + example: + environment: production + team: engineering + type: object + x-auditable: true + resourceTaggingWorkerId: + description: Worker ID is required only for worker_version resources + example: 3f72a691-44b3-4c11-8642-c18a88ddaa5e + type: string + resourceTaggingZoneId: + description: Zone ID is required only for zone-level resources + minLength: 32 + $ref: '#/components/schemas/resourceTaggingIdentifier' + resourceTaggingZoneResourceType: + description: Identifies the type of zone-level resource. + enum: + - access_application_policy + - api_gateway_operation + - custom_certificate + - custom_hostname + - dns_record + - managed_client_certificate + - zone + example: zone + type: string + x-auditable: true + resourceTaggingZoneResourceTypeBaseEnum: + description: Enum for base zone-level resource types (those with no extra required fields). + enum: + - api_gateway_operation + - custom_certificate + - custom_hostname + - dns_record + - managed_client_certificate + - zone + example: zone + type: string + x-auditable: true + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + account_tags: + id: cloudflare.resource_tagging.account_tags + name: account_tags + title: Account Tags + methods: + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1tags/delete' + response: + mediaType: application/json + openAPIDocKey: '204' + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1tags/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1tags/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .resource_id }}{{ $sep }}"resource_id": {{ toJson .resource_id }}{{- $sep = "," -}}{{ end }} + + {{- if .resource_type }}{{ $sep }}"resource_type": {{ toJson .resource_type }}{{- $sep = "," -}}{{ end }} + + {{- if .worker_id }}{{ $sep }}"worker_id": {{ toJson .worker_id }}{{- $sep = "," -}}{{ end }} + + {{- if .tags }}{{ $sep }}"tags": {{ if eq (kindOf .tags) "string" }}{{ .tags }}{{ else }}{{ toJson .tags }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/account_tags/methods/list' + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/account_tags/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/account_tags/methods/update' + keys: + id: cloudflare.resource_tagging.keys + name: keys + title: Keys + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1tags~1keys/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/keys/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + resources: + id: cloudflare.resource_tagging.resources + name: resources + title: Resources + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1tags~1resources/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/resources/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + values: + id: cloudflare.resource_tagging.values + name: values + title: Values + methods: + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1tags~1values~1{tag_key}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/values/methods/get' + insert: [] + update: [] + delete: [] + replace: [] + zone_tags: + id: cloudflare.resource_tagging.zone_tags + name: zone_tags + title: Zone Tags + methods: + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1tags/delete' + response: + mediaType: application/json + openAPIDocKey: '204' + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1tags/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1tags/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .resource_id }}{{ $sep }}"resource_id": {{ toJson .resource_id }}{{- $sep = "," -}}{{ end }} + + {{- if .resource_type }}{{ $sep }}"resource_type": {{ toJson .resource_type }}{{- $sep = "," -}}{{ end }} + + {{- if .tags }}{{ $sep }}"tags": {{ if eq (kindOf .tags) "string" }}{{ .tags }}{{ else }}{{ toJson .tags }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .access_application_id }}{{ $sep }}"access_application_id": {{ toJson .access_application_id }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/zone_tags/methods/list' + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/zone_tags/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/zone_tags/methods/update' diff --git a/providers/src/cloudflare/v00.00.00000/services/rulesets.yaml b/providers/src/cloudflare/v00.00.00000/services/rulesets.yaml index a0fa04f3..3b76e506 100644 --- a/providers/src/cloudflare/v00.00.00000/services/rulesets.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/rulesets.yaml @@ -1,6086 +1,6157 @@ -openapi: 3.0.3 -info: - title: rulesets API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/rulesets: - get: - description: Fetches all rulesets. - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: cursor - schema: - $ref: '#/components/schemas/rulesetsCursor' - - in: query - name: per_page - schema: - $ref: '#/components/schemas/rulesetsPerPage' - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: >- - A list of rulesets. The returned information will not - include the rules in each ruleset. - title: Rulesets - items: - description: A ruleset object. - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - required: - - id - - version - - last_updated - - name - - kind - - phase - title: Ruleset - type: object - type: array - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - result_info: - $ref: '#/components/schemas/rulesetsResultInfo' - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A rulesets response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List account or zone rulesets - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Mass URL Redirects Read - - Magic Firewall Write - - Magic Firewall Read - - L4 DDoS Managed Ruleset Write - - L4 DDoS Managed Ruleset Read - - Transform Rules Write - - Transform Rules Read - - Select Configuration Write - - Select Configuration Read - - Account WAF Write - - Account WAF Read - - Account Rulesets Read - - Account Rulesets Write - - Logs Write - - Logs Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: [] - method: list - operationId: get_accounts_account_id_rulesets - post: - description: Creates a ruleset. - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - description: A ruleset object. - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - rules: - $ref: '#/components/schemas/rulesetsRequestRules' - required: - - id - - version - - last_updated - - name - - kind - - phase - title: Ruleset - type: object - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A ruleset object. - title: Ruleset - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - rules: - $ref: '#/components/schemas/rulesetsResponseRules' - required: - - id - - version - - last_updated - - name - - kind - - phase - - rules - type: object - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A ruleset response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create an account or zone ruleset - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Magic Firewall Write - - L4 DDoS Managed Ruleset Write - - Transform Rules Write - - Select Configuration Write - - Account WAF Write - - Account Rulesets Write - - Logs Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: [] - method: create - operationId: post_accounts_account_id_rulesets - /zones/{zone_id}/rulesets: - get: - description: Fetches all rulesets. - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: query - name: cursor - schema: - $ref: '#/components/schemas/rulesetsCursor' - - in: query - name: per_page - schema: - $ref: '#/components/schemas/rulesetsPerPage' - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: >- - A list of rulesets. The returned information will not - include the rules in each ruleset. - title: Rulesets - items: - description: A ruleset object. - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - required: - - id - - version - - last_updated - - name - - kind - - phase - title: Ruleset - type: object - type: array - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - result_info: - $ref: '#/components/schemas/rulesetsResultInfo' - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A rulesets response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List account or zone rulesets - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Mass URL Redirects Read - - Magic Firewall Write - - Magic Firewall Read - - L4 DDoS Managed Ruleset Write - - L4 DDoS Managed Ruleset Read - - Transform Rules Write - - Transform Rules Read - - Select Configuration Write - - Select Configuration Read - - Account WAF Write - - Account WAF Read - - Account Rulesets Read - - Account Rulesets Write - - Logs Write - - Logs Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: [] - method: list - operationId: get_zones_zone_id_rulesets - post: - description: Creates a ruleset. - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - description: A ruleset object. - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - rules: - $ref: '#/components/schemas/rulesetsRequestRules' - required: - - id - - version - - last_updated - - name - - kind - - phase - title: Ruleset - type: object - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A ruleset object. - title: Ruleset - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - rules: - $ref: '#/components/schemas/rulesetsResponseRules' - required: - - id - - version - - last_updated - - name - - kind - - phase - - rules - type: object - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A ruleset response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create an account or zone ruleset - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Magic Firewall Write - - L4 DDoS Managed Ruleset Write - - Transform Rules Write - - Select Configuration Write - - Account WAF Write - - Account Rulesets Write - - Logs Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: [] - method: create - operationId: post_zones_zone_id_rulesets - /accounts/{account_id}/rulesets/phases/{ruleset_phase}/entrypoint: - get: - description: >- - Fetches the latest version of the account or zone entry point ruleset - for a given phase. - parameters: - - in: path - name: ruleset_phase - schema: - $ref: '#/components/schemas/rulesetsRulesetPhase' - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A ruleset object. - title: Ruleset - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - rules: - $ref: '#/components/schemas/rulesetsResponseRules' - required: - - id - - version - - last_updated - - name - - kind - - phase - - rules - type: object - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A ruleset response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get an account or zone entry point ruleset - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Mass URL Redirects Read - - Magic Firewall Write - - Magic Firewall Read - - L4 DDoS Managed Ruleset Write - - L4 DDoS Managed Ruleset Read - - Transform Rules Write - - Transform Rules Read - - Select Configuration Write - - Select Configuration Read - - Account WAF Write - - Account WAF Read - - Account Rulesets Read - - Account Rulesets Write - - Logs Write - - Logs Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: - - phases - method: get - operationId: get_accounts_account_id_rulesets_phases_ruleset_phase_entrypoint - put: - description: Updates an account or zone entry point ruleset, creating a new version. - parameters: - - in: path - name: ruleset_phase - schema: - $ref: '#/components/schemas/rulesetsRulesetPhase' - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - description: A ruleset object. - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - rules: - $ref: '#/components/schemas/rulesetsRequestRules' - required: - - id - - version - - last_updated - title: Ruleset - type: object - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A ruleset object. - title: Ruleset - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - rules: - $ref: '#/components/schemas/rulesetsResponseRules' - required: - - id - - version - - last_updated - - name - - kind - - phase - - rules - type: object - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A ruleset response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update an account or zone entry point ruleset - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Magic Firewall Write - - L4 DDoS Managed Ruleset Write - - Transform Rules Write - - Select Configuration Write - - Account WAF Write - - Account Rulesets Write - - Logs Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: - - phases - method: update - operationId: put_accounts_account_id_rulesets_phases_ruleset_phase_entrypoint - /zones/{zone_id}/rulesets/phases/{ruleset_phase}/entrypoint: - get: - description: >- - Fetches the latest version of the account or zone entry point ruleset - for a given phase. - parameters: - - in: path - name: ruleset_phase - schema: - $ref: '#/components/schemas/rulesetsRulesetPhase' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A ruleset object. - title: Ruleset - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - rules: - $ref: '#/components/schemas/rulesetsResponseRules' - required: - - id - - version - - last_updated - - name - - kind - - phase - - rules - type: object - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A ruleset response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get an account or zone entry point ruleset - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Mass URL Redirects Read - - Magic Firewall Write - - Magic Firewall Read - - L4 DDoS Managed Ruleset Write - - L4 DDoS Managed Ruleset Read - - Transform Rules Write - - Transform Rules Read - - Select Configuration Write - - Select Configuration Read - - Account WAF Write - - Account WAF Read - - Account Rulesets Read - - Account Rulesets Write - - Logs Write - - Logs Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: - - phases - method: get - operationId: get_zones_zone_id_rulesets_phases_ruleset_phase_entrypoint - put: - description: Updates an account or zone entry point ruleset, creating a new version. - parameters: - - in: path - name: ruleset_phase - schema: - $ref: '#/components/schemas/rulesetsRulesetPhase' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - description: A ruleset object. - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - rules: - $ref: '#/components/schemas/rulesetsRequestRules' - required: - - id - - version - - last_updated - title: Ruleset - type: object - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A ruleset object. - title: Ruleset - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - rules: - $ref: '#/components/schemas/rulesetsResponseRules' - required: - - id - - version - - last_updated - - name - - kind - - phase - - rules - type: object - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A ruleset response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update an account or zone entry point ruleset - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Magic Firewall Write - - L4 DDoS Managed Ruleset Write - - Transform Rules Write - - Select Configuration Write - - Account WAF Write - - Account Rulesets Write - - Logs Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: - - phases - method: update - operationId: put_zones_zone_id_rulesets_phases_ruleset_phase_entrypoint - /accounts/{account_id}/rulesets/phases/{ruleset_phase}/entrypoint/versions: - get: - description: Fetches the versions of an account or zone entry point ruleset. - parameters: - - in: path - name: ruleset_phase - schema: - $ref: '#/components/schemas/rulesetsRulesetPhase' - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: >- - A list of rulesets. The returned information will not - include the rules in each ruleset. - title: Rulesets - items: - description: A ruleset object. - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - required: - - id - - version - - last_updated - - name - - kind - - phase - title: Ruleset - type: object - type: array - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - result_info: - $ref: '#/components/schemas/rulesetsResultInfo' - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A rulesets response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List an account or zone entry point ruleset's versions - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Mass URL Redirects Read - - Magic Firewall Write - - Magic Firewall Read - - L4 DDoS Managed Ruleset Write - - L4 DDoS Managed Ruleset Read - - Transform Rules Write - - Transform Rules Read - - Select Configuration Write - - Select Configuration Read - - Account WAF Write - - Account WAF Read - - Account Rulesets Read - - Account Rulesets Write - - Logs Write - - Logs Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: - - phases - - versions - method: list - operationId: >- - get_accounts_account_id_rulesets_phases_ruleset_phase_entrypoint_versions - /zones/{zone_id}/rulesets/phases/{ruleset_phase}/entrypoint/versions: - get: - description: Fetches the versions of an account or zone entry point ruleset. - parameters: - - in: path - name: ruleset_phase - schema: - $ref: '#/components/schemas/rulesetsRulesetPhase' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: >- - A list of rulesets. The returned information will not - include the rules in each ruleset. - title: Rulesets - items: - description: A ruleset object. - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - required: - - id - - version - - last_updated - - name - - kind - - phase - title: Ruleset - type: object - type: array - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - result_info: - $ref: '#/components/schemas/rulesetsResultInfo' - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A rulesets response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List an account or zone entry point ruleset's versions - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Mass URL Redirects Read - - Magic Firewall Write - - Magic Firewall Read - - L4 DDoS Managed Ruleset Write - - L4 DDoS Managed Ruleset Read - - Transform Rules Write - - Transform Rules Read - - Select Configuration Write - - Select Configuration Read - - Account WAF Write - - Account WAF Read - - Account Rulesets Read - - Account Rulesets Write - - Logs Write - - Logs Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: - - phases - - versions - method: list - operationId: get_zones_zone_id_rulesets_phases_ruleset_phase_entrypoint_versions - /accounts/{account_id}/rulesets/phases/{ruleset_phase}/entrypoint/versions/{ruleset_version}: - get: - description: Fetches a specific version of an account or zone entry point ruleset. - parameters: - - in: path - name: ruleset_version - schema: - $ref: '#/components/schemas/rulesetsRulesetVersion' - required: true - - in: path - name: ruleset_phase - schema: - $ref: '#/components/schemas/rulesetsRulesetPhase' - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A ruleset object. - title: Ruleset - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - rules: - $ref: '#/components/schemas/rulesetsResponseRules' - required: - - id - - version - - last_updated - - name - - kind - - phase - - rules - type: object - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A ruleset response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get an account or zone entry point ruleset version - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Mass URL Redirects Read - - Magic Firewall Write - - Magic Firewall Read - - L4 DDoS Managed Ruleset Write - - L4 DDoS Managed Ruleset Read - - Transform Rules Write - - Transform Rules Read - - Select Configuration Write - - Select Configuration Read - - Account WAF Write - - Account WAF Read - - Account Rulesets Read - - Account Rulesets Write - - Logs Write - - Logs Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: - - phases - - versions - method: get - operationId: >- - get_accounts_account_id_rulesets_phases_ruleset_phase_entrypoint_versions_ruleset_version - /zones/{zone_id}/rulesets/phases/{ruleset_phase}/entrypoint/versions/{ruleset_version}: - get: - description: Fetches a specific version of an account or zone entry point ruleset. - parameters: - - in: path - name: ruleset_version - schema: - $ref: '#/components/schemas/rulesetsRulesetVersion' - required: true - - in: path - name: ruleset_phase - schema: - $ref: '#/components/schemas/rulesetsRulesetPhase' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A ruleset object. - title: Ruleset - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - rules: - $ref: '#/components/schemas/rulesetsResponseRules' - required: - - id - - version - - last_updated - - name - - kind - - phase - - rules - type: object - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A ruleset response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get an account or zone entry point ruleset version - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Mass URL Redirects Read - - Magic Firewall Write - - Magic Firewall Read - - L4 DDoS Managed Ruleset Write - - L4 DDoS Managed Ruleset Read - - Transform Rules Write - - Transform Rules Read - - Select Configuration Write - - Select Configuration Read - - Account WAF Write - - Account WAF Read - - Account Rulesets Read - - Account Rulesets Write - - Logs Write - - Logs Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: - - phases - - versions - method: get - operationId: >- - get_zones_zone_id_rulesets_phases_ruleset_phase_entrypoint_versions_ruleset_version - /accounts/{account_id}/rulesets/{ruleset_id}: - get: - description: Fetches the latest version of an account or zone ruleset. - parameters: - - name: ruleset_id - in: path - required: true - description: The ruleset ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A ruleset object. - title: Ruleset - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - rules: - $ref: '#/components/schemas/rulesetsResponseRules' - required: - - id - - version - - last_updated - - name - - kind - - phase - - rules - type: object - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A ruleset response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get an account or zone ruleset - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Mass URL Redirects Read - - Magic Firewall Write - - Magic Firewall Read - - L4 DDoS Managed Ruleset Write - - L4 DDoS Managed Ruleset Read - - Transform Rules Write - - Transform Rules Read - - Select Configuration Write - - Select Configuration Read - - Account WAF Write - - Account WAF Read - - Account Rulesets Read - - Account Rulesets Write - - Logs Write - - Logs Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: [] - method: get - operationId: get_accounts_account_id_rulesets_ruleset_id - put: - description: Updates an account or zone ruleset, creating a new version. - parameters: - - name: ruleset_id - in: path - required: true - description: The ruleset ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - description: A ruleset object. - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - rules: - $ref: '#/components/schemas/rulesetsRequestRules' - required: - - id - - version - - last_updated - title: Ruleset - type: object - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A ruleset object. - title: Ruleset - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - rules: - $ref: '#/components/schemas/rulesetsResponseRules' - required: - - id - - version - - last_updated - - name - - kind - - phase - - rules - type: object - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A ruleset response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update an account or zone ruleset - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Magic Firewall Write - - L4 DDoS Managed Ruleset Write - - Transform Rules Write - - Select Configuration Write - - Account WAF Write - - Account Rulesets Write - - Logs Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: [] - method: update - operationId: put_accounts_account_id_rulesets_ruleset_id - delete: - description: Deletes all versions of an existing account or zone ruleset. - parameters: - - name: ruleset_id - in: path - required: true - description: The ruleset ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '204': - description: An empty response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete an account or zone ruleset - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Magic Firewall Write - - L4 DDoS Managed Ruleset Write - - Transform Rules Write - - Select Configuration Write - - Account WAF Write - - Account Rulesets Write - - Logs Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: [] - method: delete - operationId: delete_accounts_account_id_rulesets_ruleset_id - /zones/{zone_id}/rulesets/{ruleset_id}: - get: - description: Fetches the latest version of an account or zone ruleset. - parameters: - - name: ruleset_id - in: path - required: true - description: The ruleset ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A ruleset object. - title: Ruleset - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - rules: - $ref: '#/components/schemas/rulesetsResponseRules' - required: - - id - - version - - last_updated - - name - - kind - - phase - - rules - type: object - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A ruleset response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get an account or zone ruleset - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Mass URL Redirects Read - - Magic Firewall Write - - Magic Firewall Read - - L4 DDoS Managed Ruleset Write - - L4 DDoS Managed Ruleset Read - - Transform Rules Write - - Transform Rules Read - - Select Configuration Write - - Select Configuration Read - - Account WAF Write - - Account WAF Read - - Account Rulesets Read - - Account Rulesets Write - - Logs Write - - Logs Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: [] - method: get - operationId: get_zones_zone_id_rulesets_ruleset_id - put: - description: Updates an account or zone ruleset, creating a new version. - parameters: - - name: ruleset_id - in: path - required: true - description: The ruleset ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - description: A ruleset object. - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - rules: - $ref: '#/components/schemas/rulesetsRequestRules' - required: - - id - - version - - last_updated - title: Ruleset - type: object - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A ruleset object. - title: Ruleset - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - rules: - $ref: '#/components/schemas/rulesetsResponseRules' - required: - - id - - version - - last_updated - - name - - kind - - phase - - rules - type: object - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A ruleset response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update an account or zone ruleset - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Magic Firewall Write - - L4 DDoS Managed Ruleset Write - - Transform Rules Write - - Select Configuration Write - - Account WAF Write - - Account Rulesets Write - - Logs Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: [] - method: update - operationId: put_zones_zone_id_rulesets_ruleset_id - delete: - description: Deletes all versions of an existing account or zone ruleset. - parameters: - - name: ruleset_id - in: path - required: true - description: The ruleset ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '204': - description: An empty response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete an account or zone ruleset - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Magic Firewall Write - - L4 DDoS Managed Ruleset Write - - Transform Rules Write - - Select Configuration Write - - Account WAF Write - - Account Rulesets Write - - Logs Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: [] - method: delete - operationId: delete_zones_zone_id_rulesets_ruleset_id - /accounts/{account_id}/rulesets/{ruleset_id}/rules: - post: - description: >- - Adds a new rule to an account or zone ruleset. The rule will be added to - the end of the existing list of rules in the ruleset by default. - parameters: - - name: ruleset_id - in: path - required: true - description: The ruleset ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - position: - type: object - title: Before Position - description: An object configuring where the rule will be placed. - properties: - before: - description: >- - The ID of another rule to place the rule before. An - empty value causes the rule to be placed at the top. - title: Before - type: string - after: - description: >- - The ID of another rule to place the rule after. An empty - value causes the rule to be placed at the bottom. - title: After - type: string - index: - description: >- - An index at which to place the rule, where index 1 is - the first rule. - minimum: 1 - title: Index - type: integer - action: - description: The action to perform when the rule matches. - title: Action - type: string - enum: - - block - action_parameters: - default: {} - description: The parameters configuring the rule's action. - title: Action Parameters - type: object - properties: - response: - description: The response to show when the block is applied. - properties: - content: - description: The content to return. - minLength: 1 - title: Content - type: string - content_type: - description: The type of the content to return. - minLength: 1 - title: Content Type - type: string - status_code: - description: The status code to return. - maximum: 499 - minimum: 400 - title: Status Code - type: integer - required: - - status_code - - content - - content_type - title: Response - type: object - categories: - $ref: '#/components/schemas/rulesetsRuleCategories' - description: - default: '' - description: An informative description of the rule. - title: Description - type: string - enabled: - $ref: '#/components/schemas/rulesetsRuleEnabled' - default: true - exposed_credential_check: - $ref: '#/components/schemas/rulesetsRuleExposedCredentialCheck' - expression: - description: The expression defining which traffic will match the rule. - minLength: 1 - title: Expression - type: string - id: - $ref: '#/components/schemas/rulesetsRuleId' - last_updated: - description: The timestamp of when the rule was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - x-stainless-skip: - - terraform - logging: - $ref: >- - #/components/schemas/unnamedSchemaRef70f2c6ccd8a405358ac7ef8fc3d6751c - ratelimit: - $ref: '#/components/schemas/rulesetsRuleRatelimit' - ref: - description: The reference of the rule (the rule's ID by default). - minLength: 1 - title: Ref - type: string - version: - description: The version of the rule. - readOnly: true - title: Version - type: string - x-stainless-skip: - - terraform - type: object - title: Block Rule - required: - - last_updated - - version - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A ruleset object. - title: Ruleset - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - rules: - $ref: '#/components/schemas/rulesetsResponseRules' - required: - - id - - version - - last_updated - - name - - kind - - phase - - rules - type: object - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A ruleset response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create an account or zone ruleset rule - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Magic Firewall Write - - L4 DDoS Managed Ruleset Write - - Transform Rules Write - - Select Configuration Write - - Account WAF Write - - Account Rulesets Write - - Logs Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: - - rules - method: create - operationId: post_accounts_account_id_rulesets_ruleset_id_rules - /zones/{zone_id}/rulesets/{ruleset_id}/rules: - post: - description: >- - Adds a new rule to an account or zone ruleset. The rule will be added to - the end of the existing list of rules in the ruleset by default. - parameters: - - name: ruleset_id - in: path - required: true - description: The ruleset ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - position: - type: object - title: Before Position - description: An object configuring where the rule will be placed. - properties: - before: - description: >- - The ID of another rule to place the rule before. An - empty value causes the rule to be placed at the top. - title: Before - type: string - after: - description: >- - The ID of another rule to place the rule after. An empty - value causes the rule to be placed at the bottom. - title: After - type: string - index: - description: >- - An index at which to place the rule, where index 1 is - the first rule. - minimum: 1 - title: Index - type: integer - action: - description: The action to perform when the rule matches. - title: Action - type: string - enum: - - block - action_parameters: - default: {} - description: The parameters configuring the rule's action. - title: Action Parameters - type: object - properties: - response: - description: The response to show when the block is applied. - properties: - content: - description: The content to return. - minLength: 1 - title: Content - type: string - content_type: - description: The type of the content to return. - minLength: 1 - title: Content Type - type: string - status_code: - description: The status code to return. - maximum: 499 - minimum: 400 - title: Status Code - type: integer - required: - - status_code - - content - - content_type - title: Response - type: object - categories: - $ref: '#/components/schemas/rulesetsRuleCategories' - description: - default: '' - description: An informative description of the rule. - title: Description - type: string - enabled: - $ref: '#/components/schemas/rulesetsRuleEnabled' - default: true - exposed_credential_check: - $ref: '#/components/schemas/rulesetsRuleExposedCredentialCheck' - expression: - description: The expression defining which traffic will match the rule. - minLength: 1 - title: Expression - type: string - id: - $ref: '#/components/schemas/rulesetsRuleId' - last_updated: - description: The timestamp of when the rule was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - x-stainless-skip: - - terraform - logging: - $ref: >- - #/components/schemas/unnamedSchemaRef70f2c6ccd8a405358ac7ef8fc3d6751c - ratelimit: - $ref: '#/components/schemas/rulesetsRuleRatelimit' - ref: - description: The reference of the rule (the rule's ID by default). - minLength: 1 - title: Ref - type: string - version: - description: The version of the rule. - readOnly: true - title: Version - type: string - x-stainless-skip: - - terraform - type: object - title: Block Rule - required: - - last_updated - - version - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A ruleset object. - title: Ruleset - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - rules: - $ref: '#/components/schemas/rulesetsResponseRules' - required: - - id - - version - - last_updated - - name - - kind - - phase - - rules - type: object - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A ruleset response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create an account or zone ruleset rule - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Magic Firewall Write - - L4 DDoS Managed Ruleset Write - - Transform Rules Write - - Select Configuration Write - - Account WAF Write - - Account Rulesets Write - - Logs Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: - - rules - method: create - operationId: post_zones_zone_id_rulesets_ruleset_id_rules - /accounts/{account_id}/rulesets/{ruleset_id}/rules/{rule_id}: - delete: - description: Deletes an existing rule from an account or zone ruleset. - parameters: - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - - name: ruleset_id - in: path - required: true - description: The ruleset ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A ruleset object. - title: Ruleset - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - rules: - $ref: '#/components/schemas/rulesetsResponseRules' - required: - - id - - version - - last_updated - - name - - kind - - phase - - rules - type: object - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A ruleset response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete an account or zone ruleset rule - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Magic Firewall Write - - L4 DDoS Managed Ruleset Write - - Transform Rules Write - - Select Configuration Write - - Account WAF Write - - Account Rulesets Write - - Logs Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: - - rules - method: delete - operationId: delete_accounts_account_id_rulesets_ruleset_id_rules_rule_id - patch: - description: Updates an existing rule in an account or zone ruleset. - parameters: - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - - name: ruleset_id - in: path - required: true - description: The ruleset ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - position: - type: object - title: Before Position - description: An object configuring where the rule will be placed. - properties: - before: - description: >- - The ID of another rule to place the rule before. An - empty value causes the rule to be placed at the top. - title: Before - type: string - after: - description: >- - The ID of another rule to place the rule after. An empty - value causes the rule to be placed at the bottom. - title: After - type: string - index: - description: >- - An index at which to place the rule, where index 1 is - the first rule. - minimum: 1 - title: Index - type: integer - action: - description: The action to perform when the rule matches. - title: Action - type: string - enum: - - block - action_parameters: - default: {} - description: The parameters configuring the rule's action. - title: Action Parameters - type: object - properties: - response: - description: The response to show when the block is applied. - properties: - content: - description: The content to return. - minLength: 1 - title: Content - type: string - content_type: - description: The type of the content to return. - minLength: 1 - title: Content Type - type: string - status_code: - description: The status code to return. - maximum: 499 - minimum: 400 - title: Status Code - type: integer - required: - - status_code - - content - - content_type - title: Response - type: object - categories: - $ref: '#/components/schemas/rulesetsRuleCategories' - description: - default: '' - description: An informative description of the rule. - title: Description - type: string - enabled: - $ref: '#/components/schemas/rulesetsRuleEnabled' - default: true - exposed_credential_check: - $ref: '#/components/schemas/rulesetsRuleExposedCredentialCheck' - expression: - description: The expression defining which traffic will match the rule. - minLength: 1 - title: Expression - type: string - id: - $ref: '#/components/schemas/rulesetsRuleId' - last_updated: - description: The timestamp of when the rule was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - x-stainless-skip: - - terraform - logging: - $ref: >- - #/components/schemas/unnamedSchemaRef70f2c6ccd8a405358ac7ef8fc3d6751c - ratelimit: - $ref: '#/components/schemas/rulesetsRuleRatelimit' - ref: - description: The reference of the rule (the rule's ID by default). - minLength: 1 - title: Ref - type: string - version: - description: The version of the rule. - readOnly: true - title: Version - type: string - x-stainless-skip: - - terraform - type: object - title: Block Rule - required: - - last_updated - - version - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A ruleset object. - title: Ruleset - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - rules: - $ref: '#/components/schemas/rulesetsResponseRules' - required: - - id - - version - - last_updated - - name - - kind - - phase - - rules - type: object - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A ruleset response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update an account or zone ruleset rule - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Magic Firewall Write - - L4 DDoS Managed Ruleset Write - - Transform Rules Write - - Select Configuration Write - - Account WAF Write - - Account Rulesets Write - - Logs Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: - - rules - method: edit - operationId: patch_accounts_account_id_rulesets_ruleset_id_rules_rule_id - /zones/{zone_id}/rulesets/{ruleset_id}/rules/{rule_id}: - delete: - description: Deletes an existing rule from an account or zone ruleset. - parameters: - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - - name: ruleset_id - in: path - required: true - description: The ruleset ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A ruleset object. - title: Ruleset - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - rules: - $ref: '#/components/schemas/rulesetsResponseRules' - required: - - id - - version - - last_updated - - name - - kind - - phase - - rules - type: object - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A ruleset response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete an account or zone ruleset rule - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Magic Firewall Write - - L4 DDoS Managed Ruleset Write - - Transform Rules Write - - Select Configuration Write - - Account WAF Write - - Account Rulesets Write - - Logs Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: - - rules - method: delete - operationId: delete_zones_zone_id_rulesets_ruleset_id_rules_rule_id - patch: - description: Updates an existing rule in an account or zone ruleset. - parameters: - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - - name: ruleset_id - in: path - required: true - description: The ruleset ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - position: - type: object - title: Before Position - description: An object configuring where the rule will be placed. - properties: - before: - description: >- - The ID of another rule to place the rule before. An - empty value causes the rule to be placed at the top. - title: Before - type: string - after: - description: >- - The ID of another rule to place the rule after. An empty - value causes the rule to be placed at the bottom. - title: After - type: string - index: - description: >- - An index at which to place the rule, where index 1 is - the first rule. - minimum: 1 - title: Index - type: integer - action: - description: The action to perform when the rule matches. - title: Action - type: string - enum: - - block - action_parameters: - default: {} - description: The parameters configuring the rule's action. - title: Action Parameters - type: object - properties: - response: - description: The response to show when the block is applied. - properties: - content: - description: The content to return. - minLength: 1 - title: Content - type: string - content_type: - description: The type of the content to return. - minLength: 1 - title: Content Type - type: string - status_code: - description: The status code to return. - maximum: 499 - minimum: 400 - title: Status Code - type: integer - required: - - status_code - - content - - content_type - title: Response - type: object - categories: - $ref: '#/components/schemas/rulesetsRuleCategories' - description: - default: '' - description: An informative description of the rule. - title: Description - type: string - enabled: - $ref: '#/components/schemas/rulesetsRuleEnabled' - default: true - exposed_credential_check: - $ref: '#/components/schemas/rulesetsRuleExposedCredentialCheck' - expression: - description: The expression defining which traffic will match the rule. - minLength: 1 - title: Expression - type: string - id: - $ref: '#/components/schemas/rulesetsRuleId' - last_updated: - description: The timestamp of when the rule was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - x-stainless-skip: - - terraform - logging: - $ref: >- - #/components/schemas/unnamedSchemaRef70f2c6ccd8a405358ac7ef8fc3d6751c - ratelimit: - $ref: '#/components/schemas/rulesetsRuleRatelimit' - ref: - description: The reference of the rule (the rule's ID by default). - minLength: 1 - title: Ref - type: string - version: - description: The version of the rule. - readOnly: true - title: Version - type: string - x-stainless-skip: - - terraform - type: object - title: Block Rule - required: - - last_updated - - version - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A ruleset object. - title: Ruleset - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - rules: - $ref: '#/components/schemas/rulesetsResponseRules' - required: - - id - - version - - last_updated - - name - - kind - - phase - - rules - type: object - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A ruleset response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update an account or zone ruleset rule - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Magic Firewall Write - - L4 DDoS Managed Ruleset Write - - Transform Rules Write - - Select Configuration Write - - Account WAF Write - - Account Rulesets Write - - Logs Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: - - rules - method: edit - operationId: patch_zones_zone_id_rulesets_ruleset_id_rules_rule_id - /accounts/{account_id}/rulesets/{ruleset_id}/versions: - get: - description: Fetches the versions of an account or zone ruleset. - parameters: - - name: ruleset_id - in: path - required: true - description: The ruleset ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: >- - A list of rulesets. The returned information will not - include the rules in each ruleset. - title: Rulesets - items: - description: A ruleset object. - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - required: - - id - - version - - last_updated - - name - - kind - - phase - title: Ruleset - type: object - type: array - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - result_info: - $ref: '#/components/schemas/rulesetsResultInfo' - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A rulesets response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List an account or zone ruleset's versions - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Mass URL Redirects Read - - Magic Firewall Write - - Magic Firewall Read - - L4 DDoS Managed Ruleset Write - - L4 DDoS Managed Ruleset Read - - Transform Rules Write - - Transform Rules Read - - Select Configuration Write - - Select Configuration Read - - Account WAF Write - - Account WAF Read - - Account Rulesets Read - - Account Rulesets Write - - Logs Write - - Logs Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: - - versions - method: list - operationId: get_accounts_account_id_rulesets_ruleset_id_versions - /zones/{zone_id}/rulesets/{ruleset_id}/versions: - get: - description: Fetches the versions of an account or zone ruleset. - parameters: - - name: ruleset_id - in: path - required: true - description: The ruleset ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: >- - A list of rulesets. The returned information will not - include the rules in each ruleset. - title: Rulesets - items: - description: A ruleset object. - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - required: - - id - - version - - last_updated - - name - - kind - - phase - title: Ruleset - type: object - type: array - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - result_info: - $ref: '#/components/schemas/rulesetsResultInfo' - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A rulesets response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List an account or zone ruleset's versions - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Mass URL Redirects Read - - Magic Firewall Write - - Magic Firewall Read - - L4 DDoS Managed Ruleset Write - - L4 DDoS Managed Ruleset Read - - Transform Rules Write - - Transform Rules Read - - Select Configuration Write - - Select Configuration Read - - Account WAF Write - - Account WAF Read - - Account Rulesets Read - - Account Rulesets Write - - Logs Write - - Logs Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: - - versions - method: list - operationId: get_zones_zone_id_rulesets_ruleset_id_versions - /accounts/{account_id}/rulesets/{ruleset_id}/versions/{ruleset_version}: - get: - description: Fetches a specific version of an account or zone ruleset. - parameters: - - in: path - name: ruleset_version - schema: - $ref: '#/components/schemas/rulesetsRulesetVersion' - required: true - - name: ruleset_id - in: path - required: true - description: The ruleset ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A ruleset object. - title: Ruleset - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - rules: - $ref: '#/components/schemas/rulesetsResponseRules' - required: - - id - - version - - last_updated - - name - - kind - - phase - - rules - type: object - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A ruleset response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get an account or zone ruleset version - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Mass URL Redirects Read - - Magic Firewall Write - - Magic Firewall Read - - L4 DDoS Managed Ruleset Write - - L4 DDoS Managed Ruleset Read - - Transform Rules Write - - Transform Rules Read - - Select Configuration Write - - Select Configuration Read - - Account WAF Write - - Account WAF Read - - Account Rulesets Read - - Account Rulesets Write - - Logs Write - - Logs Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: - - versions - method: get - operationId: get_accounts_account_id_rulesets_ruleset_id_versions_ruleset_version - delete: - description: Deletes an existing version of an account or zone ruleset. - parameters: - - in: path - name: ruleset_version - schema: - $ref: '#/components/schemas/rulesetsRulesetVersion' - required: true - - name: ruleset_id - in: path - required: true - description: The ruleset ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '204': - description: An empty response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete an account or zone ruleset version - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Magic Firewall Write - - L4 DDoS Managed Ruleset Write - - Transform Rules Write - - Select Configuration Write - - Account WAF Write - - Account Rulesets Write - - Logs Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: - - versions - method: delete - operationId: delete_accounts_account_id_rulesets_ruleset_id_versions_ruleset_version - /zones/{zone_id}/rulesets/{ruleset_id}/versions/{ruleset_version}: - get: - description: Fetches a specific version of an account or zone ruleset. - parameters: - - in: path - name: ruleset_version - schema: - $ref: '#/components/schemas/rulesetsRulesetVersion' - required: true - - name: ruleset_id - in: path - required: true - description: The ruleset ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A ruleset object. - title: Ruleset - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - rules: - $ref: '#/components/schemas/rulesetsResponseRules' - required: - - id - - version - - last_updated - - name - - kind - - phase - - rules - type: object - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A ruleset response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get an account or zone ruleset version - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Mass URL Redirects Read - - Magic Firewall Write - - Magic Firewall Read - - L4 DDoS Managed Ruleset Write - - L4 DDoS Managed Ruleset Read - - Transform Rules Write - - Transform Rules Read - - Select Configuration Write - - Select Configuration Read - - Account WAF Write - - Account WAF Read - - Account Rulesets Read - - Account Rulesets Write - - Logs Write - - Logs Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: - - versions - method: get - operationId: get_zones_zone_id_rulesets_ruleset_id_versions_ruleset_version - delete: - description: Deletes an existing version of an account or zone ruleset. - parameters: - - in: path - name: ruleset_version - schema: - $ref: '#/components/schemas/rulesetsRulesetVersion' - required: true - - name: ruleset_id - in: path - required: true - description: The ruleset ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '204': - description: An empty response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete an account or zone ruleset version - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Magic Firewall Write - - L4 DDoS Managed Ruleset Write - - Transform Rules Write - - Select Configuration Write - - Account WAF Write - - Account Rulesets Write - - Logs Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rulesets - resource_chain: - - versions - method: delete - operationId: delete_zones_zone_id_rulesets_ruleset_id_versions_ruleset_version - /accounts/{account_id}/rulesets/{ruleset_id}/versions/{ruleset_version}/by_tag/{rule_tag}: - get: - description: >- - Fetches the rules of a managed account or zone ruleset version for a - given tag. - parameters: - - in: path - name: rule_tag - schema: - $ref: '#/components/schemas/rulesetsRuleCategory' - required: true - - in: path - name: ruleset_version - schema: - $ref: '#/components/schemas/rulesetsRulesetVersion' - required: true - - name: ruleset_id - in: path - required: true - description: The ruleset ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A ruleset object. - title: Ruleset - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - rules: - $ref: '#/components/schemas/rulesetsResponseRules' - required: - - id - - version - - last_updated - - name - - kind - - phase - - rules - type: object - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A ruleset response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List an account or zone ruleset version's rules by tag - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Mass URL Redirects Read - - Magic Firewall Write - - Magic Firewall Read - - L4 DDoS Managed Ruleset Write - - L4 DDoS Managed Ruleset Read - - Transform Rules Write - - Transform Rules Read - - Select Configuration Write - - Select Configuration Read - - Account WAF Write - - Account WAF Read - - Account Rulesets Read - - Account Rulesets Write - - Logs Write - - Logs Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - operationId: >- - get_accounts_account_id_rulesets_ruleset_id_versions_ruleset_version_by_tag_rule_tag - /zones/{zone_id}/rulesets/{ruleset_id}/versions/{ruleset_version}/by_tag/{rule_tag}: - get: - description: >- - Fetches the rules of a managed account or zone ruleset version for a - given tag. - parameters: - - in: path - name: rule_tag - schema: - $ref: '#/components/schemas/rulesetsRuleCategory' - required: true - - in: path - name: ruleset_version - schema: - $ref: '#/components/schemas/rulesetsRulesetVersion' - required: true - - name: ruleset_id - in: path - required: true - description: The ruleset ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - description: A response object. - properties: - errors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - enum: - - [] - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A ruleset object. - title: Ruleset - properties: - description: - default: '' - description: An informative description of the ruleset. - title: Description - type: string - id: - $ref: '#/components/schemas/rulesetsRulesetId' - readOnly: true - last_updated: - description: The timestamp of when the ruleset was last modified. - format: date-time - readOnly: true - title: Last Updated - type: string - name: - description: The human-readable name of the ruleset. - minLength: 1 - title: Name - type: string - version: - $ref: '#/components/schemas/rulesetsRulesetVersion' - readOnly: true - kind: - $ref: '#/components/schemas/rulesetsRulesetKind' - phase: - $ref: '#/components/schemas/rulesetsRulesetPhase' - rules: - $ref: '#/components/schemas/rulesetsResponseRules' - required: - - id - - version - - last_updated - - name - - kind - - phase - - rules - type: object - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - true - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A ruleset response. - 4XX: - content: - application/json: - schema: - description: A response object. - properties: - errors: - $ref: '#/components/schemas/rulesetsErrors' - messages: - $ref: '#/components/schemas/rulesetsMessages' - result: - description: A result. - title: Result - enum: - - null - type: string - success: - description: Whether the API call was successful. - title: Success - type: boolean - enum: - - false - required: - - result - - success - - errors - - messages - title: Response - type: object - description: A failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List an account or zone ruleset version's rules by tag - tags: [] - x-api-token-group: - - Mass URL Redirects Write - - Mass URL Redirects Read - - Magic Firewall Write - - Magic Firewall Read - - L4 DDoS Managed Ruleset Write - - L4 DDoS Managed Ruleset Read - - Transform Rules Write - - Transform Rules Read - - Select Configuration Write - - Select Configuration Read - - Account WAF Write - - Account WAF Read - - Account Rulesets Read - - Account Rulesets Write - - Logs Write - - Logs Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - operationId: >- - get_zones_zone_id_rulesets_ruleset_id_versions_ruleset_version_by_tag_rule_tag -components: - schemas: - rulesetsCursor: - description: The cursor to use for the next page. - example: dGhpc2lzYW5leGFtcGxlCg - minLength: 1 - title: Cursor - type: string - rulesetsErrors: - description: A list of error messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Errors - type: array - uniqueItems: true - rulesetsMessage: - description: A message. - properties: - code: - description: A unique code for this message. - example: 10000 - title: Code - type: integer - message: - description: A text description of this message. - example: something bad happened - minLength: 1 - title: Description - type: string - source: - description: The source of this message. - properties: - pointer: - description: A JSON pointer to the field that is the source of the message. - example: /rules/0/action - minLength: 1 - title: Pointer - type: string - required: - - pointer - title: Source - type: object - required: - - message - title: Message - type: object - rulesetsMessages: - description: A list of warning messages. - items: - $ref: '#/components/schemas/rulesetsMessage' - title: Messages - type: array - uniqueItems: true - rulesetsPerPage: - description: The number of rulesets to return per page. - example: 3 - maximum: 50 - minimum: 1 - title: Per Page - type: integer - rulesetsRequestRule: - type: object - title: Block Rule - properties: - action: - description: The action to perform when the rule matches. - title: Action - type: string - enum: - - block - action_parameters: - default: {} - description: The parameters configuring the rule's action. - title: Action Parameters - type: object - properties: - response: - description: The response to show when the block is applied. - properties: - content: - description: The content to return. - example: |- - { - "success": false, - "error": "you have been blocked" - } - minLength: 1 - title: Content - type: string - content_type: - description: The type of the content to return. - example: application/json - minLength: 1 - title: Content Type - type: string - status_code: - description: The status code to return. - maximum: 499 - minimum: 400 - title: Status Code - type: integer - required: - - status_code - - content - - content_type - title: Response - type: object - categories: - $ref: '#/components/schemas/rulesetsRuleCategories' - description: - default: '' - description: An informative description of the rule. - title: Description - type: string - example: Block the request. - enabled: - $ref: '#/components/schemas/rulesetsRuleEnabled' - default: true - exposed_credential_check: - $ref: '#/components/schemas/rulesetsRuleExposedCredentialCheck' - expression: - description: The expression defining which traffic will match the rule. - example: ip.src eq 1.1.1.1 - minLength: 1 - title: Expression - type: string - id: - $ref: '#/components/schemas/rulesetsRuleId' - last_updated: - description: The timestamp of when the rule was last modified. - example: '2000-01-01T00:00:00.000000Z' - format: date-time - readOnly: true - title: Last Updated - type: string - x-stainless-skip: - - terraform - logging: - $ref: >- - #/components/schemas/unnamedSchemaRef70f2c6ccd8a405358ac7ef8fc3d6751c - ratelimit: - $ref: '#/components/schemas/rulesetsRuleRatelimit' - ref: - description: The reference of the rule (the rule's ID by default). - example: my_ref - minLength: 1 - title: Ref - type: string - version: - description: The version of the rule. - example: '1' - readOnly: true - title: Version - type: string - x-stainless-skip: - - terraform - required: - - last_updated - - version - rulesetsRequestRules: - default: [] - description: The list of rules in the ruleset. - items: - $ref: '#/components/schemas/rulesetsRequestRule' - title: Rules - type: array - rulesetsResponseRule: - $ref: '#/components/schemas/rulesetsRequestRule' - rulesetsResponseRules: - description: The list of rules in the ruleset. - items: - $ref: '#/components/schemas/rulesetsResponseRule' - title: Rules - type: array - rulesetsResultInfo: - description: Information to navigate the results. - properties: - cursors: - description: The set of cursors. - properties: - after: - $ref: '#/components/schemas/rulesetsCursor' - title: After Cursor - required: - - after - title: Cursors - type: object - title: Result Info - type: object - rulesetsRuleCategories: - description: The categories of the rule. - items: - $ref: '#/components/schemas/rulesetsRuleCategory' - minItems: 1 - readOnly: true - title: Categories - type: array - uniqueItems: true - rulesetsRuleCategory: - description: The category of a rule. - example: directory-traversal - minLength: 1 - title: Category - type: string - rulesetsRuleEnabled: - description: Whether the rule should be executed. - example: true - title: Enabled - type: boolean - rulesetsRuleExposedCredentialCheck: - description: Configuration for exposed credential checking. - properties: - password_expression: - description: >- - An expression that selects the password used in the credentials - check. - example: url_decode(http.request.body.form[\"password\"][0]) - minLength: 1 - title: Password Expression - type: string - username_expression: - description: >- - An expression that selects the user ID used in the credentials - check. - example: url_decode(http.request.body.form[\"username\"][0]) - minLength: 1 - title: Username Expression - type: string - required: - - username_expression - - password_expression - title: Exposed Credential Check - type: object - rulesetsRuleId: - description: The unique ID of the rule. - example: 3a03d665bac047339bb530ecb439a90d - title: Rule ID - type: string - rulesetsRuleLogging: - description: An object configuring the rule's logging behavior. - properties: - enabled: - description: Whether to generate a log when the rule matches. - example: true - title: Enabled - type: boolean - required: - - enabled - title: Logging - type: object - rulesetsRuleRatelimit: - description: An object configuring the rule's rate limit behavior. - properties: - characteristics: - description: >- - Characteristics of the request on which the rate limit counter will - be incremented. - items: - description: The characteristic of the request. - example: cf.colo.id - minLength: 1 - title: Characteristic - type: string - minItems: 1 - title: Characteristics - type: array - uniqueItems: true - counting_expression: - description: >- - An expression that defines when the rate limit counter should be - incremented. It defaults to the same as the rule's expression. - example: http.request.body.raw eq "abcd" - minLength: 1 - title: Counting Expression - type: string - mitigation_timeout: - description: >- - Period of time in seconds after which the action will be disabled - following its first execution. - example: 600 - title: Mitigation Timeout - type: integer - period: - description: Period in seconds over which the counter is being incremented. - example: 60 - minimum: 0 - title: Period - type: integer - requests_per_period: - description: >- - The threshold of requests per period after which the action will be - executed for the first time. - example: 1000 - minimum: 1 - title: Requests per Period - type: integer - requests_to_origin: - default: false - description: Whether counting is only performed when an origin is reached. - example: true - title: Requests to Origin - type: boolean - score_per_period: - description: >- - The score threshold per period for which the action will be executed - the first time. - example: 400 - title: Score per Period - type: integer - score_response_header_name: - description: >- - A response header name provided by the origin, which contains the - score to increment rate limit counter with. - example: my-score - minLength: 1 - title: Score Response Header Name - type: string - required: - - characteristics - - period - title: Rate Limit - type: object - rulesetsRulesetId: - description: The unique ID of the ruleset. - example: 2f2feab2026849078ba485f918791bdc - title: Ruleset ID - type: string - rulesetsRulesetKind: - description: The kind of the ruleset. - enum: - - managed - - custom - - root - - zone - example: root - title: Kind - type: string - rulesetsRulesetPhase: - description: The phase of the ruleset. - enum: - - ddos_l4 - - ddos_l7 - - http_config_settings - - http_custom_errors - - http_log_custom_fields - - http_ratelimit - - http_request_cache_settings - - http_request_dynamic_redirect - - http_request_firewall_custom - - http_request_firewall_managed - - http_request_late_transform - - http_request_origin - - http_request_redirect - - http_request_sanitize - - http_request_sbfm - - http_request_transform - - http_response_cache_settings - - http_response_compression - - http_response_firewall_managed - - http_response_headers_transform - - magic_transit - - magic_transit_ids_managed - - magic_transit_managed - - magic_transit_ratelimit - example: http_request_firewall_custom - title: Phase - type: string - rulesetsRulesetVersion: - description: The version of the ruleset. - example: '1' - title: Version - type: string - unnamedSchemaRef70f2c6ccd8a405358ac7ef8fc3d6751c: - $ref: '#/components/schemas/rulesetsRuleLogging' - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - rulesets: - id: cloudflare.rulesets.rulesets - name: rulesets - title: Rulesets - methods: - list_by_account: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1rulesets/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create_by_account: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1rulesets/post' - response: - mediaType: application/json - openAPIDocKey: '200' - list_by_zone: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1rulesets/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create_by_zone: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1rulesets/post' - response: - mediaType: application/json - openAPIDocKey: '200' - get_by_account: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1rulesets~1{ruleset_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update_by_account: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1rulesets~1{ruleset_id}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_by_account: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1rulesets~1{ruleset_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '204' - get_by_zone: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1rulesets~1{ruleset_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update_by_zone: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1rulesets~1{ruleset_id}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_by_zone: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1rulesets~1{ruleset_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '204' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/rulesets/methods/get_by_account' - - $ref: '#/components/x-stackQL-resources/rulesets/methods/get_by_zone' - - $ref: '#/components/x-stackQL-resources/rulesets/methods/list_by_account' - - $ref: '#/components/x-stackQL-resources/rulesets/methods/list_by_zone' - insert: - - $ref: >- - #/components/x-stackQL-resources/rulesets/methods/create_by_account - - $ref: '#/components/x-stackQL-resources/rulesets/methods/create_by_zone' - update: [] - delete: - - $ref: >- - #/components/x-stackQL-resources/rulesets/methods/delete_by_account - - $ref: '#/components/x-stackQL-resources/rulesets/methods/delete_by_zone' - replace: - - $ref: >- - #/components/x-stackQL-resources/rulesets/methods/update_by_account - - $ref: '#/components/x-stackQL-resources/rulesets/methods/update_by_zone' - phases: - id: cloudflare.rulesets.phases - name: phases - title: Phases - methods: - list_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1rulesets~1phases~1{ruleset_phase}~1entrypoint/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update_by_account: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1rulesets~1phases~1{ruleset_phase}~1entrypoint/put - response: - mediaType: application/json - openAPIDocKey: '200' - list_by_zone: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1rulesets~1phases~1{ruleset_phase}~1entrypoint/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update_by_zone: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1rulesets~1phases~1{ruleset_phase}~1entrypoint/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/phases/methods/list_by_account' - - $ref: '#/components/x-stackQL-resources/phases/methods/list_by_zone' - insert: [] - update: [] - delete: [] - replace: - - $ref: '#/components/x-stackQL-resources/phases/methods/update_by_account' - - $ref: '#/components/x-stackQL-resources/phases/methods/update_by_zone' - entrypoint_versions: - id: cloudflare.rulesets.entrypoint_versions - name: entrypoint_versions - title: Entrypoint Versions - methods: - list_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1rulesets~1phases~1{ruleset_phase}~1entrypoint~1versions/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - list_by_zone: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1rulesets~1phases~1{ruleset_phase}~1entrypoint~1versions/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - get_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1rulesets~1phases~1{ruleset_phase}~1entrypoint~1versions~1{ruleset_version}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - get_by_zone: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1rulesets~1phases~1{ruleset_phase}~1entrypoint~1versions~1{ruleset_version}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/entrypoint_versions/methods/get_by_account - - $ref: >- - #/components/x-stackQL-resources/entrypoint_versions/methods/get_by_zone - - $ref: >- - #/components/x-stackQL-resources/entrypoint_versions/methods/list_by_account - - $ref: >- - #/components/x-stackQL-resources/entrypoint_versions/methods/list_by_zone - insert: [] - update: [] - delete: [] - replace: [] - rules: - id: cloudflare.rulesets.rules - name: rules - title: Rules - methods: - create_by_account: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1rulesets~1{ruleset_id}~1rules/post - response: - mediaType: application/json - openAPIDocKey: '200' - create_by_zone: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1rulesets~1{ruleset_id}~1rules/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1rulesets~1{ruleset_id}~1rules~1{rule_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - edit_by_account: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1rulesets~1{ruleset_id}~1rules~1{rule_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - delete_by_zone: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1rulesets~1{ruleset_id}~1rules~1{rule_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - edit_by_zone: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1rulesets~1{ruleset_id}~1rules~1{rule_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: '#/components/x-stackQL-resources/rules/methods/create_by_account' - - $ref: '#/components/x-stackQL-resources/rules/methods/create_by_zone' - update: - - $ref: '#/components/x-stackQL-resources/rules/methods/edit_by_account' - - $ref: '#/components/x-stackQL-resources/rules/methods/edit_by_zone' - delete: - - $ref: '#/components/x-stackQL-resources/rules/methods/delete_by_account' - - $ref: '#/components/x-stackQL-resources/rules/methods/delete_by_zone' - replace: [] - rulesets_versions: - id: cloudflare.rulesets.rulesets_versions - name: rulesets_versions - title: Rulesets Versions - methods: - list_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1rulesets~1{ruleset_id}~1versions/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - list_by_zone: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1rulesets~1{ruleset_id}~1versions/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - get_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1rulesets~1{ruleset_id}~1versions~1{ruleset_version}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - get_by_zone: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1rulesets~1{ruleset_id}~1versions~1{ruleset_version}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/rulesets_versions/methods/get_by_account - - $ref: >- - #/components/x-stackQL-resources/rulesets_versions/methods/get_by_zone - - $ref: >- - #/components/x-stackQL-resources/rulesets_versions/methods/list_by_account - - $ref: >- - #/components/x-stackQL-resources/rulesets_versions/methods/list_by_zone - insert: [] - update: [] - delete: [] - replace: [] - versions: - id: cloudflare.rulesets.versions - name: versions - title: Versions - methods: - delete_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1rulesets~1{ruleset_id}~1versions~1{ruleset_version}/delete - response: - mediaType: application/json - openAPIDocKey: '204' - delete_by_zone: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1rulesets~1{ruleset_id}~1versions~1{ruleset_version}/delete - response: - mediaType: application/json - openAPIDocKey: '204' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: - - $ref: >- - #/components/x-stackQL-resources/versions/methods/delete_by_account - - $ref: '#/components/x-stackQL-resources/versions/methods/delete_by_zone' - replace: [] - by_tag: - id: cloudflare.rulesets.by_tag - name: by_tag - title: By Tag - methods: - get_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1rulesets~1{ruleset_id}~1versions~1{ruleset_version}~1by_tag~1{rule_tag}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - get_by_zone: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1rulesets~1{ruleset_id}~1versions~1{ruleset_version}~1by_tag~1{rule_tag}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/by_tag/methods/get_by_account' - - $ref: '#/components/x-stackQL-resources/by_tag/methods/get_by_zone' - insert: [] - update: [] - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: rulesets API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/rulesets: + get: + description: Fetches all rulesets. + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: cursor + schema: + $ref: '#/components/schemas/rulesetsCursor' + - in: query + name: per_page + schema: + $ref: '#/components/schemas/rulesetsPerPage' + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A list of rulesets. The returned information will not include the rules in each ruleset. + title: Rulesets + items: + description: A ruleset object. + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + required: + - id + - version + - last_updated + - name + - kind + - phase + title: Ruleset + type: object + type: array + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + result_info: + $ref: '#/components/schemas/rulesetsResultInfo' + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A rulesets response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List account or zone rulesets + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Mass URL Redirects Read + - Magic Firewall Write + - Magic Firewall Read + - L4 DDoS Managed Ruleset Write + - L4 DDoS Managed Ruleset Read + - Transform Rules Write + - Transform Rules Read + - Select Configuration Write + - Select Configuration Read + - Account WAF Write + - Account WAF Read + - Account Rulesets Read + - Account Rulesets Write + - Logs Write + - Logs Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: [] + method: list + operationId: get_accounts_account_id_rulesets + post: + description: Creates a ruleset. + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + description: A ruleset object. + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + rules: + $ref: '#/components/schemas/rulesetsRequestRules' + required: + - name + - kind + - phase + title: Ruleset + type: object + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A ruleset object. + title: Ruleset + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + rules: + $ref: '#/components/schemas/rulesetsResponseRules' + required: + - id + - version + - last_updated + - name + - kind + - phase + - rules + type: object + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A ruleset response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create an account or zone ruleset + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Magic Firewall Write + - L4 DDoS Managed Ruleset Write + - Transform Rules Write + - Select Configuration Write + - Account WAF Write + - Account Rulesets Write + - Logs Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: [] + method: create + operationId: post_accounts_account_id_rulesets + /zones/{zone_id}/rulesets: + get: + description: Fetches all rulesets. + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: query + name: cursor + schema: + $ref: '#/components/schemas/rulesetsCursor' + - in: query + name: per_page + schema: + $ref: '#/components/schemas/rulesetsPerPage' + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A list of rulesets. The returned information will not include the rules in each ruleset. + title: Rulesets + items: + description: A ruleset object. + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + required: + - id + - version + - last_updated + - name + - kind + - phase + title: Ruleset + type: object + type: array + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + result_info: + $ref: '#/components/schemas/rulesetsResultInfo' + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A rulesets response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List account or zone rulesets + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Mass URL Redirects Read + - Magic Firewall Write + - Magic Firewall Read + - L4 DDoS Managed Ruleset Write + - L4 DDoS Managed Ruleset Read + - Transform Rules Write + - Transform Rules Read + - Select Configuration Write + - Select Configuration Read + - Account WAF Write + - Account WAF Read + - Account Rulesets Read + - Account Rulesets Write + - Logs Write + - Logs Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: [] + method: list + operationId: get_zones_zone_id_rulesets + post: + description: Creates a ruleset. + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + description: A ruleset object. + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + rules: + $ref: '#/components/schemas/rulesetsRequestRules' + required: + - name + - kind + - phase + title: Ruleset + type: object + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A ruleset object. + title: Ruleset + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + rules: + $ref: '#/components/schemas/rulesetsResponseRules' + required: + - id + - version + - last_updated + - name + - kind + - phase + - rules + type: object + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A ruleset response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create an account or zone ruleset + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Magic Firewall Write + - L4 DDoS Managed Ruleset Write + - Transform Rules Write + - Select Configuration Write + - Account WAF Write + - Account Rulesets Write + - Logs Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: [] + method: create + operationId: post_zones_zone_id_rulesets + /accounts/{account_id}/rulesets/phases/{ruleset_phase}/entrypoint: + get: + description: Fetches the latest version of the account or zone entry point ruleset for a given phase. + parameters: + - in: path + name: ruleset_phase + schema: + $ref: '#/components/schemas/rulesetsRulesetPhase' + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A ruleset object. + title: Ruleset + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + rules: + $ref: '#/components/schemas/rulesetsResponseRules' + required: + - id + - version + - last_updated + - name + - kind + - phase + - rules + type: object + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A ruleset response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get an account or zone entry point ruleset + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Mass URL Redirects Read + - Magic Firewall Write + - Magic Firewall Read + - L4 DDoS Managed Ruleset Write + - L4 DDoS Managed Ruleset Read + - Transform Rules Write + - Transform Rules Read + - Select Configuration Write + - Select Configuration Read + - Account WAF Write + - Account WAF Read + - Account Rulesets Read + - Account Rulesets Write + - Logs Write + - Logs Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: + - phases + method: get + operationId: get_accounts_account_id_rulesets_phases_ruleset_phase_entrypoint + put: + description: Updates an account or zone entry point ruleset, creating a new version. + parameters: + - in: path + name: ruleset_phase + schema: + $ref: '#/components/schemas/rulesetsRulesetPhase' + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + description: A ruleset object. + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + rules: + $ref: '#/components/schemas/rulesetsRequestRules' + title: Ruleset + type: object + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A ruleset object. + title: Ruleset + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + rules: + $ref: '#/components/schemas/rulesetsResponseRules' + required: + - id + - version + - last_updated + - name + - kind + - phase + - rules + type: object + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A ruleset response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update an account or zone entry point ruleset + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Magic Firewall Write + - L4 DDoS Managed Ruleset Write + - Transform Rules Write + - Select Configuration Write + - Account WAF Write + - Account Rulesets Write + - Logs Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: + - phases + method: update + operationId: put_accounts_account_id_rulesets_phases_ruleset_phase_entrypoint + /zones/{zone_id}/rulesets/phases/{ruleset_phase}/entrypoint: + get: + description: Fetches the latest version of the account or zone entry point ruleset for a given phase. + parameters: + - in: path + name: ruleset_phase + schema: + $ref: '#/components/schemas/rulesetsRulesetPhase' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A ruleset object. + title: Ruleset + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + rules: + $ref: '#/components/schemas/rulesetsResponseRules' + required: + - id + - version + - last_updated + - name + - kind + - phase + - rules + type: object + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A ruleset response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get an account or zone entry point ruleset + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Mass URL Redirects Read + - Magic Firewall Write + - Magic Firewall Read + - L4 DDoS Managed Ruleset Write + - L4 DDoS Managed Ruleset Read + - Transform Rules Write + - Transform Rules Read + - Select Configuration Write + - Select Configuration Read + - Account WAF Write + - Account WAF Read + - Account Rulesets Read + - Account Rulesets Write + - Logs Write + - Logs Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: + - phases + method: get + operationId: get_zones_zone_id_rulesets_phases_ruleset_phase_entrypoint + put: + description: Updates an account or zone entry point ruleset, creating a new version. + parameters: + - in: path + name: ruleset_phase + schema: + $ref: '#/components/schemas/rulesetsRulesetPhase' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + description: A ruleset object. + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + rules: + $ref: '#/components/schemas/rulesetsRequestRules' + title: Ruleset + type: object + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A ruleset object. + title: Ruleset + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + rules: + $ref: '#/components/schemas/rulesetsResponseRules' + required: + - id + - version + - last_updated + - name + - kind + - phase + - rules + type: object + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A ruleset response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update an account or zone entry point ruleset + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Magic Firewall Write + - L4 DDoS Managed Ruleset Write + - Transform Rules Write + - Select Configuration Write + - Account WAF Write + - Account Rulesets Write + - Logs Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: + - phases + method: update + operationId: put_zones_zone_id_rulesets_phases_ruleset_phase_entrypoint + /accounts/{account_id}/rulesets/phases/{ruleset_phase}/entrypoint/versions: + get: + description: Fetches the versions of an account or zone entry point ruleset. + parameters: + - in: path + name: ruleset_phase + schema: + $ref: '#/components/schemas/rulesetsRulesetPhase' + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A list of rulesets. The returned information will not include the rules in each ruleset. + title: Rulesets + items: + description: A ruleset object. + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + required: + - id + - version + - last_updated + - name + - kind + - phase + title: Ruleset + type: object + type: array + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + result_info: + $ref: '#/components/schemas/rulesetsResultInfo' + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A rulesets response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List an account or zone entry point ruleset's versions + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Mass URL Redirects Read + - Magic Firewall Write + - Magic Firewall Read + - L4 DDoS Managed Ruleset Write + - L4 DDoS Managed Ruleset Read + - Transform Rules Write + - Transform Rules Read + - Select Configuration Write + - Select Configuration Read + - Account WAF Write + - Account WAF Read + - Account Rulesets Read + - Account Rulesets Write + - Logs Write + - Logs Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: + - phases + - versions + method: list + operationId: get_accounts_account_id_rulesets_phases_ruleset_phase_entrypoint_versions + /zones/{zone_id}/rulesets/phases/{ruleset_phase}/entrypoint/versions: + get: + description: Fetches the versions of an account or zone entry point ruleset. + parameters: + - in: path + name: ruleset_phase + schema: + $ref: '#/components/schemas/rulesetsRulesetPhase' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A list of rulesets. The returned information will not include the rules in each ruleset. + title: Rulesets + items: + description: A ruleset object. + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + required: + - id + - version + - last_updated + - name + - kind + - phase + title: Ruleset + type: object + type: array + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + result_info: + $ref: '#/components/schemas/rulesetsResultInfo' + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A rulesets response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List an account or zone entry point ruleset's versions + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Mass URL Redirects Read + - Magic Firewall Write + - Magic Firewall Read + - L4 DDoS Managed Ruleset Write + - L4 DDoS Managed Ruleset Read + - Transform Rules Write + - Transform Rules Read + - Select Configuration Write + - Select Configuration Read + - Account WAF Write + - Account WAF Read + - Account Rulesets Read + - Account Rulesets Write + - Logs Write + - Logs Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: + - phases + - versions + method: list + operationId: get_zones_zone_id_rulesets_phases_ruleset_phase_entrypoint_versions + /accounts/{account_id}/rulesets/phases/{ruleset_phase}/entrypoint/versions/{ruleset_version}: + get: + description: Fetches a specific version of an account or zone entry point ruleset. + parameters: + - in: path + name: ruleset_version + schema: + $ref: '#/components/schemas/rulesetsRulesetVersion' + required: true + - in: path + name: ruleset_phase + schema: + $ref: '#/components/schemas/rulesetsRulesetPhase' + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A ruleset object. + title: Ruleset + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + rules: + $ref: '#/components/schemas/rulesetsResponseRules' + required: + - id + - version + - last_updated + - name + - kind + - phase + - rules + type: object + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A ruleset response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get an account or zone entry point ruleset version + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Mass URL Redirects Read + - Magic Firewall Write + - Magic Firewall Read + - L4 DDoS Managed Ruleset Write + - L4 DDoS Managed Ruleset Read + - Transform Rules Write + - Transform Rules Read + - Select Configuration Write + - Select Configuration Read + - Account WAF Write + - Account WAF Read + - Account Rulesets Read + - Account Rulesets Write + - Logs Write + - Logs Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: + - phases + - versions + method: get + operationId: get_accounts_account_id_rulesets_phases_ruleset_phase_entrypoint_versions_ruleset_version + /zones/{zone_id}/rulesets/phases/{ruleset_phase}/entrypoint/versions/{ruleset_version}: + get: + description: Fetches a specific version of an account or zone entry point ruleset. + parameters: + - in: path + name: ruleset_version + schema: + $ref: '#/components/schemas/rulesetsRulesetVersion' + required: true + - in: path + name: ruleset_phase + schema: + $ref: '#/components/schemas/rulesetsRulesetPhase' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A ruleset object. + title: Ruleset + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + rules: + $ref: '#/components/schemas/rulesetsResponseRules' + required: + - id + - version + - last_updated + - name + - kind + - phase + - rules + type: object + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A ruleset response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get an account or zone entry point ruleset version + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Mass URL Redirects Read + - Magic Firewall Write + - Magic Firewall Read + - L4 DDoS Managed Ruleset Write + - L4 DDoS Managed Ruleset Read + - Transform Rules Write + - Transform Rules Read + - Select Configuration Write + - Select Configuration Read + - Account WAF Write + - Account WAF Read + - Account Rulesets Read + - Account Rulesets Write + - Logs Write + - Logs Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: + - phases + - versions + method: get + operationId: get_zones_zone_id_rulesets_phases_ruleset_phase_entrypoint_versions_ruleset_version + /accounts/{account_id}/rulesets/{ruleset_id}: + get: + description: Fetches the latest version of an account or zone ruleset. + parameters: + - name: ruleset_id + in: path + required: true + description: The ruleset ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A ruleset object. + title: Ruleset + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + rules: + $ref: '#/components/schemas/rulesetsResponseRules' + required: + - id + - version + - last_updated + - name + - kind + - phase + - rules + type: object + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A ruleset response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get an account or zone ruleset + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Mass URL Redirects Read + - Magic Firewall Write + - Magic Firewall Read + - L4 DDoS Managed Ruleset Write + - L4 DDoS Managed Ruleset Read + - Transform Rules Write + - Transform Rules Read + - Select Configuration Write + - Select Configuration Read + - Account WAF Write + - Account WAF Read + - Account Rulesets Read + - Account Rulesets Write + - Logs Write + - Logs Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: [] + method: get + operationId: get_accounts_account_id_rulesets_ruleset_id + put: + description: Updates an account or zone ruleset, creating a new version. + parameters: + - name: ruleset_id + in: path + required: true + description: The ruleset ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + description: A ruleset object. + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + rules: + $ref: '#/components/schemas/rulesetsRequestRules' + title: Ruleset + type: object + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A ruleset object. + title: Ruleset + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + rules: + $ref: '#/components/schemas/rulesetsResponseRules' + required: + - id + - version + - last_updated + - name + - kind + - phase + - rules + type: object + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A ruleset response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update an account or zone ruleset + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Magic Firewall Write + - L4 DDoS Managed Ruleset Write + - Transform Rules Write + - Select Configuration Write + - Account WAF Write + - Account Rulesets Write + - Logs Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: [] + method: update + operationId: put_accounts_account_id_rulesets_ruleset_id + delete: + description: Deletes all versions of an existing account or zone ruleset. + parameters: + - name: ruleset_id + in: path + required: true + description: The ruleset ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '204': + description: An empty response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete an account or zone ruleset + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Magic Firewall Write + - L4 DDoS Managed Ruleset Write + - Transform Rules Write + - Select Configuration Write + - Account WAF Write + - Account Rulesets Write + - Logs Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: [] + method: delete + operationId: delete_accounts_account_id_rulesets_ruleset_id + /zones/{zone_id}/rulesets/{ruleset_id}: + get: + description: Fetches the latest version of an account or zone ruleset. + parameters: + - name: ruleset_id + in: path + required: true + description: The ruleset ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A ruleset object. + title: Ruleset + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + rules: + $ref: '#/components/schemas/rulesetsResponseRules' + required: + - id + - version + - last_updated + - name + - kind + - phase + - rules + type: object + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A ruleset response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get an account or zone ruleset + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Mass URL Redirects Read + - Magic Firewall Write + - Magic Firewall Read + - L4 DDoS Managed Ruleset Write + - L4 DDoS Managed Ruleset Read + - Transform Rules Write + - Transform Rules Read + - Select Configuration Write + - Select Configuration Read + - Account WAF Write + - Account WAF Read + - Account Rulesets Read + - Account Rulesets Write + - Logs Write + - Logs Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: [] + method: get + operationId: get_zones_zone_id_rulesets_ruleset_id + put: + description: Updates an account or zone ruleset, creating a new version. + parameters: + - name: ruleset_id + in: path + required: true + description: The ruleset ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + description: A ruleset object. + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + rules: + $ref: '#/components/schemas/rulesetsRequestRules' + title: Ruleset + type: object + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A ruleset object. + title: Ruleset + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + rules: + $ref: '#/components/schemas/rulesetsResponseRules' + required: + - id + - version + - last_updated + - name + - kind + - phase + - rules + type: object + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A ruleset response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update an account or zone ruleset + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Magic Firewall Write + - L4 DDoS Managed Ruleset Write + - Transform Rules Write + - Select Configuration Write + - Account WAF Write + - Account Rulesets Write + - Logs Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: [] + method: update + operationId: put_zones_zone_id_rulesets_ruleset_id + delete: + description: Deletes all versions of an existing account or zone ruleset. + parameters: + - name: ruleset_id + in: path + required: true + description: The ruleset ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '204': + description: An empty response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete an account or zone ruleset + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Magic Firewall Write + - L4 DDoS Managed Ruleset Write + - Transform Rules Write + - Select Configuration Write + - Account WAF Write + - Account Rulesets Write + - Logs Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: [] + method: delete + operationId: delete_zones_zone_id_rulesets_ruleset_id + /accounts/{account_id}/rulesets/{ruleset_id}/rules: + post: + description: Adds a new rule to an account or zone ruleset. The rule will be added to the end of the existing list of rules in the ruleset by default. + parameters: + - name: ruleset_id + in: path + required: true + description: The ruleset ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + position: + type: object + title: Before Position + description: An object configuring where the rule will be placed. + properties: + before: + description: The ID of another rule to place the rule before. An empty value causes the rule to be placed at the top. + title: Before + type: string + after: + description: The ID of another rule to place the rule after. An empty value causes the rule to be placed at the bottom. + title: After + type: string + index: + description: An index at which to place the rule, where index 1 is the first rule. + minimum: 1 + title: Index + type: integer + action: + description: The action to perform when the rule matches. + title: Action + type: string + enum: + - block + action_parameters: + default: {} + description: The parameters configuring the rule's action. + title: Action Parameters + type: object + properties: + response: + description: The response to show when the block is applied. + properties: + content: + description: The content to return. + minLength: 1 + title: Content + type: string + content_type: + description: The type of the content to return. + minLength: 1 + title: Content Type + type: string + status_code: + description: The status code to return. + maximum: 499 + minimum: 400 + title: Status Code + type: integer + required: + - status_code + - content + - content_type + title: Response + type: object + categories: + $ref: '#/components/schemas/rulesetsRuleCategories' + description: + default: '' + description: An informative description of the rule. + title: Description + type: string + enabled: + $ref: '#/components/schemas/rulesetsRuleEnabled' + default: true + exposed_credential_check: + $ref: '#/components/schemas/rulesetsRuleExposedCredentialCheck' + expression: + description: The expression defining which traffic will match the rule. + minLength: 1 + title: Expression + type: string + id: + $ref: '#/components/schemas/rulesetsRuleId' + last_updated: + description: The timestamp of when the rule was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + x-stainless-skip: + - terraform + logging: + $ref: '#/components/schemas/unnamedSchemaRef70f2c6ccd8a405358ac7ef8fc3d6751c' + ratelimit: + $ref: '#/components/schemas/rulesetsRuleRatelimit' + ref: + description: The reference of the rule (the rule's ID by default). + minLength: 1 + title: Ref + type: string + version: + description: The version of the rule. + readOnly: true + title: Version + type: string + x-stainless-skip: + - terraform + type: object + title: Block Rule + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A ruleset object. + title: Ruleset + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + rules: + $ref: '#/components/schemas/rulesetsResponseRules' + required: + - id + - version + - last_updated + - name + - kind + - phase + - rules + type: object + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A ruleset response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create an account or zone ruleset rule + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Magic Firewall Write + - L4 DDoS Managed Ruleset Write + - Transform Rules Write + - Select Configuration Write + - Account WAF Write + - Account Rulesets Write + - Logs Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: + - rules + method: create + operationId: post_accounts_account_id_rulesets_ruleset_id_rules + /zones/{zone_id}/rulesets/{ruleset_id}/rules: + post: + description: Adds a new rule to an account or zone ruleset. The rule will be added to the end of the existing list of rules in the ruleset by default. + parameters: + - name: ruleset_id + in: path + required: true + description: The ruleset ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + position: + type: object + title: Before Position + description: An object configuring where the rule will be placed. + properties: + before: + description: The ID of another rule to place the rule before. An empty value causes the rule to be placed at the top. + title: Before + type: string + after: + description: The ID of another rule to place the rule after. An empty value causes the rule to be placed at the bottom. + title: After + type: string + index: + description: An index at which to place the rule, where index 1 is the first rule. + minimum: 1 + title: Index + type: integer + action: + description: The action to perform when the rule matches. + title: Action + type: string + enum: + - block + action_parameters: + default: {} + description: The parameters configuring the rule's action. + title: Action Parameters + type: object + properties: + response: + description: The response to show when the block is applied. + properties: + content: + description: The content to return. + minLength: 1 + title: Content + type: string + content_type: + description: The type of the content to return. + minLength: 1 + title: Content Type + type: string + status_code: + description: The status code to return. + maximum: 499 + minimum: 400 + title: Status Code + type: integer + required: + - status_code + - content + - content_type + title: Response + type: object + categories: + $ref: '#/components/schemas/rulesetsRuleCategories' + description: + default: '' + description: An informative description of the rule. + title: Description + type: string + enabled: + $ref: '#/components/schemas/rulesetsRuleEnabled' + default: true + exposed_credential_check: + $ref: '#/components/schemas/rulesetsRuleExposedCredentialCheck' + expression: + description: The expression defining which traffic will match the rule. + minLength: 1 + title: Expression + type: string + id: + $ref: '#/components/schemas/rulesetsRuleId' + last_updated: + description: The timestamp of when the rule was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + x-stainless-skip: + - terraform + logging: + $ref: '#/components/schemas/unnamedSchemaRef70f2c6ccd8a405358ac7ef8fc3d6751c' + ratelimit: + $ref: '#/components/schemas/rulesetsRuleRatelimit' + ref: + description: The reference of the rule (the rule's ID by default). + minLength: 1 + title: Ref + type: string + version: + description: The version of the rule. + readOnly: true + title: Version + type: string + x-stainless-skip: + - terraform + type: object + title: Block Rule + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A ruleset object. + title: Ruleset + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + rules: + $ref: '#/components/schemas/rulesetsResponseRules' + required: + - id + - version + - last_updated + - name + - kind + - phase + - rules + type: object + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A ruleset response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create an account or zone ruleset rule + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Magic Firewall Write + - L4 DDoS Managed Ruleset Write + - Transform Rules Write + - Select Configuration Write + - Account WAF Write + - Account Rulesets Write + - Logs Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: + - rules + method: create + operationId: post_zones_zone_id_rulesets_ruleset_id_rules + /accounts/{account_id}/rulesets/{ruleset_id}/rules/{rule_id}: + delete: + description: Deletes an existing rule from an account or zone ruleset. + parameters: + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + - name: ruleset_id + in: path + required: true + description: The ruleset ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A ruleset object. + title: Ruleset + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + rules: + $ref: '#/components/schemas/rulesetsResponseRules' + required: + - id + - version + - last_updated + - name + - kind + - phase + - rules + type: object + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A ruleset response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete an account or zone ruleset rule + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Magic Firewall Write + - L4 DDoS Managed Ruleset Write + - Transform Rules Write + - Select Configuration Write + - Account WAF Write + - Account Rulesets Write + - Logs Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: + - rules + method: delete + operationId: delete_accounts_account_id_rulesets_ruleset_id_rules_rule_id + patch: + description: Updates an existing rule in an account or zone ruleset. + parameters: + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + - name: ruleset_id + in: path + required: true + description: The ruleset ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + position: + type: object + title: Before Position + description: An object configuring where the rule will be placed. + properties: + before: + description: The ID of another rule to place the rule before. An empty value causes the rule to be placed at the top. + title: Before + type: string + after: + description: The ID of another rule to place the rule after. An empty value causes the rule to be placed at the bottom. + title: After + type: string + index: + description: An index at which to place the rule, where index 1 is the first rule. + minimum: 1 + title: Index + type: integer + action: + description: The action to perform when the rule matches. + title: Action + type: string + enum: + - block + action_parameters: + default: {} + description: The parameters configuring the rule's action. + title: Action Parameters + type: object + properties: + response: + description: The response to show when the block is applied. + properties: + content: + description: The content to return. + minLength: 1 + title: Content + type: string + content_type: + description: The type of the content to return. + minLength: 1 + title: Content Type + type: string + status_code: + description: The status code to return. + maximum: 499 + minimum: 400 + title: Status Code + type: integer + required: + - status_code + - content + - content_type + title: Response + type: object + categories: + $ref: '#/components/schemas/rulesetsRuleCategories' + description: + default: '' + description: An informative description of the rule. + title: Description + type: string + enabled: + $ref: '#/components/schemas/rulesetsRuleEnabled' + default: true + exposed_credential_check: + $ref: '#/components/schemas/rulesetsRuleExposedCredentialCheck' + expression: + description: The expression defining which traffic will match the rule. + minLength: 1 + title: Expression + type: string + id: + $ref: '#/components/schemas/rulesetsRuleId' + last_updated: + description: The timestamp of when the rule was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + x-stainless-skip: + - terraform + logging: + $ref: '#/components/schemas/unnamedSchemaRef70f2c6ccd8a405358ac7ef8fc3d6751c' + ratelimit: + $ref: '#/components/schemas/rulesetsRuleRatelimit' + ref: + description: The reference of the rule (the rule's ID by default). + minLength: 1 + title: Ref + type: string + version: + description: The version of the rule. + readOnly: true + title: Version + type: string + x-stainless-skip: + - terraform + type: object + title: Block Rule + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A ruleset object. + title: Ruleset + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + rules: + $ref: '#/components/schemas/rulesetsResponseRules' + required: + - id + - version + - last_updated + - name + - kind + - phase + - rules + type: object + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A ruleset response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update an account or zone ruleset rule + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Magic Firewall Write + - L4 DDoS Managed Ruleset Write + - Transform Rules Write + - Select Configuration Write + - Account WAF Write + - Account Rulesets Write + - Logs Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: + - rules + method: edit + operationId: patch_accounts_account_id_rulesets_ruleset_id_rules_rule_id + /zones/{zone_id}/rulesets/{ruleset_id}/rules/{rule_id}: + delete: + description: Deletes an existing rule from an account or zone ruleset. + parameters: + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + - name: ruleset_id + in: path + required: true + description: The ruleset ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A ruleset object. + title: Ruleset + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + rules: + $ref: '#/components/schemas/rulesetsResponseRules' + required: + - id + - version + - last_updated + - name + - kind + - phase + - rules + type: object + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A ruleset response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete an account or zone ruleset rule + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Magic Firewall Write + - L4 DDoS Managed Ruleset Write + - Transform Rules Write + - Select Configuration Write + - Account WAF Write + - Account Rulesets Write + - Logs Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: + - rules + method: delete + operationId: delete_zones_zone_id_rulesets_ruleset_id_rules_rule_id + patch: + description: Updates an existing rule in an account or zone ruleset. + parameters: + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + - name: ruleset_id + in: path + required: true + description: The ruleset ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + position: + type: object + title: Before Position + description: An object configuring where the rule will be placed. + properties: + before: + description: The ID of another rule to place the rule before. An empty value causes the rule to be placed at the top. + title: Before + type: string + after: + description: The ID of another rule to place the rule after. An empty value causes the rule to be placed at the bottom. + title: After + type: string + index: + description: An index at which to place the rule, where index 1 is the first rule. + minimum: 1 + title: Index + type: integer + action: + description: The action to perform when the rule matches. + title: Action + type: string + enum: + - block + action_parameters: + default: {} + description: The parameters configuring the rule's action. + title: Action Parameters + type: object + properties: + response: + description: The response to show when the block is applied. + properties: + content: + description: The content to return. + minLength: 1 + title: Content + type: string + content_type: + description: The type of the content to return. + minLength: 1 + title: Content Type + type: string + status_code: + description: The status code to return. + maximum: 499 + minimum: 400 + title: Status Code + type: integer + required: + - status_code + - content + - content_type + title: Response + type: object + categories: + $ref: '#/components/schemas/rulesetsRuleCategories' + description: + default: '' + description: An informative description of the rule. + title: Description + type: string + enabled: + $ref: '#/components/schemas/rulesetsRuleEnabled' + default: true + exposed_credential_check: + $ref: '#/components/schemas/rulesetsRuleExposedCredentialCheck' + expression: + description: The expression defining which traffic will match the rule. + minLength: 1 + title: Expression + type: string + id: + $ref: '#/components/schemas/rulesetsRuleId' + last_updated: + description: The timestamp of when the rule was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + x-stainless-skip: + - terraform + logging: + $ref: '#/components/schemas/unnamedSchemaRef70f2c6ccd8a405358ac7ef8fc3d6751c' + ratelimit: + $ref: '#/components/schemas/rulesetsRuleRatelimit' + ref: + description: The reference of the rule (the rule's ID by default). + minLength: 1 + title: Ref + type: string + version: + description: The version of the rule. + readOnly: true + title: Version + type: string + x-stainless-skip: + - terraform + type: object + title: Block Rule + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A ruleset object. + title: Ruleset + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + rules: + $ref: '#/components/schemas/rulesetsResponseRules' + required: + - id + - version + - last_updated + - name + - kind + - phase + - rules + type: object + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A ruleset response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update an account or zone ruleset rule + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Magic Firewall Write + - L4 DDoS Managed Ruleset Write + - Transform Rules Write + - Select Configuration Write + - Account WAF Write + - Account Rulesets Write + - Logs Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: + - rules + method: edit + operationId: patch_zones_zone_id_rulesets_ruleset_id_rules_rule_id + /accounts/{account_id}/rulesets/{ruleset_id}/versions: + get: + description: Fetches the versions of an account or zone ruleset. + parameters: + - name: ruleset_id + in: path + required: true + description: The ruleset ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A list of rulesets. The returned information will not include the rules in each ruleset. + title: Rulesets + items: + description: A ruleset object. + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + required: + - id + - version + - last_updated + - name + - kind + - phase + title: Ruleset + type: object + type: array + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + result_info: + $ref: '#/components/schemas/rulesetsResultInfo' + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A rulesets response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List an account or zone ruleset's versions + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Mass URL Redirects Read + - Magic Firewall Write + - Magic Firewall Read + - L4 DDoS Managed Ruleset Write + - L4 DDoS Managed Ruleset Read + - Transform Rules Write + - Transform Rules Read + - Select Configuration Write + - Select Configuration Read + - Account WAF Write + - Account WAF Read + - Account Rulesets Read + - Account Rulesets Write + - Logs Write + - Logs Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: + - versions + method: list + operationId: get_accounts_account_id_rulesets_ruleset_id_versions + /zones/{zone_id}/rulesets/{ruleset_id}/versions: + get: + description: Fetches the versions of an account or zone ruleset. + parameters: + - name: ruleset_id + in: path + required: true + description: The ruleset ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A list of rulesets. The returned information will not include the rules in each ruleset. + title: Rulesets + items: + description: A ruleset object. + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + required: + - id + - version + - last_updated + - name + - kind + - phase + title: Ruleset + type: object + type: array + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + result_info: + $ref: '#/components/schemas/rulesetsResultInfo' + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A rulesets response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List an account or zone ruleset's versions + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Mass URL Redirects Read + - Magic Firewall Write + - Magic Firewall Read + - L4 DDoS Managed Ruleset Write + - L4 DDoS Managed Ruleset Read + - Transform Rules Write + - Transform Rules Read + - Select Configuration Write + - Select Configuration Read + - Account WAF Write + - Account WAF Read + - Account Rulesets Read + - Account Rulesets Write + - Logs Write + - Logs Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: + - versions + method: list + operationId: get_zones_zone_id_rulesets_ruleset_id_versions + /accounts/{account_id}/rulesets/{ruleset_id}/versions/{ruleset_version}: + get: + description: Fetches a specific version of an account or zone ruleset. + parameters: + - in: path + name: ruleset_version + schema: + $ref: '#/components/schemas/rulesetsRulesetVersion' + required: true + - name: ruleset_id + in: path + required: true + description: The ruleset ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A ruleset object. + title: Ruleset + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + rules: + $ref: '#/components/schemas/rulesetsResponseRules' + required: + - id + - version + - last_updated + - name + - kind + - phase + - rules + type: object + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A ruleset response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get an account or zone ruleset version + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Mass URL Redirects Read + - Magic Firewall Write + - Magic Firewall Read + - L4 DDoS Managed Ruleset Write + - L4 DDoS Managed Ruleset Read + - Transform Rules Write + - Transform Rules Read + - Select Configuration Write + - Select Configuration Read + - Account WAF Write + - Account WAF Read + - Account Rulesets Read + - Account Rulesets Write + - Logs Write + - Logs Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: + - versions + method: get + operationId: get_accounts_account_id_rulesets_ruleset_id_versions_ruleset_version + delete: + description: Deletes an existing version of an account or zone ruleset. + parameters: + - in: path + name: ruleset_version + schema: + $ref: '#/components/schemas/rulesetsRulesetVersion' + required: true + - name: ruleset_id + in: path + required: true + description: The ruleset ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '204': + description: An empty response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete an account or zone ruleset version + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Magic Firewall Write + - L4 DDoS Managed Ruleset Write + - Transform Rules Write + - Select Configuration Write + - Account WAF Write + - Account Rulesets Write + - Logs Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: + - versions + method: delete + operationId: delete_accounts_account_id_rulesets_ruleset_id_versions_ruleset_version + /zones/{zone_id}/rulesets/{ruleset_id}/versions/{ruleset_version}: + get: + description: Fetches a specific version of an account or zone ruleset. + parameters: + - in: path + name: ruleset_version + schema: + $ref: '#/components/schemas/rulesetsRulesetVersion' + required: true + - name: ruleset_id + in: path + required: true + description: The ruleset ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A ruleset object. + title: Ruleset + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + rules: + $ref: '#/components/schemas/rulesetsResponseRules' + required: + - id + - version + - last_updated + - name + - kind + - phase + - rules + type: object + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A ruleset response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get an account or zone ruleset version + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Mass URL Redirects Read + - Magic Firewall Write + - Magic Firewall Read + - L4 DDoS Managed Ruleset Write + - L4 DDoS Managed Ruleset Read + - Transform Rules Write + - Transform Rules Read + - Select Configuration Write + - Select Configuration Read + - Account WAF Write + - Account WAF Read + - Account Rulesets Read + - Account Rulesets Write + - Logs Write + - Logs Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: + - versions + method: get + operationId: get_zones_zone_id_rulesets_ruleset_id_versions_ruleset_version + delete: + description: Deletes an existing version of an account or zone ruleset. + parameters: + - in: path + name: ruleset_version + schema: + $ref: '#/components/schemas/rulesetsRulesetVersion' + required: true + - name: ruleset_id + in: path + required: true + description: The ruleset ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '204': + description: An empty response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete an account or zone ruleset version + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Magic Firewall Write + - L4 DDoS Managed Ruleset Write + - Transform Rules Write + - Select Configuration Write + - Account WAF Write + - Account Rulesets Write + - Logs Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rulesets + resource_chain: + - versions + method: delete + operationId: delete_zones_zone_id_rulesets_ruleset_id_versions_ruleset_version + /accounts/{account_id}/rulesets/{ruleset_id}/versions/{ruleset_version}/by_tag/{rule_tag}: + get: + description: Fetches the rules of a managed account or zone ruleset version for a given tag. + parameters: + - in: path + name: rule_tag + schema: + $ref: '#/components/schemas/rulesetsRuleCategory' + required: true + - in: path + name: ruleset_version + schema: + $ref: '#/components/schemas/rulesetsRulesetVersion' + required: true + - name: ruleset_id + in: path + required: true + description: The ruleset ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A ruleset object. + title: Ruleset + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + rules: + $ref: '#/components/schemas/rulesetsResponseRules' + required: + - id + - version + - last_updated + - name + - kind + - phase + - rules + type: object + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A ruleset response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List an account or zone ruleset version's rules by tag + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Mass URL Redirects Read + - Magic Firewall Write + - Magic Firewall Read + - L4 DDoS Managed Ruleset Write + - L4 DDoS Managed Ruleset Read + - Transform Rules Write + - Transform Rules Read + - Select Configuration Write + - Select Configuration Read + - Account WAF Write + - Account WAF Read + - Account Rulesets Read + - Account Rulesets Write + - Logs Write + - Logs Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + operationId: get_accounts_account_id_rulesets_ruleset_id_versions_ruleset_version_by_tag_rule_tag + /zones/{zone_id}/rulesets/{ruleset_id}/versions/{ruleset_version}/by_tag/{rule_tag}: + get: + description: Fetches the rules of a managed account or zone ruleset version for a given tag. + parameters: + - in: path + name: rule_tag + schema: + $ref: '#/components/schemas/rulesetsRuleCategory' + required: true + - in: path + name: ruleset_version + schema: + $ref: '#/components/schemas/rulesetsRulesetVersion' + required: true + - name: ruleset_id + in: path + required: true + description: The ruleset ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + description: A response object. + properties: + errors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + enum: + - [] + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A ruleset object. + title: Ruleset + properties: + description: + default: '' + description: An informative description of the ruleset. + title: Description + type: string + id: + $ref: '#/components/schemas/rulesetsRulesetId' + readOnly: true + last_updated: + description: The timestamp of when the ruleset was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + name: + description: The human-readable name of the ruleset. + minLength: 1 + title: Name + type: string + version: + $ref: '#/components/schemas/rulesetsRulesetVersion' + readOnly: true + kind: + $ref: '#/components/schemas/rulesetsRulesetKind' + phase: + $ref: '#/components/schemas/rulesetsRulesetPhase' + rules: + $ref: '#/components/schemas/rulesetsResponseRules' + required: + - id + - version + - last_updated + - name + - kind + - phase + - rules + type: object + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - true + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A ruleset response. + 4XX: + content: + application/json: + schema: + description: A response object. + properties: + errors: + $ref: '#/components/schemas/rulesetsErrors' + messages: + $ref: '#/components/schemas/rulesetsMessages' + result: + description: A result. + title: Result + enum: + - null + type: string + success: + description: Whether the API call was successful. + title: Success + type: boolean + enum: + - false + required: + - result + - success + - errors + - messages + title: Response + type: object + description: A failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List an account or zone ruleset version's rules by tag + tags: [] + x-api-token-group: + - Mass URL Redirects Write + - Mass URL Redirects Read + - Magic Firewall Write + - Magic Firewall Read + - L4 DDoS Managed Ruleset Write + - L4 DDoS Managed Ruleset Read + - Transform Rules Write + - Transform Rules Read + - Select Configuration Write + - Select Configuration Read + - Account WAF Write + - Account WAF Read + - Account Rulesets Read + - Account Rulesets Write + - Logs Write + - Logs Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + operationId: get_zones_zone_id_rulesets_ruleset_id_versions_ruleset_version_by_tag_rule_tag +components: + schemas: + rulesetsCursor: + description: The cursor to use for the next page. + example: dGhpc2lzYW5leGFtcGxlCg + minLength: 1 + title: Cursor + type: string + rulesetsErrors: + description: A list of error messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Errors + type: array + uniqueItems: true + rulesetsMessage: + description: A message. + properties: + code: + description: A unique code for this message. + example: 10000 + title: Code + type: integer + message: + description: A text description of this message. + example: something bad happened + minLength: 1 + title: Description + type: string + source: + description: The source of this message. + properties: + pointer: + description: A JSON pointer to the field that is the source of the message. + example: /rules/0/action + minLength: 1 + title: Pointer + type: string + required: + - pointer + title: Source + type: object + required: + - message + title: Message + type: object + rulesetsMessages: + description: A list of warning messages. + items: + $ref: '#/components/schemas/rulesetsMessage' + title: Messages + type: array + uniqueItems: true + rulesetsPerPage: + description: The number of rulesets to return per page. + example: 3 + maximum: 50 + minimum: 1 + title: Per Page + type: integer + rulesetsRequestRule: + type: object + title: Block Rule + properties: + action: + description: The action to perform when the rule matches. + title: Action + type: string + enum: + - block + action_parameters: + default: {} + description: The parameters configuring the rule's action. + title: Action Parameters + type: object + properties: + response: + description: The response to show when the block is applied. + properties: + content: + description: The content to return. + example: "{\n \"success\": false,\n \"error\": \"you have been blocked\"\n}" + minLength: 1 + title: Content + type: string + content_type: + description: The type of the content to return. + example: application/json + minLength: 1 + title: Content Type + type: string + status_code: + description: The status code to return. + maximum: 499 + minimum: 400 + title: Status Code + type: integer + required: + - status_code + - content + - content_type + title: Response + type: object + categories: + $ref: '#/components/schemas/rulesetsRuleCategories' + description: + default: '' + description: An informative description of the rule. + title: Description + type: string + example: Block the request. + enabled: + $ref: '#/components/schemas/rulesetsRuleEnabled' + default: true + exposed_credential_check: + $ref: '#/components/schemas/rulesetsRuleExposedCredentialCheck' + expression: + description: The expression defining which traffic will match the rule. + example: ip.src eq 1.1.1.1 + minLength: 1 + title: Expression + type: string + id: + $ref: '#/components/schemas/rulesetsRuleId' + last_updated: + description: The timestamp of when the rule was last modified. + example: '2000-01-01T00:00:00.000000Z' + format: date-time + readOnly: true + title: Last Updated + type: string + x-stainless-skip: + - terraform + logging: + $ref: '#/components/schemas/unnamedSchemaRef70f2c6ccd8a405358ac7ef8fc3d6751c' + ratelimit: + $ref: '#/components/schemas/rulesetsRuleRatelimit' + ref: + description: The reference of the rule (the rule's ID by default). + example: my_ref + minLength: 1 + title: Ref + type: string + version: + description: The version of the rule. + example: '1' + readOnly: true + title: Version + type: string + x-stainless-skip: + - terraform + required: + - last_updated + - version + rulesetsRequestRules: + default: [] + description: The list of rules in the ruleset. + items: + $ref: '#/components/schemas/rulesetsRequestRule' + title: Rules + type: array + rulesetsResponseRule: + $ref: '#/components/schemas/rulesetsRequestRule' + rulesetsResponseRules: + description: The list of rules in the ruleset. + items: + $ref: '#/components/schemas/rulesetsResponseRule' + title: Rules + type: array + rulesetsResultInfo: + description: Information to navigate the results. + properties: + cursors: + description: The set of cursors. + properties: + after: + $ref: '#/components/schemas/rulesetsCursor' + title: After Cursor + required: + - after + title: Cursors + type: object + title: Result Info + type: object + rulesetsRuleCategories: + description: The categories of the rule. + items: + $ref: '#/components/schemas/rulesetsRuleCategory' + minItems: 1 + readOnly: true + title: Categories + type: array + uniqueItems: true + rulesetsRuleCategory: + description: The category of a rule. + example: directory-traversal + minLength: 1 + title: Category + type: string + rulesetsRuleEnabled: + description: Whether the rule should be executed. + example: true + title: Enabled + type: boolean + rulesetsRuleExposedCredentialCheck: + description: Configuration for exposed credential checking. + properties: + password_expression: + description: An expression that selects the password used in the credentials check. + example: url_decode(http.request.body.form[\"password\"][0]) + minLength: 1 + title: Password Expression + type: string + username_expression: + description: An expression that selects the user ID used in the credentials check. + example: url_decode(http.request.body.form[\"username\"][0]) + minLength: 1 + title: Username Expression + type: string + required: + - username_expression + - password_expression + title: Exposed Credential Check + type: object + rulesetsRuleId: + description: The unique ID of the rule. + example: 3a03d665bac047339bb530ecb439a90d + title: Rule ID + type: string + rulesetsRuleLogging: + description: An object configuring the rule's logging behavior. + properties: + enabled: + description: Whether to generate a log when the rule matches. + example: true + title: Enabled + type: boolean + required: + - enabled + title: Logging + type: object + rulesetsRuleRatelimit: + description: An object configuring the rule's rate limit behavior. + properties: + characteristics: + description: Characteristics of the request on which the rate limit counter will be incremented. + items: + description: The characteristic of the request. + example: cf.colo.id + minLength: 1 + title: Characteristic + type: string + minItems: 1 + title: Characteristics + type: array + uniqueItems: true + counting_expression: + description: An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. + example: http.request.body.raw eq "abcd" + minLength: 1 + title: Counting Expression + type: string + mitigation_timeout: + description: Period of time in seconds after which the action will be disabled following its first execution. + example: 600 + title: Mitigation Timeout + type: integer + period: + description: Period in seconds over which the counter is being incremented. + example: 60 + minimum: 0 + title: Period + type: integer + requests_per_period: + description: The threshold of requests per period after which the action will be executed for the first time. + example: 1000 + minimum: 1 + title: Requests per Period + type: integer + requests_to_origin: + default: false + description: Whether counting is only performed when an origin is reached. + example: true + title: Requests to Origin + type: boolean + score_per_period: + description: The score threshold per period for which the action will be executed the first time. + example: 400 + title: Score per Period + type: integer + score_response_header_name: + description: A response header name provided by the origin, which contains the score to increment rate limit counter with. + example: my-score + minLength: 1 + title: Score Response Header Name + type: string + required: + - characteristics + - period + title: Rate Limit + type: object + rulesetsRulesetId: + description: The unique ID of the ruleset. + example: 2f2feab2026849078ba485f918791bdc + title: Ruleset ID + type: string + rulesetsRulesetKind: + description: The kind of the ruleset. + enum: + - managed + - custom + - root + - zone + example: root + title: Kind + type: string + rulesetsRulesetPhase: + description: The phase of the ruleset. + enum: + - ddos_l4 + - ddos_l7 + - http_config_settings + - http_custom_errors + - http_log_custom_fields + - http_ratelimit + - http_request_cache_settings + - http_request_dynamic_redirect + - http_request_firewall_custom + - http_request_firewall_managed + - http_request_late_transform + - http_request_origin + - http_request_redirect + - http_request_sanitize + - http_request_sbfm + - http_request_transform + - http_response_cache_settings + - http_response_compression + - http_response_firewall_managed + - http_response_headers_transform + - magic_transit + - magic_transit_ids_managed + - magic_transit_managed + - magic_transit_ratelimit + example: http_request_firewall_custom + title: Phase + type: string + rulesetsRulesetVersion: + description: The version of the ruleset. + example: '1' + title: Version + type: string + unnamedSchemaRef70f2c6ccd8a405358ac7ef8fc3d6751c: + $ref: '#/components/schemas/rulesetsRuleLogging' + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + rulesets: + id: cloudflare.rulesets.rulesets + name: rulesets + title: Rulesets + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1rulesets/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create_by_account: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1rulesets/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .kind }}{{ $sep }}"kind": {{ toJson .kind }}{{- $sep = "," -}}{{ end }} + + {{- if .phase }}{{ $sep }}"phase": {{ toJson .phase }}{{- $sep = "," -}}{{ end }} + + {{- if .rules }}{{ $sep }}"rules": {{ if eq (kindOf .rules) "string" }}{{ .rules }}{{ else }}{{ toJson .rules }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + list_by_zone: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1rulesets/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create_by_zone: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1rulesets/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .kind }}{{ $sep }}"kind": {{ toJson .kind }}{{- $sep = "," -}}{{ end }} + + {{- if .phase }}{{ $sep }}"phase": {{ toJson .phase }}{{- $sep = "," -}}{{ end }} + + {{- if .rules }}{{ $sep }}"rules": {{ if eq (kindOf .rules) "string" }}{{ .rules }}{{ else }}{{ toJson .rules }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + get_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1rulesets~1{ruleset_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update_by_account: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1rulesets~1{ruleset_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .kind }}{{ $sep }}"kind": {{ toJson .kind }}{{- $sep = "," -}}{{ end }} + + {{- if .phase }}{{ $sep }}"phase": {{ toJson .phase }}{{- $sep = "," -}}{{ end }} + + {{- if .rules }}{{ $sep }}"rules": {{ if eq (kindOf .rules) "string" }}{{ .rules }}{{ else }}{{ toJson .rules }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1rulesets~1{ruleset_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '204' + get_by_zone: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1rulesets~1{ruleset_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update_by_zone: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1rulesets~1{ruleset_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .kind }}{{ $sep }}"kind": {{ toJson .kind }}{{- $sep = "," -}}{{ end }} + + {{- if .phase }}{{ $sep }}"phase": {{ toJson .phase }}{{- $sep = "," -}}{{ end }} + + {{- if .rules }}{{ $sep }}"rules": {{ if eq (kindOf .rules) "string" }}{{ .rules }}{{ else }}{{ toJson .rules }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete_by_zone: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1rulesets~1{ruleset_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '204' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/rulesets/methods/get_by_account' + - $ref: '#/components/x-stackQL-resources/rulesets/methods/get_by_zone' + - $ref: '#/components/x-stackQL-resources/rulesets/methods/list_by_account' + - $ref: '#/components/x-stackQL-resources/rulesets/methods/list_by_zone' + insert: + - $ref: '#/components/x-stackQL-resources/rulesets/methods/create_by_account' + - $ref: '#/components/x-stackQL-resources/rulesets/methods/create_by_zone' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/rulesets/methods/delete_by_account' + - $ref: '#/components/x-stackQL-resources/rulesets/methods/delete_by_zone' + replace: + - $ref: '#/components/x-stackQL-resources/rulesets/methods/update_by_account' + - $ref: '#/components/x-stackQL-resources/rulesets/methods/update_by_zone' + phases: + id: cloudflare.rulesets.phases + name: phases + title: Phases + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1rulesets~1phases~1{ruleset_phase}~1entrypoint/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update_by_account: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1rulesets~1phases~1{ruleset_phase}~1entrypoint/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .rules }}{{ $sep }}"rules": {{ if eq (kindOf .rules) "string" }}{{ .rules }}{{ else }}{{ toJson .rules }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + list_by_zone: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1rulesets~1phases~1{ruleset_phase}~1entrypoint/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update_by_zone: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1rulesets~1phases~1{ruleset_phase}~1entrypoint/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .rules }}{{ $sep }}"rules": {{ if eq (kindOf .rules) "string" }}{{ .rules }}{{ else }}{{ toJson .rules }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/phases/methods/list_by_account' + - $ref: '#/components/x-stackQL-resources/phases/methods/list_by_zone' + insert: [] + update: [] + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/phases/methods/update_by_account' + - $ref: '#/components/x-stackQL-resources/phases/methods/update_by_zone' + entrypoint_versions: + id: cloudflare.rulesets.entrypoint_versions + name: entrypoint_versions + title: Entrypoint Versions + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1rulesets~1phases~1{ruleset_phase}~1entrypoint~1versions/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + list_by_zone: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1rulesets~1phases~1{ruleset_phase}~1entrypoint~1versions/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + get_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1rulesets~1phases~1{ruleset_phase}~1entrypoint~1versions~1{ruleset_version}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + get_by_zone: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1rulesets~1phases~1{ruleset_phase}~1entrypoint~1versions~1{ruleset_version}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/entrypoint_versions/methods/get_by_account' + - $ref: '#/components/x-stackQL-resources/entrypoint_versions/methods/get_by_zone' + - $ref: '#/components/x-stackQL-resources/entrypoint_versions/methods/list_by_account' + - $ref: '#/components/x-stackQL-resources/entrypoint_versions/methods/list_by_zone' + insert: [] + update: [] + delete: [] + replace: [] + rules: + id: cloudflare.rulesets.rules + name: rules + title: Rules + methods: + create_by_account: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1rulesets~1{ruleset_id}~1rules/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .position }}{{ $sep }}"position": {{ if eq (kindOf .position) "string" }}{{ .position }}{{ else }}{{ toJson .position }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .action }}{{ $sep }}"action": {{ toJson .action }}{{- $sep = "," -}}{{ end }} + + {{- if .action_parameters }}{{ $sep }}"action_parameters": {{ if eq (kindOf .action_parameters) "string" }}{{ .action_parameters }}{{ else }}{{ toJson .action_parameters }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .exposed_credential_check }}{{ $sep }}"exposed_credential_check": {{ if eq (kindOf .exposed_credential_check) "string" }}{{ .exposed_credential_check }}{{ else }}{{ toJson .exposed_credential_check }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .expression }}{{ $sep }}"expression": {{ toJson .expression }}{{- $sep = "," -}}{{ end }} + + {{- if .id }}{{ $sep }}"id": {{ toJson .id }}{{- $sep = "," -}}{{ end }} + + {{- if .logging }}{{ $sep }}"logging": {{ if eq (kindOf .logging) "string" }}{{ .logging }}{{ else }}{{ toJson .logging }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ratelimit }}{{ $sep }}"ratelimit": {{ if eq (kindOf .ratelimit) "string" }}{{ .ratelimit }}{{ else }}{{ toJson .ratelimit }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ref }}{{ $sep }}"ref": {{ toJson .ref }}{{- $sep = "," -}}{{ end }} + + } + + ' + create_by_zone: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1rulesets~1{ruleset_id}~1rules/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .position }}{{ $sep }}"position": {{ if eq (kindOf .position) "string" }}{{ .position }}{{ else }}{{ toJson .position }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .action }}{{ $sep }}"action": {{ toJson .action }}{{- $sep = "," -}}{{ end }} + + {{- if .action_parameters }}{{ $sep }}"action_parameters": {{ if eq (kindOf .action_parameters) "string" }}{{ .action_parameters }}{{ else }}{{ toJson .action_parameters }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .exposed_credential_check }}{{ $sep }}"exposed_credential_check": {{ if eq (kindOf .exposed_credential_check) "string" }}{{ .exposed_credential_check }}{{ else }}{{ toJson .exposed_credential_check }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .expression }}{{ $sep }}"expression": {{ toJson .expression }}{{- $sep = "," -}}{{ end }} + + {{- if .id }}{{ $sep }}"id": {{ toJson .id }}{{- $sep = "," -}}{{ end }} + + {{- if .logging }}{{ $sep }}"logging": {{ if eq (kindOf .logging) "string" }}{{ .logging }}{{ else }}{{ toJson .logging }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ratelimit }}{{ $sep }}"ratelimit": {{ if eq (kindOf .ratelimit) "string" }}{{ .ratelimit }}{{ else }}{{ toJson .ratelimit }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ref }}{{ $sep }}"ref": {{ toJson .ref }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1rulesets~1{ruleset_id}~1rules~1{rule_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + edit_by_account: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1rulesets~1{ruleset_id}~1rules~1{rule_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .position }}{{ $sep }}"position": {{ if eq (kindOf .position) "string" }}{{ .position }}{{ else }}{{ toJson .position }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .action }}{{ $sep }}"action": {{ toJson .action }}{{- $sep = "," -}}{{ end }} + + {{- if .action_parameters }}{{ $sep }}"action_parameters": {{ if eq (kindOf .action_parameters) "string" }}{{ .action_parameters }}{{ else }}{{ toJson .action_parameters }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .exposed_credential_check }}{{ $sep }}"exposed_credential_check": {{ if eq (kindOf .exposed_credential_check) "string" }}{{ .exposed_credential_check }}{{ else }}{{ toJson .exposed_credential_check }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .expression }}{{ $sep }}"expression": {{ toJson .expression }}{{- $sep = "," -}}{{ end }} + + {{- if .id }}{{ $sep }}"id": {{ toJson .id }}{{- $sep = "," -}}{{ end }} + + {{- if .logging }}{{ $sep }}"logging": {{ if eq (kindOf .logging) "string" }}{{ .logging }}{{ else }}{{ toJson .logging }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ratelimit }}{{ $sep }}"ratelimit": {{ if eq (kindOf .ratelimit) "string" }}{{ .ratelimit }}{{ else }}{{ toJson .ratelimit }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ref }}{{ $sep }}"ref": {{ toJson .ref }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete_by_zone: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1rulesets~1{ruleset_id}~1rules~1{rule_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + edit_by_zone: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1rulesets~1{ruleset_id}~1rules~1{rule_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .position }}{{ $sep }}"position": {{ if eq (kindOf .position) "string" }}{{ .position }}{{ else }}{{ toJson .position }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .action }}{{ $sep }}"action": {{ toJson .action }}{{- $sep = "," -}}{{ end }} + + {{- if .action_parameters }}{{ $sep }}"action_parameters": {{ if eq (kindOf .action_parameters) "string" }}{{ .action_parameters }}{{ else }}{{ toJson .action_parameters }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .exposed_credential_check }}{{ $sep }}"exposed_credential_check": {{ if eq (kindOf .exposed_credential_check) "string" }}{{ .exposed_credential_check }}{{ else }}{{ toJson .exposed_credential_check }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .expression }}{{ $sep }}"expression": {{ toJson .expression }}{{- $sep = "," -}}{{ end }} + + {{- if .id }}{{ $sep }}"id": {{ toJson .id }}{{- $sep = "," -}}{{ end }} + + {{- if .logging }}{{ $sep }}"logging": {{ if eq (kindOf .logging) "string" }}{{ .logging }}{{ else }}{{ toJson .logging }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ratelimit }}{{ $sep }}"ratelimit": {{ if eq (kindOf .ratelimit) "string" }}{{ .ratelimit }}{{ else }}{{ toJson .ratelimit }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ref }}{{ $sep }}"ref": {{ toJson .ref }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/rules/methods/create_by_account' + - $ref: '#/components/x-stackQL-resources/rules/methods/create_by_zone' + update: + - $ref: '#/components/x-stackQL-resources/rules/methods/edit_by_account' + - $ref: '#/components/x-stackQL-resources/rules/methods/edit_by_zone' + delete: + - $ref: '#/components/x-stackQL-resources/rules/methods/delete_by_account' + - $ref: '#/components/x-stackQL-resources/rules/methods/delete_by_zone' + replace: [] + rulesets_versions: + id: cloudflare.rulesets.rulesets_versions + name: rulesets_versions + title: Rulesets Versions + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1rulesets~1{ruleset_id}~1versions/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + list_by_zone: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1rulesets~1{ruleset_id}~1versions/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + get_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1rulesets~1{ruleset_id}~1versions~1{ruleset_version}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + get_by_zone: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1rulesets~1{ruleset_id}~1versions~1{ruleset_version}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/rulesets_versions/methods/get_by_account' + - $ref: '#/components/x-stackQL-resources/rulesets_versions/methods/get_by_zone' + - $ref: '#/components/x-stackQL-resources/rulesets_versions/methods/list_by_account' + - $ref: '#/components/x-stackQL-resources/rulesets_versions/methods/list_by_zone' + insert: [] + update: [] + delete: [] + replace: [] + versions: + id: cloudflare.rulesets.versions + name: versions + title: Versions + methods: + delete_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1rulesets~1{ruleset_id}~1versions~1{ruleset_version}/delete' + response: + mediaType: application/json + openAPIDocKey: '204' + delete_by_zone: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1rulesets~1{ruleset_id}~1versions~1{ruleset_version}/delete' + response: + mediaType: application/json + openAPIDocKey: '204' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/versions/methods/delete_by_account' + - $ref: '#/components/x-stackQL-resources/versions/methods/delete_by_zone' + replace: [] + by_tag: + id: cloudflare.rulesets.by_tag + name: by_tag + title: By Tag + methods: + get_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1rulesets~1{ruleset_id}~1versions~1{ruleset_version}~1by_tag~1{rule_tag}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + get_by_zone: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1rulesets~1{ruleset_id}~1versions~1{ruleset_version}~1by_tag~1{rule_tag}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/by_tag/methods/get_by_account' + - $ref: '#/components/x-stackQL-resources/by_tag/methods/get_by_zone' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/rum.yaml b/providers/src/cloudflare/v00.00.00000/services/rum.yaml index 927d4dc8..c678f2b5 100644 --- a/providers/src/cloudflare/v00.00.00000/services/rum.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/rum.yaml @@ -1,1150 +1,1152 @@ -openapi: 3.0.3 -info: - title: rum API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/rum/site_info: - post: - description: Creates a new Web Analytics site. - operationId: web-analytics-create-site - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/rumCreateSiteRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/rumSiteResponseSingle' - description: Created Web Analytics site. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/rumApiResponseCommonFailure' - description: Failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a Web Analytics site - tags: - - Web Analytics - x-api-token-group: - - Account Settings Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rum - resource_chain: - - site_info - method: create - /accounts/{account_id}/rum/site_info/list: - get: - description: Lists all Web Analytics sites of an account. - operationId: web-analytics-list-sites - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: per_page - schema: - $ref: '#/components/schemas/rumPerPage' - - in: query - name: page - schema: - $ref: '#/components/schemas/rumPage' - - in: query - name: order_by - schema: - $ref: '#/components/schemas/rumOrderBy' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/rumSitesResponseCollection' - description: List of Web Analytics sites. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/rumApiResponseCommonFailure' - description: Failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Web Analytics sites - tags: - - Web Analytics - x-api-token-group: - - Account Settings Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rum - resource_chain: - - site_info - method: list - /accounts/{account_id}/rum/site_info/{site_id}: - delete: - description: Deletes an existing Web Analytics site. - operationId: web-analytics-delete-site - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: site_id - in: path - required: true - description: The site ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/rumSiteTagResponseSingle' - description: Deleted Web Analytics site identifier. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/rumApiResponseCommonFailure' - description: Failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete a Web Analytics site - tags: - - Web Analytics - x-api-token-group: - - Account Settings Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rum - resource_chain: - - site_info - method: delete - get: - description: Retrieves a Web Analytics site. - operationId: web-analytics-get-site - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: site_id - in: path - required: true - description: The site ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/rumSiteResponseSingle' - description: Web Analytics site. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/rumApiResponseCommonFailure' - description: Failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get a Web Analytics site - tags: - - Web Analytics - x-api-token-group: - - Account Settings Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rum - resource_chain: - - site_info - method: get - put: - description: Updates an existing Web Analytics site. - operationId: web-analytics-update-site - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: site_id - in: path - required: true - description: The site ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/rumUpdateSiteRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/rumSiteResponseSingle' - description: Updated Web Analytics site. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/rumApiResponseCommonFailure' - description: Failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update a Web Analytics site - tags: - - Web Analytics - x-api-token-group: - - Account Settings Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rum - resource_chain: - - site_info - method: update - /accounts/{account_id}/rum/v2/{ruleset_id}/rule: - post: - description: Creates a new rule in a Web Analytics ruleset. - operationId: web-analytics-create-rule - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: ruleset_id - in: path - required: true - description: The ruleset ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/rumCreateRuleRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/rumRuleResponseSingle' - description: Created Web Analytics rule. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/rumApiResponseCommonFailure' - description: Failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a Web Analytics rule - tags: - - Web Analytics - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: rum - resource_chain: - - rules - method: create - /accounts/{account_id}/rum/v2/{ruleset_id}/rule/{rule_id}: - delete: - description: Deletes an existing rule from a Web Analytics ruleset. - operationId: web-analytics-delete-rule - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: ruleset_id - in: path - required: true - description: The ruleset ID. - schema: - type: string - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/rumRuleIdResponseSingle' - description: Deleted Web Analytics rule identifier. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/rumApiResponseCommonFailure' - description: Failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete a Web Analytics rule - tags: - - Web Analytics - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: rum - resource_chain: - - rules - method: delete - put: - description: Updates a rule in a Web Analytics ruleset. - operationId: web-analytics-update-rule - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: ruleset_id - in: path - required: true - description: The ruleset ID. - schema: - type: string - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/rumCreateRuleRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/rumRuleResponseSingle' - description: Updated Web Analytics rule. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/rumApiResponseCommonFailure' - description: Failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update a Web Analytics rule - tags: - - Web Analytics - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: rum - resource_chain: - - rules - method: update - /accounts/{account_id}/rum/v2/{ruleset_id}/rules: - get: - description: Lists all the rules in a Web Analytics ruleset. - operationId: web-analytics-list-rules - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: ruleset_id - in: path - required: true - description: The ruleset ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/rumRulesResponseCollection' - description: List of Web Analytics rules in the ruleset. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/rumApiResponseCommonFailure' - description: Failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List rules in Web Analytics ruleset - tags: - - Web Analytics - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: rum - resource_chain: - - rules - method: list - post: - description: >- - Modifies one or more rules in a Web Analytics ruleset with a single - request. - operationId: web-analytics-modify-rules - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: ruleset_id - in: path - required: true - description: The ruleset ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/rumModifyRulesRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/rumRulesResponseCollection' - description: List of modified Web Analytics rules. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/rumApiResponseCommonFailure' - description: Failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Web Analytics rules - tags: - - Web Analytics - x-api-token-group: - - Account Settings Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: rum - resource_chain: - - rules - method: bulk_create -components: - schemas: - responseInfo: - properties: - code: - minimum: 1000 - type: integer - message: - type: string - documentation_url: - type: string - source: - type: object - properties: - pointer: - type: string - required: - - code - - message - type: object - uniqueItems: true - rumApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/rumSchemasMessages' - messages: - example: [] - $ref: '#/components/schemas/rumSchemasMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - rumAutoInstall: - description: >- - If enabled, the JavaScript snippet is automatically injected for - orange-clouded sites. - example: true - type: boolean - x-auditable: true - rumCreateRuleRequest: - properties: - host: - example: example.com - type: string - inclusive: - description: Whether the rule includes or excludes traffic from being measured. - example: true - type: boolean - is_paused: - description: Whether the rule is paused or not. - example: false - type: boolean - paths: - example: - - '*' - items: - type: string - type: array - type: object - rumCreateSiteRequest: - properties: - auto_install: - $ref: '#/components/schemas/rumAutoInstall' - host: - $ref: '#/components/schemas/rumHost' - zone_tag: - $ref: '#/components/schemas/rumZoneTag' - type: object - rumEnabled: - description: >- - Enables or disables RUM. This option can be used only when auto_install - is set to true. - example: true - type: boolean - x-auditable: true - rumHost: - description: The hostname to use for gray-clouded sites. - example: example.com - type: string - x-auditable: true - rumLite: - description: >- - If enabled, the JavaScript snippet will not be injected for visitors - from the EU. - type: boolean - x-auditable: true - rumMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - rumModifyRulesRequest: - properties: - delete_rules: - description: A list of rule identifiers to delete. - items: - $ref: '#/components/schemas/rumRuleIdentifier' - type: array - rules: - description: A list of rules to create or update. - items: - properties: - host: - example: example.com - type: string - id: - $ref: '#/components/schemas/rumRuleIdentifier' - inclusive: - example: true - type: boolean - is_paused: - example: false - type: boolean - paths: - example: - - '*' - items: - type: string - type: array - type: object - type: array - type: object - rumOrderBy: - description: The property used to sort the list of results. - enum: - - host - - created - example: host - type: string - rumPage: - description: Current page within the paginated list of results. - example: 1 - type: number - rumPerPage: - description: Number of items to return per page of results. - example: 10 - type: number - rumResultInfo: - properties: - count: - description: The total number of items on the current page. - example: 10 - type: integer - page: - description: Current page within the paginated list of results. - example: 1 - type: integer - per_page: - description: The maximum number of items to return per page of results. - example: 10 - type: integer - total_count: - description: The total number of items. - example: 25 - type: integer - total_pages: - description: The total number of pages. - example: 3 - nullable: true - type: integer - type: object - rumRule: - properties: - created: - $ref: '#/components/schemas/rumTimestamp' - host: - description: The hostname the rule will be applied to. - example: example.com - type: string - x-auditable: true - id: - $ref: '#/components/schemas/rumRuleIdentifier' - inclusive: - description: Whether the rule includes or excludes traffic from being measured. - example: true - type: boolean - x-auditable: true - is_paused: - description: Whether the rule is paused or not. - example: false - type: boolean - x-auditable: true - paths: - description: The paths the rule will be applied to. - example: - - '*' - items: - type: string - x-auditable: true - type: array - priority: - example: 1000 - type: number - x-auditable: true - type: object - rumRuleIdResponseSingle: - properties: - errors: - $ref: '#/components/schemas/rumMessages' - messages: - $ref: '#/components/schemas/rumMessages' - success: - description: Whether the API call was successful. - example: true - type: boolean - result: - properties: - id: - $ref: '#/components/schemas/rumRuleIdentifier' - type: object - required: - - success - - errors - - messages - type: object - rumRuleIdentifier: - description: The Web Analytics rule identifier. - example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 - type: string - x-auditable: true - rumRuleResponseSingle: - properties: - errors: - $ref: '#/components/schemas/rumMessages' - messages: - $ref: '#/components/schemas/rumMessages' - success: - description: Whether the API call was successful. - example: true - type: boolean - result: - $ref: '#/components/schemas/rumRule' - required: - - success - - errors - - messages - type: object - rumRules: - description: A list of rules. - items: - $ref: '#/components/schemas/rumRule' - type: array - rumRulesResponseCollection: - properties: - errors: - $ref: '#/components/schemas/rumMessages' - messages: - $ref: '#/components/schemas/rumMessages' - success: - description: Whether the API call was successful. - example: true - type: boolean - result: - properties: - rules: - $ref: '#/components/schemas/rumRules' - ruleset: - $ref: '#/components/schemas/rumRuleset' - type: object - required: - - success - - errors - - messages - type: object - rumRuleset: - properties: - enabled: - description: Whether the ruleset is enabled. - example: true - type: boolean - id: - $ref: '#/components/schemas/rumRulesetIdentifier' - zone_name: - example: example.com - type: string - zone_tag: - $ref: '#/components/schemas/rumZoneTag' - type: object - rumRulesetIdentifier: - description: The Web Analytics ruleset identifier. - example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 - type: string - x-auditable: true - rumSchemasMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - rumSite: - properties: - auto_install: - $ref: '#/components/schemas/rumAutoInstall' - created: - $ref: '#/components/schemas/rumTimestamp' - rules: - $ref: '#/components/schemas/rumRules' - ruleset: - $ref: '#/components/schemas/rumRuleset' - site_tag: - $ref: '#/components/schemas/rumSiteTag' - site_token: - $ref: '#/components/schemas/rumSiteToken' - snippet: - $ref: '#/components/schemas/rumSnippet' - type: object - rumSiteResponseSingle: - properties: - errors: - $ref: '#/components/schemas/rumMessages' - messages: - $ref: '#/components/schemas/rumMessages' - success: - description: Whether the API call was successful. - example: true - type: boolean - result: - $ref: '#/components/schemas/rumSite' - required: - - success - - errors - - messages - type: object - rumSiteTag: - description: The Web Analytics site identifier. - example: 023e105f4ecef8ad9ca31a8372d0c353 - type: string - x-auditable: true - rumSiteTagResponseSingle: - properties: - errors: - $ref: '#/components/schemas/rumMessages' - messages: - $ref: '#/components/schemas/rumMessages' - success: - description: Whether the API call was successful. - example: true - type: boolean - result: - properties: - site_tag: - $ref: '#/components/schemas/rumSiteTag' - type: object - required: - - success - - errors - - messages - type: object - rumSiteToken: - description: The Web Analytics site token. - example: 023e105f4ecef8ad9ca31a8372d0c353 - type: string - x-auditable: true - rumSitesResponseCollection: - properties: - errors: - $ref: '#/components/schemas/rumMessages' - messages: - $ref: '#/components/schemas/rumMessages' - success: - description: Whether the API call was successful. - example: true - type: boolean - result: - items: - $ref: '#/components/schemas/rumSite' - type: array - result_info: - $ref: '#/components/schemas/rumResultInfo' - required: - - success - - errors - - messages - type: object - rumSnippet: - description: Encoded JavaScript snippet. - example: >- - - type: string - x-auditable: true - rumTimestamp: - example: '2014-01-01T05:20:00.12345Z' - format: date-time - readOnly: true - type: string - x-auditable: true - rumUpdateSiteRequest: - properties: - auto_install: - $ref: '#/components/schemas/rumAutoInstall' - enabled: - $ref: '#/components/schemas/rumEnabled' - host: - $ref: '#/components/schemas/rumHost' - lite: - $ref: '#/components/schemas/rumLite' - zone_tag: - $ref: '#/components/schemas/rumZoneTag' - type: object - rumZoneTag: - description: The zone identifier. - example: 023e105f4ecef8ad9ca31a8372d0c353 - type: string - x-auditable: true - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - site_info: - id: cloudflare.rum.site_info - name: site_info - title: Site Info - methods: - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1rum~1site_info/post' - response: - mediaType: application/json - openAPIDocKey: '200' - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1rum~1site_info~1list/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - delete: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1rum~1site_info~1{site_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1rum~1site_info~1{site_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1rum~1site_info~1{site_id}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/site_info/methods/get' - - $ref: '#/components/x-stackQL-resources/site_info/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/site_info/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/site_info/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/site_info/methods/update' - rum: - id: cloudflare.rum.rum - name: rum - title: Rum - methods: - create_rule_v2: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1rum~1v2~1{ruleset_id}~1rule/post' - response: - mediaType: application/json - openAPIDocKey: '200' - create_rules_v2: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1rum~1v2~1{ruleset_id}~1rules/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] - rules: - id: cloudflare.rum.rules - name: rules - title: Rules - methods: - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1rum~1v2~1{ruleset_id}~1rule~1{rule_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1rum~1v2~1{ruleset_id}~1rule~1{rule_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1rum~1v2~1{ruleset_id}~1rules/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/rules/methods/list' - insert: [] - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/rules/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/rules/methods/update' +openapi: 3.0.3 +info: + title: rum API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/rum/site_info: + post: + description: Creates a new Web Analytics site. + operationId: web-analytics-create-site + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/rumCreateSiteRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/rumSiteResponseSingle' + description: Created Web Analytics site. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/rumApiResponseCommonFailure' + description: Failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a Web Analytics site + tags: + - Web Analytics + x-api-token-group: + - Account Settings Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rum + resource_chain: + - site_info + method: create + /accounts/{account_id}/rum/site_info/list: + get: + description: Lists all Web Analytics sites of an account. + operationId: web-analytics-list-sites + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: per_page + schema: + $ref: '#/components/schemas/rumPerPage' + - in: query + name: page + schema: + $ref: '#/components/schemas/rumPage' + - in: query + name: order_by + schema: + $ref: '#/components/schemas/rumOrderBy' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/rumSitesResponseCollection' + description: List of Web Analytics sites. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/rumApiResponseCommonFailure' + description: Failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Web Analytics sites + tags: + - Web Analytics + x-api-token-group: + - Account Settings Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rum + resource_chain: + - site_info + method: list + /accounts/{account_id}/rum/site_info/{site_id}: + delete: + description: Deletes an existing Web Analytics site. + operationId: web-analytics-delete-site + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: site_id + in: path + required: true + description: The site ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/rumSiteTagResponseSingle' + description: Deleted Web Analytics site identifier. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/rumApiResponseCommonFailure' + description: Failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete a Web Analytics site + tags: + - Web Analytics + x-api-token-group: + - Account Settings Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rum + resource_chain: + - site_info + method: delete + get: + description: Retrieves a Web Analytics site. + operationId: web-analytics-get-site + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: site_id + in: path + required: true + description: The site ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/rumSiteResponseSingle' + description: Web Analytics site. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/rumApiResponseCommonFailure' + description: Failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get a Web Analytics site + tags: + - Web Analytics + x-api-token-group: + - Account Settings Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rum + resource_chain: + - site_info + method: get + put: + description: Updates an existing Web Analytics site. + operationId: web-analytics-update-site + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: site_id + in: path + required: true + description: The site ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/rumUpdateSiteRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/rumSiteResponseSingle' + description: Updated Web Analytics site. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/rumApiResponseCommonFailure' + description: Failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update a Web Analytics site + tags: + - Web Analytics + x-api-token-group: + - Account Settings Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rum + resource_chain: + - site_info + method: update + /accounts/{account_id}/rum/v2/{ruleset_id}/rule: + post: + description: Creates a new rule in a Web Analytics ruleset. + operationId: web-analytics-create-rule + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: ruleset_id + in: path + required: true + description: The ruleset ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/rumCreateRuleRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/rumRuleResponseSingle' + description: Created Web Analytics rule. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/rumApiResponseCommonFailure' + description: Failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a Web Analytics rule + tags: + - Web Analytics + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: rum + resource_chain: + - rules + method: create + /accounts/{account_id}/rum/v2/{ruleset_id}/rule/{rule_id}: + delete: + description: Deletes an existing rule from a Web Analytics ruleset. + operationId: web-analytics-delete-rule + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: ruleset_id + in: path + required: true + description: The ruleset ID. + schema: + type: string + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/rumRuleIdResponseSingle' + description: Deleted Web Analytics rule identifier. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/rumApiResponseCommonFailure' + description: Failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete a Web Analytics rule + tags: + - Web Analytics + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: rum + resource_chain: + - rules + method: delete + put: + description: Updates a rule in a Web Analytics ruleset. + operationId: web-analytics-update-rule + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: ruleset_id + in: path + required: true + description: The ruleset ID. + schema: + type: string + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/rumCreateRuleRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/rumRuleResponseSingle' + description: Updated Web Analytics rule. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/rumApiResponseCommonFailure' + description: Failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update a Web Analytics rule + tags: + - Web Analytics + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: rum + resource_chain: + - rules + method: update + /accounts/{account_id}/rum/v2/{ruleset_id}/rules: + get: + description: Lists all the rules in a Web Analytics ruleset. + operationId: web-analytics-list-rules + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: ruleset_id + in: path + required: true + description: The ruleset ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/rumRulesResponseCollection' + description: List of Web Analytics rules in the ruleset. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/rumApiResponseCommonFailure' + description: Failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List rules in Web Analytics ruleset + tags: + - Web Analytics + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: rum + resource_chain: + - rules + method: list + post: + description: Modifies one or more rules in a Web Analytics ruleset with a single request. + operationId: web-analytics-modify-rules + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: ruleset_id + in: path + required: true + description: The ruleset ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/rumModifyRulesRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/rumRulesResponseCollection' + description: List of modified Web Analytics rules. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/rumApiResponseCommonFailure' + description: Failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Web Analytics rules + tags: + - Web Analytics + x-api-token-group: + - Account Settings Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: rum + resource_chain: + - rules + method: bulk_create +components: + schemas: + responseInfo: + properties: + code: + minimum: 1000 + type: integer + message: + type: string + documentation_url: + type: string + source: + type: object + properties: + pointer: + type: string + required: + - code + - message + type: object + uniqueItems: true + rumApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/rumSchemasMessages' + messages: + example: [] + $ref: '#/components/schemas/rumSchemasMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + rumAutoInstall: + description: If enabled, the JavaScript snippet is automatically injected for orange-clouded sites. + example: true + type: boolean + x-auditable: true + rumCreateRuleRequest: + properties: + host: + example: example.com + type: string + inclusive: + description: Whether the rule includes or excludes traffic from being measured. + example: true + type: boolean + is_paused: + description: Whether the rule is paused or not. + example: false + type: boolean + paths: + example: + - '*' + items: + type: string + type: array + type: object + rumCreateSiteRequest: + properties: + auto_install: + $ref: '#/components/schemas/rumAutoInstall' + host: + $ref: '#/components/schemas/rumHost' + zone_tag: + $ref: '#/components/schemas/rumZoneTag' + type: object + rumEnabled: + description: Enables or disables RUM. This option can be used only when auto_install is set to true. + example: true + type: boolean + x-auditable: true + rumHost: + description: The hostname to use for gray-clouded sites. + example: example.com + type: string + x-auditable: true + rumLite: + description: If enabled, the JavaScript snippet will not be injected for visitors from the EU. + type: boolean + x-auditable: true + rumMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + rumModifyRulesRequest: + properties: + delete_rules: + description: A list of rule identifiers to delete. + items: + $ref: '#/components/schemas/rumRuleIdentifier' + type: array + rules: + description: A list of rules to create or update. + items: + properties: + host: + example: example.com + type: string + id: + $ref: '#/components/schemas/rumRuleIdentifier' + inclusive: + example: true + type: boolean + is_paused: + example: false + type: boolean + paths: + example: + - '*' + items: + type: string + type: array + type: object + type: array + type: object + rumOrderBy: + description: The property used to sort the list of results. + enum: + - host + - created + example: host + type: string + rumPage: + description: Current page within the paginated list of results. + example: 1 + type: number + rumPerPage: + description: Number of items to return per page of results. + example: 10 + type: number + rumResultInfo: + properties: + count: + description: The total number of items on the current page. + example: 10 + type: integer + page: + description: Current page within the paginated list of results. + example: 1 + type: integer + per_page: + description: The maximum number of items to return per page of results. + example: 10 + type: integer + total_count: + description: The total number of items. + example: 25 + type: integer + total_pages: + description: The total number of pages. + example: 3 + nullable: true + type: integer + type: object + rumRule: + properties: + created: + $ref: '#/components/schemas/rumTimestamp' + host: + description: The hostname the rule will be applied to. + example: example.com + type: string + x-auditable: true + id: + $ref: '#/components/schemas/rumRuleIdentifier' + inclusive: + description: Whether the rule includes or excludes traffic from being measured. + example: true + type: boolean + x-auditable: true + is_paused: + description: Whether the rule is paused or not. + example: false + type: boolean + x-auditable: true + paths: + description: The paths the rule will be applied to. + example: + - '*' + items: + type: string + x-auditable: true + type: array + priority: + example: 1000 + type: number + x-auditable: true + type: object + rumRuleIdResponseSingle: + properties: + errors: + $ref: '#/components/schemas/rumMessages' + messages: + $ref: '#/components/schemas/rumMessages' + success: + description: Whether the API call was successful. + example: true + type: boolean + result: + properties: + id: + $ref: '#/components/schemas/rumRuleIdentifier' + type: object + required: + - success + - errors + - messages + type: object + rumRuleIdentifier: + description: The Web Analytics rule identifier. + example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 + type: string + x-auditable: true + rumRuleResponseSingle: + properties: + errors: + $ref: '#/components/schemas/rumMessages' + messages: + $ref: '#/components/schemas/rumMessages' + success: + description: Whether the API call was successful. + example: true + type: boolean + result: + $ref: '#/components/schemas/rumRule' + required: + - success + - errors + - messages + type: object + rumRules: + description: A list of rules. + items: + $ref: '#/components/schemas/rumRule' + type: array + rumRulesResponseCollection: + properties: + errors: + $ref: '#/components/schemas/rumMessages' + messages: + $ref: '#/components/schemas/rumMessages' + success: + description: Whether the API call was successful. + example: true + type: boolean + result: + properties: + rules: + $ref: '#/components/schemas/rumRules' + ruleset: + $ref: '#/components/schemas/rumRuleset' + type: object + required: + - success + - errors + - messages + type: object + rumRuleset: + properties: + enabled: + description: Whether the ruleset is enabled. + example: true + type: boolean + id: + $ref: '#/components/schemas/rumRulesetIdentifier' + zone_name: + example: example.com + type: string + zone_tag: + $ref: '#/components/schemas/rumZoneTag' + type: object + rumRulesetIdentifier: + description: The Web Analytics ruleset identifier. + example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 + type: string + x-auditable: true + rumSchemasMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + rumSite: + properties: + auto_install: + $ref: '#/components/schemas/rumAutoInstall' + created: + $ref: '#/components/schemas/rumTimestamp' + rules: + $ref: '#/components/schemas/rumRules' + ruleset: + $ref: '#/components/schemas/rumRuleset' + site_tag: + $ref: '#/components/schemas/rumSiteTag' + site_token: + $ref: '#/components/schemas/rumSiteToken' + snippet: + $ref: '#/components/schemas/rumSnippet' + type: object + rumSiteResponseSingle: + properties: + errors: + $ref: '#/components/schemas/rumMessages' + messages: + $ref: '#/components/schemas/rumMessages' + success: + description: Whether the API call was successful. + example: true + type: boolean + result: + $ref: '#/components/schemas/rumSite' + required: + - success + - errors + - messages + type: object + rumSiteTag: + description: The Web Analytics site identifier. + example: 023e105f4ecef8ad9ca31a8372d0c353 + type: string + x-auditable: true + rumSiteTagResponseSingle: + properties: + errors: + $ref: '#/components/schemas/rumMessages' + messages: + $ref: '#/components/schemas/rumMessages' + success: + description: Whether the API call was successful. + example: true + type: boolean + result: + properties: + site_tag: + $ref: '#/components/schemas/rumSiteTag' + type: object + required: + - success + - errors + - messages + type: object + rumSiteToken: + description: The Web Analytics site token. + example: 023e105f4ecef8ad9ca31a8372d0c353 + type: string + x-auditable: true + rumSitesResponseCollection: + properties: + errors: + $ref: '#/components/schemas/rumMessages' + messages: + $ref: '#/components/schemas/rumMessages' + success: + description: Whether the API call was successful. + example: true + type: boolean + result: + items: + $ref: '#/components/schemas/rumSite' + type: array + result_info: + $ref: '#/components/schemas/rumResultInfo' + required: + - success + - errors + - messages + type: object + rumSnippet: + description: Encoded JavaScript snippet. + example: '' + type: string + x-auditable: true + rumTimestamp: + example: '2014-01-01T05:20:00.12345Z' + format: date-time + readOnly: true + type: string + x-auditable: true + rumUpdateSiteRequest: + properties: + auto_install: + $ref: '#/components/schemas/rumAutoInstall' + enabled: + $ref: '#/components/schemas/rumEnabled' + host: + $ref: '#/components/schemas/rumHost' + lite: + $ref: '#/components/schemas/rumLite' + zone_tag: + $ref: '#/components/schemas/rumZoneTag' + type: object + rumZoneTag: + description: The zone identifier. + example: 023e105f4ecef8ad9ca31a8372d0c353 + type: string + x-auditable: true + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + site_info: + id: cloudflare.rum.site_info + name: site_info + title: Site Info + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1rum~1site_info/post' + response: + mediaType: application/json + openAPIDocKey: '200' + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1rum~1site_info~1list/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1rum~1site_info~1{site_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1rum~1site_info~1{site_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1rum~1site_info~1{site_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/site_info/methods/get' + - $ref: '#/components/x-stackQL-resources/site_info/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/site_info/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/site_info/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/site_info/methods/update' + rum: + id: cloudflare.rum.rum + name: rum + title: Rum + methods: + create_rule_v2: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1rum~1v2~1{ruleset_id}~1rule/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .host }}{{ $sep }}"host": {{ toJson .host }}{{- $sep = "," -}}{{ end }} + + {{- if .inclusive }}{{ $sep }}"inclusive": {{ toJson .inclusive }}{{- $sep = "," -}}{{ end }} + + {{- if .is_paused }}{{ $sep }}"is_paused": {{ toJson .is_paused }}{{- $sep = "," -}}{{ end }} + + {{- if .paths }}{{ $sep }}"paths": {{ if eq (kindOf .paths) "string" }}{{ .paths }}{{ else }}{{ toJson .paths }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + create_rules_v2: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1rum~1v2~1{ruleset_id}~1rules/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .delete_rules }}{{ $sep }}"delete_rules": {{ if eq (kindOf .delete_rules) "string" }}{{ .delete_rules }}{{ else }}{{ toJson .delete_rules }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .rules }}{{ $sep }}"rules": {{ if eq (kindOf .rules) "string" }}{{ .rules }}{{ else }}{{ toJson .rules }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + rules: + id: cloudflare.rum.rules + name: rules + title: Rules + methods: + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1rum~1v2~1{ruleset_id}~1rule~1{rule_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1rum~1v2~1{ruleset_id}~1rule~1{rule_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .host }}{{ $sep }}"host": {{ toJson .host }}{{- $sep = "," -}}{{ end }} + + {{- if .inclusive }}{{ $sep }}"inclusive": {{ toJson .inclusive }}{{- $sep = "," -}}{{ end }} + + {{- if .is_paused }}{{ $sep }}"is_paused": {{ toJson .is_paused }}{{- $sep = "," -}}{{ end }} + + {{- if .paths }}{{ $sep }}"paths": {{ if eq (kindOf .paths) "string" }}{{ .paths }}{{ else }}{{ toJson .paths }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1rum~1v2~1{ruleset_id}~1rules/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/rules/methods/list' + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/rules/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/rules/methods/update' diff --git a/providers/src/cloudflare/v00.00.00000/services/secrets_store.yaml b/providers/src/cloudflare/v00.00.00000/services/secrets_store.yaml index a33a0217..6eb45941 100644 --- a/providers/src/cloudflare/v00.00.00000/services/secrets_store.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/secrets_store.yaml @@ -1,2126 +1,2060 @@ -openapi: 3.0.3 -info: - title: secrets_store API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/secrets_store/quota: - get: - description: Lists the number of secrets used in the account. - operationId: secrets-store-quota - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreQuotaResponse' - description: Usage and quota - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' - description: List store secrets response failure - security: - - api_email: [] - api_key: [] - summary: View secret usage - tags: - - Secrets Store - x-api-token-group: - - Secrets Store Write - - Secrets Store Read - x-cfPermissionsRequired: - enum: - - '#com.cloudflare.api.account.secrets-store.secret.read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: secrets_store - resource_chain: - - quota - method: get - /accounts/{account_id}/secrets_store/stores: - get: - description: Lists all the stores in an account - operationId: secrets-store-list - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Direction to sort objects - in: query - name: direction - schema: - default: desc - enum: - - asc - - desc - type: string - - description: Page number - in: query - name: page - schema: - minimum: 0 - multipleOf: 1 - type: integer - - description: Number of objects to return per page - in: query - name: per_page - schema: - maximum: 100 - minimum: 0 - multipleOf: 1 - type: integer - - description: Order secrets by values in the given field - in: query - name: order - schema: - default: created - enum: - - name - - comment - - created - - modified - - status - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreStoresResponseCollection' - description: List account stores response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' - description: List account stores response failure - security: - - api_email: [] - api_key: [] - summary: List account stores - tags: - - Secrets Store - x-api-token-group: - - Secrets Store Write - - Secrets Store Read - x-cfPermissionsRequired: - enum: - - '#com.cloudflare.api.account.secrets-store.secret.list' - - '#com.cloudflare.api.account.secrets-store.secret.read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: secrets_store - resource_chain: - - stores - method: list - post: - description: Creates a store in the account - operationId: secrets-store-create - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreCreateStoreObject' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreStoreResponse' - description: store details - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' - description: Create store response failure - security: - - api_email: [] - api_key: [] - summary: Create a store - tags: - - Secrets Store - x-api-token-group: - - Secrets Store Write - x-cfPermissionsRequired: - enum: - - '#com.cloudflare.api.account.secrets-store.secret.read' - - '#com.cloudflare.api.account.secrets-store.secret.create' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: secrets_store - resource_chain: - - stores - method: create - /accounts/{account_id}/secrets_store/stores/{store_id}: - delete: - description: Deletes a single store - operationId: secrets-store-delete-by-id - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: store_id - in: path - required: true - description: The secrets store ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreDeleteResponse' - description: Store deleted - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' - description: Delete store failure - security: - - api_email: [] - api_key: [] - summary: Delete a store - tags: - - Secrets Store - x-api-token-group: - - Secrets Store Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: secrets_store - resource_chain: - - stores - method: delete - get: - description: Returns details of a single store - operationId: secrets-store-get-store-by-id - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: store_id - in: path - required: true - description: The secrets store ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreStoreResponse' - description: store details - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' - description: failure - security: - - api_email: [] - api_key: [] - summary: Get a store by ID - tags: - - Secrets Store - x-api-token-group: - - Secrets Store Write - - Secrets Store Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/secrets_store/stores/{store_id}/secrets: - delete: - description: Deletes one or more secrets - operationId: secrets-store-delete-bulk - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: store_id - in: path - required: true - description: The secrets store ID. - schema: - type: string - responses: - '202': - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreDeleteResponse' - description: Secrets deletion accepted - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' - description: Delete secrets response failure - security: - - api_email: [] - api_key: [] - summary: Delete secrets - tags: - - Secrets Store - x-api-token-group: - - Secrets Store Write - x-cfPermissionsRequired: - enum: - - '#com.cloudflare.api.account.secrets-store.secret.read' - - '#com.cloudflare.api.account.secrets-store.secret.delete' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: secrets_store - resource_chain: - - stores - - secrets - method: bulk_delete - get: - description: Lists all store secrets - operationId: secrets-store-secrets-list - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: store_id - in: path - required: true - description: The secrets store ID. - schema: - type: string - - description: Direction to sort objects - in: query - name: direction - schema: - default: desc - enum: - - asc - - desc - type: string - - description: Page number - in: query - name: page - schema: - minimum: 0 - multipleOf: 1 - type: integer - - description: Number of objects to return per page - in: query - name: per_page - schema: - maximum: 100 - minimum: 0 - multipleOf: 1 - type: integer - - description: >- - Search secrets using a filter string, filtering across name and - comment - in: query - name: search - schema: - type: string - - description: Order secrets by values in the given field - in: query - name: order - schema: - default: created - enum: - - name - - comment - - created - - modified - - status - type: string - - description: Only secrets with the given scopes will be returned - explode: false - in: query - name: scopes - schema: - items: - $ref: '#/components/schemas/secretsStoreScopes' - type: array - style: form - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreSecretsResponseCollection' - description: List store secrets response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' - description: List store secrets response failure - security: - - api_email: [] - api_key: [] - summary: List store secrets - tags: - - Secrets Store - x-api-token-group: - - Secrets Store Write - - Secrets Store Read - x-cfPermissionsRequired: - enum: - - '#com.cloudflare.api.account.secrets-store.secret.list' - - '#com.cloudflare.api.account.secrets-store.secret.read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: secrets_store - resource_chain: - - stores - - secrets - method: create - post: - description: Creates a secret in the account - operationId: secrets-store-secret-create - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: store_id - in: path - required: true - description: The secrets store ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - items: - $ref: '#/components/schemas/secretsStoreCreateSecretObject' - type: array - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreSecretsResponseCollection' - description: secret detail - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' - description: List store secrets response failure - security: - - api_email: [] - api_key: [] - summary: Create a secret - tags: - - Secrets Store - x-api-token-group: - - Secrets Store Write - x-cfPermissionsRequired: - enum: - - '#com.cloudflare.api.account.secrets-store.secret.read' - - '#com.cloudflare.api.account.secrets-store.secret.create' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/secrets_store/stores/{store_id}/secrets/{secret_id}: - delete: - description: Deletes a single secret - operationId: secrets-store-secret-delete-by-id - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: store_id - in: path - required: true - description: The secrets store ID. - schema: - type: string - - name: secret_id - in: path - required: true - description: The secret ID. - schema: - type: string - responses: - '202': - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreDeleteResponse' - description: Secret deletion accepted - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' - description: Delete secret failure - security: - - api_email: [] - api_key: [] - summary: Delete a secret - tags: - - Secrets Store - x-api-token-group: - - Secrets Store Write - x-cfPermissionsRequired: - enum: - - '#com.cloudflare.api.account.secrets-store.secret.read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: secrets_store - resource_chain: - - stores - - secrets - method: delete - get: - description: Returns details of a single secret - operationId: secrets-store-get-by-id - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: store_id - in: path - required: true - description: The secrets store ID. - schema: - type: string - - name: secret_id - in: path - required: true - description: The secret ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreSecretResponse' - description: secret detail - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' - description: failure - security: - - api_email: [] - api_key: [] - summary: Get a secret by ID - tags: - - Secrets Store - x-api-token-group: - - Secrets Store Write - - Secrets Store Read - x-cfPermissionsRequired: - enum: - - '#com.cloudflare.api.account.secrets-store.secret.read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: secrets_store - resource_chain: - - stores - - secrets - method: get - patch: - description: Updates a single secret - operationId: secrets-store-patch-by-id - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: store_id - in: path - required: true - description: The secrets store ID. - schema: - type: string - - name: secret_id - in: path - required: true - description: The secret ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStorePatchSecretObject' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreSecretResponse' - description: secret detail - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' - description: failure - security: - - api_email: [] - api_key: [] - summary: Patch a secret - tags: - - Secrets Store - x-api-token-group: - - Secrets Store Write - x-cfPermissionsRequired: - enum: - - '#com.cloudflare.api.account.secrets-store.secret.read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: secrets_store - resource_chain: - - stores - - secrets - method: edit - /accounts/{account_id}/secrets_store/stores/{store_id}/secrets/{secret_id}/duplicate: - post: - description: Duplicates the secret, keeping the value - operationId: secrets-store-duplicate-by-id - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: store_id - in: path - required: true - description: The secrets store ID. - schema: - type: string - - name: secret_id - in: path - required: true - description: The secret ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreDuplicateSecretObject' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreSecretResponse' - description: secret detail - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' - description: failure - security: - - api_email: [] - api_key: [] - summary: Duplicate Secret - tags: - - Secrets Store - x-api-token-group: - - Secrets Store Write - x-cfPermissionsRequired: - enum: - - '#com.cloudflare.api.account.secrets-store.secret.read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: secrets_store - resource_chain: - - stores - - secrets - method: duplicate - /system/accounts/{account_tag}/stores: - get: - description: >- - Lists all stores in an account that are managed by the calling service. - Only returns stores where managed_by matches the authenticated service. - operationId: secrets-store-system-list - parameters: - - description: >- - Account tag identifier (e.g., '12a6ed19f349896cfbd6694ba3de8d31'). - This is the account's external tag identifier, not the numeric - account ID. - in: path - name: account_tag - schema: - $ref: '#/components/schemas/secretsStoreAccountTag' - required: true - - description: Direction to sort objects - in: query - name: direction - schema: - default: desc - enum: - - asc - - desc - type: string - - description: Page number - in: query - name: page - schema: - minimum: 0 - multipleOf: 1 - type: integer - - description: Number of objects to return per page - in: query - name: per_page - schema: - maximum: 100 - minimum: 0 - multipleOf: 1 - type: integer - - description: Order secrets by values in the given field - in: query - name: order - schema: - default: created - enum: - - name - - comment - - created - - modified - - status - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreStoresResponseCollection' - description: List account stores response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' - description: List account stores response failure - security: - - api_email: [] - api_key: [] - summary: List account stores (System) - tags: - - Secrets Store - x-stability: internal - post: - description: >- - Creates a store in the account on behalf of the calling service. The - store will be marked as managed by the authenticated service. Requires - account_id in the request body. - operationId: secrets-store-system-create - parameters: - - description: >- - Account tag identifier (e.g., '12a6ed19f349896cfbd6694ba3de8d31'). - This is the account's external tag identifier, not the numeric - account ID. - in: path - name: account_tag - schema: - $ref: '#/components/schemas/secretsStoreAccountTag' - required: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreCreateStoreObjectSystem' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreStoreResponse' - description: Store details - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' - description: Create store failure - security: - - api_email: [] - api_key: [] - summary: Create a store (System) - tags: - - Secrets Store - x-stability: internal - /system/accounts/{account_tag}/stores/{store_id}: - delete: - description: >- - Deletes a store managed by the calling service. Returns 404 if the store - doesn't exist or is not managed by the authenticated service. - operationId: secrets-store-system-delete-by-id - parameters: - - description: >- - Account tag identifier (e.g., '12a6ed19f349896cfbd6694ba3de8d31'). - This is the account's external tag identifier, not the numeric - account ID. - in: path - name: account_tag - schema: - $ref: '#/components/schemas/secretsStoreAccountTag' - required: true - - name: store_id - in: path - required: true - description: The secrets store ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreDeleteResponse' - description: Store deleted - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' - description: Delete store failure - security: - - api_email: [] - api_key: [] - summary: Delete a store (System) - tags: - - Secrets Store - x-stability: internal - get: - description: >- - Returns details of a single store managed by the calling service. - Returns 404 if the store doesn't exist or is not managed by the - authenticated service. - operationId: secrets-store-system-get-store-by-id - parameters: - - description: >- - Account tag identifier (e.g., '12a6ed19f349896cfbd6694ba3de8d31'). - This is the account's external tag identifier, not the numeric - account ID. - in: path - name: account_tag - schema: - $ref: '#/components/schemas/secretsStoreAccountTag' - required: true - - name: store_id - in: path - required: true - description: The secrets store ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreStoreResponse' - description: Store details - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' - description: Get store failure - security: - - api_email: [] - api_key: [] - summary: Get a store by ID (System) - tags: - - Secrets Store - x-stability: internal - /system/accounts/{account_tag}/stores/{store_id}/secrets: - delete: - description: >- - Deletes one or more secrets from a store managed by the calling service. - Returns 404 if the store doesn't exist or is not managed by the - authenticated service. - operationId: secrets-store-system-delete-bulk - parameters: - - description: >- - Account tag identifier (e.g., '12a6ed19f349896cfbd6694ba3de8d31'). - This is the account's external tag identifier, not the numeric - account ID. - in: path - name: account_tag - schema: - $ref: '#/components/schemas/secretsStoreAccountTag' - required: true - - name: store_id - in: path - required: true - description: The secrets store ID. - schema: - type: string - responses: - '202': - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreDeleteResponse' - description: Secrets deletion accepted - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' - description: Delete secrets failure - security: - - api_email: [] - api_key: [] - summary: Delete secrets (System) - tags: - - Secrets Store - x-stability: internal - get: - description: >- - Lists all secrets in a store managed by the calling service. Returns 404 - if the store doesn't exist or is not managed by the authenticated - service. - operationId: secrets-store-system-secrets-list - parameters: - - description: >- - Account tag identifier (e.g., '12a6ed19f349896cfbd6694ba3de8d31'). - This is the account's external tag identifier, not the numeric - account ID. - in: path - name: account_tag - schema: - $ref: '#/components/schemas/secretsStoreAccountTag' - required: true - - name: store_id - in: path - required: true - description: The secrets store ID. - schema: - type: string - - description: Direction to sort objects - in: query - name: direction - schema: - default: desc - enum: - - asc - - desc - type: string - - description: Page number - in: query - name: page - schema: - minimum: 0 - multipleOf: 1 - type: integer - - description: Number of objects to return per page - in: query - name: per_page - schema: - maximum: 100 - minimum: 0 - multipleOf: 1 - type: integer - - description: >- - Search secrets using a filter string, filtering across name and - comment - in: query - name: search - schema: - type: string - - description: Order secrets by values in the given field - in: query - name: order - schema: - default: created - enum: - - name - - comment - - created - - modified - - status - type: string - - description: Only secrets with the given scopes will be returned - explode: false - in: query - name: scopes - schema: - items: - $ref: '#/components/schemas/secretsStoreScopes' - type: array - style: form - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreSecretsResponseCollection' - description: List store secrets response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' - description: List store secrets response failure - security: - - api_email: [] - api_key: [] - summary: List store secrets (System) - tags: - - Secrets Store - x-stability: internal - post: - description: >- - Creates one or more secrets in a store managed by the calling service. - Returns 404 if the store doesn't exist or is not managed by the - authenticated service. - operationId: secrets-store-system-secret-create - parameters: - - description: >- - Account tag identifier (e.g., '12a6ed19f349896cfbd6694ba3de8d31'). - This is the account's external tag identifier, not the numeric - account ID. - in: path - name: account_tag - schema: - $ref: '#/components/schemas/secretsStoreAccountTag' - required: true - - name: store_id - in: path - required: true - description: The secrets store ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - items: - $ref: '#/components/schemas/secretsStoreCreateSecretObject' - type: array - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreSecretsResponseCollection' - description: Secret detail - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' - description: Create secrets failure - security: - - api_email: [] - api_key: [] - summary: Create secrets (System) - tags: - - Secrets Store - x-stability: internal - /system/accounts/{account_tag}/stores/{store_id}/secrets/{secret_id}: - delete: - description: >- - Deletes a single secret from a store managed by the calling service. - Returns 404 if the store doesn't exist or is not managed by the - authenticated service. - operationId: secrets-store-system-secret-delete-by-id - parameters: - - description: >- - Account tag identifier (e.g., '12a6ed19f349896cfbd6694ba3de8d31'). - This is the account's external tag identifier, not the numeric - account ID. - in: path - name: account_tag - schema: - $ref: '#/components/schemas/secretsStoreAccountTag' - required: true - - name: store_id - in: path - required: true - description: The secrets store ID. - schema: - type: string - - name: secret_id - in: path - required: true - description: The secret ID. - schema: - type: string - responses: - '202': - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreDeleteResponse' - description: Secret deletion accepted - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' - description: Delete secret failure - security: - - api_email: [] - api_key: [] - summary: Delete a secret (System) - tags: - - Secrets Store - x-stability: internal - get: - description: >- - Returns details of a single secret from a store managed by the calling - service. Returns 404 if the store doesn't exist or is not managed by the - authenticated service. - operationId: secrets-store-system-get-by-id - parameters: - - description: >- - Account tag identifier (e.g., '12a6ed19f349896cfbd6694ba3de8d31'). - This is the account's external tag identifier, not the numeric - account ID. - in: path - name: account_tag - schema: - $ref: '#/components/schemas/secretsStoreAccountTag' - required: true - - name: store_id - in: path - required: true - description: The secrets store ID. - schema: - type: string - - name: secret_id - in: path - required: true - description: The secret ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreSecretResponse' - description: Secret detail - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' - description: Get secret failure - security: - - api_email: [] - api_key: [] - summary: Get a secret by ID (System) - tags: - - Secrets Store - x-stability: internal - patch: - description: >- - Updates a single secret in a store managed by the calling service. - Returns 404 if the store doesn't exist or is not managed by the - authenticated service. - operationId: secrets-store-system-patch-by-id - parameters: - - description: >- - Account tag identifier (e.g., '12a6ed19f349896cfbd6694ba3de8d31'). - This is the account's external tag identifier, not the numeric - account ID. - in: path - name: account_tag - schema: - $ref: '#/components/schemas/secretsStoreAccountTag' - required: true - - name: store_id - in: path - required: true - description: The secrets store ID. - schema: - type: string - - name: secret_id - in: path - required: true - description: The secret ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStorePatchSecretObject' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreSecretResponse' - description: Secret detail - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' - description: Patch secret failure - security: - - api_email: [] - api_key: [] - summary: Patch a secret (System) - tags: - - Secrets Store - x-stability: internal - /system/accounts/{account_tag}/stores/{store_id}/secrets/{secret_id}/duplicate: - post: - description: >- - Duplicates a secret in a store managed by the calling service, keeping - the value. Returns 404 if the store doesn't exist or is not managed by - the authenticated service. - operationId: secrets-store-system-duplicate-by-id - parameters: - - description: >- - Account tag identifier (e.g., '12a6ed19f349896cfbd6694ba3de8d31'). - This is the account's external tag identifier, not the numeric - account ID. - in: path - name: account_tag - schema: - $ref: '#/components/schemas/secretsStoreAccountTag' - required: true - - name: store_id - in: path - required: true - description: The secrets store ID. - schema: - type: string - - name: secret_id - in: path - required: true - description: The secret ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreDuplicateSecretObject' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreSecretResponse' - description: Secret detail - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' - description: Duplicate secret failure - security: - - api_email: [] - api_key: [] - summary: Duplicate secret (System) - tags: - - Secrets Store - x-stability: internal -components: - schemas: - secretsStoreAccountIdentifier: - description: Account Identifier - example: 985e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - readOnly: true - type: string - secretsStoreAccountTag: - description: Account tag identifier - example: 12a6ed19f349896cfbd6694ba3de8d31 - type: string - secretsStoreApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/secretsStoreMessages' - messages: - example: [] - $ref: '#/components/schemas/secretsStoreMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - secretsStoreComment: - description: Freeform text describing the secret - example: info about my secret - type: string - x-auditable: true - secretsStoreCreateSecretObject: - properties: - comment: - $ref: '#/components/schemas/secretsStoreComment' - name: - $ref: '#/components/schemas/secretsStoreSecretName' - scopes: - $ref: '#/components/schemas/secretsStoreScopes' - value: - $ref: '#/components/schemas/secretsStoreValue' - required: - - name - - value - - scopes - type: object - secretsStoreCreateStoreObject: - properties: - name: - $ref: '#/components/schemas/secretsStoreStoreName' - required: - - name - type: object - secretsStoreCreateStoreObjectSystem: - description: Request body for creating a store via system API routes - properties: - account_id: - description: >- - Account internal ID (numeric). Required for system API routes. This - value must remain consistent for all stores within an account - managed by the same service. - example: 12345 - format: int64 - type: integer - name: - $ref: '#/components/schemas/secretsStoreStoreName' - required: - - name - - account_id - type: object - secretsStoreCreated: - description: Whenthe secret was created. - example: '2023-09-21T18:56:32.624632Z' - format: date-time - readOnly: true - type: string - x-auditable: true - secretsStoreDeleteResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/secretsStoreMessages' - messages: - $ref: '#/components/schemas/secretsStoreMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - description: Result is null for delete operations. - nullable: true - type: object - required: - - success - - errors - - messages - secretsStoreDuplicateSecretObject: - properties: - comment: - $ref: '#/components/schemas/secretsStoreComment' - name: - $ref: '#/components/schemas/secretsStoreSecretName' - scopes: - $ref: '#/components/schemas/secretsStoreScopes' - required: - - name - - scopes - type: object - secretsStoreIdentifier: - description: Secret identifier tag. - example: 3fd85f74b32742f1bff64a85009dda07 - maxLength: 32 - readOnly: true - type: string - x-auditable: true - secretsStoreMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - secretsStoreModified: - description: When the secret was modified. - example: '2023-09-21T18:56:32.624632Z' - format: date-time - readOnly: true - type: string - x-auditable: true - secretsStorePatchSecretObject: - properties: - comment: - $ref: '#/components/schemas/secretsStoreComment' - scopes: - $ref: '#/components/schemas/secretsStoreScopes' - value: - $ref: '#/components/schemas/secretsStoreValue' - type: object - secretsStoreQuota: - description: The number of secrets the account is entitlted to use - example: 10 - type: number - x-auditable: true - secretsStoreQuotaResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/secretsStoreMessages' - messages: - $ref: '#/components/schemas/secretsStoreMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 2000 - type: number - total_pages: - description: The number of total pages in the entire result set. - example: 100 - type: number - type: object - result: - $ref: '#/components/schemas/secretsStoreSecretsUsageObject' - required: - - success - - errors - - messages - secretsStoreScopes: - description: The list of services that can use this secret. - example: - - workers - - ai_gateway - - dex - - access - items: - type: string - type: array - secretsStoreSecretName: - description: The name of the secret - example: MY_API_KEY - type: string - secretsStoreSecretObject: - properties: - comment: - $ref: '#/components/schemas/secretsStoreComment' - created: - $ref: '#/components/schemas/secretsStoreCreated' - id: - $ref: '#/components/schemas/secretsStoreIdentifier' - modified: - $ref: '#/components/schemas/secretsStoreModified' - name: - $ref: '#/components/schemas/secretsStoreSecretName' - scopes: - $ref: '#/components/schemas/secretsStoreScopes' - status: - $ref: '#/components/schemas/secretsStoreSecretStatus' - store_id: - $ref: '#/components/schemas/secretsStoreStoreIdentifier' - required: - - id - - name - - store_id - - created - - modified - - status - type: object - secretsStoreSecretResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/secretsStoreMessages' - messages: - $ref: '#/components/schemas/secretsStoreMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 2000 - type: number - total_pages: - description: The number of total pages in the entire result set. - example: 100 - type: number - type: object - result: - $ref: '#/components/schemas/secretsStoreSecretObject' - required: - - success - - errors - - messages - secretsStoreSecretStatus: - enum: - - pending - - active - - deleted - type: string - x-auditable: true - secretsStoreSecretsResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/secretsStoreMessages' - messages: - $ref: '#/components/schemas/secretsStoreMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 2000 - type: number - total_pages: - description: The number of total pages in the entire result set. - example: 100 - type: number - type: object - result: - items: - $ref: '#/components/schemas/secretsStoreSecretObject' - type: array - required: - - success - - errors - - messages - secretsStoreSecretsUsageObject: - properties: - secrets: - $ref: '#/components/schemas/secretsStoreUsageQuotaObject' - required: - - secrets - type: object - secretsStoreStoreIdentifier: - description: Store Identifier - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - readOnly: true - type: string - x-auditable: true - secretsStoreStoreName: - description: The name of the store - example: service_x_keys - type: string - secretsStoreStoreObject: - properties: - account_id: - $ref: '#/components/schemas/secretsStoreAccountIdentifier' - created: - $ref: '#/components/schemas/secretsStoreCreated' - id: - $ref: '#/components/schemas/secretsStoreStoreIdentifier' - modified: - $ref: '#/components/schemas/secretsStoreModified' - name: - $ref: '#/components/schemas/secretsStoreStoreName' - required: - - id - - name - - created - - modified - type: object - secretsStoreStoreResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/secretsStoreMessages' - messages: - $ref: '#/components/schemas/secretsStoreMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 2000 - type: number - total_pages: - description: The number of total pages in the entire result set. - example: 100 - type: number - type: object - result: - $ref: '#/components/schemas/secretsStoreStoreObject' - required: - - success - - errors - - messages - secretsStoreStoresResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/secretsStoreMessages' - messages: - $ref: '#/components/schemas/secretsStoreMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 2000 - type: number - total_pages: - description: The number of total pages in the entire result set. - example: 100 - type: number - type: object - result: - items: - $ref: '#/components/schemas/secretsStoreStoreObject' - type: array - required: - - success - - errors - - messages - secretsStoreUsage: - description: The number of secrets the account is currently using - example: 10 - type: number - x-auditable: true - secretsStoreUsageQuotaObject: - properties: - quota: - $ref: '#/components/schemas/secretsStoreQuota' - usage: - $ref: '#/components/schemas/secretsStoreUsage' - required: - - usage - - quota - type: object - secretsStoreValue: - description: >- - The value of the secret. Maximum 64 KiB (65,536 bytes). Note that this - is 'write only' - no API response will provide this value, it is only - used to create/modify secrets. - example: api-token-secret-123 - maxLength: 65536 - type: string - writeOnly: true - x-sensitive: true - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - quota: - id: cloudflare.secrets_store.quota - name: quota - title: Quota - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1secrets_store~1quota/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/quota/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - stores: - id: cloudflare.secrets_store.stores - name: stores - title: Stores - methods: - list_by_account: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1secrets_store~1stores/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1secrets_store~1stores/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1secrets_store~1stores~1{store_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1secrets_store~1stores~1{store_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - list_by_system: - operation: - $ref: '#/paths/~1system~1accounts~1{account_tag}~1stores/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - secrets_store_system_create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1system~1accounts~1{account_tag}~1stores/post' - response: - mediaType: application/json - openAPIDocKey: '200' - secrets_store_system_delete_by_id: - operation: - $ref: >- - #/paths/~1system~1accounts~1{account_tag}~1stores~1{store_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get_by_system: - operation: - $ref: '#/paths/~1system~1accounts~1{account_tag}~1stores~1{store_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/stores/methods/get_by_account' - - $ref: '#/components/x-stackQL-resources/stores/methods/get_by_system' - - $ref: '#/components/x-stackQL-resources/stores/methods/list_by_account' - - $ref: '#/components/x-stackQL-resources/stores/methods/list_by_system' - insert: - - $ref: '#/components/x-stackQL-resources/stores/methods/create' - - $ref: >- - #/components/x-stackQL-resources/stores/methods/secrets_store_system_create - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/stores/methods/delete' - - $ref: >- - #/components/x-stackQL-resources/stores/methods/secrets_store_system_delete_by_id - replace: [] - secrets: - id: cloudflare.secrets_store.secrets - name: secrets - title: Secrets - methods: - bulk_delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1secrets_store~1stores~1{store_id}~1secrets/delete - response: - mediaType: application/json - openAPIDocKey: '202' - list_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1secrets_store~1stores~1{store_id}~1secrets/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - secrets_store_secret_create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1secrets_store~1stores~1{store_id}~1secrets/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1secrets_store~1stores~1{store_id}~1secrets~1{secret_id}/delete - response: - mediaType: application/json - openAPIDocKey: '202' - get_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1secrets_store~1stores~1{store_id}~1secrets~1{secret_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1secrets_store~1stores~1{store_id}~1secrets~1{secret_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - duplicate_by_account: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1secrets_store~1stores~1{store_id}~1secrets~1{secret_id}~1duplicate/post - response: - mediaType: application/json - openAPIDocKey: '200' - secrets_store_system_delete_bulk: - operation: - $ref: >- - #/paths/~1system~1accounts~1{account_tag}~1stores~1{store_id}~1secrets/delete - response: - mediaType: application/json - openAPIDocKey: '202' - list_by_system: - operation: - $ref: >- - #/paths/~1system~1accounts~1{account_tag}~1stores~1{store_id}~1secrets/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - secrets_store_system_secret_create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1system~1accounts~1{account_tag}~1stores~1{store_id}~1secrets/post - response: - mediaType: application/json - openAPIDocKey: '200' - secrets_store_system_secret_delete_by_id: - operation: - $ref: >- - #/paths/~1system~1accounts~1{account_tag}~1stores~1{store_id}~1secrets~1{secret_id}/delete - response: - mediaType: application/json - openAPIDocKey: '202' - get_by_system: - operation: - $ref: >- - #/paths/~1system~1accounts~1{account_tag}~1stores~1{store_id}~1secrets~1{secret_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - secrets_store_system_patch_by_id: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1system~1accounts~1{account_tag}~1stores~1{store_id}~1secrets~1{secret_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - duplicate_by_system: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1system~1accounts~1{account_tag}~1stores~1{store_id}~1secrets~1{secret_id}~1duplicate/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/secrets/methods/get_by_account' - - $ref: '#/components/x-stackQL-resources/secrets/methods/get_by_system' - - $ref: '#/components/x-stackQL-resources/secrets/methods/list_by_account' - - $ref: '#/components/x-stackQL-resources/secrets/methods/list_by_system' - insert: - - $ref: >- - #/components/x-stackQL-resources/secrets/methods/duplicate_by_account - - $ref: >- - #/components/x-stackQL-resources/secrets/methods/secrets_store_secret_create - - $ref: >- - #/components/x-stackQL-resources/secrets/methods/secrets_store_system_secret_create - update: - - $ref: '#/components/x-stackQL-resources/secrets/methods/edit' - - $ref: >- - #/components/x-stackQL-resources/secrets/methods/secrets_store_system_patch_by_id - delete: - - $ref: '#/components/x-stackQL-resources/secrets/methods/delete' - - $ref: >- - #/components/x-stackQL-resources/secrets/methods/secrets_store_system_secret_delete_by_id - - $ref: '#/components/x-stackQL-resources/secrets/methods/bulk_delete' - - $ref: >- - #/components/x-stackQL-resources/secrets/methods/secrets_store_system_delete_bulk - replace: [] +openapi: 3.0.3 +info: + title: secrets_store API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/secrets_store/quota: + get: + description: Lists the number of secrets used in the account. + operationId: secrets-store-quota + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreQuotaResponse' + description: Usage and quota + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' + description: List store secrets response failure + security: + - api_email: [] + api_key: [] + summary: View secret usage + tags: + - Secrets Store + x-api-token-group: + - Secrets Store Write + - Secrets Store Read + x-cfPermissionsRequired: + enum: + - '#com.cloudflare.api.account.secrets-store.secret.read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: secrets_store + resource_chain: + - quota + method: get + /accounts/{account_id}/secrets_store/stores: + get: + description: Lists all the stores in an account + operationId: secrets-store-list + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Direction to sort objects + in: query + name: direction + schema: + default: desc + enum: + - asc + - desc + type: string + - description: Page number + in: query + name: page + schema: + minimum: 0 + multipleOf: 1 + type: integer + - description: Number of objects to return per page + in: query + name: per_page + schema: + maximum: 100 + minimum: 0 + multipleOf: 1 + type: integer + - description: Order secrets by values in the given field + in: query + name: order + schema: + default: created + enum: + - name + - comment + - created + - modified + - status + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreStoresResponseCollection' + description: List account stores response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' + description: List account stores response failure + security: + - api_email: [] + api_key: [] + summary: List account stores + tags: + - Secrets Store + x-api-token-group: + - Secrets Store Write + - Secrets Store Read + x-cfPermissionsRequired: + enum: + - '#com.cloudflare.api.account.secrets-store.secret.list' + - '#com.cloudflare.api.account.secrets-store.secret.read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: secrets_store + resource_chain: + - stores + method: list + post: + description: Creates a store in the account + operationId: secrets-store-create + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreCreateStoreObject' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreStoreResponse' + description: store details + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' + description: Create store response failure + security: + - api_email: [] + api_key: [] + summary: Create a store + tags: + - Secrets Store + x-api-token-group: + - Secrets Store Write + x-cfPermissionsRequired: + enum: + - '#com.cloudflare.api.account.secrets-store.secret.read' + - '#com.cloudflare.api.account.secrets-store.secret.create' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: secrets_store + resource_chain: + - stores + method: create + /accounts/{account_id}/secrets_store/stores/{store_id}: + delete: + description: Deletes a single store + operationId: secrets-store-delete-by-id + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: store_id + in: path + required: true + description: The secrets store ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreDeleteResponse' + description: Store deleted + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' + description: Delete store failure + security: + - api_email: [] + api_key: [] + summary: Delete a store + tags: + - Secrets Store + x-api-token-group: + - Secrets Store Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: secrets_store + resource_chain: + - stores + method: delete + get: + description: Returns details of a single store + operationId: secrets-store-get-store-by-id + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: store_id + in: path + required: true + description: The secrets store ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreStoreResponse' + description: store details + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' + description: failure + security: + - api_email: [] + api_key: [] + summary: Get a store by ID + tags: + - Secrets Store + x-api-token-group: + - Secrets Store Write + - Secrets Store Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/secrets_store/stores/{store_id}/secrets: + delete: + description: Deletes one or more secrets + operationId: secrets-store-delete-bulk + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: store_id + in: path + required: true + description: The secrets store ID. + schema: + type: string + responses: + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreDeleteResponse' + description: Secrets deletion accepted + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' + description: Delete secrets response failure + security: + - api_email: [] + api_key: [] + summary: Delete secrets + tags: + - Secrets Store + x-api-token-group: + - Secrets Store Write + x-cfPermissionsRequired: + enum: + - '#com.cloudflare.api.account.secrets-store.secret.read' + - '#com.cloudflare.api.account.secrets-store.secret.delete' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: secrets_store + resource_chain: + - stores + - secrets + method: bulk_delete + get: + description: Lists all store secrets + operationId: secrets-store-secrets-list + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: store_id + in: path + required: true + description: The secrets store ID. + schema: + type: string + - description: Direction to sort objects + in: query + name: direction + schema: + default: desc + enum: + - asc + - desc + type: string + - description: Page number + in: query + name: page + schema: + minimum: 0 + multipleOf: 1 + type: integer + - description: Number of objects to return per page + in: query + name: per_page + schema: + maximum: 100 + minimum: 0 + multipleOf: 1 + type: integer + - description: Search secrets using a filter string, filtering across name and comment + in: query + name: search + schema: + type: string + - description: Order secrets by values in the given field + in: query + name: order + schema: + default: created + enum: + - name + - comment + - created + - modified + - status + type: string + - description: Only secrets with the given scopes will be returned + explode: false + in: query + name: scopes + schema: + items: + $ref: '#/components/schemas/secretsStoreScopes' + type: array + style: form + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreSecretsResponseCollection' + description: List store secrets response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' + description: List store secrets response failure + security: + - api_email: [] + api_key: [] + summary: List store secrets + tags: + - Secrets Store + x-api-token-group: + - Secrets Store Write + - Secrets Store Read + x-cfPermissionsRequired: + enum: + - '#com.cloudflare.api.account.secrets-store.secret.list' + - '#com.cloudflare.api.account.secrets-store.secret.read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: secrets_store + resource_chain: + - stores + - secrets + method: create + post: + description: Creates a secret in the account + operationId: secrets-store-secret-create + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: store_id + in: path + required: true + description: The secrets store ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/secretsStoreCreateSecretObject' + type: array + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreSecretsResponseCollection' + description: secret detail + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' + description: List store secrets response failure + security: + - api_email: [] + api_key: [] + summary: Create a secret + tags: + - Secrets Store + x-api-token-group: + - Secrets Store Write + x-cfPermissionsRequired: + enum: + - '#com.cloudflare.api.account.secrets-store.secret.read' + - '#com.cloudflare.api.account.secrets-store.secret.create' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/secrets_store/stores/{store_id}/secrets/{secret_id}: + delete: + description: Deletes a single secret + operationId: secrets-store-secret-delete-by-id + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: store_id + in: path + required: true + description: The secrets store ID. + schema: + type: string + - name: secret_id + in: path + required: true + description: The secret ID. + schema: + type: string + responses: + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreDeleteResponse' + description: Secret deletion accepted + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' + description: Delete secret failure + security: + - api_email: [] + api_key: [] + summary: Delete a secret + tags: + - Secrets Store + x-api-token-group: + - Secrets Store Write + x-cfPermissionsRequired: + enum: + - '#com.cloudflare.api.account.secrets-store.secret.read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: secrets_store + resource_chain: + - stores + - secrets + method: delete + get: + description: Returns details of a single secret + operationId: secrets-store-get-by-id + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: store_id + in: path + required: true + description: The secrets store ID. + schema: + type: string + - name: secret_id + in: path + required: true + description: The secret ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreSecretResponse' + description: secret detail + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' + description: failure + security: + - api_email: [] + api_key: [] + summary: Get a secret by ID + tags: + - Secrets Store + x-api-token-group: + - Secrets Store Write + - Secrets Store Read + x-cfPermissionsRequired: + enum: + - '#com.cloudflare.api.account.secrets-store.secret.read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: secrets_store + resource_chain: + - stores + - secrets + method: get + patch: + description: Updates a single secret + operationId: secrets-store-patch-by-id + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: store_id + in: path + required: true + description: The secrets store ID. + schema: + type: string + - name: secret_id + in: path + required: true + description: The secret ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStorePatchSecretObject' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreSecretResponse' + description: secret detail + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' + description: failure + security: + - api_email: [] + api_key: [] + summary: Patch a secret + tags: + - Secrets Store + x-api-token-group: + - Secrets Store Write + x-cfPermissionsRequired: + enum: + - '#com.cloudflare.api.account.secrets-store.secret.read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: secrets_store + resource_chain: + - stores + - secrets + method: edit + /accounts/{account_id}/secrets_store/stores/{store_id}/secrets/{secret_id}/duplicate: + post: + description: Duplicates the secret, keeping the value + operationId: secrets-store-duplicate-by-id + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: store_id + in: path + required: true + description: The secrets store ID. + schema: + type: string + - name: secret_id + in: path + required: true + description: The secret ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreDuplicateSecretObject' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreSecretResponse' + description: secret detail + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' + description: failure + security: + - api_email: [] + api_key: [] + summary: Duplicate Secret + tags: + - Secrets Store + x-api-token-group: + - Secrets Store Write + x-cfPermissionsRequired: + enum: + - '#com.cloudflare.api.account.secrets-store.secret.read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: secrets_store + resource_chain: + - stores + - secrets + method: duplicate + /system/accounts/{account_tag}/stores: + get: + description: Lists all stores in an account that are managed by the calling service. Only returns stores where managed_by matches the authenticated service. + operationId: secrets-store-system-list + parameters: + - description: Account tag identifier (e.g., '12a6ed19f349896cfbd6694ba3de8d31'). This is the account's external tag identifier, not the numeric account ID. + in: path + name: account_tag + schema: + $ref: '#/components/schemas/secretsStoreAccountTag' + required: true + - description: Direction to sort objects + in: query + name: direction + schema: + default: desc + enum: + - asc + - desc + type: string + - description: Page number + in: query + name: page + schema: + minimum: 0 + multipleOf: 1 + type: integer + - description: Number of objects to return per page + in: query + name: per_page + schema: + maximum: 100 + minimum: 0 + multipleOf: 1 + type: integer + - description: Order secrets by values in the given field + in: query + name: order + schema: + default: created + enum: + - name + - comment + - created + - modified + - status + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreStoresResponseCollection' + description: List account stores response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' + description: List account stores response failure + security: + - api_email: [] + api_key: [] + summary: List account stores (System) + tags: + - Secrets Store + x-stability: internal + post: + description: Creates a store in the account on behalf of the calling service. The store will be marked as managed by the authenticated service. Requires account_id in the request body. + operationId: secrets-store-system-create + parameters: + - description: Account tag identifier (e.g., '12a6ed19f349896cfbd6694ba3de8d31'). This is the account's external tag identifier, not the numeric account ID. + in: path + name: account_tag + schema: + $ref: '#/components/schemas/secretsStoreAccountTag' + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreCreateStoreObjectSystem' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreStoreResponse' + description: Store details + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' + description: Create store failure + security: + - api_email: [] + api_key: [] + summary: Create a store (System) + tags: + - Secrets Store + x-stability: internal + /system/accounts/{account_tag}/stores/{store_id}: + delete: + description: Deletes a store managed by the calling service. Returns 404 if the store doesn't exist or is not managed by the authenticated service. + operationId: secrets-store-system-delete-by-id + parameters: + - description: Account tag identifier (e.g., '12a6ed19f349896cfbd6694ba3de8d31'). This is the account's external tag identifier, not the numeric account ID. + in: path + name: account_tag + schema: + $ref: '#/components/schemas/secretsStoreAccountTag' + required: true + - name: store_id + in: path + required: true + description: The secrets store ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreDeleteResponse' + description: Store deleted + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' + description: Delete store failure + security: + - api_email: [] + api_key: [] + summary: Delete a store (System) + tags: + - Secrets Store + x-stability: internal + get: + description: Returns details of a single store managed by the calling service. Returns 404 if the store doesn't exist or is not managed by the authenticated service. + operationId: secrets-store-system-get-store-by-id + parameters: + - description: Account tag identifier (e.g., '12a6ed19f349896cfbd6694ba3de8d31'). This is the account's external tag identifier, not the numeric account ID. + in: path + name: account_tag + schema: + $ref: '#/components/schemas/secretsStoreAccountTag' + required: true + - name: store_id + in: path + required: true + description: The secrets store ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreStoreResponse' + description: Store details + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' + description: Get store failure + security: + - api_email: [] + api_key: [] + summary: Get a store by ID (System) + tags: + - Secrets Store + x-stability: internal + /system/accounts/{account_tag}/stores/{store_id}/secrets: + delete: + description: Deletes one or more secrets from a store managed by the calling service. Returns 404 if the store doesn't exist or is not managed by the authenticated service. + operationId: secrets-store-system-delete-bulk + parameters: + - description: Account tag identifier (e.g., '12a6ed19f349896cfbd6694ba3de8d31'). This is the account's external tag identifier, not the numeric account ID. + in: path + name: account_tag + schema: + $ref: '#/components/schemas/secretsStoreAccountTag' + required: true + - name: store_id + in: path + required: true + description: The secrets store ID. + schema: + type: string + responses: + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreDeleteResponse' + description: Secrets deletion accepted + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' + description: Delete secrets failure + security: + - api_email: [] + api_key: [] + summary: Delete secrets (System) + tags: + - Secrets Store + x-stability: internal + get: + description: Lists all secrets in a store managed by the calling service. Returns 404 if the store doesn't exist or is not managed by the authenticated service. + operationId: secrets-store-system-secrets-list + parameters: + - description: Account tag identifier (e.g., '12a6ed19f349896cfbd6694ba3de8d31'). This is the account's external tag identifier, not the numeric account ID. + in: path + name: account_tag + schema: + $ref: '#/components/schemas/secretsStoreAccountTag' + required: true + - name: store_id + in: path + required: true + description: The secrets store ID. + schema: + type: string + - description: Direction to sort objects + in: query + name: direction + schema: + default: desc + enum: + - asc + - desc + type: string + - description: Page number + in: query + name: page + schema: + minimum: 0 + multipleOf: 1 + type: integer + - description: Number of objects to return per page + in: query + name: per_page + schema: + maximum: 100 + minimum: 0 + multipleOf: 1 + type: integer + - description: Search secrets using a filter string, filtering across name and comment + in: query + name: search + schema: + type: string + - description: Order secrets by values in the given field + in: query + name: order + schema: + default: created + enum: + - name + - comment + - created + - modified + - status + type: string + - description: Only secrets with the given scopes will be returned + explode: false + in: query + name: scopes + schema: + items: + $ref: '#/components/schemas/secretsStoreScopes' + type: array + style: form + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreSecretsResponseCollection' + description: List store secrets response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' + description: List store secrets response failure + security: + - api_email: [] + api_key: [] + summary: List store secrets (System) + tags: + - Secrets Store + x-stability: internal + post: + description: Creates one or more secrets in a store managed by the calling service. Returns 404 if the store doesn't exist or is not managed by the authenticated service. + operationId: secrets-store-system-secret-create + parameters: + - description: Account tag identifier (e.g., '12a6ed19f349896cfbd6694ba3de8d31'). This is the account's external tag identifier, not the numeric account ID. + in: path + name: account_tag + schema: + $ref: '#/components/schemas/secretsStoreAccountTag' + required: true + - name: store_id + in: path + required: true + description: The secrets store ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/secretsStoreCreateSecretObject' + type: array + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreSecretsResponseCollection' + description: Secret detail + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' + description: Create secrets failure + security: + - api_email: [] + api_key: [] + summary: Create secrets (System) + tags: + - Secrets Store + x-stability: internal + /system/accounts/{account_tag}/stores/{store_id}/secrets/{secret_id}: + delete: + description: Deletes a single secret from a store managed by the calling service. Returns 404 if the store doesn't exist or is not managed by the authenticated service. + operationId: secrets-store-system-secret-delete-by-id + parameters: + - description: Account tag identifier (e.g., '12a6ed19f349896cfbd6694ba3de8d31'). This is the account's external tag identifier, not the numeric account ID. + in: path + name: account_tag + schema: + $ref: '#/components/schemas/secretsStoreAccountTag' + required: true + - name: store_id + in: path + required: true + description: The secrets store ID. + schema: + type: string + - name: secret_id + in: path + required: true + description: The secret ID. + schema: + type: string + responses: + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreDeleteResponse' + description: Secret deletion accepted + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' + description: Delete secret failure + security: + - api_email: [] + api_key: [] + summary: Delete a secret (System) + tags: + - Secrets Store + x-stability: internal + get: + description: Returns details of a single secret from a store managed by the calling service. Returns 404 if the store doesn't exist or is not managed by the authenticated service. + operationId: secrets-store-system-get-by-id + parameters: + - description: Account tag identifier (e.g., '12a6ed19f349896cfbd6694ba3de8d31'). This is the account's external tag identifier, not the numeric account ID. + in: path + name: account_tag + schema: + $ref: '#/components/schemas/secretsStoreAccountTag' + required: true + - name: store_id + in: path + required: true + description: The secrets store ID. + schema: + type: string + - name: secret_id + in: path + required: true + description: The secret ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreSecretResponse' + description: Secret detail + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' + description: Get secret failure + security: + - api_email: [] + api_key: [] + summary: Get a secret by ID (System) + tags: + - Secrets Store + x-stability: internal + patch: + description: Updates a single secret in a store managed by the calling service. Returns 404 if the store doesn't exist or is not managed by the authenticated service. + operationId: secrets-store-system-patch-by-id + parameters: + - description: Account tag identifier (e.g., '12a6ed19f349896cfbd6694ba3de8d31'). This is the account's external tag identifier, not the numeric account ID. + in: path + name: account_tag + schema: + $ref: '#/components/schemas/secretsStoreAccountTag' + required: true + - name: store_id + in: path + required: true + description: The secrets store ID. + schema: + type: string + - name: secret_id + in: path + required: true + description: The secret ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStorePatchSecretObject' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreSecretResponse' + description: Secret detail + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' + description: Patch secret failure + security: + - api_email: [] + api_key: [] + summary: Patch a secret (System) + tags: + - Secrets Store + x-stability: internal + /system/accounts/{account_tag}/stores/{store_id}/secrets/{secret_id}/duplicate: + post: + description: Duplicates a secret in a store managed by the calling service, keeping the value. Returns 404 if the store doesn't exist or is not managed by the authenticated service. + operationId: secrets-store-system-duplicate-by-id + parameters: + - description: Account tag identifier (e.g., '12a6ed19f349896cfbd6694ba3de8d31'). This is the account's external tag identifier, not the numeric account ID. + in: path + name: account_tag + schema: + $ref: '#/components/schemas/secretsStoreAccountTag' + required: true + - name: store_id + in: path + required: true + description: The secrets store ID. + schema: + type: string + - name: secret_id + in: path + required: true + description: The secret ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreDuplicateSecretObject' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreSecretResponse' + description: Secret detail + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/secretsStoreApiResponseCommonFailure' + description: Duplicate secret failure + security: + - api_email: [] + api_key: [] + summary: Duplicate secret (System) + tags: + - Secrets Store + x-stability: internal +components: + schemas: + secretsStoreAccountIdentifier: + description: Account Identifier + example: 985e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + readOnly: true + type: string + secretsStoreAccountTag: + description: Account tag identifier + example: 12a6ed19f349896cfbd6694ba3de8d31 + type: string + secretsStoreApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/secretsStoreMessages' + messages: + example: [] + $ref: '#/components/schemas/secretsStoreMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + secretsStoreComment: + description: Freeform text describing the secret + example: info about my secret + type: string + x-auditable: true + secretsStoreCreateSecretObject: + properties: + comment: + $ref: '#/components/schemas/secretsStoreComment' + name: + $ref: '#/components/schemas/secretsStoreSecretName' + scopes: + $ref: '#/components/schemas/secretsStoreScopes' + value: + $ref: '#/components/schemas/secretsStoreValue' + required: + - name + - value + - scopes + type: object + secretsStoreCreateStoreObject: + properties: + name: + $ref: '#/components/schemas/secretsStoreStoreName' + required: + - name + type: object + secretsStoreCreateStoreObjectSystem: + description: Request body for creating a store via system API routes + properties: + account_id: + description: Account internal ID (numeric). Required for system API routes. This value must remain consistent for all stores within an account managed by the same service. + example: 12345 + format: int64 + type: integer + name: + $ref: '#/components/schemas/secretsStoreStoreName' + required: + - name + - account_id + type: object + secretsStoreCreated: + description: Whenthe secret was created. + example: '2023-09-21T18:56:32.624632Z' + format: date-time + readOnly: true + type: string + x-auditable: true + secretsStoreDeleteResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/secretsStoreMessages' + messages: + $ref: '#/components/schemas/secretsStoreMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + description: Result is null for delete operations. + nullable: true + type: object + required: + - success + - errors + - messages + secretsStoreDuplicateSecretObject: + properties: + comment: + $ref: '#/components/schemas/secretsStoreComment' + name: + $ref: '#/components/schemas/secretsStoreSecretName' + scopes: + $ref: '#/components/schemas/secretsStoreScopes' + required: + - name + - scopes + type: object + secretsStoreIdentifier: + description: Secret identifier tag. + example: 3fd85f74b32742f1bff64a85009dda07 + maxLength: 32 + readOnly: true + type: string + x-auditable: true + secretsStoreMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + secretsStoreModified: + description: When the secret was modified. + example: '2023-09-21T18:56:32.624632Z' + format: date-time + readOnly: true + type: string + x-auditable: true + secretsStorePatchSecretObject: + properties: + comment: + $ref: '#/components/schemas/secretsStoreComment' + scopes: + $ref: '#/components/schemas/secretsStoreScopes' + value: + $ref: '#/components/schemas/secretsStoreValue' + type: object + secretsStoreQuota: + description: The number of secrets the account is entitlted to use + example: 10 + type: number + x-auditable: true + secretsStoreQuotaResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/secretsStoreMessages' + messages: + $ref: '#/components/schemas/secretsStoreMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 2000 + type: number + total_pages: + description: The number of total pages in the entire result set. + example: 100 + type: number + type: object + result: + $ref: '#/components/schemas/secretsStoreSecretsUsageObject' + required: + - success + - errors + - messages + secretsStoreScopes: + description: The list of services that can use this secret. + example: + - workers + - ai_gateway + - dex + - access + items: + type: string + type: array + secretsStoreSecretName: + description: The name of the secret + example: MY_API_KEY + type: string + secretsStoreSecretObject: + properties: + comment: + $ref: '#/components/schemas/secretsStoreComment' + created: + $ref: '#/components/schemas/secretsStoreCreated' + id: + $ref: '#/components/schemas/secretsStoreIdentifier' + modified: + $ref: '#/components/schemas/secretsStoreModified' + name: + $ref: '#/components/schemas/secretsStoreSecretName' + scopes: + $ref: '#/components/schemas/secretsStoreScopes' + status: + $ref: '#/components/schemas/secretsStoreSecretStatus' + store_id: + $ref: '#/components/schemas/secretsStoreStoreIdentifier' + required: + - id + - name + - store_id + - created + - modified + - status + type: object + secretsStoreSecretResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/secretsStoreMessages' + messages: + $ref: '#/components/schemas/secretsStoreMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 2000 + type: number + total_pages: + description: The number of total pages in the entire result set. + example: 100 + type: number + type: object + result: + $ref: '#/components/schemas/secretsStoreSecretObject' + required: + - success + - errors + - messages + secretsStoreSecretStatus: + enum: + - pending + - active + - deleted + type: string + x-auditable: true + secretsStoreSecretsResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/secretsStoreMessages' + messages: + $ref: '#/components/schemas/secretsStoreMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 2000 + type: number + total_pages: + description: The number of total pages in the entire result set. + example: 100 + type: number + type: object + result: + items: + $ref: '#/components/schemas/secretsStoreSecretObject' + type: array + required: + - success + - errors + - messages + secretsStoreSecretsUsageObject: + properties: + secrets: + $ref: '#/components/schemas/secretsStoreUsageQuotaObject' + required: + - secrets + type: object + secretsStoreStoreIdentifier: + description: Store Identifier + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + readOnly: true + type: string + x-auditable: true + secretsStoreStoreName: + description: The name of the store + example: service_x_keys + type: string + secretsStoreStoreObject: + properties: + account_id: + $ref: '#/components/schemas/secretsStoreAccountIdentifier' + created: + $ref: '#/components/schemas/secretsStoreCreated' + id: + $ref: '#/components/schemas/secretsStoreStoreIdentifier' + modified: + $ref: '#/components/schemas/secretsStoreModified' + name: + $ref: '#/components/schemas/secretsStoreStoreName' + required: + - id + - name + - created + - modified + type: object + secretsStoreStoreResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/secretsStoreMessages' + messages: + $ref: '#/components/schemas/secretsStoreMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 2000 + type: number + total_pages: + description: The number of total pages in the entire result set. + example: 100 + type: number + type: object + result: + $ref: '#/components/schemas/secretsStoreStoreObject' + required: + - success + - errors + - messages + secretsStoreStoresResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/secretsStoreMessages' + messages: + $ref: '#/components/schemas/secretsStoreMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 2000 + type: number + total_pages: + description: The number of total pages in the entire result set. + example: 100 + type: number + type: object + result: + items: + $ref: '#/components/schemas/secretsStoreStoreObject' + type: array + required: + - success + - errors + - messages + secretsStoreUsage: + description: The number of secrets the account is currently using + example: 10 + type: number + x-auditable: true + secretsStoreUsageQuotaObject: + properties: + quota: + $ref: '#/components/schemas/secretsStoreQuota' + usage: + $ref: '#/components/schemas/secretsStoreUsage' + required: + - usage + - quota + type: object + secretsStoreValue: + description: The value of the secret. Maximum 64 KiB (65,536 bytes). Note that this is 'write only' - no API response will provide this value, it is only used to create/modify secrets. + example: api-token-secret-123 + maxLength: 65536 + type: string + writeOnly: true + x-sensitive: true + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + quota: + id: cloudflare.secrets_store.quota + name: quota + title: Quota + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1secrets_store~1quota/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/quota/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + stores: + id: cloudflare.secrets_store.stores + name: stores + title: Stores + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1secrets_store~1stores/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1secrets_store~1stores/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1secrets_store~1stores~1{store_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1secrets_store~1stores~1{store_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + list_by_system: + operation: + $ref: '#/paths/~1system~1accounts~1{account_tag}~1stores/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + secrets_store_system_create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1system~1accounts~1{account_tag}~1stores/post' + response: + mediaType: application/json + openAPIDocKey: '200' + secrets_store_system_delete_by_id: + operation: + $ref: '#/paths/~1system~1accounts~1{account_tag}~1stores~1{store_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get_by_system: + operation: + $ref: '#/paths/~1system~1accounts~1{account_tag}~1stores~1{store_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/stores/methods/get_by_account' + - $ref: '#/components/x-stackQL-resources/stores/methods/get_by_system' + - $ref: '#/components/x-stackQL-resources/stores/methods/list_by_account' + - $ref: '#/components/x-stackQL-resources/stores/methods/list_by_system' + insert: + - $ref: '#/components/x-stackQL-resources/stores/methods/create' + - $ref: '#/components/x-stackQL-resources/stores/methods/secrets_store_system_create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/stores/methods/delete' + - $ref: '#/components/x-stackQL-resources/stores/methods/secrets_store_system_delete_by_id' + replace: [] + secrets: + id: cloudflare.secrets_store.secrets + name: secrets + title: Secrets + methods: + bulk_delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1secrets_store~1stores~1{store_id}~1secrets/delete' + response: + mediaType: application/json + openAPIDocKey: '202' + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1secrets_store~1stores~1{store_id}~1secrets/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + secrets_store_secret_create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1secrets_store~1stores~1{store_id}~1secrets/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1secrets_store~1stores~1{store_id}~1secrets~1{secret_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '202' + get_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1secrets_store~1stores~1{store_id}~1secrets~1{secret_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1secrets_store~1stores~1{store_id}~1secrets~1{secret_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .comment }}{{ $sep }}"comment": {{ toJson .comment }}{{- $sep = "," -}}{{ end }} + + {{- if .scopes }}{{ $sep }}"scopes": {{ if eq (kindOf .scopes) "string" }}{{ .scopes }}{{ else }}{{ toJson .scopes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .value }}{{ $sep }}"value": {{ toJson .value }}{{- $sep = "," -}}{{ end }} + + } + + ' + duplicate_by_account: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1secrets_store~1stores~1{store_id}~1secrets~1{secret_id}~1duplicate/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .comment }}{{ $sep }}"comment": {{ toJson .comment }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .scopes }}{{ $sep }}"scopes": {{ if eq (kindOf .scopes) "string" }}{{ .scopes }}{{ else }}{{ toJson .scopes }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + secrets_store_system_delete_bulk: + operation: + $ref: '#/paths/~1system~1accounts~1{account_tag}~1stores~1{store_id}~1secrets/delete' + response: + mediaType: application/json + openAPIDocKey: '202' + list_by_system: + operation: + $ref: '#/paths/~1system~1accounts~1{account_tag}~1stores~1{store_id}~1secrets/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + secrets_store_system_secret_create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1system~1accounts~1{account_tag}~1stores~1{store_id}~1secrets/post' + response: + mediaType: application/json + openAPIDocKey: '200' + secrets_store_system_secret_delete_by_id: + operation: + $ref: '#/paths/~1system~1accounts~1{account_tag}~1stores~1{store_id}~1secrets~1{secret_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '202' + get_by_system: + operation: + $ref: '#/paths/~1system~1accounts~1{account_tag}~1stores~1{store_id}~1secrets~1{secret_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + secrets_store_system_patch_by_id: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1system~1accounts~1{account_tag}~1stores~1{store_id}~1secrets~1{secret_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .comment }}{{ $sep }}"comment": {{ toJson .comment }}{{- $sep = "," -}}{{ end }} + + {{- if .scopes }}{{ $sep }}"scopes": {{ if eq (kindOf .scopes) "string" }}{{ .scopes }}{{ else }}{{ toJson .scopes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .value }}{{ $sep }}"value": {{ toJson .value }}{{- $sep = "," -}}{{ end }} + + } + + ' + duplicate_by_system: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1system~1accounts~1{account_tag}~1stores~1{store_id}~1secrets~1{secret_id}~1duplicate/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .comment }}{{ $sep }}"comment": {{ toJson .comment }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .scopes }}{{ $sep }}"scopes": {{ if eq (kindOf .scopes) "string" }}{{ .scopes }}{{ else }}{{ toJson .scopes }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/secrets/methods/get_by_account' + - $ref: '#/components/x-stackQL-resources/secrets/methods/get_by_system' + - $ref: '#/components/x-stackQL-resources/secrets/methods/list_by_account' + - $ref: '#/components/x-stackQL-resources/secrets/methods/list_by_system' + insert: + - $ref: '#/components/x-stackQL-resources/secrets/methods/duplicate_by_account' + - $ref: '#/components/x-stackQL-resources/secrets/methods/secrets_store_secret_create' + - $ref: '#/components/x-stackQL-resources/secrets/methods/secrets_store_system_secret_create' + update: + - $ref: '#/components/x-stackQL-resources/secrets/methods/edit' + - $ref: '#/components/x-stackQL-resources/secrets/methods/secrets_store_system_patch_by_id' + delete: + - $ref: '#/components/x-stackQL-resources/secrets/methods/delete' + - $ref: '#/components/x-stackQL-resources/secrets/methods/secrets_store_system_secret_delete_by_id' + - $ref: '#/components/x-stackQL-resources/secrets/methods/bulk_delete' + - $ref: '#/components/x-stackQL-resources/secrets/methods/secrets_store_system_delete_bulk' + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/security_txt.yaml b/providers/src/cloudflare/v00.00.00000/services/security_txt.yaml index 44f4847e..0146aadd 100644 --- a/providers/src/cloudflare/v00.00.00000/services/security_txt.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/security_txt.yaml @@ -1,381 +1,369 @@ -openapi: 3.0.3 -info: - title: security_txt API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /zones/{zone_id}/security-center/securitytxt: - delete: - description: >- - Removes the security.txt file configuration for a zone. The - /.well-known/security.txt endpoint will no longer be served. - operationId: delete-security-txt - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/securityCenterApiResponseSingle' - description: The request was successful. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/securityCenterApiResponseCommonFailure' - description: A client error occurred. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Deletes security.txt - tags: - - security.txt - x-api-token-group: - - Zone Settings Write - x-stackql-sdk: - service: security_txt - resource_chain: [] - method: delete - get: - description: >- - Retrieves the current security.txt file configuration for a zone, used - for security vulnerability reporting. - operationId: get-security-txt - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/securityCenterMessages' - messages: - $ref: '#/components/schemas/securityCenterMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/securityCenterSecurityTxt' - required: - - success - - errors - - messages - type: object - description: The request was successful. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/securityCenterApiResponseCommonFailure' - description: A client error occurred. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Retrieves security.txt - tags: - - security.txt - x-api-token-group: - - Zone Settings Write - - Zone Settings Read - x-stackql-sdk: - service: security_txt - resource_chain: [] - method: get - put: - description: >- - Updates the security.txt file configuration for a zone, which provides - security researchers with vulnerability reporting information. - operationId: update-security-txt - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/securityCenterSecurityTxt' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/securityCenterApiResponseSingle' - description: The request was successful. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/securityCenterApiResponseCommonFailure' - description: A client error occurred. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Updates security.txt - tags: - - security.txt - x-api-token-group: - - Zone Settings Write - x-stackql-sdk: - service: security_txt - resource_chain: [] - method: update -components: - schemas: - securityCenterApiResponseCommon: - properties: - errors: - $ref: '#/components/schemas/securityCenterMessages' - messages: - $ref: '#/components/schemas/securityCenterMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - type: object - securityCenterApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/securityCenterMessages' - messages: - example: [] - $ref: '#/components/schemas/securityCenterMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - securityCenterApiResponseSingle: - type: object - $ref: '#/components/schemas/securityCenterApiResponseCommon' - securityCenterMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - securityCenterSecurityTxt: - properties: - acknowledgments: - example: - - https://example.com/hall-of-fame.html - items: - format: uri - type: string - x-auditable: true - type: array - canonical: - example: - - https://www.example.com/.well-known/security.txt - items: - format: uri - type: string - x-auditable: true - type: array - contact: - example: - - mailto:security@example.com - - tel:+1-201-555-0123 - - https://example.com/security-contact.html - items: - format: uri - type: string - x-auditable: true - type: array - enabled: - example: true - type: boolean - x-auditable: true - encryption: - example: - - https://example.com/pgp-key.txt - - dns:5d2d37ab76d47d36._openpgpkey.example.com?type=OPENPGPKEY - - openpgp4fpr:5f2de5521c63a801ab59ccb603d49de44b29100f - items: - format: uri - type: string - type: array - expires: - format: date-time - type: string - x-auditable: true - hiring: - example: - - https://example.com/jobs.html - items: - format: uri - type: string - x-auditable: true - type: array - policy: - example: - - https://example.com/disclosure-policy.html - items: - format: uri - type: string - x-auditable: true - type: array - preferred_languages: - example: en, es, fr - type: string - x-auditable: true - type: object - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - securitytxt: - id: cloudflare.security_txt.securitytxt - name: securitytxt - title: Securitytxt - methods: - delete: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1security-center~1securitytxt/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1security-center~1securitytxt/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1security-center~1securitytxt/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/securitytxt/methods/list' - insert: [] - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/securitytxt/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/securitytxt/methods/update' +openapi: 3.0.3 +info: + title: security_txt API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /zones/{zone_id}/security-center/securitytxt: + delete: + description: Removes the security.txt file configuration for a zone. The /.well-known/security.txt endpoint will no longer be served. + operationId: delete-security-txt + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/securityCenterApiResponseSingle' + description: The request was successful. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/securityCenterApiResponseCommonFailure' + description: A client error occurred. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Deletes security.txt + tags: + - security.txt + x-api-token-group: + - Zone Settings Write + x-stackql-sdk: + service: security_txt + resource_chain: [] + method: delete + get: + description: Retrieves the current security.txt file configuration for a zone, used for security vulnerability reporting. + operationId: get-security-txt + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/securityCenterMessages' + messages: + $ref: '#/components/schemas/securityCenterMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/securityCenterSecurityTxt' + required: + - success + - errors + - messages + type: object + description: The request was successful. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/securityCenterApiResponseCommonFailure' + description: A client error occurred. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Retrieves security.txt + tags: + - security.txt + x-api-token-group: + - Zone Settings Write + - Zone Settings Read + x-stackql-sdk: + service: security_txt + resource_chain: [] + method: get + put: + description: Updates the security.txt file configuration for a zone, which provides security researchers with vulnerability reporting information. + operationId: update-security-txt + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/securityCenterSecurityTxt' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/securityCenterApiResponseSingle' + description: The request was successful. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/securityCenterApiResponseCommonFailure' + description: A client error occurred. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Updates security.txt + tags: + - security.txt + x-api-token-group: + - Zone Settings Write + x-stackql-sdk: + service: security_txt + resource_chain: [] + method: update +components: + schemas: + securityCenterApiResponseCommon: + properties: + errors: + $ref: '#/components/schemas/securityCenterMessages' + messages: + $ref: '#/components/schemas/securityCenterMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + type: object + securityCenterApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/securityCenterMessages' + messages: + example: [] + $ref: '#/components/schemas/securityCenterMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + securityCenterApiResponseSingle: + type: object + $ref: '#/components/schemas/securityCenterApiResponseCommon' + securityCenterMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + securityCenterSecurityTxt: + properties: + acknowledgments: + example: + - https://example.com/hall-of-fame.html + items: + format: uri + type: string + x-auditable: true + type: array + canonical: + example: + - https://www.example.com/.well-known/security.txt + items: + format: uri + type: string + x-auditable: true + type: array + contact: + example: + - mailto:security@example.com + - tel:+1-201-555-0123 + - https://example.com/security-contact.html + items: + format: uri + type: string + x-auditable: true + type: array + enabled: + example: true + type: boolean + x-auditable: true + encryption: + example: + - https://example.com/pgp-key.txt + - dns:5d2d37ab76d47d36._openpgpkey.example.com?type=OPENPGPKEY + - openpgp4fpr:5f2de5521c63a801ab59ccb603d49de44b29100f + items: + format: uri + type: string + type: array + expires: + format: date-time + type: string + x-auditable: true + hiring: + example: + - https://example.com/jobs.html + items: + format: uri + type: string + x-auditable: true + type: array + policy: + example: + - https://example.com/disclosure-policy.html + items: + format: uri + type: string + x-auditable: true + type: array + preferred_languages: + example: en, es, fr + type: string + x-auditable: true + type: object + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + securitytxt: + id: cloudflare.security_txt.securitytxt + name: securitytxt + title: Securitytxt + methods: + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1security-center~1securitytxt/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1security-center~1securitytxt/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1security-center~1securitytxt/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .acknowledgments }}{{ $sep }}"acknowledgments": {{ if eq (kindOf .acknowledgments) "string" }}{{ .acknowledgments }}{{ else }}{{ toJson .acknowledgments }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .canonical }}{{ $sep }}"canonical": {{ if eq (kindOf .canonical) "string" }}{{ .canonical }}{{ else }}{{ toJson .canonical }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .contact }}{{ $sep }}"contact": {{ if eq (kindOf .contact) "string" }}{{ .contact }}{{ else }}{{ toJson .contact }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .encryption }}{{ $sep }}"encryption": {{ if eq (kindOf .encryption) "string" }}{{ .encryption }}{{ else }}{{ toJson .encryption }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .expires }}{{ $sep }}"expires": {{ toJson .expires }}{{- $sep = "," -}}{{ end }} + + {{- if .hiring }}{{ $sep }}"hiring": {{ if eq (kindOf .hiring) "string" }}{{ .hiring }}{{ else }}{{ toJson .hiring }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .policy }}{{ $sep }}"policy": {{ if eq (kindOf .policy) "string" }}{{ .policy }}{{ else }}{{ toJson .policy }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .preferred_languages }}{{ $sep }}"preferred_languages": {{ toJson .preferred_languages }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/securitytxt/methods/list' + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/securitytxt/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/securitytxt/methods/update' diff --git a/providers/src/cloudflare/v00.00.00000/services/snippets.yaml b/providers/src/cloudflare/v00.00.00000/services/snippets.yaml index 7dd52ae9..cf38cd83 100644 --- a/providers/src/cloudflare/v00.00.00000/services/snippets.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/snippets.yaml @@ -439,7 +439,50 @@ paths: description: Define a snippet rules object. properties: rules: - $ref: '#/components/schemas/snippetsSnippetRules' + description: Lists snippet rules. + items: + description: Define a snippet rule. + properties: + description: + default: '' + description: Provide an informative description of the rule. + title: Description + type: string + x-auditable: true + enabled: + default: false + description: Indicate whether to execute the rule. + title: Enabled + type: boolean + x-auditable: true + expression: + description: Define the expression that determines which traffic matches the rule. + minLength: 1 + title: Expression + type: string + x-auditable: true + id: + description: Specify the unique ID of the rule. + readOnly: true + title: ID + type: string + x-auditable: true + last_updated: + description: Specify the timestamp of when the rule was last modified. + format: date-time + readOnly: true + title: Last Updated + type: string + x-auditable: true + snippet_name: + $ref: '#/components/schemas/snippetsSnippetName' + required: + - expression + - snippet_name + title: Snippet Rule + type: object + title: Snippet Rules + type: array required: - rules title: Snippet Rules @@ -1352,6 +1395,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .metadata }}{{ $sep }}"metadata": {{ if eq (kindOf .metadata) "string" }}{{ .metadata }}{{ else }}{{ toJson .metadata }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/snippets/methods/get' @@ -1389,6 +1445,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .rules }}{{ $sep }}"rules": {{ if eq (kindOf .rules) "string" }}{{ .rules }}{{ else }}{{ toJson .rules }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/rules/methods/list' diff --git a/providers/src/cloudflare/v00.00.00000/services/spectrum.yaml b/providers/src/cloudflare/v00.00.00000/services/spectrum.yaml index a7f3d623..3dd57f50 100644 --- a/providers/src/cloudflare/v00.00.00000/services/spectrum.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/spectrum.yaml @@ -1,1386 +1,1346 @@ -openapi: 3.0.3 -info: - title: spectrum API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /zones/{zone_id}/spectrum/analytics/aggregate/current: - get: - description: >- - Retrieves analytics aggregated from the last minute of usage on Spectrum - applications underneath a given zone. - operationId: spectrum-aggregate-analytics-get-current-aggregated-analytics - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: query - name: appID - schema: - $ref: '#/components/schemas/spectrumAnalyticsAppIdParam' - - in: query - name: colo_name - schema: - description: Co-location identifier. - maxLength: 3 - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/spectrumAnalyticsQueryResponseAggregate' - description: Get current aggregated analytics response - 4xx: - content: - application/json: - schema: - $ref: '#/components/schemas/spectrumAnalyticsApiResponseCommonFailure' - description: Get current aggregated analytics response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get current aggregated analytics - tags: - - Spectrum Analytics - x-api-token-group: - - Analytics Read - x-stackql-sdk: - service: spectrum - resource_chain: - - analytics - - aggregates - - currents - method: get - /zones/{zone_id}/spectrum/analytics/events/bytime: - get: - description: Retrieves a list of aggregate metrics grouped by time interval. - operationId: spectrum-analytics-(-by-time)-get-analytics-by-time - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: query - name: dimensions - schema: - $ref: '#/components/schemas/spectrumAnalyticsDimensions' - - in: query - name: sort - schema: - $ref: '#/components/schemas/spectrumAnalyticsSort' - - in: query - name: until - schema: - $ref: '#/components/schemas/spectrumAnalyticsUntil' - - in: query - name: metrics - schema: - $ref: '#/components/schemas/spectrumAnalyticsMetrics' - - in: query - name: filters - schema: - $ref: '#/components/schemas/spectrumAnalyticsFilters' - - in: query - name: since - schema: - $ref: '#/components/schemas/spectrumAnalyticsSince' - - in: query - name: time_delta - schema: - description: Used to select time series resolution. - enum: - - year - - quarter - - month - - week - - day - - hour - - dekaminute - - minute - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/spectrumAnalyticsQueryResponseSingle' - description: Get analytics by time response - 4xx: - content: - application/json: - schema: - $ref: '#/components/schemas/spectrumAnalyticsApiResponseCommonFailure' - description: Get analytics by time response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get analytics by time - tags: - - Spectrum Analytics - x-api-token-group: - - Analytics Read - x-stackql-sdk: - service: spectrum - resource_chain: - - analytics - - events - - bytimes - method: get - /zones/{zone_id}/spectrum/analytics/events/summary: - get: - description: >- - Retrieves a list of summarised aggregate metrics over a given time - period. - operationId: spectrum-analytics-(-summary)-get-analytics-summary - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: query - name: dimensions - schema: - $ref: '#/components/schemas/spectrumAnalyticsDimensions' - - in: query - name: sort - schema: - $ref: '#/components/schemas/spectrumAnalyticsSort' - - in: query - name: until - schema: - $ref: '#/components/schemas/spectrumAnalyticsUntil' - - in: query - name: metrics - schema: - $ref: '#/components/schemas/spectrumAnalyticsMetrics' - - in: query - name: filters - schema: - $ref: '#/components/schemas/spectrumAnalyticsFilters' - - in: query - name: since - schema: - $ref: '#/components/schemas/spectrumAnalyticsSince' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/spectrumAnalyticsQueryResponseSingle' - description: Get analytics summary response - 4xx: - content: - application/json: - schema: - $ref: '#/components/schemas/spectrumAnalyticsApiResponseCommonFailure' - description: Get analytics summary response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get analytics summary - tags: - - Spectrum Analytics - x-api-token-group: - - Analytics Read - x-stackql-sdk: - service: spectrum - resource_chain: - - analytics - - events - - summaries - method: get - /zones/{zone_id}/spectrum/apps: - get: - description: >- - Retrieves a list of currently existing Spectrum applications inside a - zone. - operationId: spectrum-applications-list-spectrum-applications - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: query - name: page - schema: - description: >- - Page number of paginated results. This parameter is required in - order to use other pagination parameters. If included in the - query, `result_info` will be present in the response. - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 20 - description: Sets the maximum number of results per page. - maximum: 100 - minimum: 1 - type: number - - in: query - name: direction - schema: - default: asc - description: Sets the direction by which results are ordered. - enum: - - asc - - desc - type: string - - in: query - name: order - schema: - default: dns - description: Application field by which results are ordered. - enum: - - protocol - - app_id - - created_on - - modified_on - - dns - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/spectrumConfigAppConfigCollection' - description: List Spectrum applications response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/spectrumConfigApiResponseCommonFailure' - description: List Spectrum applications response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Spectrum applications - tags: - - Spectrum Applications - x-api-token-group: - - Zone Settings Write - - Zone Settings Read - x-stackql-sdk: - service: spectrum - resource_chain: - - apps - method: list - post: - description: >- - Creates a new Spectrum application from a configuration using a name for - the origin. - operationId: >- - spectrum-applications-create-spectrum-application-using-a-name-for-the-origin - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/spectrumConfigUpdateAppConfig' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/spectrumConfigAppConfigSingle' - description: Create Spectrum application using a name for the origin response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/spectrumConfigApiResponseCommonFailure' - description: >- - Create Spectrum application using a name for the origin response - failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Spectrum application using a name for the origin - tags: - - Spectrum Applications - x-api-token-group: - - Zone Settings Write - x-stackql-sdk: - service: spectrum - resource_chain: - - apps - method: create - /zones/{zone_id}/spectrum/apps/{app_id}: - delete: - description: Deletes a previously existing application. - operationId: spectrum-applications-delete-spectrum-application - parameters: - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/spectrumConfigApiResponseSingleId' - description: Delete Spectrum application response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/spectrumConfigApiResponseCommonFailure' - description: Delete Spectrum application response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Spectrum application - tags: - - Spectrum Applications - x-api-token-group: - - Zone Settings Write - x-stackql-sdk: - service: spectrum - resource_chain: - - apps - method: delete - get: - description: >- - Gets the application configuration of a specific application inside a - zone. - operationId: spectrum-applications-get-spectrum-application-configuration - parameters: - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/spectrumConfigAppConfigSingle' - description: Get Spectrum application configuration response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/spectrumConfigApiResponseCommonFailure' - description: Get Spectrum application configuration response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Spectrum application configuration - tags: - - Spectrum Applications - x-api-token-group: - - Zone Settings Write - - Zone Settings Read - x-stackql-sdk: - service: spectrum - resource_chain: - - apps - method: get - put: - description: >- - Updates a previously existing application's configuration that uses a - name for the origin. - operationId: >- - spectrum-applications-update-spectrum-application-configuration-using-a-name-for-the-origin - parameters: - - name: app_id - in: path - required: true - description: The Access application ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/spectrumConfigUpdateAppConfig' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/spectrumConfigAppConfigSingle' - description: >- - Update Spectrum application configuration using a name for the - origin response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/spectrumConfigApiResponseCommonFailure' - description: >- - Update Spectrum application configuration using a name for the - origin response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Spectrum application configuration using a name for the origin - tags: - - Spectrum Applications - x-api-token-group: - - Zone Settings Write - x-stackql-sdk: - service: spectrum - resource_chain: - - apps - method: update -components: - schemas: - spectrumAnalyticsApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/spectrumAnalyticsMessages' - messages: - example: [] - $ref: '#/components/schemas/spectrumAnalyticsMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - spectrumAnalyticsAppIdParam: - description: >- - Comma-delimited list of Spectrum Application Id(s). If provided, the - response will be limited to Spectrum Application Id(s) that match. - example: ea95132c15732412d22c1476fa83f27a,d122c5f4bb71e25cc9e86ab43b142e2f - type: string - spectrumAnalyticsColumn: - properties: - dimensions: - items: - type: string - type: array - metrics: - type: array - items: - type: number - type: object - spectrumAnalyticsDimensions: - description: >- - Can be used to break down the data by given attributes. Options are: - Dimension | Name | Example - --------------------------|---------------------------------|-------------------------- - event | Connection Event | connect, progress, disconnect, originError, - clientFiltered appID | Application ID | 40d67c87c6cd4b889a4fd57805225e85 - coloName | Colo Name | SFO ipVersion | IP version used by the client | - 4, 6. - example: - - event - - appID - items: - enum: - - event - - appID - - coloName - - ipVersion - type: string - type: array - spectrumAnalyticsFilters: - description: >- - Used to filter rows by one or more dimensions. Filters can be combined - using OR and AND boolean logic. AND takes precedence over OR in all the - expressions. The OR operator is defined using a comma (,) or OR keyword - surrounded by whitespace. The AND operator is defined using a semicolon - (;) or AND keyword surrounded by whitespace. Note that the semicolon is - a reserved character in URLs (rfc1738) and needs to be percent-encoded - as %3B. Comparison options are: Operator | Name | URL Encoded - --------------------------|---------------------------------|-------------------------- - == | Equals | %3D%3D != | Does not equals | !%3D \> | Greater Than | %3E - \< | Less Than | %3C \>= | Greater than or equal to | %3E%3D \<= | Less - than or equal to | %3C%3D - example: event==disconnect%20AND%20coloName!=SFO - type: string - spectrumAnalyticsIdentifier: - description: Identifier. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - type: string - x-auditable: true - spectrumAnalyticsMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - spectrumAnalyticsMetrics: - description: >- - One or more metrics to compute. Options are: Metric | Name | Example | - Unit - --------------------------|-------------------------------------|--------------------------|-------------------------- - count | Count of total events | 1000 | Count bytesIngress | Sum of - ingress bytes | 1000 | Sum bytesEgress | Sum of egress bytes | 1000 | - Sum durationAvg | Average connection duration | 1.0 | Time in - milliseconds durationMedian | Median connection duration | 1.0 | Time in - milliseconds duration90th | 90th percentile connection duration | 1.0 | - Time in milliseconds duration99th | 99th percentile connection duration - | 1.0 | Time in milliseconds. - example: - - count - - bytesIngress - items: - enum: - - count - - bytesIngress - - bytesEgress - - durationAvg - - durationMedian - - duration90th - - duration99th - type: string - type: array - spectrumAnalyticsQuery: - properties: - dimensions: - $ref: '#/components/schemas/spectrumAnalyticsDimensions' - filters: - $ref: '#/components/schemas/spectrumAnalyticsFilters' - limit: - description: Limit number of returned metrics. - type: number - metrics: - $ref: '#/components/schemas/spectrumAnalyticsMetrics' - since: - $ref: '#/components/schemas/spectrumAnalyticsSince' - sort: - $ref: '#/components/schemas/spectrumAnalyticsSort' - until: - $ref: '#/components/schemas/spectrumAnalyticsUntil' - type: object - spectrumAnalyticsQueryResponseAggregate: - type: object - properties: - errors: - $ref: '#/components/schemas/spectrumAnalyticsMessages' - messages: - $ref: '#/components/schemas/spectrumAnalyticsMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - items: - $ref: >- - #/components/schemas/spectrumAnalyticsQueryResponseAggregate_result_item - type: array - required: - - success - - errors - - messages - spectrumAnalyticsQueryResponseAggregate_result_item: - properties: - appID: - description: Application identifier. - $ref: '#/components/schemas/spectrumAnalyticsIdentifier' - bytesEgress: - description: Number of bytes sent - type: number - bytesIngress: - description: Number of bytes received - type: number - connections: - description: Number of connections - type: number - durationAvg: - description: Average duration of connections - type: number - required: - - appID - - bytesIngress - - bytesEgress - - connections - - durationAvg - type: object - spectrumAnalyticsQueryResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/spectrumAnalyticsMessages' - messages: - $ref: '#/components/schemas/spectrumAnalyticsMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - properties: - data: - description: List of columns returned by the analytics query. - items: - $ref: '#/components/schemas/spectrumAnalyticsColumn' - type: array - data_lag: - description: >- - Number of seconds between current time and last processed event, - i.e. how many seconds of data could be missing. - example: 3 - minimum: 0 - type: number - max: - description: Maximum result for each selected metrics across all data. - $ref: '#/components/schemas/spectrumAnalyticsStat' - min: - description: Minimum result for each selected metrics across all data. - $ref: '#/components/schemas/spectrumAnalyticsStat' - query: - $ref: '#/components/schemas/spectrumAnalyticsQuery' - rows: - description: Total number of rows in the result. - example: 5 - minimum: 0 - type: number - time_intervals: - description: 'List of time interval buckets: [start, end]' - items: - items: - $ref: '#/components/schemas/spectrumAnalyticsTimestamp' - type: array - type: array - totals: - description: Total result for each selected metrics across all data. - $ref: '#/components/schemas/spectrumAnalyticsStat' - required: - - rows - - data - - data_lag - - min - - max - - totals - - query - type: object - required: - - success - - errors - - messages - spectrumAnalyticsSince: - description: >- - Start of time interval to query, defaults to `until` - 6 hours. - Timestamp must be in RFC3339 format and uses UTC unless otherwise - specified. - $ref: '#/components/schemas/spectrumAnalyticsTimestamp' - spectrumAnalyticsSort: - description: >- - The sort order for the result set; sort fields must be included in - `metrics` or `dimensions`. - example: - - +count - - '-bytesIngress' - items: - type: string - type: array - spectrumAnalyticsStat: - example: - bytesEgress: 100 - bytesIngress: 50 - type: object - spectrumAnalyticsTimestamp: - example: '2014-01-01T05:20:00.12345Z' - format: date-time - type: string - x-auditable: true - spectrumAnalyticsUntil: - description: >- - End of time interval to query, defaults to current time. Timestamp must - be in RFC3339 format and uses UTC unless otherwise specified. - $ref: '#/components/schemas/spectrumAnalyticsTimestamp' - spectrumConfigApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/spectrumConfigMessages' - messages: - example: [] - $ref: '#/components/schemas/spectrumConfigMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - spectrumConfigApiResponseSingleId: - type: object - properties: - errors: - $ref: '#/components/schemas/spectrumConfigMessages' - messages: - $ref: '#/components/schemas/spectrumConfigMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - nullable: true - properties: - id: - $ref: '#/components/schemas/spectrumConfigIdentifier' - required: - - id - type: object - required: - - success - - errors - - messages - spectrumConfigAppConfig: - properties: - created_on: - $ref: '#/components/schemas/spectrumConfigCreated' - readOnly: true - id: - $ref: '#/components/schemas/spectrumConfigAppIdentifier' - modified_on: - $ref: '#/components/schemas/spectrumConfigModified' - readOnly: true - argo_smart_routing: - $ref: '#/components/schemas/spectrumConfigArgoSmartRouting' - dns: - $ref: '#/components/schemas/spectrumConfigDns' - edge_ips: - $ref: '#/components/schemas/spectrumConfigEdgeIps' - ip_firewall: - $ref: '#/components/schemas/spectrumConfigIpFirewall' - origin_direct: - $ref: '#/components/schemas/spectrumConfigOriginDirect' - origin_dns: - $ref: '#/components/schemas/spectrumConfigOriginDns' - origin_port: - $ref: '#/components/schemas/spectrumConfigOriginPort' - protocol: - $ref: '#/components/schemas/spectrumConfigProtocol' - proxy_protocol: - $ref: '#/components/schemas/spectrumConfigProxyProtocol' - tls: - $ref: '#/components/schemas/spectrumConfigTls' - traffic_type: - $ref: '#/components/schemas/spectrumConfigTrafficType' - required: - - id - - created_on - - modified_on - - protocol - - dns - - traffic_type - type: object - spectrumConfigAppConfigCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/spectrumConfigMessages' - messages: - $ref: '#/components/schemas/spectrumConfigMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 2000 - type: number - type: object - result: - type: array - items: - $ref: '#/components/schemas/spectrumConfigAppConfig' - required: - - success - - errors - - messages - spectrumConfigAppConfigSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/spectrumConfigMessages' - messages: - $ref: '#/components/schemas/spectrumConfigMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - type: object - properties: - created_on: - $ref: '#/components/schemas/spectrumConfigCreated' - readOnly: true - id: - $ref: '#/components/schemas/spectrumConfigAppIdentifier' - modified_on: - $ref: '#/components/schemas/spectrumConfigModified' - readOnly: true - argo_smart_routing: - $ref: '#/components/schemas/spectrumConfigArgoSmartRouting' - dns: - $ref: '#/components/schemas/spectrumConfigDns' - edge_ips: - $ref: '#/components/schemas/spectrumConfigEdgeIps' - ip_firewall: - $ref: '#/components/schemas/spectrumConfigIpFirewall' - origin_direct: - $ref: '#/components/schemas/spectrumConfigOriginDirect' - origin_dns: - $ref: '#/components/schemas/spectrumConfigOriginDns' - origin_port: - $ref: '#/components/schemas/spectrumConfigOriginPort' - protocol: - $ref: '#/components/schemas/spectrumConfigProtocol' - proxy_protocol: - $ref: '#/components/schemas/spectrumConfigProxyProtocol' - tls: - $ref: '#/components/schemas/spectrumConfigTls' - traffic_type: - $ref: '#/components/schemas/spectrumConfigTrafficType' - required: - - created_on - - dns - - id - - modified_on - - protocol - required: - - success - - errors - - messages - spectrumConfigAppIdentifier: - description: App identifier. - readOnly: true - $ref: '#/components/schemas/spectrumConfigIdentifier' - spectrumConfigArgoSmartRouting: - default: false - description: >- - Enables Argo Smart Routing for this application. Notes: Only available - for TCP applications with traffic_type set to "direct". - example: true - type: boolean - spectrumConfigCreated: - description: When the Application was created. - readOnly: true - $ref: '#/components/schemas/spectrumConfigTimestamp' - spectrumConfigDns: - description: The name and type of DNS record for the Spectrum application. - properties: - name: - $ref: '#/components/schemas/spectrumConfigDnsName' - type: - $ref: '#/components/schemas/spectrumConfigDnsType' - type: object - spectrumConfigDnsName: - description: The name of the DNS record associated with the application. - example: ssh.example.com - format: hostname - type: string - spectrumConfigDnsTtl: - description: The TTL of our resolution of your DNS record in seconds. - minimum: 600 - type: integer - spectrumConfigDnsType: - description: The type of DNS record associated with the application. - enum: - - CNAME - - ADDRESS - example: CNAME - type: string - spectrumConfigEdgeIps: - default: - connectivity: all - type: dynamic - description: The anycast edge IP configuration for the hostname of this application. - type: object - properties: - connectivity: - description: >- - The IP versions supported for inbound connections on Spectrum - anycast IPs. - enum: - - all - - ipv4 - - ipv6 - example: all - type: string - type: - description: >- - The type of edge IP configuration specified. Dynamically allocated - edge IPs use Spectrum anycast IPs in accordance with the - connectivity you specify. Only valid with CNAME DNS names. - enum: - - dynamic - example: dynamic - type: string - ips: - description: >- - The array of customer owned IPs we broadcast via anycast for this - hostname and application. - example: - - 192.0.2.1 - items: - description: Edge anycast IPs. - example: 192.0.2.1 - type: string - type: array - spectrumConfigIdentifier: - description: Identifier. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - type: string - x-auditable: true - spectrumConfigIpFirewall: - default: false - description: >- - Enables IP Access Rules for this application. Notes: Only available for - TCP applications. - example: false - type: boolean - spectrumConfigMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - spectrumConfigModified: - description: When the Application was last modified. - readOnly: true - $ref: '#/components/schemas/spectrumConfigTimestamp' - spectrumConfigOriginDirect: - description: >- - List of origin IP addresses. Array may contain multiple IP addresses for - load balancing. - items: - example: tcp://127.0.0.1:8080 - format: URI - type: string - type: array - spectrumConfigOriginDns: - description: The name and type of DNS record for the Spectrum application. - properties: - name: - $ref: '#/components/schemas/spectrumConfigOriginDnsName' - ttl: - $ref: '#/components/schemas/spectrumConfigDnsTtl' - type: - $ref: '#/components/schemas/spectrumConfigOriginDnsType' - type: object - spectrumConfigOriginDnsName: - description: The name of the DNS record associated with the origin. - example: origin.example.com - format: hostname - type: string - spectrumConfigOriginDnsType: - description: >- - The type of DNS record associated with the origin. "" is used to specify - a combination of A/AAAA records. - enum: - - '' - - A - - AAAA - - SRV - example: '' - type: string - spectrumConfigOriginPort: - description: >- - The destination port at the origin. Only specified in conjunction with - origin_dns. May use an integer to specify a single origin port, for - example `1000`, or a string to specify a range of origin ports, for - example `"1000-2000"`. Notes: If specifying a port range, the number of - ports in the range must match the number of ports specified in the - "protocol" field. - example: 22 - maximum: 65535 - minimum: 1 - type: integer - spectrumConfigProtocol: - description: >- - The port configuration at Cloudflare's edge. May specify a single port, - for example `"tcp/1000"`, or a range of ports, for example - `"tcp/1000-2000"`. - example: tcp/22 - type: string - spectrumConfigProxyProtocol: - default: 'off' - description: >- - Enables Proxy Protocol to the origin. Refer to [Enable Proxy - protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) - for implementation details on PROXY Protocol V1, PROXY Protocol V2, and - Simple Proxy Protocol. - enum: - - 'off' - - v1 - - v2 - - simple - example: 'off' - type: string - spectrumConfigTimestamp: - example: '2014-01-01T05:20:00.12345Z' - format: date-time - type: string - x-auditable: true - spectrumConfigTls: - default: 'off' - description: The type of TLS termination associated with the application. - enum: - - 'off' - - flexible - - full - - strict - example: 'off' - type: string - spectrumConfigTrafficType: - default: direct - description: >- - Determines how data travels from the edge to your origin. When set to - "direct", Spectrum will send traffic directly to your origin, and the - application's type is derived from the `protocol`. When set to "http" or - "https", Spectrum will apply Cloudflare's HTTP/HTTPS features as it - sends traffic to your origin, and the application type matches this - property exactly. - enum: - - direct - - http - - https - example: direct - type: string - spectrumConfigUpdateAppConfig: - type: object - properties: - created_on: - $ref: '#/components/schemas/spectrumConfigCreated' - readOnly: true - id: - $ref: '#/components/schemas/spectrumConfigAppIdentifier' - modified_on: - $ref: '#/components/schemas/spectrumConfigModified' - readOnly: true - argo_smart_routing: - $ref: '#/components/schemas/spectrumConfigArgoSmartRouting' - dns: - $ref: '#/components/schemas/spectrumConfigDns' - edge_ips: - $ref: '#/components/schemas/spectrumConfigEdgeIps' - ip_firewall: - $ref: '#/components/schemas/spectrumConfigIpFirewall' - origin_direct: - $ref: '#/components/schemas/spectrumConfigOriginDirect' - origin_dns: - $ref: '#/components/schemas/spectrumConfigOriginDns' - origin_port: - $ref: '#/components/schemas/spectrumConfigOriginPort' - protocol: - $ref: '#/components/schemas/spectrumConfigProtocol' - proxy_protocol: - $ref: '#/components/schemas/spectrumConfigProxyProtocol' - tls: - $ref: '#/components/schemas/spectrumConfigTls' - traffic_type: - $ref: '#/components/schemas/spectrumConfigTrafficType' - required: - - created_on - - dns - - id - - modified_on - - protocol - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - currents: - id: cloudflare.spectrum.currents - name: currents - title: Currents - methods: - list: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1spectrum~1analytics~1aggregate~1current/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/currents/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - bytimes: - id: cloudflare.spectrum.bytimes - name: bytimes - title: Bytimes - methods: - list: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1spectrum~1analytics~1events~1bytime/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result.data - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/bytimes/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - summaries: - id: cloudflare.spectrum.summaries - name: summaries - title: Summaries - methods: - list: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1spectrum~1analytics~1events~1summary/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result.data - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/summaries/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - apps: - id: cloudflare.spectrum.apps - name: apps - title: Apps - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1spectrum~1apps/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1spectrum~1apps/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1spectrum~1apps~1{app_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1spectrum~1apps~1{app_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1spectrum~1apps~1{app_id}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/apps/methods/get' - - $ref: '#/components/x-stackQL-resources/apps/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/apps/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/apps/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/apps/methods/update' +openapi: 3.0.3 +info: + title: spectrum API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /zones/{zone_id}/spectrum/analytics/aggregate/current: + get: + description: Retrieves analytics aggregated from the last minute of usage on Spectrum applications underneath a given zone. + operationId: spectrum-aggregate-analytics-get-current-aggregated-analytics + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: query + name: appID + schema: + $ref: '#/components/schemas/spectrumAnalyticsAppIdParam' + - in: query + name: colo_name + schema: + description: Co-location identifier. + maxLength: 3 + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/spectrumAnalyticsQueryResponseAggregate' + description: Get current aggregated analytics response + 4xx: + content: + application/json: + schema: + $ref: '#/components/schemas/spectrumAnalyticsApiResponseCommonFailure' + description: Get current aggregated analytics response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get current aggregated analytics + tags: + - Spectrum Analytics + x-api-token-group: + - Analytics Read + x-stackql-sdk: + service: spectrum + resource_chain: + - analytics + - aggregates + - currents + method: get + /zones/{zone_id}/spectrum/analytics/events/bytime: + get: + description: Retrieves a list of aggregate metrics grouped by time interval. + operationId: spectrum-analytics-(-by-time)-get-analytics-by-time + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: query + name: dimensions + schema: + $ref: '#/components/schemas/spectrumAnalyticsDimensions' + - in: query + name: sort + schema: + $ref: '#/components/schemas/spectrumAnalyticsSort' + - in: query + name: until + schema: + $ref: '#/components/schemas/spectrumAnalyticsUntil' + - in: query + name: metrics + schema: + $ref: '#/components/schemas/spectrumAnalyticsMetrics' + - in: query + name: filters + schema: + $ref: '#/components/schemas/spectrumAnalyticsFilters' + - in: query + name: since + schema: + $ref: '#/components/schemas/spectrumAnalyticsSince' + - in: query + name: time_delta + schema: + description: Used to select time series resolution. + enum: + - year + - quarter + - month + - week + - day + - hour + - dekaminute + - minute + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/spectrumAnalyticsQueryResponseSingle' + description: Get analytics by time response + 4xx: + content: + application/json: + schema: + $ref: '#/components/schemas/spectrumAnalyticsApiResponseCommonFailure' + description: Get analytics by time response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get analytics by time + tags: + - Spectrum Analytics + x-api-token-group: + - Analytics Read + x-stackql-sdk: + service: spectrum + resource_chain: + - analytics + - events + - bytimes + method: get + /zones/{zone_id}/spectrum/analytics/events/summary: + get: + description: Retrieves a list of summarised aggregate metrics over a given time period. + operationId: spectrum-analytics-(-summary)-get-analytics-summary + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: query + name: dimensions + schema: + $ref: '#/components/schemas/spectrumAnalyticsDimensions' + - in: query + name: sort + schema: + $ref: '#/components/schemas/spectrumAnalyticsSort' + - in: query + name: until + schema: + $ref: '#/components/schemas/spectrumAnalyticsUntil' + - in: query + name: metrics + schema: + $ref: '#/components/schemas/spectrumAnalyticsMetrics' + - in: query + name: filters + schema: + $ref: '#/components/schemas/spectrumAnalyticsFilters' + - in: query + name: since + schema: + $ref: '#/components/schemas/spectrumAnalyticsSince' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/spectrumAnalyticsQueryResponseSingle' + description: Get analytics summary response + 4xx: + content: + application/json: + schema: + $ref: '#/components/schemas/spectrumAnalyticsApiResponseCommonFailure' + description: Get analytics summary response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get analytics summary + tags: + - Spectrum Analytics + x-api-token-group: + - Analytics Read + x-stackql-sdk: + service: spectrum + resource_chain: + - analytics + - events + - summaries + method: get + /zones/{zone_id}/spectrum/apps: + get: + description: Retrieves a list of currently existing Spectrum applications inside a zone. + operationId: spectrum-applications-list-spectrum-applications + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: query + name: page + schema: + description: Page number of paginated results. This parameter is required in order to use other pagination parameters. If included in the query, `result_info` will be present in the response. + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 20 + description: Sets the maximum number of results per page. + maximum: 100 + minimum: 1 + type: number + - in: query + name: direction + schema: + default: asc + description: Sets the direction by which results are ordered. + enum: + - asc + - desc + type: string + - in: query + name: order + schema: + default: dns + description: Application field by which results are ordered. + enum: + - protocol + - app_id + - created_on + - modified_on + - dns + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/spectrumConfigAppConfigCollection' + description: List Spectrum applications response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/spectrumConfigApiResponseCommonFailure' + description: List Spectrum applications response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Spectrum applications + tags: + - Spectrum Applications + x-api-token-group: + - Zone Settings Write + - Zone Settings Read + x-stackql-sdk: + service: spectrum + resource_chain: + - apps + method: list + post: + description: Creates a new Spectrum application from a configuration using a name for the origin. + operationId: spectrum-applications-create-spectrum-application-using-a-name-for-the-origin + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + properties: + created_on: + $ref: '#/components/schemas/spectrumConfigCreated' + readOnly: true + id: + $ref: '#/components/schemas/spectrumConfigAppIdentifier' + modified_on: + $ref: '#/components/schemas/spectrumConfigModified' + readOnly: true + argo_smart_routing: + $ref: '#/components/schemas/spectrumConfigArgoSmartRouting' + dns: + $ref: '#/components/schemas/spectrumConfigDns' + edge_ips: + $ref: '#/components/schemas/spectrumConfigEdgeIps' + ip_firewall: + $ref: '#/components/schemas/spectrumConfigIpFirewall' + origin_direct: + $ref: '#/components/schemas/spectrumConfigOriginDirect' + origin_dns: + $ref: '#/components/schemas/spectrumConfigOriginDns' + origin_port: + $ref: '#/components/schemas/spectrumConfigOriginPort' + protocol: + $ref: '#/components/schemas/spectrumConfigProtocol' + proxy_protocol: + $ref: '#/components/schemas/spectrumConfigProxyProtocol' + tls: + $ref: '#/components/schemas/spectrumConfigTls' + traffic_type: + $ref: '#/components/schemas/spectrumConfigTrafficType' + required: + - dns + - protocol + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/spectrumConfigAppConfigSingle' + description: Create Spectrum application using a name for the origin response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/spectrumConfigApiResponseCommonFailure' + description: Create Spectrum application using a name for the origin response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Spectrum application using a name for the origin + tags: + - Spectrum Applications + x-api-token-group: + - Zone Settings Write + x-stackql-sdk: + service: spectrum + resource_chain: + - apps + method: create + /zones/{zone_id}/spectrum/apps/{app_id}: + delete: + description: Deletes a previously existing application. + operationId: spectrum-applications-delete-spectrum-application + parameters: + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/spectrumConfigApiResponseSingleId' + description: Delete Spectrum application response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/spectrumConfigApiResponseCommonFailure' + description: Delete Spectrum application response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Spectrum application + tags: + - Spectrum Applications + x-api-token-group: + - Zone Settings Write + x-stackql-sdk: + service: spectrum + resource_chain: + - apps + method: delete + get: + description: Gets the application configuration of a specific application inside a zone. + operationId: spectrum-applications-get-spectrum-application-configuration + parameters: + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/spectrumConfigAppConfigSingle' + description: Get Spectrum application configuration response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/spectrumConfigApiResponseCommonFailure' + description: Get Spectrum application configuration response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Spectrum application configuration + tags: + - Spectrum Applications + x-api-token-group: + - Zone Settings Write + - Zone Settings Read + x-stackql-sdk: + service: spectrum + resource_chain: + - apps + method: get + put: + description: Updates a previously existing application's configuration that uses a name for the origin. + operationId: spectrum-applications-update-spectrum-application-configuration-using-a-name-for-the-origin + parameters: + - name: app_id + in: path + required: true + description: The Access application ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + properties: + created_on: + $ref: '#/components/schemas/spectrumConfigCreated' + readOnly: true + id: + $ref: '#/components/schemas/spectrumConfigAppIdentifier' + modified_on: + $ref: '#/components/schemas/spectrumConfigModified' + readOnly: true + argo_smart_routing: + $ref: '#/components/schemas/spectrumConfigArgoSmartRouting' + dns: + $ref: '#/components/schemas/spectrumConfigDns' + edge_ips: + $ref: '#/components/schemas/spectrumConfigEdgeIps' + ip_firewall: + $ref: '#/components/schemas/spectrumConfigIpFirewall' + origin_direct: + $ref: '#/components/schemas/spectrumConfigOriginDirect' + origin_dns: + $ref: '#/components/schemas/spectrumConfigOriginDns' + origin_port: + $ref: '#/components/schemas/spectrumConfigOriginPort' + protocol: + $ref: '#/components/schemas/spectrumConfigProtocol' + proxy_protocol: + $ref: '#/components/schemas/spectrumConfigProxyProtocol' + tls: + $ref: '#/components/schemas/spectrumConfigTls' + traffic_type: + $ref: '#/components/schemas/spectrumConfigTrafficType' + required: + - dns + - protocol + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/spectrumConfigAppConfigSingle' + description: Update Spectrum application configuration using a name for the origin response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/spectrumConfigApiResponseCommonFailure' + description: Update Spectrum application configuration using a name for the origin response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Spectrum application configuration using a name for the origin + tags: + - Spectrum Applications + x-api-token-group: + - Zone Settings Write + x-stackql-sdk: + service: spectrum + resource_chain: + - apps + method: update +components: + schemas: + spectrumAnalyticsApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/spectrumAnalyticsMessages' + messages: + example: [] + $ref: '#/components/schemas/spectrumAnalyticsMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + spectrumAnalyticsAppIdParam: + description: Comma-delimited list of Spectrum Application Id(s). If provided, the response will be limited to Spectrum Application Id(s) that match. + example: ea95132c15732412d22c1476fa83f27a,d122c5f4bb71e25cc9e86ab43b142e2f + type: string + spectrumAnalyticsColumn: + properties: + dimensions: + items: + type: string + type: array + metrics: + type: array + items: + type: number + type: object + spectrumAnalyticsDimensions: + description: 'Can be used to break down the data by given attributes. Options are: Dimension | Name | Example --------------------------|---------------------------------|-------------------------- event | Connection Event | connect, progress, disconnect, originError, clientFiltered appID | Application ID | 40d67c87c6cd4b889a4fd57805225e85 coloName | Colo Name | SFO ipVersion | IP version used by the client | 4, 6.' + example: + - event + - appID + items: + enum: + - event + - appID + - coloName + - ipVersion + type: string + type: array + spectrumAnalyticsFilters: + description: 'Used to filter rows by one or more dimensions. Filters can be combined using OR and AND boolean logic. AND takes precedence over OR in all the expressions. The OR operator is defined using a comma (,) or OR keyword surrounded by whitespace. The AND operator is defined using a semicolon (;) or AND keyword surrounded by whitespace. Note that the semicolon is a reserved character in URLs (rfc1738) and needs to be percent-encoded as %3B. Comparison options are: Operator | Name | URL Encoded --------------------------|---------------------------------|-------------------------- == | Equals | %3D%3D != | Does not equals | !%3D \> | Greater Than | %3E \< | Less Than | %3C \>= | Greater than or equal to | %3E%3D \<= | Less than or equal to | %3C%3D' + example: event==disconnect%20AND%20coloName!=SFO + type: string + spectrumAnalyticsIdentifier: + description: Identifier. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + type: string + x-auditable: true + spectrumAnalyticsMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + spectrumAnalyticsMetrics: + description: 'One or more metrics to compute. Options are: Metric | Name | Example | Unit --------------------------|-------------------------------------|--------------------------|-------------------------- count | Count of total events | 1000 | Count bytesIngress | Sum of ingress bytes | 1000 | Sum bytesEgress | Sum of egress bytes | 1000 | Sum durationAvg | Average connection duration | 1.0 | Time in milliseconds durationMedian | Median connection duration | 1.0 | Time in milliseconds duration90th | 90th percentile connection duration | 1.0 | Time in milliseconds duration99th | 99th percentile connection duration | 1.0 | Time in milliseconds.' + example: + - count + - bytesIngress + items: + enum: + - count + - bytesIngress + - bytesEgress + - durationAvg + - durationMedian + - duration90th + - duration99th + type: string + type: array + spectrumAnalyticsQuery: + properties: + dimensions: + $ref: '#/components/schemas/spectrumAnalyticsDimensions' + filters: + $ref: '#/components/schemas/spectrumAnalyticsFilters' + limit: + description: Limit number of returned metrics. + type: number + metrics: + $ref: '#/components/schemas/spectrumAnalyticsMetrics' + since: + $ref: '#/components/schemas/spectrumAnalyticsSince' + sort: + $ref: '#/components/schemas/spectrumAnalyticsSort' + until: + $ref: '#/components/schemas/spectrumAnalyticsUntil' + type: object + spectrumAnalyticsQueryResponseAggregate: + type: object + properties: + errors: + $ref: '#/components/schemas/spectrumAnalyticsMessages' + messages: + $ref: '#/components/schemas/spectrumAnalyticsMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + items: + $ref: '#/components/schemas/spectrumAnalyticsQueryResponseAggregate_result_item' + type: array + required: + - success + - errors + - messages + spectrumAnalyticsQueryResponseAggregate_result_item: + properties: + appID: + description: Application identifier. + $ref: '#/components/schemas/spectrumAnalyticsIdentifier' + bytesEgress: + description: Number of bytes sent + type: number + bytesIngress: + description: Number of bytes received + type: number + connections: + description: Number of connections + type: number + durationAvg: + description: Average duration of connections + type: number + required: + - appID + - bytesIngress + - bytesEgress + - connections + - durationAvg + type: object + spectrumAnalyticsQueryResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/spectrumAnalyticsMessages' + messages: + $ref: '#/components/schemas/spectrumAnalyticsMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + properties: + data: + description: List of columns returned by the analytics query. + items: + $ref: '#/components/schemas/spectrumAnalyticsColumn' + type: array + data_lag: + description: Number of seconds between current time and last processed event, i.e. how many seconds of data could be missing. + example: 3 + minimum: 0 + type: number + max: + description: Maximum result for each selected metrics across all data. + $ref: '#/components/schemas/spectrumAnalyticsStat' + min: + description: Minimum result for each selected metrics across all data. + $ref: '#/components/schemas/spectrumAnalyticsStat' + query: + $ref: '#/components/schemas/spectrumAnalyticsQuery' + rows: + description: Total number of rows in the result. + example: 5 + minimum: 0 + type: number + time_intervals: + description: 'List of time interval buckets: [start, end]' + items: + items: + $ref: '#/components/schemas/spectrumAnalyticsTimestamp' + type: array + type: array + totals: + description: Total result for each selected metrics across all data. + $ref: '#/components/schemas/spectrumAnalyticsStat' + required: + - rows + - data + - data_lag + - min + - max + - totals + - query + type: object + required: + - success + - errors + - messages + spectrumAnalyticsSince: + description: Start of time interval to query, defaults to `until` - 6 hours. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified. + $ref: '#/components/schemas/spectrumAnalyticsTimestamp' + spectrumAnalyticsSort: + description: The sort order for the result set; sort fields must be included in `metrics` or `dimensions`. + example: + - +count + - -bytesIngress + items: + type: string + type: array + spectrumAnalyticsStat: + example: + bytesEgress: 100 + bytesIngress: 50 + type: object + spectrumAnalyticsTimestamp: + example: '2014-01-01T05:20:00.12345Z' + format: date-time + type: string + x-auditable: true + spectrumAnalyticsUntil: + description: End of time interval to query, defaults to current time. Timestamp must be in RFC3339 format and uses UTC unless otherwise specified. + $ref: '#/components/schemas/spectrumAnalyticsTimestamp' + spectrumConfigApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/spectrumConfigMessages' + messages: + example: [] + $ref: '#/components/schemas/spectrumConfigMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + spectrumConfigApiResponseSingleId: + type: object + properties: + errors: + $ref: '#/components/schemas/spectrumConfigMessages' + messages: + $ref: '#/components/schemas/spectrumConfigMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + nullable: true + properties: + id: + $ref: '#/components/schemas/spectrumConfigIdentifier' + required: + - id + type: object + required: + - success + - errors + - messages + spectrumConfigAppConfig: + properties: + created_on: + $ref: '#/components/schemas/spectrumConfigCreated' + readOnly: true + id: + $ref: '#/components/schemas/spectrumConfigAppIdentifier' + modified_on: + $ref: '#/components/schemas/spectrumConfigModified' + readOnly: true + argo_smart_routing: + $ref: '#/components/schemas/spectrumConfigArgoSmartRouting' + dns: + $ref: '#/components/schemas/spectrumConfigDns' + edge_ips: + $ref: '#/components/schemas/spectrumConfigEdgeIps' + ip_firewall: + $ref: '#/components/schemas/spectrumConfigIpFirewall' + origin_direct: + $ref: '#/components/schemas/spectrumConfigOriginDirect' + origin_dns: + $ref: '#/components/schemas/spectrumConfigOriginDns' + origin_port: + $ref: '#/components/schemas/spectrumConfigOriginPort' + protocol: + $ref: '#/components/schemas/spectrumConfigProtocol' + proxy_protocol: + $ref: '#/components/schemas/spectrumConfigProxyProtocol' + tls: + $ref: '#/components/schemas/spectrumConfigTls' + traffic_type: + $ref: '#/components/schemas/spectrumConfigTrafficType' + required: + - id + - created_on + - modified_on + - protocol + - dns + - traffic_type + type: object + spectrumConfigAppConfigCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/spectrumConfigMessages' + messages: + $ref: '#/components/schemas/spectrumConfigMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 2000 + type: number + type: object + result: + type: array + items: + $ref: '#/components/schemas/spectrumConfigAppConfig' + required: + - success + - errors + - messages + spectrumConfigAppConfigSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/spectrumConfigMessages' + messages: + $ref: '#/components/schemas/spectrumConfigMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + type: object + properties: + created_on: + $ref: '#/components/schemas/spectrumConfigCreated' + readOnly: true + id: + $ref: '#/components/schemas/spectrumConfigAppIdentifier' + modified_on: + $ref: '#/components/schemas/spectrumConfigModified' + readOnly: true + argo_smart_routing: + $ref: '#/components/schemas/spectrumConfigArgoSmartRouting' + dns: + $ref: '#/components/schemas/spectrumConfigDns' + edge_ips: + $ref: '#/components/schemas/spectrumConfigEdgeIps' + ip_firewall: + $ref: '#/components/schemas/spectrumConfigIpFirewall' + origin_direct: + $ref: '#/components/schemas/spectrumConfigOriginDirect' + origin_dns: + $ref: '#/components/schemas/spectrumConfigOriginDns' + origin_port: + $ref: '#/components/schemas/spectrumConfigOriginPort' + protocol: + $ref: '#/components/schemas/spectrumConfigProtocol' + proxy_protocol: + $ref: '#/components/schemas/spectrumConfigProxyProtocol' + tls: + $ref: '#/components/schemas/spectrumConfigTls' + traffic_type: + $ref: '#/components/schemas/spectrumConfigTrafficType' + required: + - created_on + - dns + - id + - modified_on + - protocol + required: + - success + - errors + - messages + spectrumConfigAppIdentifier: + description: App identifier. + readOnly: true + $ref: '#/components/schemas/spectrumConfigIdentifier' + spectrumConfigArgoSmartRouting: + default: false + description: 'Enables Argo Smart Routing for this application. Notes: Only available for TCP applications with traffic_type set to "direct".' + example: true + type: boolean + spectrumConfigCreated: + description: When the Application was created. + readOnly: true + $ref: '#/components/schemas/spectrumConfigTimestamp' + spectrumConfigDns: + description: The name and type of DNS record for the Spectrum application. + properties: + name: + $ref: '#/components/schemas/spectrumConfigDnsName' + type: + $ref: '#/components/schemas/spectrumConfigDnsType' + type: object + spectrumConfigDnsName: + description: The name of the DNS record associated with the application. + example: ssh.example.com + format: hostname + type: string + spectrumConfigDnsTtl: + description: The TTL of our resolution of your DNS record in seconds. + minimum: 600 + type: integer + spectrumConfigDnsType: + description: The type of DNS record associated with the application. + enum: + - CNAME + - ADDRESS + example: CNAME + type: string + spectrumConfigEdgeIps: + default: + connectivity: all + type: dynamic + description: The anycast edge IP configuration for the hostname of this application. + type: object + properties: + connectivity: + description: The IP versions supported for inbound connections on Spectrum anycast IPs. + enum: + - all + - ipv4 + - ipv6 + example: all + type: string + type: + description: The type of edge IP configuration specified. Dynamically allocated edge IPs use Spectrum anycast IPs in accordance with the connectivity you specify. Only valid with CNAME DNS names. + enum: + - dynamic + example: dynamic + type: string + ips: + description: The array of customer owned IPs we broadcast via anycast for this hostname and application. + example: + - 192.0.2.1 + items: + description: Edge anycast IPs. + example: 192.0.2.1 + type: string + type: array + spectrumConfigIdentifier: + description: Identifier. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + type: string + x-auditable: true + spectrumConfigIpFirewall: + default: false + description: 'Enables IP Access Rules for this application. Notes: Only available for TCP applications.' + example: false + type: boolean + spectrumConfigMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + spectrumConfigModified: + description: When the Application was last modified. + readOnly: true + $ref: '#/components/schemas/spectrumConfigTimestamp' + spectrumConfigOriginDirect: + description: List of origin IP addresses. Array may contain multiple IP addresses for load balancing. + items: + example: tcp://127.0.0.1:8080 + format: URI + type: string + type: array + spectrumConfigOriginDns: + description: The name and type of DNS record for the Spectrum application. + properties: + name: + $ref: '#/components/schemas/spectrumConfigOriginDnsName' + ttl: + $ref: '#/components/schemas/spectrumConfigDnsTtl' + type: + $ref: '#/components/schemas/spectrumConfigOriginDnsType' + type: object + spectrumConfigOriginDnsName: + description: The name of the DNS record associated with the origin. + example: origin.example.com + format: hostname + type: string + spectrumConfigOriginDnsType: + description: The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records. + enum: + - '' + - A + - AAAA + - SRV + example: '' + type: string + spectrumConfigOriginPort: + description: 'The destination port at the origin. Only specified in conjunction with origin_dns. May use an integer to specify a single origin port, for example `1000`, or a string to specify a range of origin ports, for example `"1000-2000"`. Notes: If specifying a port range, the number of ports in the range must match the number of ports specified in the "protocol" field.' + example: 22 + maximum: 65535 + minimum: 1 + type: integer + spectrumConfigProtocol: + description: The port configuration at Cloudflare's edge. May specify a single port, for example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`. + example: tcp/22 + type: string + spectrumConfigProxyProtocol: + default: 'off' + description: Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol. + enum: + - 'off' + - v1 + - v2 + - simple + example: 'off' + type: string + spectrumConfigTimestamp: + example: '2014-01-01T05:20:00.12345Z' + format: date-time + type: string + x-auditable: true + spectrumConfigTls: + default: 'off' + description: The type of TLS termination associated with the application. + enum: + - 'off' + - flexible + - full + - strict + example: 'off' + type: string + spectrumConfigTrafficType: + default: direct + description: Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application's type is derived from the `protocol`. When set to "http" or "https", Spectrum will apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly. + enum: + - direct + - http + - https + example: direct + type: string + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + currents: + id: cloudflare.spectrum.currents + name: currents + title: Currents + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1spectrum~1analytics~1aggregate~1current/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/currents/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + bytimes: + id: cloudflare.spectrum.bytimes + name: bytimes + title: Bytimes + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1spectrum~1analytics~1events~1bytime/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result.data + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/bytimes/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + summaries: + id: cloudflare.spectrum.summaries + name: summaries + title: Summaries + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1spectrum~1analytics~1events~1summary/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result.data + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/summaries/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + apps: + id: cloudflare.spectrum.apps + name: apps + title: Apps + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1spectrum~1apps/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1spectrum~1apps/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .argo_smart_routing }}{{ $sep }}"argo_smart_routing": {{ toJson .argo_smart_routing }}{{- $sep = "," -}}{{ end }} + + {{- if .dns }}{{ $sep }}"dns": {{ if eq (kindOf .dns) "string" }}{{ .dns }}{{ else }}{{ toJson .dns }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .edge_ips }}{{ $sep }}"edge_ips": {{ if eq (kindOf .edge_ips) "string" }}{{ .edge_ips }}{{ else }}{{ toJson .edge_ips }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ip_firewall }}{{ $sep }}"ip_firewall": {{ toJson .ip_firewall }}{{- $sep = "," -}}{{ end }} + + {{- if .origin_direct }}{{ $sep }}"origin_direct": {{ if eq (kindOf .origin_direct) "string" }}{{ .origin_direct }}{{ else }}{{ toJson .origin_direct }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .origin_dns }}{{ $sep }}"origin_dns": {{ if eq (kindOf .origin_dns) "string" }}{{ .origin_dns }}{{ else }}{{ toJson .origin_dns }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .origin_port }}{{ $sep }}"origin_port": {{ toJson .origin_port }}{{- $sep = "," -}}{{ end }} + + {{- if .protocol }}{{ $sep }}"protocol": {{ toJson .protocol }}{{- $sep = "," -}}{{ end }} + + {{- if .proxy_protocol }}{{ $sep }}"proxy_protocol": {{ toJson .proxy_protocol }}{{- $sep = "," -}}{{ end }} + + {{- if .tls }}{{ $sep }}"tls": {{ toJson .tls }}{{- $sep = "," -}}{{ end }} + + {{- if .traffic_type }}{{ $sep }}"traffic_type": {{ toJson .traffic_type }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1spectrum~1apps~1{app_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1spectrum~1apps~1{app_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1spectrum~1apps~1{app_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .argo_smart_routing }}{{ $sep }}"argo_smart_routing": {{ toJson .argo_smart_routing }}{{- $sep = "," -}}{{ end }} + + {{- if .dns }}{{ $sep }}"dns": {{ if eq (kindOf .dns) "string" }}{{ .dns }}{{ else }}{{ toJson .dns }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .edge_ips }}{{ $sep }}"edge_ips": {{ if eq (kindOf .edge_ips) "string" }}{{ .edge_ips }}{{ else }}{{ toJson .edge_ips }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ip_firewall }}{{ $sep }}"ip_firewall": {{ toJson .ip_firewall }}{{- $sep = "," -}}{{ end }} + + {{- if .origin_direct }}{{ $sep }}"origin_direct": {{ if eq (kindOf .origin_direct) "string" }}{{ .origin_direct }}{{ else }}{{ toJson .origin_direct }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .origin_dns }}{{ $sep }}"origin_dns": {{ if eq (kindOf .origin_dns) "string" }}{{ .origin_dns }}{{ else }}{{ toJson .origin_dns }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .origin_port }}{{ $sep }}"origin_port": {{ toJson .origin_port }}{{- $sep = "," -}}{{ end }} + + {{- if .protocol }}{{ $sep }}"protocol": {{ toJson .protocol }}{{- $sep = "," -}}{{ end }} + + {{- if .proxy_protocol }}{{ $sep }}"proxy_protocol": {{ toJson .proxy_protocol }}{{- $sep = "," -}}{{ end }} + + {{- if .tls }}{{ $sep }}"tls": {{ toJson .tls }}{{- $sep = "," -}}{{ end }} + + {{- if .traffic_type }}{{ $sep }}"traffic_type": {{ toJson .traffic_type }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/apps/methods/get' + - $ref: '#/components/x-stackQL-resources/apps/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/apps/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/apps/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/apps/methods/update' diff --git a/providers/src/cloudflare/v00.00.00000/services/ssl.yaml b/providers/src/cloudflare/v00.00.00000/services/ssl.yaml index 8c736692..6e478647 100644 --- a/providers/src/cloudflare/v00.00.00000/services/ssl.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/ssl.yaml @@ -1,2294 +1,2167 @@ -openapi: 3.0.3 -info: - title: ssl API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /zones/{zone_id}/ssl/analyze: - post: - description: >- - Returns the set of hostnames, the signature algorithm, and the - expiration date of the certificate. - operationId: analyze-certificate-analyze-certificate - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - bundle_method: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesBundleMethod' - certificate: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificate' - type: object - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCertificateAnalyzeResponse - description: Analyze Certificate response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - type: object - enum: - - null - nullable: true - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Analyze Certificate response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Analyze Certificate - tags: - - Analyze Certificate - x-api-token-group: - - 'Access: Mutual TLS Certificates Write' - - 'Access: Mutual TLS Certificates Read' - - SSL and Certificates Write - - SSL and Certificates Read - x-cfPermissionsRequired: - enum: - - '#ssl:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ssl - resource_chain: - - analyze - method: create - /zones/{zone_id}/ssl/certificate_packs: - get: - description: For a given zone, list all active certificate packs. - operationId: certificate-packs-list-certificate-packs - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: query - name: page - schema: - default: 1 - description: Page number of paginated results. - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 20 - description: Number of certificate packs per page. - maximum: 50 - minimum: 5 - type: number - - in: query - name: status - schema: - description: Include Certificate Packs of all statuses, not just active ones. - enum: - - all - type: string - - in: query - name: deploy - schema: - description: Specify the deployment environment for the certificate packs. - enum: - - staging - - production - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCertificatePackResponseCollection - description: List Certificate Packs response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCertificatePack - type: array - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: List Certificate Packs response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Certificate Packs - tags: - - Certificate Packs - x-api-token-group: - - SSL and Certificates Write - - SSL and Certificates Read - x-cfPermissionsRequired: - enum: - - '#ssl:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ssl - resource_chain: - - certificate_packs - method: list - /zones/{zone_id}/ssl/certificate_packs/order: - post: - description: For a given zone, order an advanced certificate pack. - operationId: certificate-packs-order-advanced-certificate-manager-certificate-pack - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - certificate_authority: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasCertificateAuthority - cloudflare_branding: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCloudflareBranding - hosts: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasHosts' - type: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesAdvancedType' - validation_method: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesValidationMethod - validity_days: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidityDays' - required: - - type - - hosts - - validation_method - - validity_days - - certificate_authority - type: object - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesAdvancedCertificatePackResponseSingle - description: Order Advanced Certificate Manager Certificate Pack response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - description: A certificate pack with all its properties. - properties: - certificate_authority: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasCertificateAuthority - certificates: - description: Array of certificates in this pack. - items: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCertificatePackCertificate - type: array - cloudflare_branding: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCloudflareBranding - dcv_delegation_records: - description: DCV Delegation records for domain validation. - items: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesValidationRecord - readOnly: true - type: array - hosts: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasHosts - id: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesIdentifier - primary_certificate: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesPrimary - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCertificatePacksComponentsSchemasStatus - type: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasType - validation_errors: - description: >- - Domain validation errors that have been received by - the certificate authority (CA). - items: - properties: - message: - description: A domain validation error. - type: string - x-auditable: true - type: object - type: array - validation_method: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesValidationMethod - validation_records: - description: Certificates' validation records. - items: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesValidationRecord - type: array - validity_days: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesValidityDays - required: - - id - - type - - hosts - - certificates - - status - type: object - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Order Advanced Certificate Manager Certificate Pack response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Order Advanced Certificate Manager Certificate Pack - tags: - - Certificate Packs - x-api-token-group: - - SSL and Certificates Write - x-cfPermissionsRequired: - enum: - - '#ssl:read' - - '#ssl:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ssl - resource_chain: - - certificate_packs - method: create - /zones/{zone_id}/ssl/certificate_packs/quota: - get: - description: For a given zone, list certificate pack quotas. - operationId: certificate-packs-get-certificate-pack-quotas - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCertificatePackQuotaResponse - description: Get Certificate Pack Quotas response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - advanced: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesQuota' - type: object - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Get Certificate Pack Quotas response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Certificate Pack Quotas - tags: - - Certificate Packs - x-api-token-group: - - SSL and Certificates Write - - SSL and Certificates Read - x-cfPermissionsRequired: - enum: - - '#ssl:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ssl - resource_chain: - - certificate_packs - - quota - method: get - /zones/{zone_id}/ssl/certificate_packs/{certificate_pack_id}: - delete: - description: For a given zone, delete an advanced certificate pack. - operationId: certificate-packs-delete-advanced-certificate-manager-certificate-pack - parameters: - - in: path - name: certificate_pack_id - schema: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesDeleteAdvancedCertificatePackResponseSingle - description: Delete Advanced Certificate Manager Certificate Pack response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - $ref: '#/components/schemas/identifier' - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: >- - Delete Advanced Certificate Manager Certificate Pack response - failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Advanced Certificate Manager Certificate Pack - tags: - - Certificate Packs - x-api-token-group: - - SSL and Certificates Write - x-cfPermissionsRequired: - enum: - - '#ssl:read' - - '#ssl:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ssl - resource_chain: - - certificate_packs - method: delete - get: - description: For a given zone, get a certificate pack. - operationId: certificate-packs-get-certificate-pack - parameters: - - in: path - name: certificate_pack_id - schema: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCertificatePackResponseSingle - description: Get Certificate Pack response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - description: A certificate pack with all its properties. - properties: - certificate_authority: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasCertificateAuthority - certificates: - description: Array of certificates in this pack. - items: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCertificatePackCertificate - type: array - cloudflare_branding: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCloudflareBranding - dcv_delegation_records: - description: DCV Delegation records for domain validation. - items: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesValidationRecord - readOnly: true - type: array - hosts: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasHosts - id: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesIdentifier - primary_certificate: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesPrimary - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCertificatePacksComponentsSchemasStatus - type: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasType - validation_errors: - description: >- - Domain validation errors that have been received by - the certificate authority (CA). - items: - properties: - message: - description: A domain validation error. - type: string - x-auditable: true - type: object - type: array - validation_method: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesValidationMethod - validation_records: - description: Certificates' validation records. - items: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesValidationRecord - type: array - validity_days: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesValidityDays - required: - - id - - type - - hosts - - certificates - - status - type: object - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Get Certificate Pack response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Certificate Pack - tags: - - Certificate Packs - x-api-token-group: - - SSL and Certificates Write - - SSL and Certificates Read - x-cfPermissionsRequired: - enum: - - '#ssl:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ssl - resource_chain: - - certificate_packs - method: get - patch: - description: >- - For a given zone, restart validation or add cloudflare branding for an - advanced certificate pack. The former is only a validation operation for - a Certificate Pack in a validation_timed_out status. - operationId: >- - certificate-packs-restart-validation-for-advanced-certificate-manager-certificate-pack - parameters: - - in: path - name: certificate_pack_id - schema: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - cloudflare_branding: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCloudflareBranding - type: object - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesAdvancedCertificatePackResponseSingle - description: >- - Restart Validation for Advanced Certificate Manager Certificate Pack - response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - description: A certificate pack with all its properties. - properties: - certificate_authority: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasCertificateAuthority - certificates: - description: Array of certificates in this pack. - items: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCertificatePackCertificate - type: array - cloudflare_branding: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCloudflareBranding - dcv_delegation_records: - description: DCV Delegation records for domain validation. - items: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesValidationRecord - readOnly: true - type: array - hosts: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasHosts - id: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesIdentifier - primary_certificate: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesPrimary - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCertificatePacksComponentsSchemasStatus - type: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasType - validation_errors: - description: >- - Domain validation errors that have been received by - the certificate authority (CA). - items: - properties: - message: - description: A domain validation error. - type: string - x-auditable: true - type: object - type: array - validation_method: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesValidationMethod - validation_records: - description: Certificates' validation records. - items: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesValidationRecord - type: array - validity_days: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesValidityDays - required: - - id - - type - - hosts - - certificates - - status - type: object - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: >- - Restart Validation for Advanced Certificate Manager Certificate Pack - response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: >- - Restart Validation or Update Advanced Certificate Manager Certificate - Pack - tags: - - Certificate Packs - x-api-token-group: - - SSL and Certificates Write - x-cfPermissionsRequired: - enum: - - '#ssl:read' - - '#ssl:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ssl - resource_chain: - - certificate_packs - method: edit - /zones/{zone_id}/ssl/recommendation: - get: - deprecated: true - description: Retrieve the SSL/TLS Recommender's recommendation for a zone. - operationId: ssl/-tls-mode-recommendation-ssl/-tls-recommendation - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/cacheApiResponseSingleId' - description: SSL/TLS Recommendation response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheApiResponseCommonFailure' - description: SSL/TLS Recommendation response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: SSL/TLS Recommendation - tags: - - SSL/TLS Mode Recommendation - x-api-token-group: - - Zone Settings Write - - Zone Settings Read - - SSL and Certificates Write - - SSL and Certificates Read - x-cfPermissionsRequired: - enum: - - '#ssl:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stainless-deprecation-message: >- - SSL/TLS Recommender has been decommissioned in favor of Automatic - SSL/TLS - x-stackql-sdk: - service: ssl - resource_chain: - - recommendations - method: get - /zones/{zone_id}/ssl/universal/settings: - get: - description: Get Universal SSL Settings for a Zone. - operationId: universal-ssl-settings-for-a-zone-universal-ssl-settings-details - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSslUniversalSettingsResponse - description: Universal SSL Settings Details response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - enabled: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasEnabled - type: object - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Universal SSL Settings Details response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Universal SSL Settings Details - tags: - - Universal SSL Settings for a Zone - x-api-token-group: - - SSL and Certificates Write - - SSL and Certificates Read - x-cfPermissionsRequired: - enum: - - '#ssl:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ssl - resource_chain: - - universal - - settings - method: get - patch: - description: Patch Universal SSL Settings for a Zone. - operationId: universal-ssl-settings-for-a-zone-edit-universal-ssl-settings - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesUniversal' - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSslUniversalSettingsResponse - description: Edit Universal SSL Settings response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - enabled: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasEnabled - type: object - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Edit Universal SSL Settings response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Edit Universal SSL Settings - tags: - - Universal SSL Settings for a Zone - x-api-token-group: - - SSL and Certificates Write - x-cfPermissionsRequired: - enum: - - '#ssl:read' - - '#ssl:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ssl - resource_chain: - - universal - - settings - method: edit - /zones/{zone_id}/ssl/verification: - get: - description: Get SSL Verification Info for a Zone. - operationId: ssl-verification-ssl-verification-details - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: query - name: retry - schema: - description: Immediately retry SSL Verification. - enum: - - true - type: boolean - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSslVerificationResponseCollection - description: SSL Verification Details response - 4XX: - content: - application/json: - schema: - properties: - result: - items: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesVerification - type: array - enum: - - null - errors: - minLength: 1 - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - false - type: boolean - type: object - required: - - success - - errors - - messages - - result - description: SSL Verification Details response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: SSL Verification Details - tags: - - SSL Verification - x-api-token-group: - - 'Access: Mutual TLS Certificates Write' - - 'Access: Mutual TLS Certificates Read' - - SSL and Certificates Write - - SSL and Certificates Read - x-cfPermissionsRequired: - enum: - - '#ssl:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ssl - resource_chain: - - verification - method: get - /zones/{zone_id}/ssl/verification/{certificate_pack_id}: - patch: - description: >- - Edit SSL validation method for a certificate pack. A PATCH request will - request an immediate validation check on any certificate, and return the - updated status. If a validation method is provided, the validation will - be immediately attempted using that method. - operationId: ssl-verification-edit-ssl-certificate-pack-validation-method - parameters: - - in: path - name: certificate_pack_id - schema: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertPackUuid' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasValidationMethod - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSslValidationMethodResponseCollection - description: Edit SSL Certificate Pack Validation Method response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result: - properties: - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesValidationMethodComponentsSchemasStatus - validation_method: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesValidationMethodDefinition - type: object - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Edit SSL Certificate Pack Validation Method response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Edit SSL Certificate Pack Validation Method - tags: - - SSL Verification - x-api-token-group: - - 'Access: Mutual TLS Certificates Write' - - 'Access: Mutual TLS Certificates Read' - - SSL and Certificates Write - - SSL and Certificates Read - x-cfPermissionsRequired: - enum: - - '#ssl:read' - - '#ssl:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: ssl - resource_chain: - - verification - method: edit -components: - schemas: - cacheApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/cacheMessages' - messages: - example: [] - $ref: '#/components/schemas/cacheMessages' - result: - $ref: '#/components/schemas/cacheResult' - success: - description: Indicates the API call's success or failure. - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - cacheApiResponseSingleId: - properties: - errors: - $ref: '#/components/schemas/cacheMessages' - messages: - $ref: '#/components/schemas/cacheMessages' - result: - $ref: '#/components/schemas/cacheResult' - success: - description: Indicates the API call's success or failure. - example: true - type: boolean - required: - - success - - errors - - messages - - result - type: object - cacheMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - cacheResult: - properties: - editable: - description: Whether this setting can be updated or not. - readOnly: true - type: boolean - id: - example: ssl_automatic_mode - readOnly: true - type: string - modified_on: - description: Last time this setting was modified. - example: '2014-01-01T05:20:00.12345Z' - format: date-time - readOnly: true - type: string - next_scheduled_scan: - description: Next time this zone will be scanned by the Automatic SSL/TLS. - example: '2014-01-01T05:20:00.12345Z' - format: date-time - nullable: true - readOnly: true - type: string - value: - description: Current setting of the automatic SSL/TLS. - enum: - - auto - - custom - example: auto - readOnly: true - type: string - required: - - id - - modified_on - - value - - editable - type: object - identifier: - properties: - id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - type: object - enum: - - null - responseInfo: - properties: - code: - minimum: 1000 - type: integer - message: - type: string - documentation_url: - type: string - source: - type: object - properties: - pointer: - type: string - required: - - code - - message - type: object - uniqueItems: true - tlsCertificatesAndHostnamesAdvancedCertificatePackResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificatePack' - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesAdvancedType: - description: Type of certificate pack. - enum: - - advanced - example: advanced - type: string - x-auditable: true - tlsCertificatesAndHostnamesBrandCheck: - description: Certificate Authority is manually reviewing the order. - example: false - type: boolean - x-auditable: true - tlsCertificatesAndHostnamesBundleMethod: - $ref: '#/components/schemas/unnamedSchemaRef16aca57bde2963201c7e6e895436c1c1' - tlsCertificatesAndHostnamesCertPackUuid: - description: Certificate Pack UUID. - example: a77f8bd7-3b47-46b4-a6f1-75cf98109948 - type: string - x-auditable: true - tlsCertificatesAndHostnamesCertificate: - description: The zone's SSL certificate or certificate and the intermediate(s). - example: | - -----BEGIN CERTIFICATE----- - MIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV - BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX - aWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF - MQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50 - ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB - CgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1 - CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB - KwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5 - 0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI - dZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2 - izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4 - 9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI - GKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV - BAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF - MAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2 - 2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP - Mlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG - SvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq - 2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw - YbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY= - -----END CERTIFICATE----- - type: string - tlsCertificatesAndHostnamesCertificateAnalyzeResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - type: object - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesCertificatePack: - description: A certificate pack with all its properties. - properties: - certificate_authority: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasCertificateAuthority - certificates: - description: Array of certificates in this pack. - items: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCertificatePackCertificate - type: array - cloudflare_branding: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCloudflareBranding' - dcv_delegation_records: - description: DCV Delegation records for domain validation. - items: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidationRecord' - readOnly: true - type: array - hosts: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasHosts' - id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - primary_certificate: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesPrimary' - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesCertificatePacksComponentsSchemasStatus - type: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasType' - validation_errors: - description: >- - Domain validation errors that have been received by the certificate - authority (CA). - items: - properties: - message: - description: A domain validation error. - example: SERVFAIL looking up CAA for app.example.com - type: string - x-auditable: true - type: object - type: array - validation_method: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidationMethod' - validation_records: - description: Certificates' validation records. - items: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidationRecord' - type: array - validity_days: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidityDays' - required: - - id - - type - - hosts - - certificates - - status - type: object - tlsCertificatesAndHostnamesCertificatePackCertificate: - description: An individual certificate within a certificate pack. - properties: - bundle_method: - description: Certificate bundle method. - example: ubiquitous - type: string - x-auditable: true - expires_on: - description: When the certificate from the authority expires. - example: '2024-01-01T00:00:00Z' - format: date-time - type: string - x-auditable: true - geo_restrictions: - description: Specify the region where your private key can be held locally. - properties: - label: - enum: - - us - - eu - - highest_security - example: us - type: string - x-auditable: true - type: object - hosts: - description: Hostnames covered by this certificate. - example: - - example.com - - '*.example.com' - items: - type: string - type: array - x-auditable: true - id: - description: Certificate identifier. - example: 7e7b8deba8538af625850b7b2530034c - type: string - x-auditable: true - issuer: - description: The certificate authority that issued the certificate. - example: Let's Encrypt - type: string - x-auditable: true - modified_on: - description: When the certificate was last modified. - example: '2014-01-01T05:20:00Z' - format: date-time - type: string - x-auditable: true - readOnly: true - priority: - description: The order/priority in which the certificate will be used. - type: number - x-auditable: true - signature: - description: The type of hash used for the certificate. - example: ECDSAWithSHA256 - type: string - x-auditable: true - status: - description: Certificate status. - example: active - type: string - x-auditable: true - uploaded_on: - description: When the certificate was uploaded to Cloudflare. - example: '2014-01-01T05:20:00Z' - format: date-time - type: string - x-auditable: true - zone_id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - required: - - id - - hosts - - status - type: object - tlsCertificatesAndHostnamesCertificatePackQuotaResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - properties: - advanced: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesQuota' - type: object - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesCertificatePackResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 2000 - type: number - total_pages: - description: The number of total pages in the entire result set. - example: 100 - type: number - type: object - result: - items: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificatePack' - type: array - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesCertificatePackResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificatePack' - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesCertificatePacksComponentsSchemasStatus: - description: Status of certificate pack. - enum: - - initializing - - pending_validation - - deleted - - pending_issuance - - pending_deployment - - pending_deletion - - pending_expiration - - expired - - active - - initializing_timed_out - - validation_timed_out - - issuance_timed_out - - deployment_timed_out - - deletion_timed_out - - pending_cleanup - - staging_deployment - - staging_active - - deactivating - - inactive - - backup_issued - - holding_deployment - example: initializing - type: string - x-auditable: true - tlsCertificatesAndHostnamesCertificateStatus: - description: Current status of certificate. - enum: - - initializing - - authorizing - - active - - expired - - issuing - - timing_out - - pending_deployment - example: active - type: string - x-auditable: true - tlsCertificatesAndHostnamesCloudflareBranding: - description: >- - Whether or not to add Cloudflare Branding for the order. This will add a - subdomain of sni.cloudflaressl.com as the Common Name if set to true. - example: false - type: boolean - x-auditable: true - tlsCertificatesAndHostnamesComponentsSchemasValidationMethod: - properties: - validation_method: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesValidationMethodDefinition - required: - - validation_method - type: object - tlsCertificatesAndHostnamesDeleteAdvancedCertificatePackResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - properties: - id: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' - type: object - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesIdentifier: - description: Identifier. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - type: string - x-auditable: true - tlsCertificatesAndHostnamesMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - tlsCertificatesAndHostnamesPrimary: - description: Identifier of the primary certificate in a pack. - example: 7e7b8deba8538af625850b7b2530034c - type: string - x-auditable: true - tlsCertificatesAndHostnamesQuota: - properties: - allocated: - description: Quantity Allocated. - type: integer - x-auditable: true - used: - description: Quantity Used. - type: integer - x-auditable: true - type: object - tlsCertificatesAndHostnamesSchemasCertificateAuthority: - description: >- - Certificate Authority selected for the order. For information on any - certificate authority specific details or restrictions [see this page - for more - details.](https://developers.cloudflare.com/ssl/reference/certificate-authorities) - enum: - - google - - lets_encrypt - - ssl_com - example: lets_encrypt - type: string - x-auditable: true - tlsCertificatesAndHostnamesSchemasEnabled: - description: >- - Disabling Universal SSL removes any currently active Universal SSL - certificates for your zone from the edge and prevents any future - Universal SSL certificates from being ordered. If there are no advanced - certificates or custom certificates uploaded for the domain, visitors - will be unable to access the domain over HTTPS. By disabling Universal - SSL, you understand that the following Cloudflare settings and - preferences will result in visitors being unable to visit your domain - unless you have uploaded a custom certificate or purchased an advanced - certificate. * HSTS * Always Use HTTPS * Opportunistic Encryption * - Onion Routing * Any Page Rules redirecting traffic to HTTPS Similarly, - any HTTP redirect to HTTPS at the origin while the Cloudflare proxy is - enabled will result in users being unable to visit your site without a - valid certificate at Cloudflare's edge. If you do not have a valid - custom or advanced certificate at Cloudflare's edge and are unsure if - any of the above Cloudflare settings are enabled, or if any HTTP - redirects exist at your origin, we advise leaving Universal SSL enabled - for your domain. - example: true - type: boolean - x-auditable: true - tlsCertificatesAndHostnamesSchemasHosts: - description: >- - Comma separated list of valid host names for the certificate packs. Must - contain the zone apex, may not contain more than 50 hosts, and may not - be empty. - example: - - example.com - - '*.example.com' - - www.example.com - items: - type: string - x-auditable: true - type: array - x-stainless-collection-type: set - x-stainless-terraform-configurability: computed_optional - tlsCertificatesAndHostnamesSchemasSignature: - description: Certificate's signature algorithm. - enum: - - ECDSAWithSHA256 - - SHA1WithRSA - - SHA256WithRSA - type: string - x-auditable: true - tlsCertificatesAndHostnamesSchemasType: - description: Type of certificate pack. - enum: - - mh_custom - - managed_hostname - - sni_custom - - universal - - advanced - - total_tls - - keyless - - legacy_custom - example: universal - type: string - x-auditable: true - tlsCertificatesAndHostnamesSchemasValidationMethod: - description: Validation method in use for a certificate pack order. - enum: - - http - - cname - - txt - example: txt - type: string - x-auditable: true - tlsCertificatesAndHostnamesSslUniversalSettingsResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesUniversal' - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesSslValidationMethodResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - messages: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - properties: - status: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesValidationMethodComponentsSchemasStatus - validation_method: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesValidationMethodDefinition - type: object - required: - - success - - errors - - messages - tlsCertificatesAndHostnamesSslVerificationResponseCollection: - properties: - result: - items: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesVerification' - type: array - type: object - tlsCertificatesAndHostnamesUniversal: - properties: - enabled: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasEnabled' - type: object - tlsCertificatesAndHostnamesValidationMethod: - description: Validation Method selected for the order. - enum: - - txt - - http - - email - example: txt - type: string - x-auditable: true - tlsCertificatesAndHostnamesValidationMethodComponentsSchemasStatus: - description: Result status. - example: pending_validation - type: string - x-auditable: true - tlsCertificatesAndHostnamesValidationMethodDefinition: - description: Desired validation method. - enum: - - http - - cname - - txt - - email - example: txt - type: string - x-auditable: true - tlsCertificatesAndHostnamesValidationRecord: - description: Certificate's required validation record. - properties: - cname: - description: The CNAME record hostname for DCV delegation. - example: _acme-challenge.example.com - readOnly: true - type: string - x-auditable: true - cname_target: - description: The CNAME record target value for DCV delegation. - example: dcv.cloudflare.com - readOnly: true - type: string - x-auditable: true - emails: - description: >- - The set of email addresses that the certificate authority (CA) will - use to complete domain validation. - example: - - administrator@example.com - - webmaster@example.com - items: - type: string - x-auditable: true - type: array - http_body: - description: >- - The content that the certificate authority (CA) will expect to find - at the http_url during the domain validation. - example: ca3-574923932a82475cb8592200f1a2a23d - type: string - http_url: - description: The url that will be checked during domain validation. - example: >- - http://app.example.com/.well-known/pki-validation/ca3-da12a1c25e7b48cf80408c6c1763b8a2.txt - type: string - status: - description: Status of the validation record. - example: pending - readOnly: true - type: string - txt_name: - description: >- - The hostname that the certificate authority (CA) will check for a - TXT record during domain validation . - example: _acme-challenge.app.example.com - type: string - x-auditable: true - txt_value: - description: >- - The TXT record that the certificate authority (CA) will check during - domain validation. - example: 810b7d5f01154524b961ba0cd578acc2 - type: string - type: object - tlsCertificatesAndHostnamesValidityDays: - description: Validity Days selected for the order. - enum: - - 14 - - 30 - - 90 - - 365 - type: integer - x-auditable: true - tlsCertificatesAndHostnamesVerification: - properties: - brand_check: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesBrandCheck' - cert_pack_uuid: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertPackUuid' - certificate_status: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificateStatus' - signature: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasSignature' - validation_method: - $ref: >- - #/components/schemas/tlsCertificatesAndHostnamesSchemasValidationMethod - verification_info: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesVerificationInfo' - verification_status: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesVerificationStatus' - verification_type: - $ref: '#/components/schemas/tlsCertificatesAndHostnamesVerificationType' - required: - - certificate_status - type: object - tlsCertificatesAndHostnamesVerificationInfo: - description: Certificate's required verification information. - properties: - record_name: - description: Name of CNAME record. - enum: - - record_name - - http_url - - cname - - txt_name - format: hostname - type: string - x-auditable: true - record_target: - description: Target of CNAME record. - enum: - - record_value - - http_body - - cname_target - - txt_value - format: hostname - type: string - x-auditable: true - type: object - tlsCertificatesAndHostnamesVerificationStatus: - description: >- - Status of the required verification information, omitted if verification - status is unknown. - example: true - type: boolean - x-auditable: true - tlsCertificatesAndHostnamesVerificationType: - description: Method of verification. - enum: - - cname - - meta tag - example: cname - type: string - x-auditable: true - unnamedSchemaRef16aca57bde2963201c7e6e895436c1c1: - default: ubiquitous - description: >- - A ubiquitous bundle has the highest probability of being verified - everywhere, even by clients using outdated or unusual trust stores. An - optimal bundle uses the shortest chain and newest intermediates. And the - force bundle verifies the chain, but does not otherwise modify it. - enum: - - ubiquitous - - optimal - - force - example: ubiquitous - type: string - x-auditable: true - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - ssl: - id: cloudflare.ssl.ssl - name: ssl - title: Ssl - methods: - create_analyze: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1ssl~1analyze/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] - certificate_packs: - id: cloudflare.ssl.certificate_packs - name: certificate_packs - title: Certificate Packs - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1ssl~1certificate_packs/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1ssl~1certificate_packs~1order/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1ssl~1certificate_packs~1{certificate_pack_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1ssl~1certificate_packs~1{certificate_pack_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1ssl~1certificate_packs~1{certificate_pack_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/certificate_packs/methods/get' - - $ref: '#/components/x-stackQL-resources/certificate_packs/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/certificate_packs/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/certificate_packs/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/certificate_packs/methods/delete' - replace: [] - quota: - id: cloudflare.ssl.quota - name: quota - title: Quota - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1ssl~1certificate_packs~1quota/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/quota/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - recommendations: - id: cloudflare.ssl.recommendations - name: recommendations - title: Recommendations - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1ssl~1recommendation/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/recommendations/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - settings: - id: cloudflare.ssl.settings - name: settings - title: Settings - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1ssl~1universal~1settings/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1ssl~1universal~1settings/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/settings/methods/list' - insert: [] - update: - - $ref: '#/components/x-stackQL-resources/settings/methods/edit' - delete: [] - replace: [] - verification: - id: cloudflare.ssl.verification - name: verification - title: Verification - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1ssl~1verification/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1ssl~1verification~1{certificate_pack_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/verification/methods/list' - insert: [] - update: - - $ref: '#/components/x-stackQL-resources/verification/methods/edit' - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: ssl API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /zones/{zone_id}/ssl/analyze: + post: + description: Returns the set of hostnames, the signature algorithm, and the expiration date of the certificate. + operationId: analyze-certificate-analyze-certificate + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + bundle_method: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesBundleMethod' + certificate: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificate' + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificateAnalyzeResponse' + description: Analyze Certificate response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + type: object + enum: + - null + nullable: true + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Analyze Certificate response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Analyze Certificate + tags: + - Analyze Certificate + x-api-token-group: + - 'Access: Mutual TLS Certificates Write' + - 'Access: Mutual TLS Certificates Read' + - SSL and Certificates Write + - SSL and Certificates Read + x-cfPermissionsRequired: + enum: + - '#ssl:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ssl + resource_chain: + - analyze + method: create + /zones/{zone_id}/ssl/certificate_packs: + get: + description: For a given zone, list all active certificate packs. + operationId: certificate-packs-list-certificate-packs + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: query + name: page + schema: + default: 1 + description: Page number of paginated results. + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 20 + description: Number of certificate packs per page. + maximum: 50 + minimum: 5 + type: number + - in: query + name: status + schema: + description: Include Certificate Packs of all statuses, not just active ones. + enum: + - all + type: string + - in: query + name: deploy + schema: + description: Specify the deployment environment for the certificate packs. + enum: + - staging + - production + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificatePackResponseCollection' + description: List Certificate Packs response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificatePack' + type: array + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: List Certificate Packs response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Certificate Packs + tags: + - Certificate Packs + x-api-token-group: + - SSL and Certificates Write + - SSL and Certificates Read + x-cfPermissionsRequired: + enum: + - '#ssl:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ssl + resource_chain: + - certificate_packs + method: list + /zones/{zone_id}/ssl/certificate_packs/order: + post: + description: For a given zone, order an advanced certificate pack. + operationId: certificate-packs-order-advanced-certificate-manager-certificate-pack + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + certificate_authority: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasCertificateAuthority' + cloudflare_branding: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCloudflareBranding' + hosts: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasHosts' + type: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesAdvancedType' + validation_method: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidationMethod' + validity_days: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidityDays' + required: + - type + - hosts + - validation_method + - validity_days + - certificate_authority + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesAdvancedCertificatePackResponseSingle' + description: Order Advanced Certificate Manager Certificate Pack response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + description: A certificate pack with all its properties. + properties: + certificate_authority: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasCertificateAuthority' + certificates: + description: Array of certificates in this pack. + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificatePackCertificate' + type: array + cloudflare_branding: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCloudflareBranding' + dcv_delegation_records: + description: DCV Delegation records for domain validation. + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidationRecord' + readOnly: true + type: array + hosts: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasHosts' + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + primary_certificate: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPrimary' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificatePacksComponentsSchemasStatus' + type: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasType' + validation_errors: + description: Domain validation errors that have been received by the certificate authority (CA). + items: + properties: + message: + description: A domain validation error. + type: string + x-auditable: true + type: object + type: array + validation_method: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidationMethod' + validation_records: + description: Certificates' validation records. + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidationRecord' + type: array + validity_days: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidityDays' + required: + - id + - type + - hosts + - certificates + - status + type: object + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Order Advanced Certificate Manager Certificate Pack response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Order Advanced Certificate Manager Certificate Pack + tags: + - Certificate Packs + x-api-token-group: + - SSL and Certificates Write + x-cfPermissionsRequired: + enum: + - '#ssl:read' + - '#ssl:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ssl + resource_chain: + - certificate_packs + method: create + /zones/{zone_id}/ssl/certificate_packs/quota: + get: + description: For a given zone, list certificate pack quotas. + operationId: certificate-packs-get-certificate-pack-quotas + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificatePackQuotaResponse' + description: Get Certificate Pack Quotas response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + advanced: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesQuota' + type: object + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Get Certificate Pack Quotas response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Certificate Pack Quotas + tags: + - Certificate Packs + x-api-token-group: + - SSL and Certificates Write + - SSL and Certificates Read + x-cfPermissionsRequired: + enum: + - '#ssl:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ssl + resource_chain: + - certificate_packs + - quota + method: get + /zones/{zone_id}/ssl/certificate_packs/{certificate_pack_id}: + delete: + description: For a given zone, delete an advanced certificate pack. + operationId: certificate-packs-delete-advanced-certificate-manager-certificate-pack + parameters: + - in: path + name: certificate_pack_id + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesDeleteAdvancedCertificatePackResponseSingle' + description: Delete Advanced Certificate Manager Certificate Pack response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + $ref: '#/components/schemas/identifier' + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Delete Advanced Certificate Manager Certificate Pack response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Advanced Certificate Manager Certificate Pack + tags: + - Certificate Packs + x-api-token-group: + - SSL and Certificates Write + x-cfPermissionsRequired: + enum: + - '#ssl:read' + - '#ssl:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ssl + resource_chain: + - certificate_packs + method: delete + get: + description: For a given zone, get a certificate pack. + operationId: certificate-packs-get-certificate-pack + parameters: + - in: path + name: certificate_pack_id + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificatePackResponseSingle' + description: Get Certificate Pack response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + description: A certificate pack with all its properties. + properties: + certificate_authority: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasCertificateAuthority' + certificates: + description: Array of certificates in this pack. + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificatePackCertificate' + type: array + cloudflare_branding: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCloudflareBranding' + dcv_delegation_records: + description: DCV Delegation records for domain validation. + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidationRecord' + readOnly: true + type: array + hosts: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasHosts' + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + primary_certificate: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPrimary' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificatePacksComponentsSchemasStatus' + type: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasType' + validation_errors: + description: Domain validation errors that have been received by the certificate authority (CA). + items: + properties: + message: + description: A domain validation error. + type: string + x-auditable: true + type: object + type: array + validation_method: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidationMethod' + validation_records: + description: Certificates' validation records. + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidationRecord' + type: array + validity_days: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidityDays' + required: + - id + - type + - hosts + - certificates + - status + type: object + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Get Certificate Pack response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Certificate Pack + tags: + - Certificate Packs + x-api-token-group: + - SSL and Certificates Write + - SSL and Certificates Read + x-cfPermissionsRequired: + enum: + - '#ssl:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ssl + resource_chain: + - certificate_packs + method: get + patch: + description: For a given zone, restart validation or add cloudflare branding for an advanced certificate pack. The former is only a validation operation for a Certificate Pack in a validation_timed_out status. + operationId: certificate-packs-restart-validation-for-advanced-certificate-manager-certificate-pack + parameters: + - in: path + name: certificate_pack_id + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + cloudflare_branding: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCloudflareBranding' + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesAdvancedCertificatePackResponseSingle' + description: Restart Validation for Advanced Certificate Manager Certificate Pack response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + description: A certificate pack with all its properties. + properties: + certificate_authority: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasCertificateAuthority' + certificates: + description: Array of certificates in this pack. + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificatePackCertificate' + type: array + cloudflare_branding: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCloudflareBranding' + dcv_delegation_records: + description: DCV Delegation records for domain validation. + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidationRecord' + readOnly: true + type: array + hosts: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasHosts' + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + primary_certificate: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPrimary' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificatePacksComponentsSchemasStatus' + type: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasType' + validation_errors: + description: Domain validation errors that have been received by the certificate authority (CA). + items: + properties: + message: + description: A domain validation error. + type: string + x-auditable: true + type: object + type: array + validation_method: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidationMethod' + validation_records: + description: Certificates' validation records. + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidationRecord' + type: array + validity_days: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidityDays' + required: + - id + - type + - hosts + - certificates + - status + type: object + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Restart Validation for Advanced Certificate Manager Certificate Pack response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Restart Validation or Update Advanced Certificate Manager Certificate Pack + tags: + - Certificate Packs + x-api-token-group: + - SSL and Certificates Write + x-cfPermissionsRequired: + enum: + - '#ssl:read' + - '#ssl:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ssl + resource_chain: + - certificate_packs + method: edit + /zones/{zone_id}/ssl/recommendation: + get: + deprecated: true + description: Retrieve the SSL/TLS Recommender's recommendation for a zone. + operationId: ssl/-tls-mode-recommendation-ssl/-tls-recommendation + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/cacheApiResponseSingleId' + description: SSL/TLS Recommendation response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheApiResponseCommonFailure' + description: SSL/TLS Recommendation response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: SSL/TLS Recommendation + tags: + - SSL/TLS Mode Recommendation + x-api-token-group: + - Zone Settings Write + - Zone Settings Read + - SSL and Certificates Write + - SSL and Certificates Read + x-cfPermissionsRequired: + enum: + - '#ssl:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stainless-deprecation-message: SSL/TLS Recommender has been decommissioned in favor of Automatic SSL/TLS + x-stackql-sdk: + service: ssl + resource_chain: + - recommendations + method: get + /zones/{zone_id}/ssl/universal/settings: + get: + description: Get Universal SSL Settings for a Zone. + operationId: universal-ssl-settings-for-a-zone-universal-ssl-settings-details + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSslUniversalSettingsResponse' + description: Universal SSL Settings Details response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + enabled: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasEnabled' + type: object + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Universal SSL Settings Details response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Universal SSL Settings Details + tags: + - Universal SSL Settings for a Zone + x-api-token-group: + - SSL and Certificates Write + - SSL and Certificates Read + x-cfPermissionsRequired: + enum: + - '#ssl:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ssl + resource_chain: + - universal + - settings + method: get + patch: + description: Patch Universal SSL Settings for a Zone. + operationId: universal-ssl-settings-for-a-zone-edit-universal-ssl-settings + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesUniversal' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSslUniversalSettingsResponse' + description: Edit Universal SSL Settings response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + enabled: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasEnabled' + type: object + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Edit Universal SSL Settings response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Edit Universal SSL Settings + tags: + - Universal SSL Settings for a Zone + x-api-token-group: + - SSL and Certificates Write + x-cfPermissionsRequired: + enum: + - '#ssl:read' + - '#ssl:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ssl + resource_chain: + - universal + - settings + method: edit + /zones/{zone_id}/ssl/verification: + get: + description: Get SSL Verification Info for a Zone. + operationId: ssl-verification-ssl-verification-details + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: query + name: retry + schema: + description: Immediately retry SSL Verification. + enum: + - true + type: boolean + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSslVerificationResponseCollection' + description: SSL Verification Details response + 4XX: + content: + application/json: + schema: + properties: + result: + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesVerification' + type: array + enum: + - null + errors: + minLength: 1 + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - false + type: boolean + type: object + required: + - success + - errors + - messages + - result + description: SSL Verification Details response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: SSL Verification Details + tags: + - SSL Verification + x-api-token-group: + - 'Access: Mutual TLS Certificates Write' + - 'Access: Mutual TLS Certificates Read' + - SSL and Certificates Write + - SSL and Certificates Read + x-cfPermissionsRequired: + enum: + - '#ssl:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ssl + resource_chain: + - verification + method: get + /zones/{zone_id}/ssl/verification/{certificate_pack_id}: + patch: + description: Edit SSL validation method for a certificate pack. A PATCH request will request an immediate validation check on any certificate, and return the updated status. If a validation method is provided, the validation will be immediately attempted using that method. + operationId: ssl-verification-edit-ssl-certificate-pack-validation-method + parameters: + - in: path + name: certificate_pack_id + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertPackUuid' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesComponentsSchemasValidationMethod' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSslValidationMethodResponseCollection' + description: Edit SSL Certificate Pack Validation Method response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result: + properties: + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidationMethodComponentsSchemasStatus' + validation_method: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidationMethodDefinition' + type: object + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Edit SSL Certificate Pack Validation Method response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Edit SSL Certificate Pack Validation Method + tags: + - SSL Verification + x-api-token-group: + - 'Access: Mutual TLS Certificates Write' + - 'Access: Mutual TLS Certificates Read' + - SSL and Certificates Write + - SSL and Certificates Read + x-cfPermissionsRequired: + enum: + - '#ssl:read' + - '#ssl:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: ssl + resource_chain: + - verification + method: edit +components: + schemas: + cacheApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/cacheMessages' + messages: + example: [] + $ref: '#/components/schemas/cacheMessages' + result: + $ref: '#/components/schemas/cacheResult' + success: + description: Indicates the API call's success or failure. + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + cacheApiResponseSingleId: + properties: + errors: + $ref: '#/components/schemas/cacheMessages' + messages: + $ref: '#/components/schemas/cacheMessages' + result: + $ref: '#/components/schemas/cacheResult' + success: + description: Indicates the API call's success or failure. + example: true + type: boolean + required: + - success + - errors + - messages + - result + type: object + cacheMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + cacheResult: + properties: + editable: + description: Whether this setting can be updated or not. + readOnly: true + type: boolean + id: + example: ssl_automatic_mode + readOnly: true + type: string + modified_on: + description: Last time this setting was modified. + example: '2014-01-01T05:20:00.12345Z' + format: date-time + readOnly: true + type: string + next_scheduled_scan: + description: Next time this zone will be scanned by the Automatic SSL/TLS. + example: '2014-01-01T05:20:00.12345Z' + format: date-time + nullable: true + readOnly: true + type: string + value: + description: Current setting of the automatic SSL/TLS. + enum: + - auto + - custom + example: auto + readOnly: true + type: string + required: + - id + - modified_on + - value + - editable + type: object + identifier: + properties: + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + type: object + enum: + - null + responseInfo: + properties: + code: + minimum: 1000 + type: integer + message: + type: string + documentation_url: + type: string + source: + type: object + properties: + pointer: + type: string + required: + - code + - message + type: object + uniqueItems: true + tlsCertificatesAndHostnamesAdvancedCertificatePackResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificatePack' + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesAdvancedType: + description: Type of certificate pack. + enum: + - advanced + example: advanced + type: string + x-auditable: true + tlsCertificatesAndHostnamesBrandCheck: + description: Certificate Authority is manually reviewing the order. + example: false + type: boolean + x-auditable: true + tlsCertificatesAndHostnamesBundleMethod: + $ref: '#/components/schemas/unnamedSchemaRef16aca57bde2963201c7e6e895436c1c1' + tlsCertificatesAndHostnamesCertPackUuid: + description: Certificate Pack UUID. + example: a77f8bd7-3b47-46b4-a6f1-75cf98109948 + type: string + x-auditable: true + tlsCertificatesAndHostnamesCertificate: + description: The zone's SSL certificate or certificate and the intermediate(s). + example: '-----BEGIN CERTIFICATE----- + + MIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV + + BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX + + aWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF + + MQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50 + + ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB + + CgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1 + + CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB + + KwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5 + + 0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI + + dZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2 + + izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4 + + 9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI + + GKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV + + BAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF + + MAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2 + + 2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP + + Mlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG + + SvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq + + 2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw + + YbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY= + + -----END CERTIFICATE----- + + ' + type: string + tlsCertificatesAndHostnamesCertificateAnalyzeResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + type: object + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesCertificatePack: + description: A certificate pack with all its properties. + properties: + certificate_authority: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasCertificateAuthority' + certificates: + description: Array of certificates in this pack. + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificatePackCertificate' + type: array + cloudflare_branding: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCloudflareBranding' + dcv_delegation_records: + description: DCV Delegation records for domain validation. + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidationRecord' + readOnly: true + type: array + hosts: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasHosts' + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + primary_certificate: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesPrimary' + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificatePacksComponentsSchemasStatus' + type: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasType' + validation_errors: + description: Domain validation errors that have been received by the certificate authority (CA). + items: + properties: + message: + description: A domain validation error. + example: SERVFAIL looking up CAA for app.example.com + type: string + x-auditable: true + type: object + type: array + validation_method: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidationMethod' + validation_records: + description: Certificates' validation records. + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidationRecord' + type: array + validity_days: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidityDays' + required: + - id + - type + - hosts + - certificates + - status + type: object + tlsCertificatesAndHostnamesCertificatePackCertificate: + description: An individual certificate within a certificate pack. + properties: + bundle_method: + description: Certificate bundle method. + example: ubiquitous + type: string + x-auditable: true + expires_on: + description: When the certificate from the authority expires. + example: '2024-01-01T00:00:00Z' + format: date-time + type: string + x-auditable: true + geo_restrictions: + description: Specify the region where your private key can be held locally. + properties: + label: + enum: + - us + - eu + - highest_security + example: us + type: string + x-auditable: true + type: object + hosts: + description: Hostnames covered by this certificate. + example: + - example.com + - '*.example.com' + items: + type: string + type: array + x-auditable: true + id: + description: Certificate identifier. + example: 7e7b8deba8538af625850b7b2530034c + type: string + x-auditable: true + issuer: + description: The certificate authority that issued the certificate. + example: Let's Encrypt + type: string + x-auditable: true + modified_on: + description: When the certificate was last modified. + example: '2014-01-01T05:20:00Z' + format: date-time + type: string + x-auditable: true + readOnly: true + priority: + description: The order/priority in which the certificate will be used. + type: number + x-auditable: true + signature: + description: The type of hash used for the certificate. + example: ECDSAWithSHA256 + type: string + x-auditable: true + status: + description: Certificate status. + example: active + type: string + x-auditable: true + uploaded_on: + description: When the certificate was uploaded to Cloudflare. + example: '2014-01-01T05:20:00Z' + format: date-time + type: string + x-auditable: true + zone_id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + required: + - id + - hosts + - status + type: object + tlsCertificatesAndHostnamesCertificatePackQuotaResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + properties: + advanced: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesQuota' + type: object + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesCertificatePackResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 2000 + type: number + total_pages: + description: The number of total pages in the entire result set. + example: 100 + type: number + type: object + result: + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificatePack' + type: array + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesCertificatePackResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificatePack' + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesCertificatePacksComponentsSchemasStatus: + description: Status of certificate pack. + enum: + - initializing + - pending_validation + - deleted + - pending_issuance + - pending_deployment + - pending_deletion + - pending_expiration + - expired + - active + - initializing_timed_out + - validation_timed_out + - issuance_timed_out + - deployment_timed_out + - deletion_timed_out + - pending_cleanup + - staging_deployment + - staging_active + - deactivating + - inactive + - backup_issued + - holding_deployment + example: initializing + type: string + x-auditable: true + tlsCertificatesAndHostnamesCertificateStatus: + description: Current status of certificate. + enum: + - initializing + - authorizing + - active + - expired + - issuing + - timing_out + - pending_deployment + example: active + type: string + x-auditable: true + tlsCertificatesAndHostnamesCloudflareBranding: + description: Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true. + example: false + type: boolean + x-auditable: true + tlsCertificatesAndHostnamesComponentsSchemasValidationMethod: + properties: + validation_method: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidationMethodDefinition' + required: + - validation_method + type: object + tlsCertificatesAndHostnamesDeleteAdvancedCertificatePackResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + properties: + id: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesIdentifier' + type: object + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesIdentifier: + description: Identifier. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + type: string + x-auditable: true + tlsCertificatesAndHostnamesMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + tlsCertificatesAndHostnamesPrimary: + description: Identifier of the primary certificate in a pack. + example: 7e7b8deba8538af625850b7b2530034c + type: string + x-auditable: true + tlsCertificatesAndHostnamesQuota: + properties: + allocated: + description: Quantity Allocated. + type: integer + x-auditable: true + used: + description: Quantity Used. + type: integer + x-auditable: true + type: object + tlsCertificatesAndHostnamesSchemasCertificateAuthority: + description: Certificate Authority selected for the order. For information on any certificate authority specific details or restrictions [see this page for more details.](https://developers.cloudflare.com/ssl/reference/certificate-authorities) + enum: + - google + - lets_encrypt + - ssl_com + example: lets_encrypt + type: string + x-auditable: true + tlsCertificatesAndHostnamesSchemasEnabled: + description: Disabling Universal SSL removes any currently active Universal SSL certificates for your zone from the edge and prevents any future Universal SSL certificates from being ordered. If there are no advanced certificates or custom certificates uploaded for the domain, visitors will be unable to access the domain over HTTPS. By disabling Universal SSL, you understand that the following Cloudflare settings and preferences will result in visitors being unable to visit your domain unless you have uploaded a custom certificate or purchased an advanced certificate. * HSTS * Always Use HTTPS * Opportunistic Encryption * Onion Routing * Any Page Rules redirecting traffic to HTTPS Similarly, any HTTP redirect to HTTPS at the origin while the Cloudflare proxy is enabled will result in users being unable to visit your site without a valid certificate at Cloudflare's edge. If you do not have a valid custom or advanced certificate at Cloudflare's edge and are unsure if any of the above + Cloudflare settings are enabled, or if any HTTP redirects exist at your origin, we advise leaving Universal SSL enabled for your domain. + example: true + type: boolean + x-auditable: true + tlsCertificatesAndHostnamesSchemasHosts: + description: Comma separated list of valid host names for the certificate packs. Must contain the zone apex, may not contain more than 50 hosts, and may not be empty. + example: + - example.com + - '*.example.com' + - www.example.com + items: + type: string + x-auditable: true + type: array + x-stainless-collection-type: set + x-stainless-terraform-configurability: computed_optional + tlsCertificatesAndHostnamesSchemasSignature: + description: Certificate's signature algorithm. + enum: + - ECDSAWithSHA256 + - SHA1WithRSA + - SHA256WithRSA + type: string + x-auditable: true + tlsCertificatesAndHostnamesSchemasType: + description: Type of certificate pack. + enum: + - mh_custom + - managed_hostname + - sni_custom + - universal + - advanced + - total_tls + - keyless + - legacy_custom + example: universal + type: string + x-auditable: true + tlsCertificatesAndHostnamesSchemasValidationMethod: + description: Validation method in use for a certificate pack order. + enum: + - http + - cname + - txt + example: txt + type: string + x-auditable: true + tlsCertificatesAndHostnamesSslUniversalSettingsResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesUniversal' + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesSslValidationMethodResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + messages: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + properties: + status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidationMethodComponentsSchemasStatus' + validation_method: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesValidationMethodDefinition' + type: object + required: + - success + - errors + - messages + tlsCertificatesAndHostnamesSslVerificationResponseCollection: + properties: + result: + items: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesVerification' + type: array + type: object + tlsCertificatesAndHostnamesUniversal: + properties: + enabled: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasEnabled' + type: object + tlsCertificatesAndHostnamesValidationMethod: + description: Validation Method selected for the order. + enum: + - txt + - http + - email + example: txt + type: string + x-auditable: true + tlsCertificatesAndHostnamesValidationMethodComponentsSchemasStatus: + description: Result status. + example: pending_validation + type: string + x-auditable: true + tlsCertificatesAndHostnamesValidationMethodDefinition: + description: Desired validation method. + enum: + - http + - cname + - txt + - email + example: txt + type: string + x-auditable: true + tlsCertificatesAndHostnamesValidationRecord: + description: Certificate's required validation record. + properties: + cname: + description: The CNAME record hostname for DCV delegation. + example: _acme-challenge.example.com + readOnly: true + type: string + x-auditable: true + cname_target: + description: The CNAME record target value for DCV delegation. + example: dcv.cloudflare.com + readOnly: true + type: string + x-auditable: true + emails: + description: The set of email addresses that the certificate authority (CA) will use to complete domain validation. + example: + - administrator@example.com + - webmaster@example.com + items: + type: string + x-auditable: true + type: array + http_body: + description: The content that the certificate authority (CA) will expect to find at the http_url during the domain validation. + example: ca3-574923932a82475cb8592200f1a2a23d + type: string + http_url: + description: The url that will be checked during domain validation. + example: http://app.example.com/.well-known/pki-validation/ca3-da12a1c25e7b48cf80408c6c1763b8a2.txt + type: string + status: + description: Status of the validation record. + example: pending + readOnly: true + type: string + txt_name: + description: The hostname that the certificate authority (CA) will check for a TXT record during domain validation . + example: _acme-challenge.app.example.com + type: string + x-auditable: true + txt_value: + description: The TXT record that the certificate authority (CA) will check during domain validation. + example: 810b7d5f01154524b961ba0cd578acc2 + type: string + type: object + tlsCertificatesAndHostnamesValidityDays: + description: Validity Days selected for the order. + enum: + - 14 + - 30 + - 90 + - 365 + type: integer + x-auditable: true + tlsCertificatesAndHostnamesVerification: + properties: + brand_check: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesBrandCheck' + cert_pack_uuid: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertPackUuid' + certificate_status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesCertificateStatus' + signature: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasSignature' + validation_method: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesSchemasValidationMethod' + verification_info: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesVerificationInfo' + verification_status: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesVerificationStatus' + verification_type: + $ref: '#/components/schemas/tlsCertificatesAndHostnamesVerificationType' + required: + - certificate_status + type: object + tlsCertificatesAndHostnamesVerificationInfo: + description: Certificate's required verification information. + properties: + record_name: + description: Name of CNAME record. + enum: + - record_name + - http_url + - cname + - txt_name + format: hostname + type: string + x-auditable: true + record_target: + description: Target of CNAME record. + enum: + - record_value + - http_body + - cname_target + - txt_value + format: hostname + type: string + x-auditable: true + type: object + tlsCertificatesAndHostnamesVerificationStatus: + description: Status of the required verification information, omitted if verification status is unknown. + example: true + type: boolean + x-auditable: true + tlsCertificatesAndHostnamesVerificationType: + description: Method of verification. + enum: + - cname + - meta tag + example: cname + type: string + x-auditable: true + unnamedSchemaRef16aca57bde2963201c7e6e895436c1c1: + default: ubiquitous + description: A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it. + enum: + - ubiquitous + - optimal + - force + example: ubiquitous + type: string + x-auditable: true + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + ssl: + id: cloudflare.ssl.ssl + name: ssl + title: Ssl + methods: + create_analyze: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1ssl~1analyze/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + certificate_packs: + id: cloudflare.ssl.certificate_packs + name: certificate_packs + title: Certificate Packs + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1ssl~1certificate_packs/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1ssl~1certificate_packs~1order/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .certificate_authority }}{{ $sep }}"certificate_authority": {{ toJson .certificate_authority }}{{- $sep = "," -}}{{ end }} + + {{- if .cloudflare_branding }}{{ $sep }}"cloudflare_branding": {{ toJson .cloudflare_branding }}{{- $sep = "," -}}{{ end }} + + {{- if .hosts }}{{ $sep }}"hosts": {{ if eq (kindOf .hosts) "string" }}{{ .hosts }}{{ else }}{{ toJson .hosts }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + {{- if .validation_method }}{{ $sep }}"validation_method": {{ toJson .validation_method }}{{- $sep = "," -}}{{ end }} + + {{- if .validity_days }}{{ $sep }}"validity_days": {{ toJson .validity_days }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1ssl~1certificate_packs~1{certificate_pack_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1ssl~1certificate_packs~1{certificate_pack_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1ssl~1certificate_packs~1{certificate_pack_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/certificate_packs/methods/get' + - $ref: '#/components/x-stackQL-resources/certificate_packs/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/certificate_packs/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/certificate_packs/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/certificate_packs/methods/delete' + replace: [] + quota: + id: cloudflare.ssl.quota + name: quota + title: Quota + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1ssl~1certificate_packs~1quota/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/quota/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + recommendations: + id: cloudflare.ssl.recommendations + name: recommendations + title: Recommendations + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1ssl~1recommendation/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/recommendations/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + settings: + id: cloudflare.ssl.settings + name: settings + title: Settings + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1ssl~1universal~1settings/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1ssl~1universal~1settings/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/settings/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/settings/methods/edit' + delete: [] + replace: [] + verification: + id: cloudflare.ssl.verification + name: verification + title: Verification + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1ssl~1verification/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1ssl~1verification~1{certificate_pack_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/verification/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/verification/methods/edit' + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/streams.yaml b/providers/src/cloudflare/v00.00.00000/services/streams.yaml index f1c0d6d1..ccbca083 100644 --- a/providers/src/cloudflare/v00.00.00000/services/streams.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/streams.yaml @@ -4048,6 +4048,43 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allowedOrigins }}{{ $sep }}"allowedOrigins": {{ if eq (kindOf .allowedOrigins) "string" }}{{ .allowedOrigins }}{{ else }}{{ toJson .allowedOrigins }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .clippedFromVideoUID }}{{ $sep }}"clippedFromVideoUID": {{ toJson .clippedFromVideoUID }}{{- $sep = "," -}}{{ end }} + + {{- if .creator }}{{ $sep }}"creator": {{ toJson .creator }}{{- $sep = "," -}}{{ end }} + + {{- if .endTimeSeconds }}{{ $sep }}"endTimeSeconds": {{ toJson .endTimeSeconds }}{{- $sep = "," -}}{{ end }} + + {{- if .input }}{{ $sep }}"input": {{ toJson .input }}{{- $sep = "," -}}{{ end }} + + {{- if .meta }}{{ $sep }}"meta": {{ if eq (kindOf .meta) "string" }}{{ .meta }}{{ else }}{{ toJson .meta }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .requireSignedURLs }}{{ $sep }}"requireSignedURLs": {{ toJson .requireSignedURLs }}{{- $sep = "," -}}{{ end }} + + {{- if .scheduledDeletion }}{{ $sep }}"scheduledDeletion": {{ toJson .scheduledDeletion }}{{- $sep = "," -}}{{ end }} + + {{- if .startTimeSeconds }}{{ $sep }}"startTimeSeconds": {{ toJson .startTimeSeconds }}{{- $sep = "," -}}{{ end }} + + {{- if .thumbnailTimestampPct }}{{ $sep }}"thumbnailTimestampPct": {{ toJson .thumbnailTimestampPct }}{{- $sep = "," -}}{{ end }} + + {{- if .url }}{{ $sep }}"url": {{ toJson .url }}{{- $sep = "," -}}{{ end }} + + {{- if .watermark }}{{ $sep }}"watermark": {{ if eq (kindOf .watermark) "string" }}{{ .watermark }}{{ else }}{{ toJson .watermark }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' copy: config: requestBodyTranslate: @@ -4057,6 +4094,37 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allowedOrigins }}{{ $sep }}"allowedOrigins": {{ if eq (kindOf .allowedOrigins) "string" }}{{ .allowedOrigins }}{{ else }}{{ toJson .allowedOrigins }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .creator }}{{ $sep }}"creator": {{ toJson .creator }}{{- $sep = "," -}}{{ end }} + + {{- if .input }}{{ $sep }}"input": {{ toJson .input }}{{- $sep = "," -}}{{ end }} + + {{- if .meta }}{{ $sep }}"meta": {{ if eq (kindOf .meta) "string" }}{{ .meta }}{{ else }}{{ toJson .meta }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .requireSignedURLs }}{{ $sep }}"requireSignedURLs": {{ toJson .requireSignedURLs }}{{- $sep = "," -}}{{ end }} + + {{- if .scheduledDeletion }}{{ $sep }}"scheduledDeletion": {{ toJson .scheduledDeletion }}{{- $sep = "," -}}{{ end }} + + {{- if .thumbnailTimestampPct }}{{ $sep }}"thumbnailTimestampPct": {{ toJson .thumbnailTimestampPct }}{{- $sep = "," -}}{{ end }} + + {{- if .url }}{{ $sep }}"url": {{ toJson .url }}{{- $sep = "," -}}{{ end }} + + {{- if .watermark }}{{ $sep }}"watermark": {{ if eq (kindOf .watermark) "string" }}{{ .watermark }}{{ else }}{{ toJson .watermark }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' create_direct_upload: config: requestBodyTranslate: @@ -4066,6 +4134,35 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allowedOrigins }}{{ $sep }}"allowedOrigins": {{ if eq (kindOf .allowedOrigins) "string" }}{{ .allowedOrigins }}{{ else }}{{ toJson .allowedOrigins }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .creator }}{{ $sep }}"creator": {{ toJson .creator }}{{- $sep = "," -}}{{ end }} + + {{- if .expiry }}{{ $sep }}"expiry": {{ toJson .expiry }}{{- $sep = "," -}}{{ end }} + + {{- if .maxDurationSeconds }}{{ $sep }}"maxDurationSeconds": {{ toJson .maxDurationSeconds }}{{- $sep = "," -}}{{ end }} + + {{- if .meta }}{{ $sep }}"meta": {{ if eq (kindOf .meta) "string" }}{{ .meta }}{{ else }}{{ toJson .meta }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .requireSignedURLs }}{{ $sep }}"requireSignedURLs": {{ toJson .requireSignedURLs }}{{- $sep = "," -}}{{ end }} + + {{- if .scheduledDeletion }}{{ $sep }}"scheduledDeletion": {{ toJson .scheduledDeletion }}{{- $sep = "," -}}{{ end }} + + {{- if .thumbnailTimestampPct }}{{ $sep }}"thumbnailTimestampPct": {{ toJson .thumbnailTimestampPct }}{{- $sep = "," -}}{{ end }} + + {{- if .watermark }}{{ $sep }}"watermark": {{ if eq (kindOf .watermark) "string" }}{{ .watermark }}{{ else }}{{ toJson .watermark }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1stream~1{identifier}/delete' @@ -4088,6 +4185,37 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allowedOrigins }}{{ $sep }}"allowedOrigins": {{ if eq (kindOf .allowedOrigins) "string" }}{{ .allowedOrigins }}{{ else }}{{ toJson .allowedOrigins }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .creator }}{{ $sep }}"creator": {{ toJson .creator }}{{- $sep = "," -}}{{ end }} + + {{- if .maxDurationSeconds }}{{ $sep }}"maxDurationSeconds": {{ toJson .maxDurationSeconds }}{{- $sep = "," -}}{{ end }} + + {{- if .meta }}{{ $sep }}"meta": {{ if eq (kindOf .meta) "string" }}{{ .meta }}{{ else }}{{ toJson .meta }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .publicDetails }}{{ $sep }}"publicDetails": {{ if eq (kindOf .publicDetails) "string" }}{{ .publicDetails }}{{ else }}{{ toJson .publicDetails }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .requireSignedURLs }}{{ $sep }}"requireSignedURLs": {{ toJson .requireSignedURLs }}{{- $sep = "," -}}{{ end }} + + {{- if .scheduledDeletion }}{{ $sep }}"scheduledDeletion": {{ toJson .scheduledDeletion }}{{- $sep = "," -}}{{ end }} + + {{- if .thumbnailTimestampPct }}{{ $sep }}"thumbnailTimestampPct": {{ toJson .thumbnailTimestampPct }}{{- $sep = "," -}}{{ end }} + + {{- if .uid }}{{ $sep }}"uid": {{ toJson .uid }}{{- $sep = "," -}}{{ end }} + + {{- if .uploadExpiry }}{{ $sep }}"uploadExpiry": {{ toJson .uploadExpiry }}{{- $sep = "," -}}{{ end }} + + } + + ' create_token: config: requestBodyTranslate: @@ -4097,6 +4225,31 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .accessRules }}{{ $sep }}"accessRules": {{ if eq (kindOf .accessRules) "string" }}{{ .accessRules }}{{ else }}{{ toJson .accessRules }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .downloadable }}{{ $sep }}"downloadable": {{ toJson .downloadable }}{{- $sep = "," -}}{{ end }} + + {{- if .exp }}{{ $sep }}"exp": {{ toJson .exp }}{{- $sep = "," -}}{{ end }} + + {{- if .flags }}{{ $sep }}"flags": {{ if eq (kindOf .flags) "string" }}{{ .flags }}{{ else }}{{ toJson .flags }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .id }}{{ $sep }}"id": {{ toJson .id }}{{- $sep = "," -}}{{ end }} + + {{- if .nbf }}{{ $sep }}"nbf": {{ toJson .nbf }}{{- $sep = "," -}}{{ end }} + + {{- if .pem }}{{ $sep }}"pem": {{ toJson .pem }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/streams/methods/get' @@ -4165,6 +4318,27 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .defaultCreator }}{{ $sep }}"defaultCreator": {{ toJson .defaultCreator }}{{- $sep = "," -}}{{ end }} + + {{- if .deleteRecordingAfterDays }}{{ $sep }}"deleteRecordingAfterDays": {{ toJson .deleteRecordingAfterDays }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .meta }}{{ $sep }}"meta": {{ if eq (kindOf .meta) "string" }}{{ .meta }}{{ else }}{{ toJson .meta }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .recording }}{{ $sep }}"recording": {{ if eq (kindOf .recording) "string" }}{{ .recording }}{{ else }}{{ toJson .recording }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1stream~1live_inputs~1{live_input_identifier}/delete' @@ -4187,6 +4361,27 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .defaultCreator }}{{ $sep }}"defaultCreator": {{ toJson .defaultCreator }}{{- $sep = "," -}}{{ end }} + + {{- if .deleteRecordingAfterDays }}{{ $sep }}"deleteRecordingAfterDays": {{ toJson .deleteRecordingAfterDays }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .meta }}{{ $sep }}"meta": {{ if eq (kindOf .meta) "string" }}{{ .meta }}{{ else }}{{ toJson .meta }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .recording }}{{ $sep }}"recording": {{ if eq (kindOf .recording) "string" }}{{ .recording }}{{ else }}{{ toJson .recording }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' disable: operation: $ref: '#/paths/~1accounts~1{account_id}~1stream~1live_inputs~1{live_input_identifier}~1disable/post' diff --git a/providers/src/cloudflare/v00.00.00000/services/token_validation.yaml b/providers/src/cloudflare/v00.00.00000/services/token_validation.yaml index b5548993..757c6d02 100644 --- a/providers/src/cloudflare/v00.00.00000/services/token_validation.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/token_validation.yaml @@ -1,1908 +1,1921 @@ -openapi: 3.0.3 -info: - title: token_validation API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /zones/{zone_id}/token_validation/config: - get: - description: Lists all token validation configurations for this zone - externalDocs: - description: Learn more about JSON Web Tokens Validation. - url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ - operationId: token-validation-config-list - parameters: - - description: Page number of paginated results. - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - description: Maximum number of results per page. - in: query - name: per_page - schema: - default: 20 - maximum: 50 - minimum: 5 - type: integer - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: '#/components/schemas/apiShieldTokenConfiguration' - type: array - required: - - success - - errors - - messages - - result - description: OK - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List token validation configurations - tags: - - Token Validation Token Configuration - x-api-token-group: - - Account API Gateway - - Account API Gateway Read - - Domain API Gateway - - Domain API Gateway Read - x-stackql-sdk: - service: token_validation - resource_chain: - - configuration - method: list - post: - description: Create a new Token Validation configuration - externalDocs: - description: Learn more about JSON Web Tokens Validation. - url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ - operationId: token-validation-config-create - requestBody: - content: - application/json: - schema: - properties: - credentials: - $ref: '#/components/schemas/apiShieldCredentials' - description: - $ref: '#/components/schemas/apiShieldDescription' - title: - $ref: '#/components/schemas/apiShieldTitle' - token_sources: - $ref: '#/components/schemas/apiShieldTokenSources' - token_type: - $ref: '#/components/schemas/apiShieldTokenType' - required: - - title - - description - - token_sources - - token_type - - credentials - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/apiShieldTokenConfiguration' - required: - - success - - errors - - messages - - result - type: object - description: OK - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a new Token Validation configuration - tags: - - Token Validation Token Configuration - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - x-stackql-sdk: - service: token_validation - resource_chain: - - configuration - method: create - /zones/{zone_id}/token_validation/config/{config_id}: - delete: - description: Delete Token Configuration - externalDocs: - description: Learn more about JSON Web Tokens Validation. - url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ - operationId: token-validation-config-delete - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - properties: - id: - $ref: '#/components/schemas/apiShieldSchemasUuid' - type: object - required: - - success - - errors - - messages - - result - type: object - description: OK - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Token Configuration - tags: - - Token Validation Token Configuration - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: Token Configuration ID - in: path - name: config_id - schema: - $ref: '#/components/schemas/apiShieldSchemasUuid' - required: true - x-stackql-sdk: - service: token_validation - resource_chain: - - configuration - method: delete - get: - description: Get a single Token Configuration - externalDocs: - description: Learn more about JSON Web Tokens Validation. - url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ - operationId: token-validation-config-get - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/apiShieldTokenConfiguration' - required: - - success - - errors - - messages - - result - type: object - description: OK - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get a single Token Configuration - tags: - - Token Validation Token Configuration - x-api-token-group: - - Account API Gateway - - Account API Gateway Read - - Domain API Gateway - - Domain API Gateway Read - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: Token Configuration ID - in: path - name: config_id - schema: - $ref: '#/components/schemas/apiShieldSchemasUuid' - required: true - x-stackql-sdk: - service: token_validation - resource_chain: - - configuration - method: get - patch: - description: Edit fields of an existing Token Configuration - externalDocs: - description: Learn more about JSON Web Tokens Validation. - url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ - operationId: token-validation-config-edit - requestBody: - content: - application/json: - schema: - properties: - description: - $ref: '#/components/schemas/apiShieldDescription' - title: - $ref: '#/components/schemas/apiShieldTitle' - token_sources: - $ref: '#/components/schemas/apiShieldTokenSources' - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - properties: - description: - $ref: '#/components/schemas/apiShieldDescription' - id: - $ref: '#/components/schemas/apiShieldSchemasUuid' - title: - $ref: '#/components/schemas/apiShieldTitle' - token_sources: - $ref: '#/components/schemas/apiShieldTokenSources' - type: object - required: - - success - - errors - - messages - - result - type: object - description: OK - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Edit an existing Token Configuration - tags: - - Token Validation Token Configuration - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: Token Configuration ID - in: path - name: config_id - schema: - $ref: '#/components/schemas/apiShieldSchemasUuid' - required: true - x-stackql-sdk: - service: token_validation - resource_chain: - - configuration - method: edit - /zones/{zone_id}/token_validation/config/{config_id}/credentials: - put: - description: Update Token Configuration credentials - externalDocs: - description: Learn more about JSON Web Tokens Validation. - url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ - operationId: token-validation-config-credentials-update - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldCredentials' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - keys: - items: - $ref: '#/components/schemas/apiShieldCredentialsJWTKey' - maxItems: 4 - minItems: 1 - type: array - required: - - success - - errors - - messages - - keys - type: object - description: OK - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Token Configuration credentials - tags: - - Token Validation Token Configuration - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: Token Configuration ID - in: path - name: config_id - schema: - $ref: '#/components/schemas/apiShieldSchemasUuid' - required: true - x-stackql-sdk: - service: token_validation - resource_chain: - - configuration - - credentials - method: update - /zones/{zone_id}/token_validation/rules: - get: - description: List token validation rules - externalDocs: - description: Learn more about JSON Web Tokens Validation. - url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ - operationId: token-validation-rules-list - parameters: - - description: Maximum number of results per page. - in: query - name: per_page - schema: - default: 20 - maximum: 50 - minimum: 5 - type: integer - - description: Page number of paginated results. - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - description: Select rules using any of these token configurations. - in: query - name: token_configuration - schema: - items: - $ref: '#/components/schemas/apiShieldSchemasUuid' - type: array - explode: true - - in: query - name: action - schema: - $ref: '#/components/schemas/apiShieldAction' - - in: query - name: enabled - schema: - $ref: '#/components/schemas/apiShieldEnabled' - - description: Select rules with these IDs. - in: query - name: id - schema: - $ref: '#/components/schemas/apiShieldSchemasUuid' - - description: Select rules with these IDs. - in: query - name: rule_id - schema: - $ref: '#/components/schemas/apiShieldSchemasUuid' - - description: Select rules with this host in `include`. - in: query - name: host - schema: - $ref: '#/components/schemas/apiShieldHost' - - description: Select rules with this host in `include`. - in: query - name: hostname - schema: - $ref: '#/components/schemas/apiShieldHost' - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: '#/components/schemas/apiShieldRule' - type: array - required: - - success - - errors - - messages - - result - description: OK - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List token validation rules - tags: - - Token Validation Token Rules - x-api-token-group: - - Account API Gateway - - Account API Gateway Read - - Domain API Gateway - - Domain API Gateway Read - x-stackql-sdk: - service: token_validation - resource_chain: - - rules - method: list - post: - description: Create a token validation rule. - externalDocs: - description: Learn more about JSON Web Tokens Validation. - url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ - operationId: token-validation-rules-create - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldCreateSingleRuleRequest' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/apiShieldRule' - required: - - success - - errors - - messages - - result - description: OK - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a token validation rule - tags: - - Token Validation Token Rules - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - x-stackql-sdk: - service: token_validation - resource_chain: - - rules - method: create - /zones/{zone_id}/token_validation/rules/bulk: - patch: - description: >- - Edit token validation rules. A request can update multiple Token - Validation Rules. Rules can be re-ordered using the `position` field. - Returns all updated rules. - externalDocs: - description: Learn more about JSON Web Tokens Validation. - url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ - operationId: token-validation-rules-bulk-edit - requestBody: - content: - application/json: - schema: - items: - properties: - id: - description: Rule ID this patch applies to - format: uuid - maxLength: 36 - type: string - x-auditable: true - action: - $ref: '#/components/schemas/apiShieldAction' - description: - $ref: '#/components/schemas/apiShieldSchemasDescription' - enabled: - $ref: '#/components/schemas/apiShieldEnabled' - expression: - $ref: '#/components/schemas/apiShieldExpression' - selector: - $ref: '#/components/schemas/apiShieldSelector' - title: - $ref: '#/components/schemas/apiShieldSchemasTitle' - position: - $ref: '#/components/schemas/apiShieldPosition' - required: - - id - type: object - type: array - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: '#/components/schemas/apiShieldRule' - type: array - required: - - success - - errors - - messages - - result - description: OK - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Bulk edit token validation rules - tags: - - Token Validation Token Rules - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - post: - description: >- - Create zone token validation rules. A request can create multiple Token - Validation Rules. - externalDocs: - description: Learn more about JSON Web Tokens Validation. - url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ - operationId: token-validation-rules-bulk-create - requestBody: - content: - application/json: - schema: - items: - $ref: '#/components/schemas/apiShieldCreateSingleRuleRequest' - type: array - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: '#/components/schemas/apiShieldRule' - type: array - required: - - success - - errors - - messages - - result - description: OK - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Bulk create token validation rules - tags: - - Token Validation Token Rules - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - /zones/{zone_id}/token_validation/rules/preview: - post: - description: >- - Preview operations covered by a Token Validation rule. The API will - return all operations on a zone annotated with an additional `state` - field. Operations with an `included` `state` will be covered by a Token - Validation Rule. - externalDocs: - description: Learn more about JSON Web Tokens Validation. - url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ - operationId: token-validation-rules-preview - parameters: - - description: Maximum number of results per page. - in: query - name: per_page - schema: - default: 20 - maximum: 50 - minimum: 5 - type: integer - - description: Page number of paginated results. - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - in: query - name: state - schema: - items: - $ref: '#/components/schemas/apiShieldSelectorOperationState' - type: array - explode: true - - description: Filter operations by host. - in: query - name: host - schema: - items: - $ref: '#/components/schemas/apiShieldHost' - type: array - explode: true - - description: Filter operations by host. - in: query - name: hostname - schema: - items: - $ref: '#/components/schemas/apiShieldHost' - type: array - explode: true - - description: Filter operations by method. - in: query - name: method - schema: - items: - $ref: '#/components/schemas/apiShieldMethod' - type: array - explode: true - - description: Filter operations by endpoint. Allows substring matching. - in: query - name: endpoint - schema: - items: - $ref: '#/components/schemas/apiShieldEndpoint' - type: array - explode: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldSelector' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - properties: - available_hosts: - description: All hostnames on zone used by operations - items: - $ref: '#/components/schemas/apiShieldHost' - type: array - uniqueItems: true - excluded: - description: Number of operations with `excluded` `state` - type: integer - x-auditable: true - ignored: - description: Number of operations with `ignored` `state` - type: integer - x-auditable: true - included: - description: Number of operations with `included` `state` - type: integer - x-auditable: true - operations: - items: - properties: - endpoint: - $ref: '#/components/schemas/apiShieldEndpoint' - host: - $ref: '#/components/schemas/apiShieldHost' - last_updated: - $ref: '#/components/schemas/apiShieldSchemasTimestamp' - method: - $ref: '#/components/schemas/apiShieldMethod' - operation_id: - $ref: '#/components/schemas/apiShieldSchemasUuid' - state: - $ref: >- - #/components/schemas/apiShieldSelectorOperationState - type: object - type: array - selected_hosts: - description: Hostnames of `included` operations - items: - $ref: '#/components/schemas/apiShieldHost' - type: array - uniqueItems: true - total: - description: Number of operations on zone - type: integer - x-auditable: true - type: object - required: - - success - - errors - - messages - - result - description: OK - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Preview operations covered by a Token Validation rule - tags: - - Token Validation Token Rules - x-api-token-group: - - Account API Gateway - - Account API Gateway Read - - Domain API Gateway - - Domain API Gateway Read - /zones/{zone_id}/token_validation/rules/{rule_id}: - delete: - description: Delete a zone token validation rule. - externalDocs: - description: Learn more about JSON Web Tokens Validation. - url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ - operationId: token-validation-rules-delete - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseSingleObj' - description: OK - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete a zone token validation rule - tags: - - Token Validation Token Rules - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - x-stackql-sdk: - service: token_validation - resource_chain: - - rules - method: delete - get: - description: Get a zone token validation rule. - externalDocs: - description: Learn more about JSON Web Tokens Validation. - url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ - operationId: token-validation-rules-get - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/apiShieldRule' - required: - - success - - errors - - messages - - result - type: object - description: OK - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get a zone token validation rule - tags: - - Token Validation Token Rules - x-api-token-group: - - Account API Gateway - - Account API Gateway Read - - Domain API Gateway - - Domain API Gateway Read - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - x-stackql-sdk: - service: token_validation - resource_chain: - - rules - method: get - patch: - description: Edit a zone token validation rule. - externalDocs: - description: Learn more about JSON Web Tokens Validation. - url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ - operationId: token-validation-rules-edit - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldEditSingleRuleRequest' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/apiShieldRule' - required: - - success - - errors - - messages - - result - description: OK - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' - description: Failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Edit a zone token validation rule - tags: - - Token Validation Token Rules - x-api-token-group: - - Account API Gateway - - Domain API Gateway - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - x-stackql-sdk: - service: token_validation - resource_chain: - - rules - method: edit -components: - schemas: - apiShieldAction: - description: >- - Action to take on requests that match operations included in `selector` - and fail `expression`. - enum: - - log - - block - example: log - type: string - x-auditable: true - apiShieldApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/apiShieldMessages' - messages: - example: [] - $ref: '#/components/schemas/apiShieldMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - apiShieldApiResponseSingleObj: - properties: - errors: - $ref: '#/components/schemas/apiShieldMessages' - messages: - $ref: '#/components/schemas/apiShieldMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - type: object - required: - - success - - errors - - messages - type: object - apiShieldCreateSingleRuleRequest: - description: >- - A Token Validation rule that can enforce security policies using JWT - Tokens. - type: object - $ref: '#/components/schemas/apiShieldRuleProperties' - apiShieldCredentials: - properties: - keys: - items: - $ref: '#/components/schemas/apiShieldCredentialsJWTKey' - maxItems: 4 - minItems: 1 - type: array - required: - - keys - type: object - apiShieldCredentialsJWTKey: - description: JSON representation of a JWKS key. - example: - alg: ES256 - crv: P-256 - kid: 38013f13-c266-4eec-a72a-92ec92779f21 - kty: EC - x: KN53JRwN3wCjm2o39bvZUX2VdrsHzS8pxOAGjm8m7EQ - 'y': lnkkzIxaveggz-HFhcMWW15nxvOj0Z_uQsXbpK0GFcY - type: object - properties: - kid: - description: Key ID - type: string - x-auditable: true - alg: - description: Algorithm - enum: - - RS256 - - RS384 - - RS512 - - PS256 - - PS384 - - PS512 - type: string - x-auditable: true - e: - description: RSA exponent - type: string - x-auditable: false - kty: - description: Key Type - enum: - - RSA - type: string - x-auditable: true - 'n': - description: RSA modulus - type: string - x-auditable: false - x: - description: X EC coordinate - type: string - x-auditable: false - 'y': - description: Y EC coordinate - type: string - x-auditable: false - crv: - description: Curve - enum: - - P-256 - type: string - x-auditable: true - required: - - alg - - kid - - kty - apiShieldDescription: - example: Long description for Token Validation Configuration - maxLength: 500 - type: string - x-auditable: true - apiShieldEditSingleRuleRequest: - properties: - action: - $ref: '#/components/schemas/apiShieldAction' - description: - $ref: '#/components/schemas/apiShieldSchemasDescription' - enabled: - $ref: '#/components/schemas/apiShieldEnabled' - expression: - $ref: '#/components/schemas/apiShieldExpression' - selector: - $ref: '#/components/schemas/apiShieldSelector' - title: - $ref: '#/components/schemas/apiShieldSchemasTitle' - position: - $ref: '#/components/schemas/apiShieldPosition' - type: object - apiShieldEnabled: - description: Toggle rule on or off. - example: true - type: boolean - x-auditable: true - apiShieldEndpoint: - description: >- - The endpoint which can contain path parameter templates in curly braces, - each will be replaced from left to right with {varN}, starting with - {var1}, during insertion. This will further be Cloudflare-normalized - upon insertion. See: - https://developers.cloudflare.com/rules/normalization/how-it-works/. - example: /api/v1/users/{var1} - format: uri-template - maxLength: 4096 - type: string - x-auditable: true - apiShieldExpression: - description: >- - Rule expression. Requests that fail to match this expression will be - subject to `action`. For details on expressions, see the [Cloudflare - Docs](https://developers.cloudflare.com/api-shield/security/jwt-validation/). - example: >- - is_jwt_valid("52973293-cb04-4a97-8f55-e7d2ad1107dd") or - is_jwt_valid("46eab8d1-6376-45e3-968f-2c649d77d423") - type: string - x-auditable: true - apiShieldHost: - description: RFC3986-compliant host. - example: www.example.com - format: hostname - maxLength: 255 - type: string - x-auditable: true - apiShieldMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - apiShieldMethod: - description: The HTTP method used to access the endpoint. - enum: - - GET - - POST - - HEAD - - OPTIONS - - PUT - - DELETE - - CONNECT - - PATCH - - TRACE - example: GET - type: string - x-auditable: true - apiShieldPosition: - description: Update rule order among zone rules. - type: object - writeOnly: true - properties: - index: - description: Move rule to this position - example: 2 - minimum: 1 - type: integer - x-auditable: true - before: - description: Move rule to before rule with this ID. - example: 0d9bf70c-92e1-4bb3-9411-34a3bcc59003 - format: uuid - maxLength: 36 - type: string - x-auditable: true - after: - description: Move rule to after rule with this ID. - example: 0d9bf70c-92e1-4bb3-9411-34a3bcc59003 - format: uuid - maxLength: 36 - type: string - x-auditable: true - required: - - index - apiShieldRule: - description: >- - A Token Validation rule that can enforce security policies using JWT - Tokens. - properties: - action: - $ref: '#/components/schemas/apiShieldAction' - created_at: - $ref: '#/components/schemas/apiShieldSchemasTimestamp' - readOnly: true - description: - $ref: '#/components/schemas/apiShieldSchemasDescription' - enabled: - $ref: '#/components/schemas/apiShieldEnabled' - expression: - $ref: '#/components/schemas/apiShieldExpression' - id: - $ref: '#/components/schemas/apiShieldSchemasUuid' - last_updated: - $ref: '#/components/schemas/apiShieldSchemasTimestamp' - selector: - $ref: '#/components/schemas/apiShieldSelector' - title: - $ref: '#/components/schemas/apiShieldSchemasTitle' - required: - - title - - description - - action - - enabled - - expression - - selector - type: object - apiShieldRuleProperties: - properties: - action: - $ref: '#/components/schemas/apiShieldAction' - description: - $ref: '#/components/schemas/apiShieldSchemasDescription' - enabled: - $ref: '#/components/schemas/apiShieldEnabled' - expression: - $ref: '#/components/schemas/apiShieldExpression' - selector: - $ref: '#/components/schemas/apiShieldSelector' - title: - $ref: '#/components/schemas/apiShieldSchemasTitle' - type: object - apiShieldSchemasDescription: - description: A human-readable description that gives more details than `title`. - example: Long description for Token Validation Rule - maxLength: 500 - type: string - x-auditable: true - apiShieldSchemasTimestamp: - $ref: '#/components/schemas/apiShieldTimestamp' - readOnly: true - type: string - x-auditable: true - apiShieldSchemasTitle: - description: A human-readable name for the rule. - example: Example Token Validation Rule - maxLength: 50 - type: string - x-auditable: true - apiShieldSchemasUuid: - minLength: 36 - type: string - x-auditable: true - $ref: '#/components/schemas/apiShieldUuid' - apiShieldSelector: - description: >- - Select operations covered by this rule. For details on selectors, see - the [Cloudflare - Docs](https://developers.cloudflare.com/api-shield/security/jwt-validation/). - properties: - exclude: - description: Ignore operations that were otherwise included by `include`. - items: - $ref: '#/components/schemas/apiShieldSelectorExclude' - nullable: true - type: array - include: - description: Select all matching operations. - items: - $ref: '#/components/schemas/apiShieldSelectorInclude' - nullable: true - type: array - type: object - apiShieldSelectorExclude: - properties: - operation_ids: - description: Excluded operation IDs. - example: - - f9c5615e-fe15-48ce-bec6-cfc1946f1bec - - 56828eae-035a-4396-ba07-51c66d680a04 - items: - $ref: '#/components/schemas/apiShieldSchemasUuid' - type: array - type: object - apiShieldSelectorInclude: - properties: - host: - description: Included hostnames. - example: - - v1.example.com - - v2.example.com - items: - $ref: '#/components/schemas/apiShieldHost' - type: array - type: object - apiShieldSelectorOperationState: - description: >- - Details how `selector` interacted with an operation: - `included` - operations are included by `selector` and will be covered by the Token - Validation Rule - `excluded` operations are excluded by `selector` and - will not be covered by the Token Validation Rule - `ignored` operations - are not included by `selector` and will not be covered by the Token - Validation Rule - enum: - - included - - excluded - - ignored - example: included - type: string - x-auditable: true - apiShieldTimestamp: - example: '2014-01-01T05:20:00.12345Z' - format: date-time - type: string - x-auditable: true - apiShieldTitle: - example: Example Token Validation Configuration - maxLength: 50 - type: string - x-auditable: true - apiShieldTokenConfiguration: - properties: - created_at: - $ref: '#/components/schemas/apiShieldSchemasTimestamp' - readOnly: true - credentials: - $ref: '#/components/schemas/apiShieldCredentials' - description: - $ref: '#/components/schemas/apiShieldDescription' - id: - $ref: '#/components/schemas/apiShieldSchemasUuid' - last_updated: - $ref: '#/components/schemas/apiShieldSchemasTimestamp' - title: - $ref: '#/components/schemas/apiShieldTitle' - token_sources: - $ref: '#/components/schemas/apiShieldTokenSources' - token_type: - $ref: '#/components/schemas/apiShieldTokenType' - required: - - id - - title - - description - - token_sources - - token_type - - credentials - - created_at - - last_updated - type: object - apiShieldTokenSources: - example: - - http.request.headers["x-auth"][0] - - http.request.cookies["Authorization"][0] - items: - type: string - description: HTTP request header (must be lowercase) - example: http.request.headers["x-auth"][0] - maxItems: 4 - minItems: 1 - type: array - apiShieldTokenType: - enum: - - JWT - example: JWT - type: string - x-auditable: true - apiShieldUuid: - description: UUID. - example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 - maxLength: 36 - type: string - x-auditable: true - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - configuration: - id: cloudflare.token_validation.configuration - name: configuration - title: Configuration - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1token_validation~1config/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1token_validation~1config/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1token_validation~1config~1{config_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1token_validation~1config~1{config_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1token_validation~1config~1{config_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/configuration/methods/get' - - $ref: '#/components/x-stackQL-resources/configuration/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/configuration/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/configuration/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/configuration/methods/delete' - replace: [] - token_validation: - id: cloudflare.token_validation.token_validation - name: token_validation - title: Token Validation - methods: - update_credentials: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1token_validation~1config~1{config_id}~1credentials/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] - rules: - id: cloudflare.token_validation.rules - name: rules - title: Rules - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1token_validation~1rules/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1token_validation~1rules/post' - response: - mediaType: application/json - openAPIDocKey: '200' - preview: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1token_validation~1rules~1preview/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1token_validation~1rules~1{rule_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1token_validation~1rules~1{rule_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1token_validation~1rules~1{rule_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/rules/methods/get' - - $ref: '#/components/x-stackQL-resources/rules/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/rules/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/rules/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/rules/methods/delete' - replace: [] - bulk: - id: cloudflare.token_validation.bulk - name: bulk - title: Bulk - methods: - token_validation_rules_bulk_edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1token_validation~1rules~1bulk/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - token_validation_rules_bulk_create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1token_validation~1rules~1bulk/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/bulk/methods/token_validation_rules_bulk_create - update: - - $ref: >- - #/components/x-stackQL-resources/bulk/methods/token_validation_rules_bulk_edit - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: token_validation API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /zones/{zone_id}/token_validation/config: + get: + description: Lists all token validation configurations for this zone + externalDocs: + description: Learn more about JSON Web Tokens Validation. + url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ + operationId: token-validation-config-list + parameters: + - description: Page number of paginated results. + in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - description: Maximum number of results per page. + in: query + name: per_page + schema: + default: 20 + maximum: 50 + minimum: 5 + type: integer + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/apiShieldTokenConfiguration' + type: array + required: + - success + - errors + - messages + - result + description: OK + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List token validation configurations + tags: + - Token Validation Token Configuration + x-api-token-group: + - Account API Gateway + - Account API Gateway Read + - Domain API Gateway + - Domain API Gateway Read + x-stackql-sdk: + service: token_validation + resource_chain: + - configuration + method: list + post: + description: Create a new Token Validation configuration + externalDocs: + description: Learn more about JSON Web Tokens Validation. + url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ + operationId: token-validation-config-create + requestBody: + content: + application/json: + schema: + properties: + credentials: + $ref: '#/components/schemas/apiShieldCredentials' + description: + $ref: '#/components/schemas/apiShieldDescription' + title: + $ref: '#/components/schemas/apiShieldTitle' + token_sources: + $ref: '#/components/schemas/apiShieldTokenSources' + token_type: + $ref: '#/components/schemas/apiShieldTokenType' + required: + - title + - description + - token_sources + - token_type + - credentials + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/apiShieldTokenConfiguration' + required: + - success + - errors + - messages + - result + type: object + description: OK + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a new Token Validation configuration + tags: + - Token Validation Token Configuration + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + x-stackql-sdk: + service: token_validation + resource_chain: + - configuration + method: create + /zones/{zone_id}/token_validation/config/{config_id}: + delete: + description: Delete Token Configuration + externalDocs: + description: Learn more about JSON Web Tokens Validation. + url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ + operationId: token-validation-config-delete + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + properties: + id: + $ref: '#/components/schemas/apiShieldSchemasUuid' + type: object + required: + - success + - errors + - messages + - result + type: object + description: OK + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Token Configuration + tags: + - Token Validation Token Configuration + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Token Configuration ID + in: path + name: config_id + schema: + $ref: '#/components/schemas/apiShieldSchemasUuid' + required: true + x-stackql-sdk: + service: token_validation + resource_chain: + - configuration + method: delete + get: + description: Get a single Token Configuration + externalDocs: + description: Learn more about JSON Web Tokens Validation. + url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ + operationId: token-validation-config-get + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/apiShieldTokenConfiguration' + required: + - success + - errors + - messages + - result + type: object + description: OK + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get a single Token Configuration + tags: + - Token Validation Token Configuration + x-api-token-group: + - Account API Gateway + - Account API Gateway Read + - Domain API Gateway + - Domain API Gateway Read + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Token Configuration ID + in: path + name: config_id + schema: + $ref: '#/components/schemas/apiShieldSchemasUuid' + required: true + x-stackql-sdk: + service: token_validation + resource_chain: + - configuration + method: get + patch: + description: Edit fields of an existing Token Configuration + externalDocs: + description: Learn more about JSON Web Tokens Validation. + url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ + operationId: token-validation-config-edit + requestBody: + content: + application/json: + schema: + properties: + description: + $ref: '#/components/schemas/apiShieldDescription' + title: + $ref: '#/components/schemas/apiShieldTitle' + token_sources: + $ref: '#/components/schemas/apiShieldTokenSources' + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + properties: + description: + $ref: '#/components/schemas/apiShieldDescription' + id: + $ref: '#/components/schemas/apiShieldSchemasUuid' + title: + $ref: '#/components/schemas/apiShieldTitle' + token_sources: + $ref: '#/components/schemas/apiShieldTokenSources' + type: object + required: + - success + - errors + - messages + - result + type: object + description: OK + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Edit an existing Token Configuration + tags: + - Token Validation Token Configuration + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Token Configuration ID + in: path + name: config_id + schema: + $ref: '#/components/schemas/apiShieldSchemasUuid' + required: true + x-stackql-sdk: + service: token_validation + resource_chain: + - configuration + method: edit + /zones/{zone_id}/token_validation/config/{config_id}/credentials: + put: + description: Update Token Configuration credentials + externalDocs: + description: Learn more about JSON Web Tokens Validation. + url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ + operationId: token-validation-config-credentials-update + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldCredentials' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + keys: + items: + $ref: '#/components/schemas/apiShieldCredentialsJWTKey' + maxItems: 4 + minItems: 1 + type: array + required: + - success + - errors + - messages + - keys + type: object + description: OK + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Token Configuration credentials + tags: + - Token Validation Token Configuration + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Token Configuration ID + in: path + name: config_id + schema: + $ref: '#/components/schemas/apiShieldSchemasUuid' + required: true + x-stackql-sdk: + service: token_validation + resource_chain: + - configuration + - credentials + method: update + /zones/{zone_id}/token_validation/rules: + get: + description: List token validation rules + externalDocs: + description: Learn more about JSON Web Tokens Validation. + url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ + operationId: token-validation-rules-list + parameters: + - description: Maximum number of results per page. + in: query + name: per_page + schema: + default: 20 + maximum: 50 + minimum: 5 + type: integer + - description: Page number of paginated results. + in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - description: Select rules using any of these token configurations. + in: query + name: token_configuration + schema: + items: + $ref: '#/components/schemas/apiShieldSchemasUuid' + type: array + explode: true + - in: query + name: action + schema: + $ref: '#/components/schemas/apiShieldAction' + - in: query + name: enabled + schema: + $ref: '#/components/schemas/apiShieldEnabled' + - description: Select rules with these IDs. + in: query + name: id + schema: + $ref: '#/components/schemas/apiShieldSchemasUuid' + - description: Select rules with these IDs. + in: query + name: rule_id + schema: + $ref: '#/components/schemas/apiShieldSchemasUuid' + - description: Select rules with this host in `include`. + in: query + name: host + schema: + $ref: '#/components/schemas/apiShieldHost' + - description: Select rules with this host in `include`. + in: query + name: hostname + schema: + $ref: '#/components/schemas/apiShieldHost' + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/apiShieldRule' + type: array + required: + - success + - errors + - messages + - result + description: OK + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List token validation rules + tags: + - Token Validation Token Rules + x-api-token-group: + - Account API Gateway + - Account API Gateway Read + - Domain API Gateway + - Domain API Gateway Read + x-stackql-sdk: + service: token_validation + resource_chain: + - rules + method: list + post: + description: Create a token validation rule. + externalDocs: + description: Learn more about JSON Web Tokens Validation. + url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ + operationId: token-validation-rules-create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldCreateSingleRuleRequest' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/apiShieldRule' + required: + - success + - errors + - messages + - result + description: OK + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a token validation rule + tags: + - Token Validation Token Rules + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + x-stackql-sdk: + service: token_validation + resource_chain: + - rules + method: create + /zones/{zone_id}/token_validation/rules/bulk: + patch: + description: Edit token validation rules. A request can update multiple Token Validation Rules. Rules can be re-ordered using the `position` field. Returns all updated rules. + externalDocs: + description: Learn more about JSON Web Tokens Validation. + url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ + operationId: token-validation-rules-bulk-edit + requestBody: + content: + application/json: + schema: + items: + properties: + id: + description: Rule ID this patch applies to + format: uuid + maxLength: 36 + type: string + x-auditable: true + action: + $ref: '#/components/schemas/apiShieldAction' + description: + $ref: '#/components/schemas/apiShieldSchemasDescription' + enabled: + $ref: '#/components/schemas/apiShieldEnabled' + expression: + $ref: '#/components/schemas/apiShieldExpression' + selector: + $ref: '#/components/schemas/apiShieldSelector' + title: + $ref: '#/components/schemas/apiShieldSchemasTitle' + position: + $ref: '#/components/schemas/apiShieldPosition' + required: + - id + type: object + type: array + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/apiShieldRule' + type: array + required: + - success + - errors + - messages + - result + description: OK + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Bulk edit token validation rules + tags: + - Token Validation Token Rules + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + post: + description: Create zone token validation rules. A request can create multiple Token Validation Rules. + externalDocs: + description: Learn more about JSON Web Tokens Validation. + url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ + operationId: token-validation-rules-bulk-create + requestBody: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/apiShieldCreateSingleRuleRequest' + type: array + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/apiShieldRule' + type: array + required: + - success + - errors + - messages + - result + description: OK + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Bulk create token validation rules + tags: + - Token Validation Token Rules + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + /zones/{zone_id}/token_validation/rules/preview: + post: + description: Preview operations covered by a Token Validation rule. The API will return all operations on a zone annotated with an additional `state` field. Operations with an `included` `state` will be covered by a Token Validation Rule. + externalDocs: + description: Learn more about JSON Web Tokens Validation. + url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ + operationId: token-validation-rules-preview + parameters: + - description: Maximum number of results per page. + in: query + name: per_page + schema: + default: 20 + maximum: 50 + minimum: 5 + type: integer + - description: Page number of paginated results. + in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - in: query + name: state + schema: + items: + $ref: '#/components/schemas/apiShieldSelectorOperationState' + type: array + explode: true + - description: Filter operations by host. + in: query + name: host + schema: + items: + $ref: '#/components/schemas/apiShieldHost' + type: array + explode: true + - description: Filter operations by host. + in: query + name: hostname + schema: + items: + $ref: '#/components/schemas/apiShieldHost' + type: array + explode: true + - description: Filter operations by method. + in: query + name: method + schema: + items: + $ref: '#/components/schemas/apiShieldMethod' + type: array + explode: true + - description: Filter operations by endpoint. Allows substring matching. + in: query + name: endpoint + schema: + items: + $ref: '#/components/schemas/apiShieldEndpoint' + type: array + explode: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldSelector' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + properties: + available_hosts: + description: All hostnames on zone used by operations + items: + $ref: '#/components/schemas/apiShieldHost' + type: array + uniqueItems: true + excluded: + description: Number of operations with `excluded` `state` + type: integer + x-auditable: true + ignored: + description: Number of operations with `ignored` `state` + type: integer + x-auditable: true + included: + description: Number of operations with `included` `state` + type: integer + x-auditable: true + operations: + items: + properties: + endpoint: + $ref: '#/components/schemas/apiShieldEndpoint' + host: + $ref: '#/components/schemas/apiShieldHost' + last_updated: + $ref: '#/components/schemas/apiShieldSchemasTimestamp' + method: + $ref: '#/components/schemas/apiShieldMethod' + operation_id: + $ref: '#/components/schemas/apiShieldSchemasUuid' + state: + $ref: '#/components/schemas/apiShieldSelectorOperationState' + type: object + type: array + selected_hosts: + description: Hostnames of `included` operations + items: + $ref: '#/components/schemas/apiShieldHost' + type: array + uniqueItems: true + total: + description: Number of operations on zone + type: integer + x-auditable: true + type: object + required: + - success + - errors + - messages + - result + description: OK + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Preview operations covered by a Token Validation rule + tags: + - Token Validation Token Rules + x-api-token-group: + - Account API Gateway + - Account API Gateway Read + - Domain API Gateway + - Domain API Gateway Read + /zones/{zone_id}/token_validation/rules/{rule_id}: + delete: + description: Delete a zone token validation rule. + externalDocs: + description: Learn more about JSON Web Tokens Validation. + url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ + operationId: token-validation-rules-delete + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseSingleObj' + description: OK + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete a zone token validation rule + tags: + - Token Validation Token Rules + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + x-stackql-sdk: + service: token_validation + resource_chain: + - rules + method: delete + get: + description: Get a zone token validation rule. + externalDocs: + description: Learn more about JSON Web Tokens Validation. + url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ + operationId: token-validation-rules-get + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/apiShieldRule' + required: + - success + - errors + - messages + - result + type: object + description: OK + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get a zone token validation rule + tags: + - Token Validation Token Rules + x-api-token-group: + - Account API Gateway + - Account API Gateway Read + - Domain API Gateway + - Domain API Gateway Read + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + x-stackql-sdk: + service: token_validation + resource_chain: + - rules + method: get + patch: + description: Edit a zone token validation rule. + externalDocs: + description: Learn more about JSON Web Tokens Validation. + url: https://developers.cloudflare.com/api-shield/security/jwt-validation/ + operationId: token-validation-rules-edit + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldEditSingleRuleRequest' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/apiShieldRule' + required: + - success + - errors + - messages + - result + description: OK + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/apiShieldApiResponseCommonFailure' + description: Failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Edit a zone token validation rule + tags: + - Token Validation Token Rules + x-api-token-group: + - Account API Gateway + - Domain API Gateway + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + x-stackql-sdk: + service: token_validation + resource_chain: + - rules + method: edit +components: + schemas: + apiShieldAction: + description: Action to take on requests that match operations included in `selector` and fail `expression`. + enum: + - log + - block + example: log + type: string + x-auditable: true + apiShieldApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/apiShieldMessages' + messages: + example: [] + $ref: '#/components/schemas/apiShieldMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + apiShieldApiResponseSingleObj: + properties: + errors: + $ref: '#/components/schemas/apiShieldMessages' + messages: + $ref: '#/components/schemas/apiShieldMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + type: object + required: + - success + - errors + - messages + type: object + apiShieldCreateSingleRuleRequest: + description: A Token Validation rule that can enforce security policies using JWT Tokens. + type: object + $ref: '#/components/schemas/apiShieldRuleProperties' + apiShieldCredentials: + properties: + keys: + items: + $ref: '#/components/schemas/apiShieldCredentialsJWTKey' + maxItems: 4 + minItems: 1 + type: array + required: + - keys + type: object + apiShieldCredentialsJWTKey: + description: JSON representation of a JWKS key. + example: + alg: ES256 + crv: P-256 + kid: 38013f13-c266-4eec-a72a-92ec92779f21 + kty: EC + x: KN53JRwN3wCjm2o39bvZUX2VdrsHzS8pxOAGjm8m7EQ + 'y': lnkkzIxaveggz-HFhcMWW15nxvOj0Z_uQsXbpK0GFcY + type: object + properties: + kid: + description: Key ID + type: string + x-auditable: true + alg: + description: Algorithm + enum: + - RS256 + - RS384 + - RS512 + - PS256 + - PS384 + - PS512 + type: string + x-auditable: true + e: + description: RSA exponent + type: string + x-auditable: false + kty: + description: Key Type + enum: + - RSA + type: string + x-auditable: true + 'n': + description: RSA modulus + type: string + x-auditable: false + x: + description: X EC coordinate + type: string + x-auditable: false + 'y': + description: Y EC coordinate + type: string + x-auditable: false + crv: + description: Curve + enum: + - P-256 + type: string + x-auditable: true + required: + - alg + - kid + - kty + apiShieldDescription: + example: Long description for Token Validation Configuration + maxLength: 500 + type: string + x-auditable: true + apiShieldEditSingleRuleRequest: + properties: + action: + $ref: '#/components/schemas/apiShieldAction' + description: + $ref: '#/components/schemas/apiShieldSchemasDescription' + enabled: + $ref: '#/components/schemas/apiShieldEnabled' + expression: + $ref: '#/components/schemas/apiShieldExpression' + selector: + $ref: '#/components/schemas/apiShieldSelector' + title: + $ref: '#/components/schemas/apiShieldSchemasTitle' + position: + $ref: '#/components/schemas/apiShieldPosition' + type: object + apiShieldEnabled: + description: Toggle rule on or off. + example: true + type: boolean + x-auditable: true + apiShieldEndpoint: + description: 'The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.' + example: /api/v1/users/{var1} + format: uri-template + maxLength: 4096 + type: string + x-auditable: true + apiShieldExpression: + description: Rule expression. Requests that fail to match this expression will be subject to `action`. For details on expressions, see the [Cloudflare Docs](https://developers.cloudflare.com/api-shield/security/jwt-validation/). + example: is_jwt_valid("52973293-cb04-4a97-8f55-e7d2ad1107dd") or is_jwt_valid("46eab8d1-6376-45e3-968f-2c649d77d423") + type: string + x-auditable: true + apiShieldHost: + description: RFC3986-compliant host. + example: www.example.com + format: hostname + maxLength: 255 + type: string + x-auditable: true + apiShieldMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + apiShieldMethod: + description: The HTTP method used to access the endpoint. + enum: + - GET + - POST + - HEAD + - OPTIONS + - PUT + - DELETE + - CONNECT + - PATCH + - TRACE + example: GET + type: string + x-auditable: true + apiShieldPosition: + description: Update rule order among zone rules. + type: object + writeOnly: true + properties: + index: + description: Move rule to this position + example: 2 + minimum: 1 + type: integer + x-auditable: true + before: + description: Move rule to before rule with this ID. + example: 0d9bf70c-92e1-4bb3-9411-34a3bcc59003 + format: uuid + maxLength: 36 + type: string + x-auditable: true + after: + description: Move rule to after rule with this ID. + example: 0d9bf70c-92e1-4bb3-9411-34a3bcc59003 + format: uuid + maxLength: 36 + type: string + x-auditable: true + required: + - index + apiShieldRule: + description: A Token Validation rule that can enforce security policies using JWT Tokens. + properties: + action: + $ref: '#/components/schemas/apiShieldAction' + created_at: + $ref: '#/components/schemas/apiShieldSchemasTimestamp' + readOnly: true + description: + $ref: '#/components/schemas/apiShieldSchemasDescription' + enabled: + $ref: '#/components/schemas/apiShieldEnabled' + expression: + $ref: '#/components/schemas/apiShieldExpression' + id: + $ref: '#/components/schemas/apiShieldSchemasUuid' + last_updated: + $ref: '#/components/schemas/apiShieldSchemasTimestamp' + selector: + $ref: '#/components/schemas/apiShieldSelector' + title: + $ref: '#/components/schemas/apiShieldSchemasTitle' + required: + - title + - description + - action + - enabled + - expression + - selector + type: object + apiShieldRuleProperties: + properties: + action: + $ref: '#/components/schemas/apiShieldAction' + description: + $ref: '#/components/schemas/apiShieldSchemasDescription' + enabled: + $ref: '#/components/schemas/apiShieldEnabled' + expression: + $ref: '#/components/schemas/apiShieldExpression' + selector: + $ref: '#/components/schemas/apiShieldSelector' + title: + $ref: '#/components/schemas/apiShieldSchemasTitle' + type: object + apiShieldSchemasDescription: + description: A human-readable description that gives more details than `title`. + example: Long description for Token Validation Rule + maxLength: 500 + type: string + x-auditable: true + apiShieldSchemasTimestamp: + $ref: '#/components/schemas/apiShieldTimestamp' + readOnly: true + type: string + x-auditable: true + apiShieldSchemasTitle: + description: A human-readable name for the rule. + example: Example Token Validation Rule + maxLength: 50 + type: string + x-auditable: true + apiShieldSchemasUuid: + minLength: 36 + type: string + x-auditable: true + $ref: '#/components/schemas/apiShieldUuid' + apiShieldSelector: + description: Select operations covered by this rule. For details on selectors, see the [Cloudflare Docs](https://developers.cloudflare.com/api-shield/security/jwt-validation/). + properties: + exclude: + description: Ignore operations that were otherwise included by `include`. + items: + $ref: '#/components/schemas/apiShieldSelectorExclude' + nullable: true + type: array + include: + description: Select all matching operations. + items: + $ref: '#/components/schemas/apiShieldSelectorInclude' + nullable: true + type: array + type: object + apiShieldSelectorExclude: + properties: + operation_ids: + description: Excluded operation IDs. + example: + - f9c5615e-fe15-48ce-bec6-cfc1946f1bec + - 56828eae-035a-4396-ba07-51c66d680a04 + items: + $ref: '#/components/schemas/apiShieldSchemasUuid' + type: array + type: object + apiShieldSelectorInclude: + properties: + host: + description: Included hostnames. + example: + - v1.example.com + - v2.example.com + items: + $ref: '#/components/schemas/apiShieldHost' + type: array + type: object + apiShieldSelectorOperationState: + description: 'Details how `selector` interacted with an operation: - `included` operations are included by `selector` and will be covered by the Token Validation Rule - `excluded` operations are excluded by `selector` and will not be covered by the Token Validation Rule - `ignored` operations are not included by `selector` and will not be covered by the Token Validation Rule' + enum: + - included + - excluded + - ignored + example: included + type: string + x-auditable: true + apiShieldTimestamp: + example: '2014-01-01T05:20:00.12345Z' + format: date-time + type: string + x-auditable: true + apiShieldTitle: + example: Example Token Validation Configuration + maxLength: 50 + type: string + x-auditable: true + apiShieldTokenConfiguration: + properties: + created_at: + $ref: '#/components/schemas/apiShieldSchemasTimestamp' + readOnly: true + credentials: + $ref: '#/components/schemas/apiShieldCredentials' + description: + $ref: '#/components/schemas/apiShieldDescription' + id: + $ref: '#/components/schemas/apiShieldSchemasUuid' + last_updated: + $ref: '#/components/schemas/apiShieldSchemasTimestamp' + title: + $ref: '#/components/schemas/apiShieldTitle' + token_sources: + $ref: '#/components/schemas/apiShieldTokenSources' + token_type: + $ref: '#/components/schemas/apiShieldTokenType' + required: + - id + - title + - description + - token_sources + - token_type + - credentials + - created_at + - last_updated + type: object + apiShieldTokenSources: + example: + - http.request.headers["x-auth"][0] + - http.request.cookies["Authorization"][0] + items: + type: string + description: HTTP request header (must be lowercase) + example: http.request.headers["x-auth"][0] + maxItems: 4 + minItems: 1 + type: array + apiShieldTokenType: + enum: + - JWT + example: JWT + type: string + x-auditable: true + apiShieldUuid: + description: UUID. + example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 + maxLength: 36 + type: string + x-auditable: true + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + configuration: + id: cloudflare.token_validation.configuration + name: configuration + title: Configuration + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1token_validation~1config/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1token_validation~1config/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .credentials }}{{ $sep }}"credentials": {{ if eq (kindOf .credentials) "string" }}{{ .credentials }}{{ else }}{{ toJson .credentials }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .title }}{{ $sep }}"title": {{ toJson .title }}{{- $sep = "," -}}{{ end }} + + {{- if .token_sources }}{{ $sep }}"token_sources": {{ if eq (kindOf .token_sources) "string" }}{{ .token_sources }}{{ else }}{{ toJson .token_sources }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .token_type }}{{ $sep }}"token_type": {{ toJson .token_type }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1token_validation~1config~1{config_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1token_validation~1config~1{config_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1token_validation~1config~1{config_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .title }}{{ $sep }}"title": {{ toJson .title }}{{- $sep = "," -}}{{ end }} + + {{- if .token_sources }}{{ $sep }}"token_sources": {{ if eq (kindOf .token_sources) "string" }}{{ .token_sources }}{{ else }}{{ toJson .token_sources }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/configuration/methods/get' + - $ref: '#/components/x-stackQL-resources/configuration/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/configuration/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/configuration/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/configuration/methods/delete' + replace: [] + token_validation: + id: cloudflare.token_validation.token_validation + name: token_validation + title: Token Validation + methods: + update_credentials: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1token_validation~1config~1{config_id}~1credentials/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .keys }}{{ $sep }}"keys": {{ if eq (kindOf .keys) "string" }}{{ .keys }}{{ else }}{{ toJson .keys }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + rules: + id: cloudflare.token_validation.rules + name: rules + title: Rules + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1token_validation~1rules/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1token_validation~1rules/post' + response: + mediaType: application/json + openAPIDocKey: '200' + preview: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1token_validation~1rules~1preview/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .exclude }}{{ $sep }}"exclude": {{ if eq (kindOf .exclude) "string" }}{{ .exclude }}{{ else }}{{ toJson .exclude }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .include }}{{ $sep }}"include": {{ if eq (kindOf .include) "string" }}{{ .include }}{{ else }}{{ toJson .include }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1token_validation~1rules~1{rule_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1token_validation~1rules~1{rule_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1token_validation~1rules~1{rule_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .action }}{{ $sep }}"action": {{ toJson .action }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .expression }}{{ $sep }}"expression": {{ toJson .expression }}{{- $sep = "," -}}{{ end }} + + {{- if .selector }}{{ $sep }}"selector": {{ if eq (kindOf .selector) "string" }}{{ .selector }}{{ else }}{{ toJson .selector }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .title }}{{ $sep }}"title": {{ toJson .title }}{{- $sep = "," -}}{{ end }} + + {{- if .position }}{{ $sep }}"position": {{ if eq (kindOf .position) "string" }}{{ .position }}{{ else }}{{ toJson .position }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/rules/methods/get' + - $ref: '#/components/x-stackQL-resources/rules/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/rules/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/rules/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/rules/methods/delete' + replace: [] + bulk: + id: cloudflare.token_validation.bulk + name: bulk + title: Bulk + methods: + token_validation_rules_bulk_edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1token_validation~1rules~1bulk/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + token_validation_rules_bulk_create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1token_validation~1rules~1bulk/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/bulk/methods/token_validation_rules_bulk_create' + update: + - $ref: '#/components/x-stackQL-resources/bulk/methods/token_validation_rules_bulk_edit' + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/turnstile.yaml b/providers/src/cloudflare/v00.00.00000/services/turnstile.yaml index 48cba402..46730272 100644 --- a/providers/src/cloudflare/v00.00.00000/services/turnstile.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/turnstile.yaml @@ -1,896 +1,881 @@ -openapi: 3.0.3 -info: - title: turnstile API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/challenges/widgets: - get: - description: Lists all turnstile widgets of an account. - operationId: accounts-turnstile-widgets-list - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/turnstileMessages' - messages: - $ref: '#/components/schemas/turnstileMessages' - success: - description: Whether the API call was successful - type: boolean - result_info: - $ref: '#/components/schemas/turnstileResultInfo' - result: - items: - $ref: '#/components/schemas/turnstileWidgetList' - type: array - required: - - success - - errors - - messages - description: List Turnstile Widgets - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/turnstileApiResponseCommonFailure' - description: List Turnstile Widgets Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Turnstile Widgets - tags: - - Turnstile - x-api-token-group: - - Turnstile Sites Write - - Turnstile Sites Read - - Account Settings Write - - Account Settings Read - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: page - schema: - default: 1 - description: Page number of paginated results. - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 25 - description: Number of items per page. - maximum: 1000 - minimum: 5 - type: number - - in: query - name: order - schema: - description: Field to order widgets by. - enum: - - id - - sitekey - - name - - created_on - - modified_on - type: string - - in: query - name: direction - schema: - description: Direction to order widgets. - enum: - - asc - - desc - type: string - - description: >- - Filter widgets by field using case-insensitive substring matching. - Format: `field:value` Supported fields: - `name` - Filter by widget - name (e.g., `filter=name:login-form`) - `sitekey` - Filter by - sitekey (e.g., `filter=sitekey:0x4AAA`) Returns 400 Bad Request if - the field is unsupported or format is invalid. An empty filter value - returns all results. - in: query - name: filter - schema: - type: string - x-stackql-sdk: - service: turnstile - resource_chain: - - widgets - method: list - post: - description: Lists challenge widgets. - operationId: accounts-turnstile-widget-create - requestBody: - content: - application/json: - schema: - properties: - bot_fight_mode: - $ref: '#/components/schemas/turnstileBotFightMode' - clearance_level: - $ref: '#/components/schemas/turnstileClearanceLevel' - domains: - $ref: '#/components/schemas/turnstileDomains' - ephemeral_id: - $ref: '#/components/schemas/turnstileEphemeralId' - mode: - $ref: '#/components/schemas/turnstileWidgetMode' - name: - $ref: '#/components/schemas/turnstileName' - offlabel: - $ref: '#/components/schemas/turnstileOfflabel' - region: - $ref: '#/components/schemas/turnstileRegion' - required: - - name - - mode - - domains - type: object - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/turnstileMessages' - messages: - $ref: '#/components/schemas/turnstileMessages' - success: - description: Whether the API call was successful - type: boolean - result_info: - $ref: '#/components/schemas/turnstileResultInfo' - result: - $ref: '#/components/schemas/turnstileWidgetDetail' - required: - - success - - errors - - messages - description: Create Turnstile Widget Response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/turnstileApiResponseCommonFailure' - description: Create Turnstile Widget Response Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a Turnstile Widget - tags: - - Turnstile - x-api-token-group: - - Turnstile Sites Write - - Account Settings Write - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: page - schema: - default: 1 - description: Page number of paginated results. - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 25 - description: Number of items per page. - maximum: 1000 - minimum: 5 - type: number - - in: query - name: order - schema: - description: Field to order widgets by. - enum: - - id - - sitekey - - name - - created_on - - modified_on - type: string - - in: query - name: direction - schema: - description: Direction to order widgets. - enum: - - asc - - desc - type: string - - description: >- - Filter widgets by field using case-insensitive substring matching. - Format: `field:value` Supported fields: - `name` - Filter by widget - name (e.g., `filter=name:login-form`) - `sitekey` - Filter by - sitekey (e.g., `filter=sitekey:0x4AAA`) Returns 400 Bad Request if - the field is unsupported or format is invalid. An empty filter value - returns all results. - in: query - name: filter - schema: - type: string - x-stackql-sdk: - service: turnstile - resource_chain: - - widgets - method: create - /accounts/{account_id}/challenges/widgets/{sitekey}: - delete: - description: Destroy a Turnstile Widget. - operationId: accounts-turnstile-widget-delete - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/turnstileMessages' - messages: - $ref: '#/components/schemas/turnstileMessages' - success: - description: Whether the API call was successful - type: boolean - result: - $ref: '#/components/schemas/turnstileWidgetDetail' - required: - - success - - errors - - messages - description: Delete Turnstile Widget Response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/turnstileApiResponseCommonFailure' - description: Delete Turnstile Widget Response Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete a Turnstile Widget - tags: - - Turnstile - x-api-token-group: - - Turnstile Sites Write - - Account Settings Write - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: sitekey - schema: - $ref: '#/components/schemas/turnstileSitekey' - required: true - x-stackql-sdk: - service: turnstile - resource_chain: - - widgets - method: delete - get: - description: Show a single challenge widget configuration. - operationId: accounts-turnstile-widget-get - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/turnstileMessages' - messages: - $ref: '#/components/schemas/turnstileMessages' - success: - description: Whether the API call was successful - type: boolean - result: - $ref: '#/components/schemas/turnstileWidgetDetail' - required: - - success - - errors - - messages - description: Turnstile Widget Details Response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/turnstileApiResponseCommonFailure' - description: Turnstile Widget Details Response Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Turnstile Widget Details - tags: - - Turnstile - x-api-token-group: - - Turnstile Sites Write - - Turnstile Sites Read - - Account Settings Write - - Account Settings Read - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: sitekey - schema: - $ref: '#/components/schemas/turnstileSitekey' - required: true - x-stackql-sdk: - service: turnstile - resource_chain: - - widgets - method: get - put: - description: Update the configuration of a widget. - operationId: accounts-turnstile-widget-update - requestBody: - content: - application/json: - schema: - properties: - bot_fight_mode: - $ref: '#/components/schemas/turnstileBotFightMode' - clearance_level: - $ref: '#/components/schemas/turnstileClearanceLevel' - domains: - $ref: '#/components/schemas/turnstileDomains' - ephemeral_id: - $ref: '#/components/schemas/turnstileEphemeralId' - mode: - $ref: '#/components/schemas/turnstileWidgetMode' - name: - $ref: '#/components/schemas/turnstileName' - offlabel: - $ref: '#/components/schemas/turnstileOfflabel' - region: - $ref: '#/components/schemas/turnstileRegion' - required: - - name - - mode - - domains - type: object - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/turnstileMessages' - messages: - $ref: '#/components/schemas/turnstileMessages' - success: - description: Whether the API call was successful - type: boolean - result: - $ref: '#/components/schemas/turnstileWidgetDetail' - required: - - success - - errors - - messages - description: Update Turnstile Widget Response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/turnstileApiResponseCommonFailure' - description: Update Turnstile Widget Response Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update a Turnstile Widget - tags: - - Turnstile - x-api-token-group: - - Turnstile Sites Write - - Account Settings Write - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: sitekey - schema: - $ref: '#/components/schemas/turnstileSitekey' - required: true - x-stackql-sdk: - service: turnstile - resource_chain: - - widgets - method: update - /accounts/{account_id}/challenges/widgets/{sitekey}/rotate_secret: - post: - description: >- - Generate a new secret key for this widget. If `invalidate_immediately` - is set to `false`, the previous secret remains valid for 2 hours. Note - that secrets cannot be rotated again during the grace period. - operationId: accounts-turnstile-widget-rotate-secret - requestBody: - content: - application/json: - schema: - properties: - invalidate_immediately: - $ref: '#/components/schemas/turnstileInvalidateImmediately' - type: object - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/turnstileMessages' - messages: - $ref: '#/components/schemas/turnstileMessages' - success: - description: Whether the API call was successful - type: boolean - result: - $ref: '#/components/schemas/turnstileWidgetDetail' - required: - - success - - errors - - messages - description: Rotate Secret Response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/turnstileApiResponseCommonFailure' - description: Rotate Secret Response Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Rotate Secret for a Turnstile Widget - tags: - - Turnstile - x-api-token-group: - - Turnstile Sites Write - - Account Settings Write - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: sitekey - schema: - $ref: '#/components/schemas/turnstileSitekey' - required: true - x-stackql-sdk: - service: turnstile - resource_chain: - - widgets - method: rotate_secret -components: - schemas: - responseInfo: - properties: - code: - minimum: 1000 - type: integer - message: - type: string - documentation_url: - type: string - source: - type: object - properties: - pointer: - type: string - required: - - code - - message - type: object - uniqueItems: true - turnstileApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/turnstileMessages' - messages: - example: [] - $ref: '#/components/schemas/turnstileMessages' - result: - nullable: true - type: object - success: - description: Whether the API call was successful - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - turnstileBotFightMode: - description: >- - If bot_fight_mode is set to `true`, Cloudflare issues computationally - expensive challenges in response to malicious bots (ENT only). - example: false - type: boolean - x-auditable: true - turnstileClearanceLevel: - description: >- - If Turnstile is embedded on a Cloudflare site and the widget should - grant challenge clearance, this setting can determine the clearance - level to be set - enum: - - no_clearance - - jschallenge - - managed - - interactive - example: interactive - type: string - x-auditable: true - turnstileCreatedOn: - description: When the widget was created. - example: '2014-01-01T05:20:00.123123Z' - format: date-time - readOnly: true - type: string - turnstileDomains: - example: - - 203.0.113.1 - - cloudflare.com - - blog.example.com - items: - description: >- - Hosts as a hostname or IPv4/IPv6 address represented by strings. The - widget will only work on these domains, and their subdomains. - example: 203.0.113.1 - type: string - x-auditable: true - maxLength: 10 - type: array - turnstileEphemeralId: - description: Return the Ephemeral ID in /siteverify (ENT only). - example: false - type: boolean - x-auditable: true - turnstileInvalidateImmediately: - default: false - description: >- - If `invalidate_immediately` is set to `false`, the previous secret will - remain valid for two hours. Otherwise, the secret is immediately - invalidated, and requests using it will be rejected. - type: boolean - x-auditable: true - turnstileMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - turnstileModifiedOn: - description: When the widget was modified. - example: '2014-01-01T05:20:00.123123Z' - format: date-time - readOnly: true - type: string - turnstileName: - description: >- - Human readable widget name. Not unique. Cloudflare suggests that you set - this to a meaningful string to make it easier to identify your widget, - and where it is used. - example: blog.cloudflare.com login form - maxLength: 254 - minLength: 1 - type: string - x-auditable: true - turnstileOfflabel: - description: Do not show any Cloudflare branding on the widget (ENT only). - example: false - type: boolean - x-auditable: true - turnstileRegion: - default: world - description: >- - Region where this widget can be used. This cannot be changed after - creation. - enum: - - world - - china - type: string - x-auditable: true - turnstileResultInfo: - properties: - count: - description: Total number of results for the requested service - example: 1 - type: number - page: - description: Current page within paginated list of results - example: 1 - type: number - per_page: - description: Number of results per page of results - example: 20 - type: number - total_count: - description: Total results available without any search parameters - example: 2000 - type: number - required: - - page - - per_page - - count - - total_count - type: object - turnstileSecret: - description: Secret key for this widget. - example: 0x4AAF00AAAABn0R22HWm098HVBjhdsYUc - type: string - x-sensitive: true - turnstileSitekey: - description: Widget item identifier tag. - example: 0x4AAF00AAAABn0R22HWm-YUc - maxLength: 32 - type: string - x-auditable: true - turnstileWidgetDetail: - description: A Turnstile widget's detailed configuration - properties: - bot_fight_mode: - $ref: '#/components/schemas/turnstileBotFightMode' - clearance_level: - $ref: '#/components/schemas/turnstileClearanceLevel' - created_on: - $ref: '#/components/schemas/turnstileCreatedOn' - readOnly: true - domains: - $ref: '#/components/schemas/turnstileDomains' - ephemeral_id: - $ref: '#/components/schemas/turnstileEphemeralId' - mode: - $ref: '#/components/schemas/turnstileWidgetMode' - modified_on: - $ref: '#/components/schemas/turnstileModifiedOn' - readOnly: true - name: - $ref: '#/components/schemas/turnstileName' - offlabel: - $ref: '#/components/schemas/turnstileOfflabel' - region: - $ref: '#/components/schemas/turnstileRegion' - secret: - $ref: '#/components/schemas/turnstileSecret' - sitekey: - $ref: '#/components/schemas/turnstileSitekey' - required: - - sitekey - - secret - - created_on - - modified_on - - name - - domains - - mode - - region - - bot_fight_mode - - offlabel - - clearance_level - - ephemeral_id - type: object - turnstileWidgetList: - description: A Turnstile Widgets configuration as it appears in listings - properties: - bot_fight_mode: - $ref: '#/components/schemas/turnstileBotFightMode' - clearance_level: - $ref: '#/components/schemas/turnstileClearanceLevel' - created_on: - $ref: '#/components/schemas/turnstileCreatedOn' - readOnly: true - domains: - $ref: '#/components/schemas/turnstileDomains' - ephemeral_id: - $ref: '#/components/schemas/turnstileEphemeralId' - mode: - $ref: '#/components/schemas/turnstileWidgetMode' - modified_on: - $ref: '#/components/schemas/turnstileModifiedOn' - readOnly: true - name: - $ref: '#/components/schemas/turnstileName' - offlabel: - $ref: '#/components/schemas/turnstileOfflabel' - region: - $ref: '#/components/schemas/turnstileRegion' - sitekey: - $ref: '#/components/schemas/turnstileSitekey' - required: - - sitekey - - created_on - - modified_on - - name - - domains - - mode - - region - - bot_fight_mode - - offlabel - - clearance_level - - ephemeral_id - type: object - turnstileWidgetMode: - description: Widget Mode - enum: - - non-interactive - - invisible - - managed - example: invisible - type: string - x-auditable: true - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - widgets: - id: cloudflare.turnstile.widgets - name: widgets - title: Widgets - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1challenges~1widgets/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1challenges~1widgets/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1challenges~1widgets~1{sitekey}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1challenges~1widgets~1{sitekey}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1challenges~1widgets~1{sitekey}/put - response: - mediaType: application/json - openAPIDocKey: '200' - rotate_secret: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1challenges~1widgets~1{sitekey}~1rotate_secret/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/widgets/methods/get' - - $ref: '#/components/x-stackQL-resources/widgets/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/widgets/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/widgets/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/widgets/methods/update' +openapi: 3.0.3 +info: + title: turnstile API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/challenges/widgets: + get: + description: Lists all turnstile widgets of an account. + operationId: accounts-turnstile-widgets-list + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/turnstileMessages' + messages: + $ref: '#/components/schemas/turnstileMessages' + success: + description: Whether the API call was successful + type: boolean + result_info: + $ref: '#/components/schemas/turnstileResultInfo' + result: + items: + $ref: '#/components/schemas/turnstileWidgetList' + type: array + required: + - success + - errors + - messages + description: List Turnstile Widgets + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/turnstileApiResponseCommonFailure' + description: List Turnstile Widgets Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Turnstile Widgets + tags: + - Turnstile + x-api-token-group: + - Turnstile Sites Write + - Turnstile Sites Read + - Account Settings Write + - Account Settings Read + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: page + schema: + default: 1 + description: Page number of paginated results. + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 25 + description: Number of items per page. + maximum: 1000 + minimum: 5 + type: number + - in: query + name: order + schema: + description: Field to order widgets by. + enum: + - id + - sitekey + - name + - created_on + - modified_on + type: string + - in: query + name: direction + schema: + description: Direction to order widgets. + enum: + - asc + - desc + type: string + - description: 'Filter widgets by field using case-insensitive substring matching. Format: `field:value` Supported fields: - `name` - Filter by widget name (e.g., `filter=name:login-form`) - `sitekey` - Filter by sitekey (e.g., `filter=sitekey:0x4AAA`) Returns 400 Bad Request if the field is unsupported or format is invalid. An empty filter value returns all results.' + in: query + name: filter + schema: + type: string + x-stackql-sdk: + service: turnstile + resource_chain: + - widgets + method: list + post: + description: Lists challenge widgets. + operationId: accounts-turnstile-widget-create + requestBody: + content: + application/json: + schema: + properties: + bot_fight_mode: + $ref: '#/components/schemas/turnstileBotFightMode' + clearance_level: + $ref: '#/components/schemas/turnstileClearanceLevel' + domains: + $ref: '#/components/schemas/turnstileDomains' + ephemeral_id: + $ref: '#/components/schemas/turnstileEphemeralId' + mode: + $ref: '#/components/schemas/turnstileWidgetMode' + name: + $ref: '#/components/schemas/turnstileName' + offlabel: + $ref: '#/components/schemas/turnstileOfflabel' + region: + $ref: '#/components/schemas/turnstileRegion' + required: + - name + - mode + - domains + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/turnstileMessages' + messages: + $ref: '#/components/schemas/turnstileMessages' + success: + description: Whether the API call was successful + type: boolean + result_info: + $ref: '#/components/schemas/turnstileResultInfo' + result: + $ref: '#/components/schemas/turnstileWidgetDetail' + required: + - success + - errors + - messages + description: Create Turnstile Widget Response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/turnstileApiResponseCommonFailure' + description: Create Turnstile Widget Response Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a Turnstile Widget + tags: + - Turnstile + x-api-token-group: + - Turnstile Sites Write + - Account Settings Write + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: page + schema: + default: 1 + description: Page number of paginated results. + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 25 + description: Number of items per page. + maximum: 1000 + minimum: 5 + type: number + - in: query + name: order + schema: + description: Field to order widgets by. + enum: + - id + - sitekey + - name + - created_on + - modified_on + type: string + - in: query + name: direction + schema: + description: Direction to order widgets. + enum: + - asc + - desc + type: string + - description: 'Filter widgets by field using case-insensitive substring matching. Format: `field:value` Supported fields: - `name` - Filter by widget name (e.g., `filter=name:login-form`) - `sitekey` - Filter by sitekey (e.g., `filter=sitekey:0x4AAA`) Returns 400 Bad Request if the field is unsupported or format is invalid. An empty filter value returns all results.' + in: query + name: filter + schema: + type: string + x-stackql-sdk: + service: turnstile + resource_chain: + - widgets + method: create + /accounts/{account_id}/challenges/widgets/{sitekey}: + delete: + description: Destroy a Turnstile Widget. + operationId: accounts-turnstile-widget-delete + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/turnstileMessages' + messages: + $ref: '#/components/schemas/turnstileMessages' + success: + description: Whether the API call was successful + type: boolean + result: + $ref: '#/components/schemas/turnstileWidgetDetail' + required: + - success + - errors + - messages + description: Delete Turnstile Widget Response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/turnstileApiResponseCommonFailure' + description: Delete Turnstile Widget Response Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete a Turnstile Widget + tags: + - Turnstile + x-api-token-group: + - Turnstile Sites Write + - Account Settings Write + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: sitekey + schema: + $ref: '#/components/schemas/turnstileSitekey' + required: true + x-stackql-sdk: + service: turnstile + resource_chain: + - widgets + method: delete + get: + description: Show a single challenge widget configuration. + operationId: accounts-turnstile-widget-get + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/turnstileMessages' + messages: + $ref: '#/components/schemas/turnstileMessages' + success: + description: Whether the API call was successful + type: boolean + result: + $ref: '#/components/schemas/turnstileWidgetDetail' + required: + - success + - errors + - messages + description: Turnstile Widget Details Response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/turnstileApiResponseCommonFailure' + description: Turnstile Widget Details Response Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Turnstile Widget Details + tags: + - Turnstile + x-api-token-group: + - Turnstile Sites Write + - Turnstile Sites Read + - Account Settings Write + - Account Settings Read + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: sitekey + schema: + $ref: '#/components/schemas/turnstileSitekey' + required: true + x-stackql-sdk: + service: turnstile + resource_chain: + - widgets + method: get + put: + description: Update the configuration of a widget. + operationId: accounts-turnstile-widget-update + requestBody: + content: + application/json: + schema: + properties: + bot_fight_mode: + $ref: '#/components/schemas/turnstileBotFightMode' + clearance_level: + $ref: '#/components/schemas/turnstileClearanceLevel' + domains: + $ref: '#/components/schemas/turnstileDomains' + ephemeral_id: + $ref: '#/components/schemas/turnstileEphemeralId' + mode: + $ref: '#/components/schemas/turnstileWidgetMode' + name: + $ref: '#/components/schemas/turnstileName' + offlabel: + $ref: '#/components/schemas/turnstileOfflabel' + region: + $ref: '#/components/schemas/turnstileRegion' + required: + - name + - mode + - domains + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/turnstileMessages' + messages: + $ref: '#/components/schemas/turnstileMessages' + success: + description: Whether the API call was successful + type: boolean + result: + $ref: '#/components/schemas/turnstileWidgetDetail' + required: + - success + - errors + - messages + description: Update Turnstile Widget Response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/turnstileApiResponseCommonFailure' + description: Update Turnstile Widget Response Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update a Turnstile Widget + tags: + - Turnstile + x-api-token-group: + - Turnstile Sites Write + - Account Settings Write + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: sitekey + schema: + $ref: '#/components/schemas/turnstileSitekey' + required: true + x-stackql-sdk: + service: turnstile + resource_chain: + - widgets + method: update + /accounts/{account_id}/challenges/widgets/{sitekey}/rotate_secret: + post: + description: Generate a new secret key for this widget. If `invalidate_immediately` is set to `false`, the previous secret remains valid for 2 hours. Note that secrets cannot be rotated again during the grace period. + operationId: accounts-turnstile-widget-rotate-secret + requestBody: + content: + application/json: + schema: + properties: + invalidate_immediately: + $ref: '#/components/schemas/turnstileInvalidateImmediately' + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/turnstileMessages' + messages: + $ref: '#/components/schemas/turnstileMessages' + success: + description: Whether the API call was successful + type: boolean + result: + $ref: '#/components/schemas/turnstileWidgetDetail' + required: + - success + - errors + - messages + description: Rotate Secret Response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/turnstileApiResponseCommonFailure' + description: Rotate Secret Response Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Rotate Secret for a Turnstile Widget + tags: + - Turnstile + x-api-token-group: + - Turnstile Sites Write + - Account Settings Write + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: sitekey + schema: + $ref: '#/components/schemas/turnstileSitekey' + required: true + x-stackql-sdk: + service: turnstile + resource_chain: + - widgets + method: rotate_secret +components: + schemas: + responseInfo: + properties: + code: + minimum: 1000 + type: integer + message: + type: string + documentation_url: + type: string + source: + type: object + properties: + pointer: + type: string + required: + - code + - message + type: object + uniqueItems: true + turnstileApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/turnstileMessages' + messages: + example: [] + $ref: '#/components/schemas/turnstileMessages' + result: + nullable: true + type: object + success: + description: Whether the API call was successful + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + turnstileBotFightMode: + description: If bot_fight_mode is set to `true`, Cloudflare issues computationally expensive challenges in response to malicious bots (ENT only). + example: false + type: boolean + x-auditable: true + turnstileClearanceLevel: + description: If Turnstile is embedded on a Cloudflare site and the widget should grant challenge clearance, this setting can determine the clearance level to be set + enum: + - no_clearance + - jschallenge + - managed + - interactive + example: interactive + type: string + x-auditable: true + turnstileCreatedOn: + description: When the widget was created. + example: '2014-01-01T05:20:00.123123Z' + format: date-time + readOnly: true + type: string + turnstileDomains: + example: + - 203.0.113.1 + - cloudflare.com + - blog.example.com + items: + description: Hosts as a hostname or IPv4/IPv6 address represented by strings. The widget will only work on these domains, and their subdomains. + example: 203.0.113.1 + type: string + x-auditable: true + maxLength: 10 + type: array + turnstileEphemeralId: + description: Return the Ephemeral ID in /siteverify (ENT only). + example: false + type: boolean + x-auditable: true + turnstileInvalidateImmediately: + default: false + description: If `invalidate_immediately` is set to `false`, the previous secret will remain valid for two hours. Otherwise, the secret is immediately invalidated, and requests using it will be rejected. + type: boolean + x-auditable: true + turnstileMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + turnstileModifiedOn: + description: When the widget was modified. + example: '2014-01-01T05:20:00.123123Z' + format: date-time + readOnly: true + type: string + turnstileName: + description: Human readable widget name. Not unique. Cloudflare suggests that you set this to a meaningful string to make it easier to identify your widget, and where it is used. + example: blog.cloudflare.com login form + maxLength: 254 + minLength: 1 + type: string + x-auditable: true + turnstileOfflabel: + description: Do not show any Cloudflare branding on the widget (ENT only). + example: false + type: boolean + x-auditable: true + turnstileRegion: + default: world + description: Region where this widget can be used. This cannot be changed after creation. + enum: + - world + - china + type: string + x-auditable: true + turnstileResultInfo: + properties: + count: + description: Total number of results for the requested service + example: 1 + type: number + page: + description: Current page within paginated list of results + example: 1 + type: number + per_page: + description: Number of results per page of results + example: 20 + type: number + total_count: + description: Total results available without any search parameters + example: 2000 + type: number + required: + - page + - per_page + - count + - total_count + type: object + turnstileSecret: + description: Secret key for this widget. + example: 0x4AAF00AAAABn0R22HWm098HVBjhdsYUc + type: string + x-sensitive: true + turnstileSitekey: + description: Widget item identifier tag. + example: 0x4AAF00AAAABn0R22HWm-YUc + maxLength: 32 + type: string + x-auditable: true + turnstileWidgetDetail: + description: A Turnstile widget's detailed configuration + properties: + bot_fight_mode: + $ref: '#/components/schemas/turnstileBotFightMode' + clearance_level: + $ref: '#/components/schemas/turnstileClearanceLevel' + created_on: + $ref: '#/components/schemas/turnstileCreatedOn' + readOnly: true + domains: + $ref: '#/components/schemas/turnstileDomains' + ephemeral_id: + $ref: '#/components/schemas/turnstileEphemeralId' + mode: + $ref: '#/components/schemas/turnstileWidgetMode' + modified_on: + $ref: '#/components/schemas/turnstileModifiedOn' + readOnly: true + name: + $ref: '#/components/schemas/turnstileName' + offlabel: + $ref: '#/components/schemas/turnstileOfflabel' + region: + $ref: '#/components/schemas/turnstileRegion' + secret: + $ref: '#/components/schemas/turnstileSecret' + sitekey: + $ref: '#/components/schemas/turnstileSitekey' + required: + - sitekey + - secret + - created_on + - modified_on + - name + - domains + - mode + - region + - bot_fight_mode + - offlabel + - clearance_level + - ephemeral_id + type: object + turnstileWidgetList: + description: A Turnstile Widgets configuration as it appears in listings + properties: + bot_fight_mode: + $ref: '#/components/schemas/turnstileBotFightMode' + clearance_level: + $ref: '#/components/schemas/turnstileClearanceLevel' + created_on: + $ref: '#/components/schemas/turnstileCreatedOn' + readOnly: true + domains: + $ref: '#/components/schemas/turnstileDomains' + ephemeral_id: + $ref: '#/components/schemas/turnstileEphemeralId' + mode: + $ref: '#/components/schemas/turnstileWidgetMode' + modified_on: + $ref: '#/components/schemas/turnstileModifiedOn' + readOnly: true + name: + $ref: '#/components/schemas/turnstileName' + offlabel: + $ref: '#/components/schemas/turnstileOfflabel' + region: + $ref: '#/components/schemas/turnstileRegion' + sitekey: + $ref: '#/components/schemas/turnstileSitekey' + required: + - sitekey + - created_on + - modified_on + - name + - domains + - mode + - region + - bot_fight_mode + - offlabel + - clearance_level + - ephemeral_id + type: object + turnstileWidgetMode: + description: Widget Mode + enum: + - non-interactive + - invisible + - managed + example: invisible + type: string + x-auditable: true + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + widgets: + id: cloudflare.turnstile.widgets + name: widgets + title: Widgets + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1challenges~1widgets/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1challenges~1widgets/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .bot_fight_mode }}{{ $sep }}"bot_fight_mode": {{ toJson .bot_fight_mode }}{{- $sep = "," -}}{{ end }} + + {{- if .clearance_level }}{{ $sep }}"clearance_level": {{ toJson .clearance_level }}{{- $sep = "," -}}{{ end }} + + {{- if .domains }}{{ $sep }}"domains": {{ if eq (kindOf .domains) "string" }}{{ .domains }}{{ else }}{{ toJson .domains }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ephemeral_id }}{{ $sep }}"ephemeral_id": {{ toJson .ephemeral_id }}{{- $sep = "," -}}{{ end }} + + {{- if .mode }}{{ $sep }}"mode": {{ toJson .mode }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .offlabel }}{{ $sep }}"offlabel": {{ toJson .offlabel }}{{- $sep = "," -}}{{ end }} + + {{- if .region }}{{ $sep }}"region": {{ toJson .region }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1challenges~1widgets~1{sitekey}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1challenges~1widgets~1{sitekey}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1challenges~1widgets~1{sitekey}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .bot_fight_mode }}{{ $sep }}"bot_fight_mode": {{ toJson .bot_fight_mode }}{{- $sep = "," -}}{{ end }} + + {{- if .clearance_level }}{{ $sep }}"clearance_level": {{ toJson .clearance_level }}{{- $sep = "," -}}{{ end }} + + {{- if .domains }}{{ $sep }}"domains": {{ if eq (kindOf .domains) "string" }}{{ .domains }}{{ else }}{{ toJson .domains }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ephemeral_id }}{{ $sep }}"ephemeral_id": {{ toJson .ephemeral_id }}{{- $sep = "," -}}{{ end }} + + {{- if .mode }}{{ $sep }}"mode": {{ toJson .mode }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .offlabel }}{{ $sep }}"offlabel": {{ toJson .offlabel }}{{- $sep = "," -}}{{ end }} + + {{- if .region }}{{ $sep }}"region": {{ toJson .region }}{{- $sep = "," -}}{{ end }} + + } + + ' + rotate_secret: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1challenges~1widgets~1{sitekey}~1rotate_secret/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/widgets/methods/get' + - $ref: '#/components/x-stackQL-resources/widgets/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/widgets/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/widgets/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/widgets/methods/update' diff --git a/providers/src/cloudflare/v00.00.00000/services/url_scanner.yaml b/providers/src/cloudflare/v00.00.00000/services/url_scanner.yaml index 31bf758b..2e0023a8 100644 --- a/providers/src/cloudflare/v00.00.00000/services/url_scanner.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/url_scanner.yaml @@ -6630,6 +6630,27 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .country }}{{ $sep }}"country": {{ toJson .country }}{{- $sep = "," -}}{{ end }} + + {{- if .customHeaders }}{{ $sep }}"customHeaders": {{ if eq (kindOf .customHeaders) "string" }}{{ .customHeaders }}{{ else }}{{ toJson .customHeaders }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .screenshotsResolutions }}{{ $sep }}"screenshotsResolutions": {{ if eq (kindOf .screenshotsResolutions) "string" }}{{ .screenshotsResolutions }}{{ else }}{{ toJson .screenshotsResolutions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .url }}{{ $sep }}"url": {{ toJson .url }}{{- $sep = "," -}}{{ end }} + + {{- if .visibility }}{{ $sep }}"visibility": {{ toJson .visibility }}{{- $sep = "," -}}{{ end }} + + } + + ' get: operation: $ref: '#/paths/~1accounts~1{account_id}~1urlscanner~1scan~1{scan_id}/get' @@ -6710,6 +6731,33 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .agentReadiness }}{{ $sep }}"agentReadiness": {{ toJson .agentReadiness }}{{- $sep = "," -}}{{ end }} + + {{- if .country }}{{ $sep }}"country": {{ toJson .country }}{{- $sep = "," -}}{{ end }} + + {{- if .customHeaders }}{{ $sep }}"customHeaders": {{ if eq (kindOf .customHeaders) "string" }}{{ .customHeaders }}{{ else }}{{ toJson .customHeaders }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .customagent }}{{ $sep }}"customagent": {{ toJson .customagent }}{{- $sep = "," -}}{{ end }} + + {{- if .referer }}{{ $sep }}"referer": {{ toJson .referer }}{{- $sep = "," -}}{{ end }} + + {{- if .screenshotsResolutions }}{{ $sep }}"screenshotsResolutions": {{ if eq (kindOf .screenshotsResolutions) "string" }}{{ .screenshotsResolutions }}{{ else }}{{ toJson .screenshotsResolutions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .url }}{{ $sep }}"url": {{ toJson .url }}{{- $sep = "," -}}{{ end }} + + {{- if .visibility }}{{ $sep }}"visibility": {{ toJson .visibility }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: [] insert: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/user.yaml b/providers/src/cloudflare/v00.00.00000/services/user.yaml index 241cdf22..033fd731 100644 --- a/providers/src/cloudflare/v00.00.00000/services/user.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/user.yaml @@ -1,3726 +1,3659 @@ -openapi: 3.0.3 -info: - title: user API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /user: - get: - operationId: user-user-details - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamSingleUserResponse' - description: User Details response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: User Details response failure - security: - - api_email: [] - api_key: [] - summary: User Details - tags: - - User - x-api-token-group: - - User Details Write - - User Details Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.user.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: user - resource_chain: [] - method: get - patch: - description: Edit part of your user details. - operationId: user-edit-user - requestBody: - content: - application/json: - schema: - properties: - country: - $ref: '#/components/schemas/iamCountry' - first_name: - $ref: '#/components/schemas/iamFirstName' - last_name: - $ref: '#/components/schemas/iamLastName' - telephone: - $ref: '#/components/schemas/iamTelephone' - zipcode: - $ref: '#/components/schemas/iamZipcode' - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamSingleUserResponse' - description: Edit User response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Edit User response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Edit User - tags: - - User - x-api-token-group: - - User Details Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.user.update - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: user - resource_chain: [] - method: edit - /user/audit_logs: - get: - description: >- - Gets a list of audit logs for a user account. Can be filtered by who - made the change, on which zone, and the timeframe of the change. - operationId: audit-logs-get-user-audit-logs - parameters: - - in: query - name: id - schema: - description: Finds a specific log by its ID. - type: string - - in: query - name: export - schema: - description: Indicates that this request is an export of logs in CSV format. - type: boolean - - in: query - name: action.type - schema: - description: Filters by the action type. - type: string - - in: query - name: actor.ip - schema: - description: >- - Filters by the IP address of the request that made the change by - specific IP address or valid CIDR Range. - type: string - - in: query - name: actor.email - schema: - description: Filters by the email address of the actor that made the change. - format: email - type: string - - in: query - name: since - schema: - type: string - format: date - description: >- - Limits the returned results to logs newer than the specified date. - A `full-date` that conforms to RFC3339. - - in: query - name: before - schema: - type: string - format: date - description: >- - Limits the returned results to logs older than the specified date. - A `full-date` that conforms to RFC3339. - - in: query - name: zone.name - schema: - description: Filters by the name of the zone associated to the change. - type: string - - in: query - name: direction - schema: - default: desc - description: Changes the direction of the chronological sorting. - enum: - - desc - - asc - type: string - - in: query - name: per_page - schema: - default: 100 - description: Sets the number of results to return per page. - maximum: 1000 - minimum: 1 - type: number - - in: query - name: page - schema: - default: 1 - description: Defines which page of results to return. - minimum: 1 - type: number - - in: query - name: hide_user_logs - schema: - default: false - description: Indicates whether or not to hide user level audit logs. - type: boolean - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/aaaAuditLogsResponseCollection_2' - description: Get user audit logs response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/result' - description: Get user audit logs response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get user audit logs - tags: - - Audit Logs - x-api-token-group: - - Account Settings Write - - Account Settings Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: user - resource_chain: - - audit_logs - method: list - /user/billing/history: - get: - deprecated: true - description: Accesses your billing history object. - operationId: user-billing-history-(-deprecated)-billing-history-details - parameters: - - in: query - name: page - schema: - default: 1 - description: Page number of paginated results. - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 20 - description: Number of items per page. - maximum: 50 - minimum: 5 - type: number - - in: query - name: order - schema: - description: Field to order billing history by. - enum: - - type - - occurred_at - - action - type: string - - in: query - name: occurred_at - schema: - $ref: '#/components/schemas/billSubsApiOccurredAt' - - in: query - name: type - schema: - description: The billing item type. - maxLength: 30 - type: string - - in: query - name: action - schema: - description: The billing item action. - maxLength: 30 - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/billSubsApiBillingHistoryCollection' - description: Billing History Details response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - items: - $ref: '#/components/schemas/billSubsApiBillingHistory' - nullable: true - type: array - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/billSubsApiResultInfo' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Billing History Details response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Billing History Details - tags: - - User Billing History - x-api-token-group: - - Billing Write - - Billing Read - x-cfPermissionsRequired: - enum: - - '#billing:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: user - resource_chain: - - billing - - history - method: list - /user/billing/profile: - get: - deprecated: true - description: Accesses your billing profile object. - operationId: user-billing-profile-(-deprecated)-billing-profile-details - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/billSubsApiBillingResponseSingle' - description: Billing Profile Details response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - properties: - account_type: - type: string - address: - type: string - address2: - type: string - balance: - type: string - card_expiry_month: - type: integer - card_expiry_year: - type: integer - card_number: - type: string - city: - type: string - company: - type: string - country: - type: string - created_on: - format: date-time - type: string - readOnly: true - device_data: - type: string - edited_on: - format: date-time - type: string - enterprise_billing_email: - type: string - x-auditable: true - enterprise_primary_email: - type: string - x-auditable: true - first_name: - type: string - id: - $ref: >- - #/components/schemas/billSubsApiComponentsSchemasIdentifier - is_partner: - type: boolean - last_name: - type: string - next_bill_date: - format: date-time - type: string - payment_address: - type: string - payment_address2: - type: string - payment_city: - type: string - payment_country: - type: string - payment_email: - type: string - payment_first_name: - type: string - payment_gateway: - type: string - payment_last_name: - type: string - payment_nonce: - type: string - payment_state: - type: string - payment_zipcode: - type: string - primary_email: - type: string - x-auditable: true - state: - type: string - tax_id_type: - type: string - telephone: - type: string - use_legacy: - type: boolean - validation_code: - type: string - vat: - type: string - zipcode: - type: string - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Billing Profile Details response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Billing Profile Details - tags: - - User Billing Profile - x-api-token-group: - - Billing Write - - Billing Read - x-cfPermissionsRequired: - enum: - - '#billing:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: user - resource_chain: - - billing - - profile - method: get - /user/invites: - get: - description: Lists all invitations associated with my user. - operationId: user'-s-invites-list-invitations - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamSchemasCollectionInviteResponse' - description: List Invitations response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: List Invitations response failure - security: - - api_email: [] - api_key: [] - summary: List Invitations - tags: - - User's Invites - x-api-token-group: - - Memberships Write - - Memberships Read - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: user - resource_chain: - - invites - method: list - /user/invites/{invite_id}: - get: - description: Gets the details of an invitation. - operationId: user'-s-invites-invitation-details - parameters: - - in: path - name: invite_id - schema: - $ref: '#/components/schemas/iamInviteComponentsSchemasIdentifier' - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamSingleInviteResponse' - description: Invitation Details response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Invitation Details response failure - security: - - api_email: [] - api_key: [] - summary: Invitation Details - tags: - - User's Invites - x-api-token-group: - - Memberships Write - - Memberships Read - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: user - resource_chain: - - invites - method: get - patch: - description: Responds to an invitation. - operationId: user'-s-invites-respond-to-invitation - parameters: - - in: path - name: invite_id - schema: - $ref: '#/components/schemas/iamInviteComponentsSchemasIdentifier' - required: true - requestBody: - content: - application/json: - schema: - properties: - status: - description: >- - Status of your response to the invitation (rejected or - accepted). - enum: - - accepted - - rejected - type: string - required: - - status - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamSingleInviteResponse' - description: Respond to Invitation response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Respond to Invitation response failure - security: - - api_email: [] - api_key: [] - summary: Respond to Invitation - tags: - - User's Invites - x-api-token-group: - - Memberships Write - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: user - resource_chain: - - invites - method: edit - /user/load_balancing_analytics/events: - get: - description: List origin health changes. - operationId: load-balancer-healthcheck-events-list-healthcheck-events - parameters: - - in: query - name: until - schema: - $ref: '#/components/schemas/loadBalancingUntil' - - in: query - name: pool_name - schema: - $ref: '#/components/schemas/loadBalancingPoolName' - - in: query - name: origin_healthy - schema: - $ref: '#/components/schemas/loadBalancingOriginHealthy_2' - - in: query - name: pool_id - schema: - $ref: '#/components/schemas/loadBalancingSchemasIdentifier' - - in: query - name: since - schema: - description: >- - Start date and time of requesting data period in the ISO8601 - format. - format: date-time - type: string - - in: query - name: origin_name - schema: - description: The name for the origin to filter. - type: string - - in: query - name: pool_healthy - schema: - default: true - description: >- - If true, filter events where the pool status is healthy. If false, - filter events where the pool status is unhealthy. - type: boolean - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/loadBalancingComponentsSchemasResponseCollection - description: List Healthcheck Events response. - 4XX: - content: - application/json: - schema: - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/loadBalancingResultInfo' - result: - items: - $ref: '#/components/schemas/loadBalancingAnalytics' - type: array - enum: - - null - description: List Healthcheck Events response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Healthcheck Events - tags: - - Load Balancer Healthcheck Events - x-api-token-group: - - 'Load Balancing: Monitors and Pools Write' - - 'Load Balancing: Monitors and Pools Read' - /user/organizations: - get: - deprecated: true - description: Lists organizations the user is associated with. - operationId: user'-s-organizations-list-organizations - parameters: - - in: query - name: name - schema: - $ref: '#/components/schemas/iamSchemasName' - - in: query - name: page - schema: - default: 1 - description: Page number of paginated results. - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 20 - description: Number of organizations per page. - maximum: 50 - minimum: 5 - type: number - - in: query - name: order - schema: - description: Field to order organizations by. - enum: - - id - - name - - status - type: string - - in: query - name: direction - schema: - description: Direction to order organizations. - enum: - - asc - - desc - type: string - - in: query - name: match - schema: - default: all - description: Whether to match all search requirements or at least one (any). - enum: - - any - - all - type: string - - in: query - name: status - schema: - description: >- - Whether the user is a member of the organization or has an - inivitation pending. - enum: - - member - - invited - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamCollectionOrganizationResponse' - description: List Organizations response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: List Organizations response failure - security: - - api_email: [] - api_key: [] - summary: List Organizations - tags: - - User's Organizations - x-api-token-group: - - Memberships Write - - Memberships Read - x-cfDeprecation: - description: >- - This endpoint and its related APIs are deprecated in favor of the - `/accounts` equivalent APIs, which have a broader range of features - and are backwards compatible with these API. - display: true - eol: '2020-02-04' - id: org_deprecation - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: user - resource_chain: - - organizations - method: list - /user/organizations/{organization_id}: - delete: - deprecated: true - description: Removes association to an organization. - operationId: user'-s-organizations-leave-organization - parameters: - - name: organization_id - in: path - required: true - description: The organization ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - id: - $ref: '#/components/schemas/iamCommonComponentsSchemasIdentifier' - type: object - description: Leave Organization response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Leave Organization response failure - security: - - api_email: [] - api_key: [] - summary: Leave Organization - tags: - - User's Organizations - x-cfDeprecation: - description: >- - This endpoint and its related APIs are deprecated in favor of the - `/accounts` equivalent APIs, which have a broader range of features - and are backwards compatible with these API. - display: true - eol: '2020-02-04' - id: org_deprecation - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: user - resource_chain: - - organizations - method: delete - get: - deprecated: true - description: Gets a specific organization the user is associated with. - operationId: user'-s-organizations-organization-details - parameters: - - name: organization_id - in: path - required: true - description: The organization ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamSingleOrganizationResponse' - description: Organization Details response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Organization Details response failure - security: - - api_email: [] - api_key: [] - summary: Organization Details - tags: - - User's Organizations - x-cfDeprecation: - description: >- - This endpoint and its related APIs are deprecated in favor of the - `/accounts` equivalent APIs, which have a broader range of features - and are backwards compatible with these API. - display: true - eol: '2020-02-04' - id: org_deprecation - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: user - resource_chain: - - organizations - method: get - /user/subscriptions: - get: - description: Lists all of a user's subscriptions. - operationId: user-subscription-get-user-subscriptions - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/billSubsApiUserSubscriptionResponseCollection - description: Get User Subscriptions response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - items: - $ref: '#/components/schemas/billSubsApiSubscription' - nullable: true - type: array - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/billSubsApiResultInfo' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Get User Subscriptions response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get User Subscriptions - tags: - - User Subscription - x-api-token-group: - - Billing Write - - Billing Read - x-cfPermissionsRequired: - enum: - - '#billing:read' - x-stackql-sdk: - service: user - resource_chain: - - subscriptions - method: get - /user/subscriptions/{identifier}: - delete: - description: Deletes a user's subscription. - operationId: user-subscription-delete-user-subscription - parameters: - - name: identifier - in: path - required: true - description: Resource identifier. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - subscription_id: - $ref: '#/components/schemas/billSubsApiSchemasIdentifier' - type: object - description: Delete User Subscription response - 4XX: - content: - application/json: - schema: - properties: - subscription_id: - $ref: '#/components/schemas/billSubsApiSchemasIdentifier' - errors: - minLength: 1 - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful - enum: - - false - type: boolean - type: object - required: - - success - - errors - - messages - - result - description: Delete User Subscription response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete User Subscription - tags: - - User Subscription - x-api-token-group: - - Billing Write - x-cfPermissionsRequired: - enum: - - '#billing:edit' - x-stackql-sdk: - service: user - resource_chain: - - subscriptions - method: delete - put: - description: Updates a user's subscriptions. - operationId: user-subscription-update-user-subscription - parameters: - - name: identifier - in: path - required: true - description: Resource identifier. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/billSubsApiSubscriptionV2' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/billSubsApiUserSubscriptionResponseSingle' - description: Update User Subscription response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - type: object - enum: - - null - nullable: true - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Update User Subscription response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update User Subscription - tags: - - User Subscription - x-api-token-group: - - Billing Write - x-cfPermissionsRequired: - enum: - - '#billing:read' - - '#billing:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: user - resource_chain: - - subscriptions - method: update - /user/tokens: - get: - description: List all access tokens you created. - operationId: user-api-tokens-list-tokens - parameters: - - in: query - name: page - schema: - default: 1 - description: Page number of paginated results. - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 20 - description: Maximum number of results per page. - maximum: 50 - minimum: 5 - type: number - - in: query - name: direction - schema: - description: Direction to order results. - enum: - - asc - - desc - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamCollectionTokensResponse' - description: List Tokens response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: List Tokens response failure - security: - - api_token: [] - summary: List Tokens - tags: - - User API Tokens - x-api-token-group: - - API Tokens Write - - API Tokens Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.token.list - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: user - resource_chain: - - tokens - method: list - post: - description: Create a new access token. - operationId: user-api-tokens-create-token - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/iamCreatePayload' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamSingleTokenCreateResponse' - description: Create Token response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Create Token response failure - security: - - api_token: [] - summary: Create Token - tags: - - User API Tokens - x-api-token-group: - - API Tokens Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.token.create - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: user - resource_chain: - - tokens - method: create - /user/tokens/permission_groups: - get: - description: Find all available permission groups for API Tokens. - operationId: permission-groups-list-permission-groups - parameters: - - description: >- - Filter by the name of the permission group. The value must be - URL-encoded. - in: query - name: name - schema: - type: string - - description: >- - Filter by the scope of the permission group. The value must be - URL-encoded. - in: query - name: scope - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamPermissionsGroupResponseCollection' - description: List Token Permission Groups response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: List Token Permission Groups response failure - security: - - api_token: [] - summary: List Token Permission Groups - tags: - - User API Tokens - x-api-token-group: - - API Tokens Write - - API Tokens Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.token.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: user - resource_chain: - - tokens - - permission_groups - method: list - /user/tokens/verify: - get: - description: Test whether a token works. - operationId: user-api-tokens-verify-token - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamTokenVerifyResponseSingleSegment' - description: Verify Token response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Verify Token response failure - security: - - api_token: [] - summary: Verify Token - tags: - - User API Tokens - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: user - resource_chain: - - tokens - method: verify - /user/tokens/{token_id}: - delete: - description: Destroy a token. - operationId: user-api-tokens-delete-token - parameters: - - name: token_id - in: path - required: true - description: The API token ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseSingleId' - description: Delete Token response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Delete Token response failure - security: - - api_token: [] - summary: Delete Token - tags: - - User API Tokens - x-api-token-group: - - API Tokens Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.token.delete - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: user - resource_chain: - - tokens - method: delete - get: - description: Get information about a specific token. - operationId: user-api-tokens-token-details - parameters: - - name: token_id - in: path - required: true - description: The API token ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamSingleTokenResponse' - description: Token Details response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Token Details response failure - security: - - api_token: [] - summary: Token Details - tags: - - User API Tokens - x-api-token-group: - - API Tokens Write - - API Tokens Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.token.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: user - resource_chain: - - tokens - method: get - put: - description: Update an existing token. - operationId: user-api-tokens-update-token - parameters: - - name: token_id - in: path - required: true - description: The API token ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/iamTokenBody' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamSingleTokenResponse' - description: Update Token response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Update Token response failure - security: - - api_token: [] - summary: Update Token - tags: - - User API Tokens - x-api-token-group: - - API Tokens Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.token.update - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: user - resource_chain: - - tokens - method: update - /user/tokens/{token_id}/value: - put: - description: Roll the token secret. - operationId: user-api-tokens-roll-token - parameters: - - name: token_id - in: path - required: true - description: The API token ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/iamResponseSingleValue' - description: Roll Token response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/iamApiResponseCommonFailure' - description: Roll Token response failure - security: - - api_token: [] - summary: Roll Token - tags: - - User API Tokens - x-api-token-group: - - API Tokens Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.token.update - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: user - resource_chain: - - tokens - - value - method: update - /users/tenants: - get: - description: Retrieves list of tenants the authenticated user / method has access to. - operationId: User_listUserTenants - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - type: object - maxItems: 0 - type: array - messages: - items: - $ref: '#/components/schemas/organizationsApiV4Message' - type: array - result: - items: - $ref: '#/components/schemas/organizationsApiOrganization' - type: array - success: - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: The request has succeeded. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/organizationsApiV4ErrorResponse' - description: An unexpected error response. - security: - - api_email: [] - api_key: [] - summary: List user tenants - tags: - - User -components: - schemas: - aaaAuditLogs: - properties: - action: - properties: - result: - description: A boolean that indicates if the action attempted was successful. - example: true - type: boolean - type: - description: A short string that describes the action that was performed. - example: change_setting - type: string - type: object - actor: - properties: - email: - description: The email of the user that performed the action. - example: michelle@example.com - format: email - type: string - id: - description: >- - The ID of the actor that performed the action. If a user - performed the action, this will be their User ID. - example: f6b5de0326bb5182b8a4840ee01ec774 - type: string - ip: - description: The IP address of the request that performed the action. - example: 198.41.129.166 - type: string - type: - description: >- - The type of actor, whether a User, Cloudflare Admin, or an - Automated System. - enum: - - user - - admin - - Cloudflare - example: user - type: string - type: object - id: - description: A string that uniquely identifies the audit log. - example: d5b0f326-1232-4452-8858-1089bd7168ef - type: string - interface: - description: The source of the event. - example: API - type: string - metadata: - description: >- - An object which can lend more context to the action being logged. - This is a flexible value and varies between different actions. - example: - name: security_level - type: firewall - value: high - zone_name: example.com - type: object - newValue: - description: The new value of the resource that was modified. - example: low - type: string - oldValue: - description: The value of the resource before it was modified. - example: high - type: string - owner: - properties: - id: - $ref: '#/components/schemas/aaaIdentifier' - type: object - resource: - properties: - id: - description: An identifier for the resource that was affected by the action. - example: 023e105f4ecef8ad9ca31a8372d0c353 - type: string - type: - description: >- - A short string that describes the resource that was affected by - the action. - example: zone - type: string - type: object - when: - description: >- - A UTC RFC3339 timestamp that specifies when the action being logged - occured. - example: '2017-04-26T17:31:07Z' - format: date-time - type: string - type: object - aaaAuditLogsResponseCollection_2: - type: object - properties: - errors: - $ref: '#/components/schemas/aaaMessages' - messages: - $ref: '#/components/schemas/aaaMessages' - result: - items: - $ref: '#/components/schemas/aaaAuditLogs' - type: array - success: - example: true - type: boolean - required: - - errors - - success - - messages - aaaIdentifier: - description: Identifier - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - readOnly: true - type: string - aaaMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - billSubsApiAction: - description: The billing item action. - example: subscription - maxLength: 30 - readOnly: true - type: string - x-auditable: true - billSubsApiAmount: - description: The amount associated with this billing item. - example: 20.99 - readOnly: true - type: number - x-auditable: true - billSubsApiBillingHistory: - properties: - action: - $ref: '#/components/schemas/billSubsApiAction' - amount: - $ref: '#/components/schemas/billSubsApiAmount' - currency: - $ref: '#/components/schemas/billSubsApiCurrency' - description: - $ref: '#/components/schemas/billSubsApiDescription' - id: - $ref: '#/components/schemas/billSubsApiComponentsSchemasIdentifier' - occurred_at: - $ref: '#/components/schemas/billSubsApiOccurredAt' - type: - $ref: '#/components/schemas/billSubsApiType' - zone: - $ref: '#/components/schemas/billSubsApiSchemasZone' - required: - - id - - type - - action - - description - - occurred_at - - amount - - currency - - zone - type: object - billSubsApiBillingHistoryCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - items: - $ref: '#/components/schemas/billSubsApiBillingHistory' - nullable: true - type: array - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/billSubsApiResultInfo' - required: - - success - - errors - - messages - - result - billSubsApiBillingResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - properties: - account_type: - example: type - type: string - address: - example: 123 Main Street - type: string - address2: - example: Apt 1 - type: string - balance: - example: '0' - type: string - card_expiry_month: - example: 12 - type: integer - card_expiry_year: - example: 2099 - type: integer - card_number: - example: '4242424242424242' - type: string - city: - example: Anytown - type: string - company: - example: Company - type: string - country: - example: Anycountry - type: string - created_on: - example: '2014-03-01T12:21:59.3456Z' - format: date-time - type: string - readOnly: true - device_data: - example: sample_data - type: string - edited_on: - example: '2014-03-01T12:21:59.3456Z' - format: date-time - type: string - enterprise_billing_email: - example: johndoe@gmail.com - type: string - x-auditable: true - enterprise_primary_email: - example: johndoe@gmail.com - type: string - x-auditable: true - first_name: - example: John - type: string - id: - $ref: '#/components/schemas/billSubsApiComponentsSchemasIdentifier' - is_partner: - example: false - type: boolean - last_name: - example: Doe - type: string - next_bill_date: - example: '2014-03-01T12:21:59.3456Z' - format: date-time - type: string - payment_address: - example: 123 Main Street - type: string - payment_address2: - example: Apt 1 - type: string - payment_city: - example: Anytown - type: string - payment_country: - example: Anycountry - type: string - payment_email: - example: johndoe@gmail.com - type: string - payment_first_name: - example: John - type: string - payment_gateway: - example: gateway - type: string - payment_last_name: - example: Doe - type: string - payment_nonce: - example: abc123 - type: string - payment_state: - example: state - type: string - payment_zipcode: - example: '12345' - type: string - primary_email: - example: johndoe@gmail.com - type: string - x-auditable: true - state: - example: AnyState - type: string - tax_id_type: - example: type - type: string - telephone: - example: '1234567899' - type: string - use_legacy: - example: false - type: boolean - validation_code: - example: '1111' - type: string - vat: - example: GB123456789 - type: string - zipcode: - example: '12345' - type: string - type: object - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - billSubsApiComponentsSchemasIdentifier: - description: Billing item identifier tag. - example: b69a9f3492637782896352daae219e7d - maxLength: 32 - readOnly: true - type: string - x-auditable: true - billSubsApiCurrency: - description: The monetary unit in which pricing information is displayed. - example: USD - readOnly: true - type: string - x-auditable: true - billSubsApiCurrentPeriodEnd: - description: The end of the current period and also when the next billing is due. - example: '2014-03-31T12:20:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - billSubsApiCurrentPeriodStart: - description: >- - When the current billing period started. May match initial_period_start - if this is the first period. - example: '2014-05-11T12:20:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - billSubsApiDescription: - description: The billing item description. - example: The billing item description - maxLength: 255 - readOnly: true - type: string - x-auditable: true - billSubsApiFrequency: - description: How often the subscription is renewed automatically. - enum: - - weekly - - monthly - - quarterly - - yearly - example: monthly - type: string - x-auditable: true - billSubsApiMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - billSubsApiOccurredAt: - description: When the billing item was created. - example: '2014-03-01T12:21:59.3456Z' - format: date-time - type: string - x-auditable: true - billSubsApiPrice: - description: The price of the subscription that will be billed, in US dollars. - example: 20 - readOnly: true - type: number - x-auditable: true - billSubsApiRatePlan_2: - description: The rate plan applied to the subscription. - properties: - currency: - description: The currency applied to the rate plan subscription. - example: USD - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - externally_managed: - description: Whether this rate plan is managed externally from Cloudflare. - example: false - type: boolean - x-auditable: true - x-stainless-terraform-configurability: computed_optional - id: - description: The ID of the rate plan. - example: free - type: string - x-auditable: true - enum: - - free - - lite - - pro - - pro_plus - - business - - enterprise - - partners_free - - partners_pro - - partners_business - - partners_enterprise - is_contract: - description: >- - Whether a rate plan is enterprise-based (or newly adopted term - contract). - example: false - type: boolean - x-auditable: true - x-stainless-terraform-configurability: computed_optional - public_name: - description: The full name of the rate plan. - example: Business Plan - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - scope: - description: The scope that this rate plan applies to. - example: zone - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - sets: - description: >- - The list of sets this rate plan applies to. Returns array of - strings. - example: [] - items: - type: string - x-auditable: true - type: array - x-stainless-terraform-configurability: optional - type: object - billSubsApiResultInfo: - properties: - count: - description: Total number of results for the requested service - example: 1 - type: number - page: - description: Current page within paginated list of results - example: 1 - type: number - per_page: - description: Number of results per page of results - example: 20 - type: number - total_count: - description: Total results available without any search parameters - example: 2000 - type: number - type: object - billSubsApiSchemasIdentifier: - description: Subscription identifier tag. - example: 506e3185e9c882d175a2d0cb0093d9f2 - maxLength: 32 - readOnly: true - type: string - x-auditable: true - billSubsApiSchemasZone: - properties: - name: - readOnly: true - type: string - x-auditable: true - type: object - billSubsApiState: - description: The state that the subscription is in. - enum: - - Trial - - Provisioned - - Paid - - AwaitingPayment - - Cancelled - - Failed - - Expired - example: Paid - readOnly: true - type: string - x-auditable: true - billSubsApiSubscription: - type: object - $ref: '#/components/schemas/billSubsApiSubscriptionV2' - billSubsApiSubscriptionV2: - properties: - currency: - $ref: '#/components/schemas/billSubsApiCurrency' - current_period_end: - $ref: '#/components/schemas/billSubsApiCurrentPeriodEnd' - current_period_start: - $ref: '#/components/schemas/billSubsApiCurrentPeriodStart' - frequency: - $ref: '#/components/schemas/billSubsApiFrequency' - id: - $ref: '#/components/schemas/billSubsApiSchemasIdentifier' - price: - $ref: '#/components/schemas/billSubsApiPrice' - rate_plan: - $ref: '#/components/schemas/billSubsApiRatePlan_2' - state: - $ref: '#/components/schemas/billSubsApiState' - type: object - billSubsApiType: - description: The billing item type. - example: charge - maxLength: 30 - readOnly: true - type: string - x-auditable: true - billSubsApiUserSubscriptionResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - items: - $ref: '#/components/schemas/billSubsApiSubscription' - nullable: true - type: array - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/billSubsApiResultInfo' - required: - - success - - errors - - messages - - result - billSubsApiUserSubscriptionResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - type: object - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - iamApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/iamSchemasMessages' - messages: - example: [] - $ref: '#/components/schemas/iamSchemasMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - iamApiResponseSingleId: - type: object - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - nullable: true - properties: - id: - $ref: '#/components/schemas/iamCommonComponentsSchemasIdentifier' - required: - - id - type: object - required: - - success - - errors - - messages - iamCidrList: - description: List of IPv4/IPv6 CIDR addresses. - example: - - 199.27.128.0/21 - - 2400:cb00::/32 - items: - description: IPv4/IPv6 CIDR. - example: 199.27.128.0/21 - type: string - x-auditable: true - type: array - iamCollectionOrganizationResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/iamResultInfo' - result: - items: - $ref: '#/components/schemas/iamOrganization' - type: array - required: - - success - - errors - - messages - iamCollectionTokensResponse: - title: Response with a list of tokens - type: object - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/iamResultInfo' - result: - items: - $ref: '#/components/schemas/iamTokenBase' - type: array - required: - - success - - errors - - messages - iamCommonComponentsSchemasIdentifier: - description: Identifier - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - minLength: 32 - type: string - x-auditable: true - iamComponentsSchemasStatus: - description: >- - Whether the user is a member of the organization or has an invitation - pending. - enum: - - member - - invited - example: member - type: string - x-auditable: true - iamCondition: - properties: - request_ip: - $ref: '#/components/schemas/iamRequestIp' - type: object - iamCountry: - description: The country in which the user lives. - example: US - maxLength: 30 - nullable: true - type: string - iamCreatePayload: - properties: - condition: - $ref: '#/components/schemas/iamCondition' - expires_on: - $ref: '#/components/schemas/iamExpiresOn' - name: - $ref: '#/components/schemas/iamName' - not_before: - $ref: '#/components/schemas/iamNotBefore' - policies: - $ref: '#/components/schemas/iamTokenPolicies' - required: - - name - - policies - type: object - iamEffect: - description: Allow or deny operations against the resources. - enum: - - allow - - deny - example: allow - type: string - x-auditable: true - iamExpiresOn: - description: >- - The expiration time on or after which the JWT MUST NOT be accepted for - processing. - example: '2020-01-01T00:00:00Z' - format: date-time - type: string - x-auditable: true - iamFirstName: - description: User's first name - example: John - maxLength: 60 - nullable: true - type: string - x-auditable: true - iamInviteComponentsSchemasIdentifier: - description: Invite identifier tag. - example: 4f5f0c14a2a41d5063dd301b2f829f04 - maxLength: 32 - readOnly: true - type: string - x-auditable: true - iamInvitedBy: - description: The email address of the user who created the invite. - example: user@example.com - maxLength: 90 - type: string - x-auditable: true - iamInvitedMemberEmail: - description: Email address of the user to add to the organization. - example: user@example.com - maxLength: 90 - type: string - x-auditable: true - iamInvitedOn: - description: When the invite was sent. - example: '2014-01-01T05:20:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - iamIssuedOn: - description: The time on which the token was created. - example: '2018-07-01T05:20:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - iamLastName: - description: User's last name - example: Appleseed - maxLength: 60 - nullable: true - type: string - x-auditable: true - iamLastUsedOn: - description: Last time the token was used. - example: '2020-01-02T12:34:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - iamModifiedOn: - description: Last time the token was modified. - example: '2018-07-02T05:20:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - iamName: - description: Token name. - example: readonly token - maxLength: 120 - type: string - x-auditable: true - iamNotBefore: - description: The time before which the token MUST NOT be accepted for processing. - example: '2018-07-01T05:20:00Z' - format: date-time - type: string - x-auditable: true - iamOrganization: - properties: - id: - $ref: '#/components/schemas/iamCommonComponentsSchemasIdentifier' - name: - $ref: '#/components/schemas/iamSchemasName' - permissions: - $ref: '#/components/schemas/iamSchemasPermissions' - roles: - description: List of roles that a user has within an organization. - items: - example: All Privileges - Super Administrator - maxLength: 120 - type: string - x-auditable: true - readOnly: true - type: array - status: - $ref: '#/components/schemas/iamComponentsSchemasStatus' - type: object - iamPermissionGroup: - description: >- - A named group of permissions that map to a group of operations against - resources. - properties: - id: - description: Identifier of the permission group. - example: 6d7f2f5f5b1d4a0e9081fdc98d432fd1 - type: string - x-auditable: true - meta: - description: Attributes associated to the permission group. - example: - label: load_balancer_admin - scopes: com.cloudflare.api.account - properties: - key: - type: string - x-auditable: true - value: - type: string - x-auditable: true - type: object - name: - description: Name of the permission group. - example: Load Balancer - readOnly: true - type: string - x-auditable: true - required: - - id - type: object - iamPermissionGroups: - description: A set of permission groups that are specified to the policy. - example: - - id: c8fed203ed3043cba015a93ad1616f1f - meta: - label: load_balancer_admin - scopes: com.cloudflare.api.account - name: Zone Read - - id: 82e64a83756745bbbb1c9c2701bf816b - meta: - label: fbm_user - scopes: com.cloudflare.api.account - name: Magic Network Monitoring - items: - $ref: '#/components/schemas/iamPermissionGroup' - type: array - iamPermissionsGroupResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/iamResultInfo' - result: - example: - - id: 7cf72faf220841aabcfdfab81c43c4f6 - name: Billing Read - scopes: - - com.cloudflare.api.account - - id: 9d24387c6e8544e2bc4024a03991339f - name: 'Load Balancing: Monitors and Pools Read' - scopes: - - com.cloudflare.api.account - - id: d2a1802cc9a34e30852f8b33869b2f3c - name: 'Load Balancing: Monitors and Pools Write' - scopes: - - com.cloudflare.api.account - - id: 8b47d2786a534c08a1f94ee8f9f599ef - name: Workers KV Storage Read - scopes: - - com.cloudflare.api.account - - id: f7f0eda5697f475c90846e879bab8666 - name: Workers KV Storage Write - scopes: - - com.cloudflare.api.account - - id: 1a71c399035b4950a1bd1466bbe4f420 - name: Workers Scripts Read - scopes: - - com.cloudflare.api.account - - id: e086da7e2179491d91ee5f35b3ca210a - name: Workers Scripts Write - scopes: - - com.cloudflare.api.account - items: - $ref: >- - #/components/schemas/iamPermissionsGroupResponseCollection_result_item - type: array - required: - - success - - errors - - messages - iamPermissionsGroupResponseCollection_result_item: - properties: - id: - description: Public ID. - type: string - x-auditable: true - name: - description: Permission Group Name - type: string - x-auditable: true - scopes: - description: Resources to which the Permission Group is scoped - items: - enum: - - com.cloudflare.api.account - - com.cloudflare.api.account.zone - - com.cloudflare.api.user - - com.cloudflare.edge.r2.bucket - type: string - x-auditable: true - type: array - type: object - iamPolicyIdentifier: - description: Policy identifier. - example: f267e341f3dd4697bd3b9f71dd96247f - readOnly: true - type: string - x-auditable: true - x-stainless-terraform-always-send: true - iamPolicyWithPermissionGroupsAndResources: - properties: - effect: - $ref: '#/components/schemas/iamEffect' - id: - $ref: '#/components/schemas/iamPolicyIdentifier' - permission_groups: - $ref: '#/components/schemas/iamPermissionGroups' - resources: - $ref: '#/components/schemas/iamResources' - required: - - id - - effect - - permission_groups - - resources - title: Policy with Permission Groups and Resources - type: object - iamRequestIp: - description: Client IP restrictions. - example: - in: - - 123.123.123.0/24 - - 2606:4700::/32 - not_in: - - 123.123.123.100/24 - - 2606:4700:4700::/48 - properties: - in: - $ref: '#/components/schemas/iamCidrList' - not_in: - $ref: '#/components/schemas/iamCidrList' - type: object - iamResources: - description: A list of resource names that the policy applies to. - x-auditable: true - type: object - iamResponseSingleValue: - type: object - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/iamValue' - required: - - success - - errors - - messages - iamResultInfo: - properties: - count: - description: Total number of results for the requested service - example: 1 - type: number - page: - description: Current page within paginated list of results - example: 1 - type: number - per_page: - description: Number of results per page of results - example: 20 - type: number - total_count: - description: Total results available without any search parameters - example: 2000 - type: number - type: object - iamRoleNames: - description: List of role names the membership has for this account. - items: - example: Account Administrator - maxLength: 120 - type: string - x-auditable: true - readOnly: true - type: array - iamSchemasCollectionInviteResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/iamResultInfo' - result: - items: - $ref: '#/components/schemas/iamUserInvite' - type: array - required: - - success - - errors - - messages - iamSchemasExpiresOn: - description: When the invite is no longer active. - example: '2014-01-01T05:20:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - iamSchemasMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - iamSchemasName: - description: Organization name. - example: Cloudflare, Inc. - maxLength: 100 - type: string - x-auditable: true - iamSchemasPermissions: - description: Access permissions for this User. - items: - example: '#zones:read' - maxLength: 160 - type: string - x-auditable: true - readOnly: true - type: array - iamSingleInviteResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/iamUserInvite' - required: - - success - - errors - - messages - iamSingleOrganizationResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - type: object - required: - - success - - errors - - messages - iamSingleTokenCreateResponse: - title: Response of a create request with a single token - type: object - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/iamTokenWithValue' - required: - - success - - errors - - messages - iamSingleTokenResponse: - title: Response with a single token - type: object - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/iamTokenBase' - required: - - success - - errors - - messages - iamSingleUserResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - properties: - betas: - description: Lists the betas that the user is participating in. - items: - description: User feature flag - example: zone_level_access_beta - type: string - readOnly: true - type: array - country: - $ref: '#/components/schemas/iamCountry' - first_name: - $ref: '#/components/schemas/iamFirstName' - has_business_zones: - default: false - description: Indicates whether user has any business zones - readOnly: true - type: boolean - has_enterprise_zones: - default: false - description: Indicates whether user has any enterprise zones - readOnly: true - type: boolean - has_pro_zones: - default: false - description: Indicates whether user has any pro zones - readOnly: true - type: boolean - id: - description: Identifier of the user. - example: 6d7f2f5f5b1d4a0e9081fdc98d432fd1 - readOnly: true - type: string - last_name: - $ref: '#/components/schemas/iamLastName' - organizations: - items: - $ref: '#/components/schemas/iamOrganization' - type: array - suspended: - default: false - description: Indicates whether user has been suspended - readOnly: true - type: boolean - telephone: - $ref: '#/components/schemas/iamTelephone' - two_factor_authentication_enabled: - $ref: '#/components/schemas/iamTwoFactorAuthenticationEnabled' - two_factor_authentication_locked: - $ref: '#/components/schemas/iamTwoFactorAuthenticationLocked' - zipcode: - $ref: '#/components/schemas/iamZipcode' - type: object - required: - - success - - errors - - messages - iamTelephone: - description: User's telephone number - example: +1 123-123-1234 - maxLength: 20 - nullable: true - type: string - iamTokenBase: - properties: - condition: - $ref: '#/components/schemas/iamCondition' - expires_on: - $ref: '#/components/schemas/iamExpiresOn' - id: - $ref: '#/components/schemas/iamTokenIdentifier' - issued_on: - $ref: '#/components/schemas/iamIssuedOn' - last_used_on: - $ref: '#/components/schemas/iamLastUsedOn' - modified_on: - $ref: '#/components/schemas/iamModifiedOn' - readOnly: true - name: - $ref: '#/components/schemas/iamName' - not_before: - $ref: '#/components/schemas/iamNotBefore' - policies: - $ref: '#/components/schemas/iamTokenPolicies' - status: - $ref: '#/components/schemas/iamTokenStatus' - type: object - iamTokenBody: - title: Token defined in a request body - $ref: '#/components/schemas/iamTokenBase' - type: object - iamTokenIdentifier: - description: Token identifier tag. - example: ed17574386854bf78a67040be0a770b0 - maxLength: 32 - readOnly: true - type: string - x-auditable: true - iamTokenPolicies: - description: List of access policies assigned to the token. - items: - $ref: '#/components/schemas/iamPolicyWithPermissionGroupsAndResources' - type: array - iamTokenStatus: - description: Status of the token. - enum: - - active - - disabled - - expired - example: active - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - iamTokenVerifyResponseSingleSegment: - type: object - properties: - errors: - $ref: '#/components/schemas/iamSchemasMessages' - messages: - $ref: '#/components/schemas/iamSchemasMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - properties: - expires_on: - $ref: '#/components/schemas/iamExpiresOn' - id: - $ref: '#/components/schemas/iamTokenIdentifier' - not_before: - $ref: '#/components/schemas/iamNotBefore' - status: - $ref: '#/components/schemas/iamTokenStatus' - required: - - id - - status - type: object - required: - - success - - errors - - messages - iamTokenWithValue: - title: Create token response, with the token value - properties: - condition: - $ref: '#/components/schemas/iamCondition' - expires_on: - $ref: '#/components/schemas/iamExpiresOn' - id: - $ref: '#/components/schemas/iamTokenIdentifier' - issued_on: - $ref: '#/components/schemas/iamIssuedOn' - last_used_on: - $ref: '#/components/schemas/iamLastUsedOn' - modified_on: - $ref: '#/components/schemas/iamModifiedOn' - readOnly: true - name: - $ref: '#/components/schemas/iamName' - not_before: - $ref: '#/components/schemas/iamNotBefore' - policies: - $ref: '#/components/schemas/iamTokenPolicies' - status: - $ref: '#/components/schemas/iamTokenStatus' - value: - $ref: '#/components/schemas/iamValue' - type: object - iamTwoFactorAuthenticationEnabled: - default: false - description: >- - Indicates whether two-factor authentication is enabled for the user - account. Does not apply to API authentication. - readOnly: true - type: boolean - iamTwoFactorAuthenticationLocked: - default: false - description: >- - Indicates whether two-factor authentication is required by one of the - accounts that the user is a member of. - readOnly: true - type: boolean - iamUserInvite: - properties: - expires_on: - $ref: '#/components/schemas/iamSchemasExpiresOn' - id: - $ref: '#/components/schemas/iamInviteComponentsSchemasIdentifier' - invited_by: - $ref: '#/components/schemas/iamInvitedBy' - invited_member_email: - $ref: '#/components/schemas/iamInvitedMemberEmail' - invited_member_id: - description: ID of the user to add to the organization. - example: 5a7805061c76ada191ed06f989cc3dac - maxLength: 32 - nullable: true - readOnly: true - type: string - x-auditable: true - invited_on: - $ref: '#/components/schemas/iamInvitedOn' - organization_id: - description: ID of the organization the user will be added to. - example: 5a7805061c76ada191ed06f989cc3dac - maxLength: 32 - readOnly: true - type: string - x-auditable: true - organization_is_enforcing_twofactor: - example: true - type: boolean - x-auditable: true - organization_name: - description: Organization name. - example: Cloudflare, Inc. - maxLength: 100 - readOnly: true - type: string - x-auditable: true - roles: - $ref: '#/components/schemas/iamRoleNames' - status: - description: Current status of the invitation. - enum: - - pending - - accepted - - rejected - - expired - example: accepted - x-auditable: true - type: string - required: - - invited_member_id - - organization_id - type: object - iamValue: - description: The token value. - example: 8M7wS6hCpXVc-DoRnPPY_UCWPgy8aea4Wy6kCe5T - maxLength: 80 - minLength: 40 - readOnly: true - type: string - x-sensitive: true - iamZipcode: - description: The zipcode or postal code where the user lives. - example: '12345' - maxLength: 20 - nullable: true - type: string - loadBalancingAddress: - description: >- - The IP address (IPv4 or IPv6) of the origin, or its publicly addressable - hostname. Hostnames entered here should resolve directly to the origin, - and not be a hostname proxied by Cloudflare. To set an internal/reserved - address, virtual_network_id must also be set. - example: 0.0.0.0 - type: string - x-auditable: true - loadBalancingAnalytics: - properties: - id: - default: 1 - type: integer - origins: - example: - - address: 198.51.100.4 - changed: true - enabled: true - failure_reason: No failures - healthy: true - ip: 198.51.100.4 - name: some-origin - items: - $ref: '#/components/schemas/loadBalancingOriginAnalytics' - type: array - pool: - example: - changed: true - healthy: true - id: 74bc6a8b9b0dda3d651707a2928bad0c - minimum_origins: 1 - name: some-pool - type: object - timestamp: - example: '2014-01-01T05:20:00.12345Z' - format: date-time - type: string - type: object - loadBalancingComponentsSchemasResponseCollection: - required: - - success - - errors - - messages - - result - type: object - properties: - errors: - $ref: '#/components/schemas/loadBalancingMessages' - messages: - $ref: '#/components/schemas/loadBalancingMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/loadBalancingResultInfo' - result: - items: - $ref: '#/components/schemas/loadBalancingAnalytics' - type: array - loadBalancingMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - loadBalancingOriginAnalytics: - properties: - address: - $ref: '#/components/schemas/loadBalancingAddress' - changed: - $ref: '#/components/schemas/loadBalancingOriginChanged' - enabled: - $ref: '#/components/schemas/loadBalancingSchemasEnabled' - failure_reason: - $ref: '#/components/schemas/loadBalancingOriginFailureReason' - healthy: - $ref: '#/components/schemas/loadBalancingOriginHealthy' - ip: - $ref: '#/components/schemas/loadBalancingOriginIp' - name: - $ref: '#/components/schemas/loadBalancingSchemasName' - type: object - loadBalancingOriginChanged: - description: Whether the origin has changed health status. - example: true - type: boolean - x-auditable: true - loadBalancingOriginFailureReason: - description: Failure reason for un-healthy origin health check. - example: No failures - type: string - x-auditable: true - loadBalancingOriginHealthy: - description: Whether the origin is reported as healthy. - example: true - type: boolean - x-auditable: true - loadBalancingOriginHealthy_2: - default: true - description: >- - If true, filter events where the origin status is healthy. If false, - filter events where the origin status is unhealthy. - example: true - type: boolean - x-auditable: true - loadBalancingOriginIp: - description: The IP address (IPv4 or IPv6) of the origin. - example: 198.51.100.4 - type: string - x-auditable: true - loadBalancingPoolName: - description: The name for the pool to filter. - example: primary-dc - type: string - x-auditable: true - loadBalancingResultInfo: - properties: - count: - description: Total number of results on the current page. - example: 20 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 2000 - type: number - total_pages: - description: Total number of pages available. - example: 100 - type: number - type: object - loadBalancingSchemasEnabled: - default: true - description: >- - Whether to enable (the default) this origin within the pool. Disabled - origins will not receive traffic and are excluded from health checks. - The origin will only be disabled for the current pool. - example: true - type: boolean - x-auditable: true - loadBalancingSchemasIdentifier: - example: 17b5962d775c646f3f9725cbc7a53df4 - type: string - x-auditable: true - loadBalancingSchemasName: - description: A human-identifiable name for the origin. - example: app-server-1 - type: string - x-auditable: true - loadBalancingUntil: - description: End date and time of requesting data period in the ISO8601 format. - example: '2016-11-11T13:00:00Z' - format: date-time - type: string - x-auditable: true - organizationsApiOrganization: - description: References an Organization in the Cloudflare data model. - properties: - create_time: - format: date-time - readOnly: true - type: string - id: - readOnly: true - $ref: '#/components/schemas/organizationsApiOrganizationID' - meta: - properties: - flags: - $ref: '#/components/schemas/organizationsApiOrganizationFlags' - managed_by: - type: string - readOnly: true - type: object - name: - type: string - parent: - properties: - id: - $ref: '#/components/schemas/organizationsApiOrganizationID' - name: - readOnly: true - type: string - required: - - id - - name - type: object - profile: - $ref: '#/components/schemas/organizationsApiProfile' - required: - - id - - name - - create_time - - meta - type: object - organizationsApiOrganizationFlags: - description: Enable features for Organizations. - properties: - account_creation: - type: string - account_deletion: - type: string - account_migration: - type: string - account_mobility: - type: string - sub_org_creation: - type: string - required: - - account_creation - - account_deletion - - account_migration - - account_mobility - - sub_org_creation - type: object - organizationsApiOrganizationID: - example: a7b9c3d2e8f4g1h5i6j0k9l2m3n7o4p8 - title: Organization ID - type: string - organizationsApiProfile: - properties: - business_address: - type: string - business_email: - type: string - business_name: - type: string - business_phone: - type: string - external_metadata: - type: string - required: - - business_name - - business_email - - business_phone - - business_address - - external_metadata - type: object - organizationsApiV4ErrorResponse: - properties: - errors: - items: - $ref: '#/components/schemas/organizationsApiV4Message' - type: array - messages: - items: - $ref: '#/components/schemas/organizationsApiV4Message' - type: array - result: - type: object - success: - enum: - - false - type: boolean - required: - - success - - errors - - messages - type: object - organizationsApiV4Message: - $ref: '#/components/schemas/responseInfo' - responseInfo: - properties: - code: - minimum: 1000 - type: integer - message: - type: string - documentation_url: - type: string - source: - type: object - properties: - pointer: - type: string - required: - - code - - message - type: object - uniqueItems: true - result: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/aaaMessages' - messages: - $ref: '#/components/schemas/aaaMessages' - success: - description: Whether the API call was successful - enum: - - false - example: false - type: boolean - result: - items: - $ref: '#/components/schemas/aaaAuditLogs' - type: array - required: - - errors - - messages - - success - type: object - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - user: - id: cloudflare.user.user - name: user - title: User - methods: - list: - operation: - $ref: '#/paths/~1user/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1user/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/user/methods/list' - insert: [] - update: - - $ref: '#/components/x-stackQL-resources/user/methods/edit' - delete: [] - replace: [] - audit_logs: - id: cloudflare.user.audit_logs - name: audit_logs - title: Audit Logs - methods: - list: - operation: - $ref: '#/paths/~1user~1audit_logs/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/audit_logs/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - history: - id: cloudflare.user.history - name: history - title: History - methods: - list: - operation: - $ref: '#/paths/~1user~1billing~1history/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/history/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - profile: - id: cloudflare.user.profile - name: profile - title: Profile - methods: - list: - operation: - $ref: '#/paths/~1user~1billing~1profile/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/profile/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - invites: - id: cloudflare.user.invites - name: invites - title: Invites - methods: - list: - operation: - $ref: '#/paths/~1user~1invites/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - get: - operation: - $ref: '#/paths/~1user~1invites~1{invite_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1user~1invites~1{invite_id}/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/invites/methods/get' - - $ref: '#/components/x-stackQL-resources/invites/methods/list' - insert: [] - update: - - $ref: '#/components/x-stackQL-resources/invites/methods/edit' - delete: [] - replace: [] - events: - id: cloudflare.user.events - name: events - title: Events - methods: - list: - operation: - $ref: '#/paths/~1user~1load_balancing_analytics~1events/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/events/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - organizations: - id: cloudflare.user.organizations - name: organizations - title: Organizations - methods: - list: - operation: - $ref: '#/paths/~1user~1organizations/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - delete: - operation: - $ref: '#/paths/~1user~1organizations~1{organization_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1user~1organizations~1{organization_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/organizations/methods/get' - - $ref: '#/components/x-stackQL-resources/organizations/methods/list' - insert: [] - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/organizations/methods/delete' - replace: [] - subscriptions: - id: cloudflare.user.subscriptions - name: subscriptions - title: Subscriptions - methods: - list: - operation: - $ref: '#/paths/~1user~1subscriptions/get' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: '#/paths/~1user~1subscriptions~1{identifier}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1user~1subscriptions~1{identifier}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/subscriptions/methods/list' - insert: [] - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/subscriptions/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/subscriptions/methods/update' - user_tokens: - id: cloudflare.user.user_tokens - name: user_tokens - title: User Tokens - methods: - list: - operation: - $ref: '#/paths/~1user~1tokens/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/user_tokens/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - tokens: - id: cloudflare.user.tokens - name: tokens - title: Tokens - methods: - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1user~1tokens/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: '#/paths/~1user~1tokens~1{token_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1user~1tokens~1{token_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1user~1tokens~1{token_id}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - update_value: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1user~1tokens~1{token_id}~1value/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/tokens/methods/get' - insert: - - $ref: '#/components/x-stackQL-resources/tokens/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/tokens/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/tokens/methods/update' - permission_groups: - id: cloudflare.user.permission_groups - name: permission_groups - title: Permission Groups - methods: - list: - operation: - $ref: '#/paths/~1user~1tokens~1permission_groups/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/permission_groups/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - tokens_verify: - id: cloudflare.user.tokens_verify - name: tokens_verify - title: Tokens Verify - methods: - list: - operation: - $ref: '#/paths/~1user~1tokens~1verify/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/tokens_verify/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - tenants: - id: cloudflare.user.tenants - name: tenants - title: Tenants - methods: - list: - operation: - $ref: '#/paths/~1users~1tenants/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/tenants/methods/list' - insert: [] - update: [] - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: user API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /user: + get: + operationId: user-user-details + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamSingleUserResponse' + description: User Details response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: User Details response failure + security: + - api_email: [] + api_key: [] + summary: User Details + tags: + - User + x-api-token-group: + - User Details Write + - User Details Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.user.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: user + resource_chain: [] + method: get + patch: + description: Edit part of your user details. + operationId: user-edit-user + requestBody: + content: + application/json: + schema: + properties: + country: + $ref: '#/components/schemas/iamCountry' + first_name: + $ref: '#/components/schemas/iamFirstName' + last_name: + $ref: '#/components/schemas/iamLastName' + telephone: + $ref: '#/components/schemas/iamTelephone' + zipcode: + $ref: '#/components/schemas/iamZipcode' + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamSingleUserResponse' + description: Edit User response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Edit User response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Edit User + tags: + - User + x-api-token-group: + - User Details Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.user.update + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: user + resource_chain: [] + method: edit + /user/audit_logs: + get: + description: Gets a list of audit logs for a user account. Can be filtered by who made the change, on which zone, and the timeframe of the change. + operationId: audit-logs-get-user-audit-logs + parameters: + - in: query + name: id + schema: + description: Finds a specific log by its ID. + type: string + - in: query + name: export + schema: + description: Indicates that this request is an export of logs in CSV format. + type: boolean + - in: query + name: action.type + schema: + description: Filters by the action type. + type: string + - in: query + name: actor.ip + schema: + description: Filters by the IP address of the request that made the change by specific IP address or valid CIDR Range. + type: string + - in: query + name: actor.email + schema: + description: Filters by the email address of the actor that made the change. + format: email + type: string + - in: query + name: since + schema: + type: string + format: date + description: Limits the returned results to logs newer than the specified date. A `full-date` that conforms to RFC3339. + - in: query + name: before + schema: + type: string + format: date + description: Limits the returned results to logs older than the specified date. A `full-date` that conforms to RFC3339. + - in: query + name: zone.name + schema: + description: Filters by the name of the zone associated to the change. + type: string + - in: query + name: direction + schema: + default: desc + description: Changes the direction of the chronological sorting. + enum: + - desc + - asc + type: string + - in: query + name: per_page + schema: + default: 100 + description: Sets the number of results to return per page. + maximum: 1000 + minimum: 1 + type: number + - in: query + name: page + schema: + default: 1 + description: Defines which page of results to return. + minimum: 1 + type: number + - in: query + name: hide_user_logs + schema: + default: false + description: Indicates whether or not to hide user level audit logs. + type: boolean + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/aaaAuditLogsResponseCollection_2' + description: Get user audit logs response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/result' + description: Get user audit logs response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get user audit logs + tags: + - Audit Logs + x-api-token-group: + - Account Settings Write + - Account Settings Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: user + resource_chain: + - audit_logs + method: list + /user/billing/history: + get: + deprecated: true + description: Accesses your billing history object. + operationId: user-billing-history-(-deprecated)-billing-history-details + parameters: + - in: query + name: page + schema: + default: 1 + description: Page number of paginated results. + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 20 + description: Number of items per page. + maximum: 50 + minimum: 5 + type: number + - in: query + name: order + schema: + description: Field to order billing history by. + enum: + - type + - occurred_at + - action + type: string + - in: query + name: occurred_at + schema: + $ref: '#/components/schemas/billSubsApiOccurredAt' + - in: query + name: type + schema: + description: The billing item type. + maxLength: 30 + type: string + - in: query + name: action + schema: + description: The billing item action. + maxLength: 30 + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/billSubsApiBillingHistoryCollection' + description: Billing History Details response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + items: + $ref: '#/components/schemas/billSubsApiBillingHistory' + nullable: true + type: array + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/billSubsApiResultInfo' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Billing History Details response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Billing History Details + tags: + - User Billing History + x-api-token-group: + - Billing Write + - Billing Read + x-cfPermissionsRequired: + enum: + - '#billing:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: user + resource_chain: + - billing + - history + method: list + /user/billing/profile: + get: + deprecated: true + description: Accesses your billing profile object. + operationId: user-billing-profile-(-deprecated)-billing-profile-details + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/billSubsApiBillingResponseSingle' + description: Billing Profile Details response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + properties: + account_type: + type: string + address: + type: string + address2: + type: string + balance: + type: string + card_expiry_month: + type: integer + card_expiry_year: + type: integer + card_number: + type: string + city: + type: string + company: + type: string + country: + type: string + created_on: + format: date-time + type: string + readOnly: true + device_data: + type: string + edited_on: + format: date-time + type: string + enterprise_billing_email: + type: string + x-auditable: true + enterprise_primary_email: + type: string + x-auditable: true + first_name: + type: string + id: + $ref: '#/components/schemas/billSubsApiComponentsSchemasIdentifier' + is_partner: + type: boolean + last_name: + type: string + next_bill_date: + format: date-time + type: string + payment_address: + type: string + payment_address2: + type: string + payment_city: + type: string + payment_country: + type: string + payment_email: + type: string + payment_first_name: + type: string + payment_gateway: + type: string + payment_last_name: + type: string + payment_nonce: + type: string + payment_state: + type: string + payment_zipcode: + type: string + primary_email: + type: string + x-auditable: true + state: + type: string + tax_id_type: + type: string + telephone: + type: string + use_legacy: + type: boolean + validation_code: + type: string + vat: + type: string + zipcode: + type: string + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Billing Profile Details response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Billing Profile Details + tags: + - User Billing Profile + x-api-token-group: + - Billing Write + - Billing Read + x-cfPermissionsRequired: + enum: + - '#billing:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: user + resource_chain: + - billing + - profile + method: get + /user/invites: + get: + description: Lists all invitations associated with my user. + operationId: user'-s-invites-list-invitations + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamSchemasCollectionInviteResponse' + description: List Invitations response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: List Invitations response failure + security: + - api_email: [] + api_key: [] + summary: List Invitations + tags: + - User's Invites + x-api-token-group: + - Memberships Write + - Memberships Read + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: user + resource_chain: + - invites + method: list + /user/invites/{invite_id}: + get: + description: Gets the details of an invitation. + operationId: user'-s-invites-invitation-details + parameters: + - in: path + name: invite_id + schema: + $ref: '#/components/schemas/iamInviteComponentsSchemasIdentifier' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamSingleInviteResponse' + description: Invitation Details response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Invitation Details response failure + security: + - api_email: [] + api_key: [] + summary: Invitation Details + tags: + - User's Invites + x-api-token-group: + - Memberships Write + - Memberships Read + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: user + resource_chain: + - invites + method: get + patch: + description: Responds to an invitation. + operationId: user'-s-invites-respond-to-invitation + parameters: + - in: path + name: invite_id + schema: + $ref: '#/components/schemas/iamInviteComponentsSchemasIdentifier' + required: true + requestBody: + content: + application/json: + schema: + properties: + status: + description: Status of your response to the invitation (rejected or accepted). + enum: + - accepted + - rejected + type: string + required: + - status + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamSingleInviteResponse' + description: Respond to Invitation response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Respond to Invitation response failure + security: + - api_email: [] + api_key: [] + summary: Respond to Invitation + tags: + - User's Invites + x-api-token-group: + - Memberships Write + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: user + resource_chain: + - invites + method: edit + /user/load_balancing_analytics/events: + get: + description: List origin health changes. + operationId: load-balancer-healthcheck-events-list-healthcheck-events + parameters: + - in: query + name: until + schema: + $ref: '#/components/schemas/loadBalancingUntil' + - in: query + name: pool_name + schema: + $ref: '#/components/schemas/loadBalancingPoolName' + - in: query + name: origin_healthy + schema: + $ref: '#/components/schemas/loadBalancingOriginHealthy_2' + - in: query + name: pool_id + schema: + $ref: '#/components/schemas/loadBalancingSchemasIdentifier' + - in: query + name: since + schema: + description: Start date and time of requesting data period in the ISO8601 format. + format: date-time + type: string + - in: query + name: origin_name + schema: + description: The name for the origin to filter. + type: string + - in: query + name: pool_healthy + schema: + default: true + description: If true, filter events where the pool status is healthy. If false, filter events where the pool status is unhealthy. + type: boolean + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/loadBalancingComponentsSchemasResponseCollection' + description: List Healthcheck Events response. + 4XX: + content: + application/json: + schema: + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/loadBalancingResultInfo' + result: + items: + $ref: '#/components/schemas/loadBalancingAnalytics' + type: array + enum: + - null + description: List Healthcheck Events response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Healthcheck Events + tags: + - Load Balancer Healthcheck Events + x-api-token-group: + - 'Load Balancing: Monitors and Pools Write' + - 'Load Balancing: Monitors and Pools Read' + /user/organizations: + get: + deprecated: true + description: Lists organizations the user is associated with. + operationId: user'-s-organizations-list-organizations + parameters: + - in: query + name: name + schema: + $ref: '#/components/schemas/iamSchemasName' + - in: query + name: page + schema: + default: 1 + description: Page number of paginated results. + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 20 + description: Number of organizations per page. + maximum: 50 + minimum: 5 + type: number + - in: query + name: order + schema: + description: Field to order organizations by. + enum: + - id + - name + - status + type: string + - in: query + name: direction + schema: + description: Direction to order organizations. + enum: + - asc + - desc + type: string + - in: query + name: match + schema: + default: all + description: Whether to match all search requirements or at least one (any). + enum: + - any + - all + type: string + - in: query + name: status + schema: + description: Whether the user is a member of the organization or has an inivitation pending. + enum: + - member + - invited + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamCollectionOrganizationResponse' + description: List Organizations response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: List Organizations response failure + security: + - api_email: [] + api_key: [] + summary: List Organizations + tags: + - User's Organizations + x-api-token-group: + - Memberships Write + - Memberships Read + x-cfDeprecation: + description: This endpoint and its related APIs are deprecated in favor of the `/accounts` equivalent APIs, which have a broader range of features and are backwards compatible with these API. + display: true + eol: '2020-02-04' + id: org_deprecation + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: user + resource_chain: + - organizations + method: list + /user/organizations/{organization_id}: + delete: + deprecated: true + description: Removes association to an organization. + operationId: user'-s-organizations-leave-organization + parameters: + - name: organization_id + in: path + required: true + description: The organization ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + id: + $ref: '#/components/schemas/iamCommonComponentsSchemasIdentifier' + type: object + description: Leave Organization response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Leave Organization response failure + security: + - api_email: [] + api_key: [] + summary: Leave Organization + tags: + - User's Organizations + x-cfDeprecation: + description: This endpoint and its related APIs are deprecated in favor of the `/accounts` equivalent APIs, which have a broader range of features and are backwards compatible with these API. + display: true + eol: '2020-02-04' + id: org_deprecation + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: user + resource_chain: + - organizations + method: delete + get: + deprecated: true + description: Gets a specific organization the user is associated with. + operationId: user'-s-organizations-organization-details + parameters: + - name: organization_id + in: path + required: true + description: The organization ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamSingleOrganizationResponse' + description: Organization Details response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Organization Details response failure + security: + - api_email: [] + api_key: [] + summary: Organization Details + tags: + - User's Organizations + x-cfDeprecation: + description: This endpoint and its related APIs are deprecated in favor of the `/accounts` equivalent APIs, which have a broader range of features and are backwards compatible with these API. + display: true + eol: '2020-02-04' + id: org_deprecation + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: user + resource_chain: + - organizations + method: get + /user/subscriptions: + get: + description: Lists all of a user's subscriptions. + operationId: user-subscription-get-user-subscriptions + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/billSubsApiUserSubscriptionResponseCollection' + description: Get User Subscriptions response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + items: + $ref: '#/components/schemas/billSubsApiSubscription' + nullable: true + type: array + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/billSubsApiResultInfo' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Get User Subscriptions response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get User Subscriptions + tags: + - User Subscription + x-api-token-group: + - Billing Write + - Billing Read + x-cfPermissionsRequired: + enum: + - '#billing:read' + x-stackql-sdk: + service: user + resource_chain: + - subscriptions + method: get + /user/subscriptions/{identifier}: + delete: + description: Deletes a user's subscription. + operationId: user-subscription-delete-user-subscription + parameters: + - name: identifier + in: path + required: true + description: Resource identifier. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + subscription_id: + $ref: '#/components/schemas/billSubsApiSchemasIdentifier' + type: object + description: Delete User Subscription response + 4XX: + content: + application/json: + schema: + properties: + subscription_id: + $ref: '#/components/schemas/billSubsApiSchemasIdentifier' + errors: + minLength: 1 + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful + enum: + - false + type: boolean + type: object + required: + - success + - errors + - messages + - result + description: Delete User Subscription response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete User Subscription + tags: + - User Subscription + x-api-token-group: + - Billing Write + x-cfPermissionsRequired: + enum: + - '#billing:edit' + x-stackql-sdk: + service: user + resource_chain: + - subscriptions + method: delete + put: + description: Updates a user's subscriptions. + operationId: user-subscription-update-user-subscription + parameters: + - name: identifier + in: path + required: true + description: Resource identifier. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/billSubsApiSubscriptionV2' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/billSubsApiUserSubscriptionResponseSingle' + description: Update User Subscription response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + type: object + enum: + - null + nullable: true + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Update User Subscription response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update User Subscription + tags: + - User Subscription + x-api-token-group: + - Billing Write + x-cfPermissionsRequired: + enum: + - '#billing:read' + - '#billing:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: user + resource_chain: + - subscriptions + method: update + /user/tokens: + get: + description: List all access tokens you created. + operationId: user-api-tokens-list-tokens + parameters: + - in: query + name: page + schema: + default: 1 + description: Page number of paginated results. + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 20 + description: Maximum number of results per page. + maximum: 50 + minimum: 5 + type: number + - in: query + name: direction + schema: + description: Direction to order results. + enum: + - asc + - desc + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamCollectionTokensResponse' + description: List Tokens response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: List Tokens response failure + security: + - api_token: [] + summary: List Tokens + tags: + - User API Tokens + x-api-token-group: + - API Tokens Write + - API Tokens Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.token.list + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: user + resource_chain: + - tokens + method: list + post: + description: Create a new access token. + operationId: user-api-tokens-create-token + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/iamCreatePayload' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamSingleTokenCreateResponse' + description: Create Token response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Create Token response failure + security: + - api_token: [] + summary: Create Token + tags: + - User API Tokens + x-api-token-group: + - API Tokens Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.token.create + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: user + resource_chain: + - tokens + method: create + /user/tokens/permission_groups: + get: + description: Find all available permission groups for API Tokens. + operationId: permission-groups-list-permission-groups + parameters: + - description: Filter by the name of the permission group. The value must be URL-encoded. + in: query + name: name + schema: + type: string + - description: Filter by the scope of the permission group. The value must be URL-encoded. + in: query + name: scope + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamPermissionsGroupResponseCollection' + description: List Token Permission Groups response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: List Token Permission Groups response failure + security: + - api_token: [] + summary: List Token Permission Groups + tags: + - User API Tokens + x-api-token-group: + - API Tokens Write + - API Tokens Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.token.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: user + resource_chain: + - tokens + - permission_groups + method: list + /user/tokens/verify: + get: + description: Test whether a token works. + operationId: user-api-tokens-verify-token + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamTokenVerifyResponseSingleSegment' + description: Verify Token response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Verify Token response failure + security: + - api_token: [] + summary: Verify Token + tags: + - User API Tokens + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: user + resource_chain: + - tokens + method: verify + /user/tokens/{token_id}: + delete: + description: Destroy a token. + operationId: user-api-tokens-delete-token + parameters: + - name: token_id + in: path + required: true + description: The API token ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseSingleId' + description: Delete Token response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Delete Token response failure + security: + - api_token: [] + summary: Delete Token + tags: + - User API Tokens + x-api-token-group: + - API Tokens Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.token.delete + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: user + resource_chain: + - tokens + method: delete + get: + description: Get information about a specific token. + operationId: user-api-tokens-token-details + parameters: + - name: token_id + in: path + required: true + description: The API token ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamSingleTokenResponse' + description: Token Details response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Token Details response failure + security: + - api_token: [] + summary: Token Details + tags: + - User API Tokens + x-api-token-group: + - API Tokens Write + - API Tokens Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.token.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: user + resource_chain: + - tokens + method: get + put: + description: Update an existing token. + operationId: user-api-tokens-update-token + parameters: + - name: token_id + in: path + required: true + description: The API token ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/iamTokenBody' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamSingleTokenResponse' + description: Update Token response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Update Token response failure + security: + - api_token: [] + summary: Update Token + tags: + - User API Tokens + x-api-token-group: + - API Tokens Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.token.update + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: user + resource_chain: + - tokens + method: update + /user/tokens/{token_id}/value: + put: + description: Roll the token secret. + operationId: user-api-tokens-roll-token + parameters: + - name: token_id + in: path + required: true + description: The API token ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/iamResponseSingleValue' + description: Roll Token response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/iamApiResponseCommonFailure' + description: Roll Token response failure + security: + - api_token: [] + summary: Roll Token + tags: + - User API Tokens + x-api-token-group: + - API Tokens Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.token.update + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: user + resource_chain: + - tokens + - value + method: update + /users/tenants: + get: + description: Retrieves list of tenants the authenticated user / method has access to. + operationId: User_listUserTenants + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + type: object + maxItems: 0 + type: array + messages: + items: + $ref: '#/components/schemas/organizationsApiV4Message' + type: array + result: + items: + $ref: '#/components/schemas/organizationsApiOrganization' + type: array + success: + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: The request has succeeded. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/organizationsApiV4ErrorResponse' + description: An unexpected error response. + security: + - api_email: [] + api_key: [] + summary: List user tenants + tags: + - User +components: + schemas: + aaaAuditLogs: + properties: + action: + properties: + result: + description: A boolean that indicates if the action attempted was successful. + example: true + type: boolean + type: + description: A short string that describes the action that was performed. + example: change_setting + type: string + type: object + actor: + properties: + email: + description: The email of the user that performed the action. + example: michelle@example.com + format: email + type: string + id: + description: The ID of the actor that performed the action. If a user performed the action, this will be their User ID. + example: f6b5de0326bb5182b8a4840ee01ec774 + type: string + ip: + description: The IP address of the request that performed the action. + example: 198.41.129.166 + type: string + type: + description: The type of actor, whether a User, Cloudflare Admin, or an Automated System. + enum: + - user + - admin + - Cloudflare + example: user + type: string + type: object + id: + description: A string that uniquely identifies the audit log. + example: d5b0f326-1232-4452-8858-1089bd7168ef + type: string + interface: + description: The source of the event. + example: API + type: string + metadata: + description: An object which can lend more context to the action being logged. This is a flexible value and varies between different actions. + example: + name: security_level + type: firewall + value: high + zone_name: example.com + type: object + newValue: + description: The new value of the resource that was modified. + example: low + type: string + oldValue: + description: The value of the resource before it was modified. + example: high + type: string + owner: + properties: + id: + $ref: '#/components/schemas/aaaIdentifier' + type: object + resource: + properties: + id: + description: An identifier for the resource that was affected by the action. + example: 023e105f4ecef8ad9ca31a8372d0c353 + type: string + type: + description: A short string that describes the resource that was affected by the action. + example: zone + type: string + type: object + when: + description: A UTC RFC3339 timestamp that specifies when the action being logged occured. + example: '2017-04-26T17:31:07Z' + format: date-time + type: string + type: object + aaaAuditLogsResponseCollection_2: + type: object + properties: + errors: + $ref: '#/components/schemas/aaaMessages' + messages: + $ref: '#/components/schemas/aaaMessages' + result: + items: + $ref: '#/components/schemas/aaaAuditLogs' + type: array + success: + example: true + type: boolean + required: + - errors + - messages + - success + aaaIdentifier: + description: Identifier + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + readOnly: true + type: string + aaaMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + billSubsApiAction: + description: The billing item action. + example: subscription + maxLength: 30 + readOnly: true + type: string + x-auditable: true + billSubsApiAmount: + description: The amount associated with this billing item. + example: 20.99 + readOnly: true + type: number + x-auditable: true + billSubsApiBillingHistory: + properties: + action: + $ref: '#/components/schemas/billSubsApiAction' + amount: + $ref: '#/components/schemas/billSubsApiAmount' + currency: + $ref: '#/components/schemas/billSubsApiCurrency' + description: + $ref: '#/components/schemas/billSubsApiDescription' + id: + $ref: '#/components/schemas/billSubsApiComponentsSchemasIdentifier' + occurred_at: + $ref: '#/components/schemas/billSubsApiOccurredAt' + type: + $ref: '#/components/schemas/billSubsApiType' + zone: + $ref: '#/components/schemas/billSubsApiSchemasZone' + required: + - id + - type + - action + - description + - occurred_at + - amount + - currency + - zone + type: object + billSubsApiBillingHistoryCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + items: + $ref: '#/components/schemas/billSubsApiBillingHistory' + nullable: true + type: array + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/billSubsApiResultInfo' + required: + - success + - errors + - messages + - result + billSubsApiBillingResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + properties: + account_type: + example: type + type: string + address: + example: 123 Main Street + type: string + address2: + example: Apt 1 + type: string + balance: + example: '0' + type: string + card_expiry_month: + example: 12 + type: integer + card_expiry_year: + example: 2099 + type: integer + card_number: + example: '4242424242424242' + type: string + city: + example: Anytown + type: string + company: + example: Company + type: string + country: + example: Anycountry + type: string + created_on: + example: '2014-03-01T12:21:59.3456Z' + format: date-time + type: string + readOnly: true + device_data: + example: sample_data + type: string + edited_on: + example: '2014-03-01T12:21:59.3456Z' + format: date-time + type: string + enterprise_billing_email: + example: johndoe@gmail.com + type: string + x-auditable: true + enterprise_primary_email: + example: johndoe@gmail.com + type: string + x-auditable: true + first_name: + example: John + type: string + id: + $ref: '#/components/schemas/billSubsApiComponentsSchemasIdentifier' + is_partner: + example: false + type: boolean + last_name: + example: Doe + type: string + next_bill_date: + example: '2014-03-01T12:21:59.3456Z' + format: date-time + type: string + payment_address: + example: 123 Main Street + type: string + payment_address2: + example: Apt 1 + type: string + payment_city: + example: Anytown + type: string + payment_country: + example: Anycountry + type: string + payment_email: + example: johndoe@gmail.com + type: string + payment_first_name: + example: John + type: string + payment_gateway: + example: gateway + type: string + payment_last_name: + example: Doe + type: string + payment_nonce: + example: abc123 + type: string + payment_state: + example: state + type: string + payment_zipcode: + example: '12345' + type: string + primary_email: + example: johndoe@gmail.com + type: string + x-auditable: true + state: + example: AnyState + type: string + tax_id_type: + example: type + type: string + telephone: + example: '1234567899' + type: string + use_legacy: + example: false + type: boolean + validation_code: + example: '1111' + type: string + vat: + example: GB123456789 + type: string + zipcode: + example: '12345' + type: string + type: object + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + billSubsApiComponentsSchemasIdentifier: + description: Billing item identifier tag. + example: b69a9f3492637782896352daae219e7d + maxLength: 32 + readOnly: true + type: string + x-auditable: true + billSubsApiCurrency: + description: The monetary unit in which pricing information is displayed. + example: USD + readOnly: true + type: string + x-auditable: true + billSubsApiCurrentPeriodEnd: + description: The end of the current period and also when the next billing is due. + example: '2014-03-31T12:20:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + billSubsApiCurrentPeriodStart: + description: When the current billing period started. May match initial_period_start if this is the first period. + example: '2014-05-11T12:20:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + billSubsApiDescription: + description: The billing item description. + example: The billing item description + maxLength: 255 + readOnly: true + type: string + x-auditable: true + billSubsApiFrequency: + description: How often the subscription is renewed automatically. + enum: + - weekly + - monthly + - quarterly + - yearly + example: monthly + type: string + x-auditable: true + billSubsApiMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + billSubsApiOccurredAt: + description: When the billing item was created. + example: '2014-03-01T12:21:59.3456Z' + format: date-time + type: string + x-auditable: true + billSubsApiPrice: + description: The price of the subscription that will be billed, in US dollars. + example: 20 + readOnly: true + type: number + x-auditable: true + billSubsApiRatePlan_2: + description: The rate plan applied to the subscription. + properties: + currency: + description: The currency applied to the rate plan subscription. + example: USD + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + externally_managed: + description: Whether this rate plan is managed externally from Cloudflare. + example: false + type: boolean + x-auditable: true + x-stainless-terraform-configurability: computed_optional + id: + description: The ID of the rate plan. + example: free + type: string + x-auditable: true + enum: + - free + - lite + - pro + - pro_plus + - business + - enterprise + - partners_free + - partners_pro + - partners_business + - partners_enterprise + is_contract: + description: Whether a rate plan is enterprise-based (or newly adopted term contract). + example: false + type: boolean + x-auditable: true + x-stainless-terraform-configurability: computed_optional + public_name: + description: The full name of the rate plan. + example: Business Plan + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + scope: + description: The scope that this rate plan applies to. + example: zone + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + sets: + description: The list of sets this rate plan applies to. Returns array of strings. + example: [] + items: + type: string + x-auditable: true + type: array + x-stainless-terraform-configurability: optional + type: object + billSubsApiResultInfo: + properties: + count: + description: Total number of results for the requested service + example: 1 + type: number + page: + description: Current page within paginated list of results + example: 1 + type: number + per_page: + description: Number of results per page of results + example: 20 + type: number + total_count: + description: Total results available without any search parameters + example: 2000 + type: number + type: object + billSubsApiSchemasIdentifier: + description: Subscription identifier tag. + example: 506e3185e9c882d175a2d0cb0093d9f2 + maxLength: 32 + readOnly: true + type: string + x-auditable: true + billSubsApiSchemasZone: + properties: + name: + readOnly: true + type: string + x-auditable: true + type: object + billSubsApiState: + description: The state that the subscription is in. + enum: + - Trial + - Provisioned + - Paid + - AwaitingPayment + - Cancelled + - Failed + - Expired + example: Paid + readOnly: true + type: string + x-auditable: true + billSubsApiSubscription: + type: object + $ref: '#/components/schemas/billSubsApiSubscriptionV2' + billSubsApiSubscriptionV2: + properties: + currency: + $ref: '#/components/schemas/billSubsApiCurrency' + current_period_end: + $ref: '#/components/schemas/billSubsApiCurrentPeriodEnd' + current_period_start: + $ref: '#/components/schemas/billSubsApiCurrentPeriodStart' + frequency: + $ref: '#/components/schemas/billSubsApiFrequency' + id: + $ref: '#/components/schemas/billSubsApiSchemasIdentifier' + price: + $ref: '#/components/schemas/billSubsApiPrice' + rate_plan: + $ref: '#/components/schemas/billSubsApiRatePlan_2' + state: + $ref: '#/components/schemas/billSubsApiState' + type: object + billSubsApiType: + description: The billing item type. + example: charge + maxLength: 30 + readOnly: true + type: string + x-auditable: true + billSubsApiUserSubscriptionResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + items: + $ref: '#/components/schemas/billSubsApiSubscription' + nullable: true + type: array + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/billSubsApiResultInfo' + required: + - success + - errors + - messages + - result + billSubsApiUserSubscriptionResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + type: object + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + iamApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/iamSchemasMessages' + messages: + example: [] + $ref: '#/components/schemas/iamSchemasMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + iamApiResponseSingleId: + type: object + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + nullable: true + properties: + id: + $ref: '#/components/schemas/iamCommonComponentsSchemasIdentifier' + required: + - id + type: object + required: + - success + - errors + - messages + iamCidrList: + description: List of IPv4/IPv6 CIDR addresses. + example: + - 199.27.128.0/21 + - 2400:cb00::/32 + items: + description: IPv4/IPv6 CIDR. + example: 199.27.128.0/21 + type: string + x-auditable: true + type: array + iamCollectionOrganizationResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/iamResultInfo' + result: + items: + $ref: '#/components/schemas/iamOrganization' + type: array + required: + - success + - errors + - messages + iamCollectionTokensResponse: + title: Response with a list of tokens + type: object + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/iamResultInfo' + result: + items: + $ref: '#/components/schemas/iamTokenBase' + type: array + required: + - success + - errors + - messages + iamCommonComponentsSchemasIdentifier: + description: Identifier + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + minLength: 32 + type: string + x-auditable: true + iamComponentsSchemasStatus: + description: Whether the user is a member of the organization or has an invitation pending. + enum: + - member + - invited + example: member + type: string + x-auditable: true + iamCondition: + properties: + request_ip: + $ref: '#/components/schemas/iamRequestIp' + type: object + iamCountry: + description: The country in which the user lives. + example: US + maxLength: 30 + nullable: true + type: string + iamCreatePayload: + properties: + condition: + $ref: '#/components/schemas/iamCondition' + expires_on: + $ref: '#/components/schemas/iamExpiresOn' + name: + $ref: '#/components/schemas/iamName' + not_before: + $ref: '#/components/schemas/iamNotBefore' + policies: + $ref: '#/components/schemas/iamTokenPolicies' + required: + - name + - policies + type: object + iamEffect: + description: Allow or deny operations against the resources. + enum: + - allow + - deny + example: allow + type: string + x-auditable: true + iamExpiresOn: + description: The expiration time on or after which the JWT MUST NOT be accepted for processing. + example: '2020-01-01T00:00:00Z' + format: date-time + type: string + x-auditable: true + iamFirstName: + description: User's first name + example: John + maxLength: 60 + nullable: true + type: string + x-auditable: true + iamInviteComponentsSchemasIdentifier: + description: Invite identifier tag. + example: 4f5f0c14a2a41d5063dd301b2f829f04 + maxLength: 32 + readOnly: true + type: string + x-auditable: true + iamInvitedBy: + description: The email address of the user who created the invite. + example: user@example.com + maxLength: 90 + type: string + x-auditable: true + iamInvitedMemberEmail: + description: Email address of the user to add to the organization. + example: user@example.com + maxLength: 90 + type: string + x-auditable: true + iamInvitedOn: + description: When the invite was sent. + example: '2014-01-01T05:20:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + iamIssuedOn: + description: The time on which the token was created. + example: '2018-07-01T05:20:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + iamLastName: + description: User's last name + example: Appleseed + maxLength: 60 + nullable: true + type: string + x-auditable: true + iamLastUsedOn: + description: Last time the token was used. + example: '2020-01-02T12:34:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + iamModifiedOn: + description: Last time the token was modified. + example: '2018-07-02T05:20:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + iamName: + description: Token name. + example: readonly token + maxLength: 120 + type: string + x-auditable: true + iamNotBefore: + description: The time before which the token MUST NOT be accepted for processing. + example: '2018-07-01T05:20:00Z' + format: date-time + type: string + x-auditable: true + iamOrganization: + properties: + id: + $ref: '#/components/schemas/iamCommonComponentsSchemasIdentifier' + name: + $ref: '#/components/schemas/iamSchemasName' + permissions: + $ref: '#/components/schemas/iamSchemasPermissions' + roles: + description: List of roles that a user has within an organization. + items: + example: All Privileges - Super Administrator + maxLength: 120 + type: string + x-auditable: true + readOnly: true + type: array + status: + $ref: '#/components/schemas/iamComponentsSchemasStatus' + type: object + iamPermissionGroup: + description: A named group of permissions that map to a group of operations against resources. + properties: + id: + description: Identifier of the permission group. + example: 6d7f2f5f5b1d4a0e9081fdc98d432fd1 + type: string + x-auditable: true + meta: + description: Attributes associated to the permission group. + example: + label: load_balancer_admin + scopes: com.cloudflare.api.account + properties: + key: + type: string + x-auditable: true + value: + type: string + x-auditable: true + type: object + name: + description: Name of the permission group. + example: Load Balancer + readOnly: true + type: string + x-auditable: true + required: + - id + type: object + iamPermissionGroups: + description: A set of permission groups that are specified to the policy. + example: + - id: c8fed203ed3043cba015a93ad1616f1f + meta: + label: load_balancer_admin + scopes: com.cloudflare.api.account + name: Zone Read + - id: 82e64a83756745bbbb1c9c2701bf816b + meta: + label: fbm_user + scopes: com.cloudflare.api.account + name: Magic Network Monitoring + items: + $ref: '#/components/schemas/iamPermissionGroup' + type: array + iamPermissionsGroupResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/iamResultInfo' + result: + example: + - id: 7cf72faf220841aabcfdfab81c43c4f6 + name: Billing Read + scopes: + - com.cloudflare.api.account + - id: 9d24387c6e8544e2bc4024a03991339f + name: 'Load Balancing: Monitors and Pools Read' + scopes: + - com.cloudflare.api.account + - id: d2a1802cc9a34e30852f8b33869b2f3c + name: 'Load Balancing: Monitors and Pools Write' + scopes: + - com.cloudflare.api.account + - id: 8b47d2786a534c08a1f94ee8f9f599ef + name: Workers KV Storage Read + scopes: + - com.cloudflare.api.account + - id: f7f0eda5697f475c90846e879bab8666 + name: Workers KV Storage Write + scopes: + - com.cloudflare.api.account + - id: 1a71c399035b4950a1bd1466bbe4f420 + name: Workers Scripts Read + scopes: + - com.cloudflare.api.account + - id: e086da7e2179491d91ee5f35b3ca210a + name: Workers Scripts Write + scopes: + - com.cloudflare.api.account + items: + $ref: '#/components/schemas/iamPermissionsGroupResponseCollection_result_item' + type: array + required: + - success + - errors + - messages + iamPermissionsGroupResponseCollection_result_item: + properties: + id: + description: Public ID. + type: string + x-auditable: true + name: + description: Permission Group Name + type: string + x-auditable: true + scopes: + description: Resources to which the Permission Group is scoped + items: + enum: + - com.cloudflare.api.account + - com.cloudflare.api.account.zone + - com.cloudflare.api.user + - com.cloudflare.edge.r2.bucket + type: string + x-auditable: true + type: array + type: object + iamPolicyIdentifier: + description: Policy identifier. + example: f267e341f3dd4697bd3b9f71dd96247f + readOnly: true + type: string + x-auditable: true + x-stainless-terraform-always-send: true + iamPolicyWithPermissionGroupsAndResources: + properties: + effect: + $ref: '#/components/schemas/iamEffect' + id: + $ref: '#/components/schemas/iamPolicyIdentifier' + permission_groups: + $ref: '#/components/schemas/iamPermissionGroups' + resources: + $ref: '#/components/schemas/iamResources' + required: + - id + - effect + - permission_groups + - resources + title: Policy with Permission Groups and Resources + type: object + iamRequestIp: + description: Client IP restrictions. + example: + in: + - 123.123.123.0/24 + - 2606:4700::/32 + not_in: + - 123.123.123.100/24 + - 2606:4700:4700::/48 + properties: + in: + $ref: '#/components/schemas/iamCidrList' + not_in: + $ref: '#/components/schemas/iamCidrList' + type: object + iamResources: + description: A list of resource names that the policy applies to. + x-auditable: true + type: object + iamResponseSingleValue: + type: object + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/iamValue' + required: + - success + - errors + - messages + iamResultInfo: + properties: + count: + description: Total number of results for the requested service + example: 1 + type: number + page: + description: Current page within paginated list of results + example: 1 + type: number + per_page: + description: Number of results per page of results + example: 20 + type: number + total_count: + description: Total results available without any search parameters + example: 2000 + type: number + type: object + iamRoleNames: + description: List of role names the membership has for this account. + items: + example: Account Administrator + maxLength: 120 + type: string + x-auditable: true + readOnly: true + type: array + iamSchemasCollectionInviteResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/iamResultInfo' + result: + items: + $ref: '#/components/schemas/iamUserInvite' + type: array + required: + - success + - errors + - messages + iamSchemasExpiresOn: + description: When the invite is no longer active. + example: '2014-01-01T05:20:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + iamSchemasMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + iamSchemasName: + description: Organization name. + example: Cloudflare, Inc. + maxLength: 100 + type: string + x-auditable: true + iamSchemasPermissions: + description: Access permissions for this User. + items: + example: '#zones:read' + maxLength: 160 + type: string + x-auditable: true + readOnly: true + type: array + iamSingleInviteResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/iamUserInvite' + required: + - success + - errors + - messages + iamSingleOrganizationResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + type: object + required: + - success + - errors + - messages + iamSingleTokenCreateResponse: + title: Response of a create request with a single token + type: object + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/iamTokenWithValue' + required: + - success + - errors + - messages + iamSingleTokenResponse: + title: Response with a single token + type: object + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/iamTokenBase' + required: + - success + - errors + - messages + iamSingleUserResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + properties: + betas: + description: Lists the betas that the user is participating in. + items: + description: User feature flag + example: zone_level_access_beta + type: string + readOnly: true + type: array + country: + $ref: '#/components/schemas/iamCountry' + first_name: + $ref: '#/components/schemas/iamFirstName' + has_business_zones: + default: false + description: Indicates whether user has any business zones + readOnly: true + type: boolean + has_enterprise_zones: + default: false + description: Indicates whether user has any enterprise zones + readOnly: true + type: boolean + has_pro_zones: + default: false + description: Indicates whether user has any pro zones + readOnly: true + type: boolean + id: + description: Identifier of the user. + example: 6d7f2f5f5b1d4a0e9081fdc98d432fd1 + readOnly: true + type: string + last_name: + $ref: '#/components/schemas/iamLastName' + organizations: + items: + $ref: '#/components/schemas/iamOrganization' + type: array + suspended: + default: false + description: Indicates whether user has been suspended + readOnly: true + type: boolean + telephone: + $ref: '#/components/schemas/iamTelephone' + two_factor_authentication_enabled: + $ref: '#/components/schemas/iamTwoFactorAuthenticationEnabled' + two_factor_authentication_locked: + $ref: '#/components/schemas/iamTwoFactorAuthenticationLocked' + zipcode: + $ref: '#/components/schemas/iamZipcode' + type: object + required: + - success + - errors + - messages + iamTelephone: + description: User's telephone number + example: +1 123-123-1234 + maxLength: 20 + nullable: true + type: string + iamTokenBase: + properties: + condition: + $ref: '#/components/schemas/iamCondition' + expires_on: + $ref: '#/components/schemas/iamExpiresOn' + id: + $ref: '#/components/schemas/iamTokenIdentifier' + issued_on: + $ref: '#/components/schemas/iamIssuedOn' + last_used_on: + $ref: '#/components/schemas/iamLastUsedOn' + modified_on: + $ref: '#/components/schemas/iamModifiedOn' + readOnly: true + name: + $ref: '#/components/schemas/iamName' + not_before: + $ref: '#/components/schemas/iamNotBefore' + policies: + $ref: '#/components/schemas/iamTokenPolicies' + status: + $ref: '#/components/schemas/iamTokenStatus' + type: object + iamTokenBody: + title: Token defined in a request body + $ref: '#/components/schemas/iamTokenBase' + type: object + iamTokenIdentifier: + description: Token identifier tag. + example: ed17574386854bf78a67040be0a770b0 + maxLength: 32 + readOnly: true + type: string + x-auditable: true + iamTokenPolicies: + description: List of access policies assigned to the token. + items: + $ref: '#/components/schemas/iamPolicyWithPermissionGroupsAndResources' + type: array + iamTokenStatus: + description: Status of the token. + enum: + - active + - disabled + - expired + example: active + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + iamTokenVerifyResponseSingleSegment: + type: object + properties: + errors: + $ref: '#/components/schemas/iamSchemasMessages' + messages: + $ref: '#/components/schemas/iamSchemasMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + properties: + expires_on: + $ref: '#/components/schemas/iamExpiresOn' + id: + $ref: '#/components/schemas/iamTokenIdentifier' + not_before: + $ref: '#/components/schemas/iamNotBefore' + status: + $ref: '#/components/schemas/iamTokenStatus' + required: + - id + - status + type: object + required: + - success + - errors + - messages + iamTokenWithValue: + title: Create token response, with the token value + properties: + condition: + $ref: '#/components/schemas/iamCondition' + expires_on: + $ref: '#/components/schemas/iamExpiresOn' + id: + $ref: '#/components/schemas/iamTokenIdentifier' + issued_on: + $ref: '#/components/schemas/iamIssuedOn' + last_used_on: + $ref: '#/components/schemas/iamLastUsedOn' + modified_on: + $ref: '#/components/schemas/iamModifiedOn' + readOnly: true + name: + $ref: '#/components/schemas/iamName' + not_before: + $ref: '#/components/schemas/iamNotBefore' + policies: + $ref: '#/components/schemas/iamTokenPolicies' + status: + $ref: '#/components/schemas/iamTokenStatus' + value: + $ref: '#/components/schemas/iamValue' + type: object + iamTwoFactorAuthenticationEnabled: + default: false + description: Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication. + readOnly: true + type: boolean + iamTwoFactorAuthenticationLocked: + default: false + description: Indicates whether two-factor authentication is required by one of the accounts that the user is a member of. + readOnly: true + type: boolean + iamUserInvite: + properties: + expires_on: + $ref: '#/components/schemas/iamSchemasExpiresOn' + id: + $ref: '#/components/schemas/iamInviteComponentsSchemasIdentifier' + invited_by: + $ref: '#/components/schemas/iamInvitedBy' + invited_member_email: + $ref: '#/components/schemas/iamInvitedMemberEmail' + invited_member_id: + description: ID of the user to add to the organization. + example: 5a7805061c76ada191ed06f989cc3dac + maxLength: 32 + nullable: true + readOnly: true + type: string + x-auditable: true + invited_on: + $ref: '#/components/schemas/iamInvitedOn' + organization_id: + description: ID of the organization the user will be added to. + example: 5a7805061c76ada191ed06f989cc3dac + maxLength: 32 + readOnly: true + type: string + x-auditable: true + organization_is_enforcing_twofactor: + example: true + type: boolean + x-auditable: true + organization_name: + description: Organization name. + example: Cloudflare, Inc. + maxLength: 100 + readOnly: true + type: string + x-auditable: true + roles: + $ref: '#/components/schemas/iamRoleNames' + status: + description: Current status of the invitation. + enum: + - pending + - accepted + - rejected + - expired + example: accepted + x-auditable: true + type: string + required: + - invited_member_id + - organization_id + type: object + iamValue: + description: The token value. + example: 8M7wS6hCpXVc-DoRnPPY_UCWPgy8aea4Wy6kCe5T + maxLength: 80 + minLength: 40 + readOnly: true + type: string + x-sensitive: true + iamZipcode: + description: The zipcode or postal code where the user lives. + example: '12345' + maxLength: 20 + nullable: true + type: string + loadBalancingAddress: + description: The IP address (IPv4 or IPv6) of the origin, or its publicly addressable hostname. Hostnames entered here should resolve directly to the origin, and not be a hostname proxied by Cloudflare. To set an internal/reserved address, virtual_network_id must also be set. + example: 0.0.0.0 + type: string + x-auditable: true + loadBalancingAnalytics: + properties: + id: + default: 1 + type: integer + origins: + example: + - address: 198.51.100.4 + changed: true + enabled: true + failure_reason: No failures + healthy: true + ip: 198.51.100.4 + name: some-origin + items: + $ref: '#/components/schemas/loadBalancingOriginAnalytics' + type: array + pool: + example: + changed: true + healthy: true + id: 74bc6a8b9b0dda3d651707a2928bad0c + minimum_origins: 1 + name: some-pool + type: object + timestamp: + example: '2014-01-01T05:20:00.12345Z' + format: date-time + type: string + type: object + loadBalancingComponentsSchemasResponseCollection: + required: + - success + - errors + - messages + - result + type: object + properties: + errors: + $ref: '#/components/schemas/loadBalancingMessages' + messages: + $ref: '#/components/schemas/loadBalancingMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/loadBalancingResultInfo' + result: + items: + $ref: '#/components/schemas/loadBalancingAnalytics' + type: array + loadBalancingMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + loadBalancingOriginAnalytics: + properties: + address: + $ref: '#/components/schemas/loadBalancingAddress' + changed: + $ref: '#/components/schemas/loadBalancingOriginChanged' + enabled: + $ref: '#/components/schemas/loadBalancingSchemasEnabled' + failure_reason: + $ref: '#/components/schemas/loadBalancingOriginFailureReason' + healthy: + $ref: '#/components/schemas/loadBalancingOriginHealthy' + ip: + $ref: '#/components/schemas/loadBalancingOriginIp' + name: + $ref: '#/components/schemas/loadBalancingSchemasName' + type: object + loadBalancingOriginChanged: + description: Whether the origin has changed health status. + example: true + type: boolean + x-auditable: true + loadBalancingOriginFailureReason: + description: Failure reason for un-healthy origin health check. + example: No failures + type: string + x-auditable: true + loadBalancingOriginHealthy: + description: Whether the origin is reported as healthy. + example: true + type: boolean + x-auditable: true + loadBalancingOriginHealthy_2: + default: true + description: If true, filter events where the origin status is healthy. If false, filter events where the origin status is unhealthy. + example: true + type: boolean + x-auditable: true + loadBalancingOriginIp: + description: The IP address (IPv4 or IPv6) of the origin. + example: 198.51.100.4 + type: string + x-auditable: true + loadBalancingPoolName: + description: The name for the pool to filter. + example: primary-dc + type: string + x-auditable: true + loadBalancingResultInfo: + properties: + count: + description: Total number of results on the current page. + example: 20 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 2000 + type: number + total_pages: + description: Total number of pages available. + example: 100 + type: number + type: object + loadBalancingSchemasEnabled: + default: true + description: Whether to enable (the default) this origin within the pool. Disabled origins will not receive traffic and are excluded from health checks. The origin will only be disabled for the current pool. + example: true + type: boolean + x-auditable: true + loadBalancingSchemasIdentifier: + example: 17b5962d775c646f3f9725cbc7a53df4 + type: string + x-auditable: true + loadBalancingSchemasName: + description: A human-identifiable name for the origin. + example: app-server-1 + type: string + x-auditable: true + loadBalancingUntil: + description: End date and time of requesting data period in the ISO8601 format. + example: '2016-11-11T13:00:00Z' + format: date-time + type: string + x-auditable: true + organizationsApiOrganization: + description: References an Organization in the Cloudflare data model. + properties: + create_time: + format: date-time + readOnly: true + type: string + id: + readOnly: true + $ref: '#/components/schemas/organizationsApiOrganizationID' + meta: + properties: + flags: + $ref: '#/components/schemas/organizationsApiOrganizationFlags' + managed_by: + type: string + readOnly: true + type: object + name: + type: string + parent: + properties: + id: + $ref: '#/components/schemas/organizationsApiOrganizationID' + name: + readOnly: true + type: string + required: + - id + - name + type: object + profile: + $ref: '#/components/schemas/organizationsApiProfile' + required: + - id + - name + - create_time + - meta + type: object + organizationsApiOrganizationFlags: + description: Enable features for Organizations. + properties: + account_creation: + type: string + account_deletion: + type: string + account_migration: + type: string + account_mobility: + type: string + sub_org_creation: + type: string + required: + - account_creation + - account_deletion + - account_migration + - account_mobility + - sub_org_creation + type: object + organizationsApiOrganizationID: + example: a7b9c3d2e8f4g1h5i6j0k9l2m3n7o4p8 + title: Organization ID + type: string + organizationsApiProfile: + properties: + business_address: + type: string + business_email: + type: string + business_name: + type: string + business_phone: + type: string + external_metadata: + type: string + required: + - business_name + - business_email + - business_phone + - business_address + - external_metadata + type: object + organizationsApiV4ErrorResponse: + properties: + errors: + items: + $ref: '#/components/schemas/organizationsApiV4Message' + type: array + messages: + items: + $ref: '#/components/schemas/organizationsApiV4Message' + type: array + result: + type: object + success: + enum: + - false + type: boolean + required: + - success + - errors + - messages + type: object + organizationsApiV4Message: + $ref: '#/components/schemas/responseInfo' + responseInfo: + properties: + code: + minimum: 1000 + type: integer + message: + type: string + documentation_url: + type: string + source: + type: object + properties: + pointer: + type: string + required: + - code + - message + type: object + uniqueItems: true + result: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/aaaMessages' + messages: + $ref: '#/components/schemas/aaaMessages' + success: + description: Whether the API call was successful + enum: + - false + example: false + type: boolean + result: + items: + $ref: '#/components/schemas/aaaAuditLogs' + type: array + required: + - errors + - messages + - success + type: object + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + user: + id: cloudflare.user.user + name: user + title: User + methods: + list: + operation: + $ref: '#/paths/~1user/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1user/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/user/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/user/methods/edit' + delete: [] + replace: [] + audit_logs: + id: cloudflare.user.audit_logs + name: audit_logs + title: Audit Logs + methods: + list: + operation: + $ref: '#/paths/~1user~1audit_logs/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/audit_logs/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + history: + id: cloudflare.user.history + name: history + title: History + methods: + list: + operation: + $ref: '#/paths/~1user~1billing~1history/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/history/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + profile: + id: cloudflare.user.profile + name: profile + title: Profile + methods: + list: + operation: + $ref: '#/paths/~1user~1billing~1profile/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/profile/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + invites: + id: cloudflare.user.invites + name: invites + title: Invites + methods: + list: + operation: + $ref: '#/paths/~1user~1invites/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + get: + operation: + $ref: '#/paths/~1user~1invites~1{invite_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1user~1invites~1{invite_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/invites/methods/get' + - $ref: '#/components/x-stackQL-resources/invites/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/invites/methods/edit' + delete: [] + replace: [] + events: + id: cloudflare.user.events + name: events + title: Events + methods: + list: + operation: + $ref: '#/paths/~1user~1load_balancing_analytics~1events/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/events/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + organizations: + id: cloudflare.user.organizations + name: organizations + title: Organizations + methods: + list: + operation: + $ref: '#/paths/~1user~1organizations/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + delete: + operation: + $ref: '#/paths/~1user~1organizations~1{organization_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1user~1organizations~1{organization_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/organizations/methods/get' + - $ref: '#/components/x-stackQL-resources/organizations/methods/list' + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/organizations/methods/delete' + replace: [] + subscriptions: + id: cloudflare.user.subscriptions + name: subscriptions + title: Subscriptions + methods: + list: + operation: + $ref: '#/paths/~1user~1subscriptions/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1user~1subscriptions~1{identifier}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1user~1subscriptions~1{identifier}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency }}{{ $sep }}"frequency": {{ toJson .frequency }}{{- $sep = "," -}}{{ end }} + + {{- if .rate_plan }}{{ $sep }}"rate_plan": {{ if eq (kindOf .rate_plan) "string" }}{{ .rate_plan }}{{ else }}{{ toJson .rate_plan }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/subscriptions/methods/list' + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/subscriptions/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/subscriptions/methods/update' + user_tokens: + id: cloudflare.user.user_tokens + name: user_tokens + title: User Tokens + methods: + list: + operation: + $ref: '#/paths/~1user~1tokens/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/user_tokens/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + tokens: + id: cloudflare.user.tokens + name: tokens + title: Tokens + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1user~1tokens/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .condition }}{{ $sep }}"condition": {{ if eq (kindOf .condition) "string" }}{{ .condition }}{{ else }}{{ toJson .condition }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .expires_on }}{{ $sep }}"expires_on": {{ toJson .expires_on }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .not_before }}{{ $sep }}"not_before": {{ toJson .not_before }}{{- $sep = "," -}}{{ end }} + + {{- if .policies }}{{ $sep }}"policies": {{ if eq (kindOf .policies) "string" }}{{ .policies }}{{ else }}{{ toJson .policies }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1user~1tokens~1{token_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1user~1tokens~1{token_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1user~1tokens~1{token_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + update_value: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1user~1tokens~1{token_id}~1value/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/tokens/methods/get' + insert: + - $ref: '#/components/x-stackQL-resources/tokens/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/tokens/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/tokens/methods/update' + permission_groups: + id: cloudflare.user.permission_groups + name: permission_groups + title: Permission Groups + methods: + list: + operation: + $ref: '#/paths/~1user~1tokens~1permission_groups/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/permission_groups/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + tokens_verify: + id: cloudflare.user.tokens_verify + name: tokens_verify + title: Tokens Verify + methods: + list: + operation: + $ref: '#/paths/~1user~1tokens~1verify/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/tokens_verify/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + tenants: + id: cloudflare.user.tenants + name: tenants + title: Tenants + methods: + list: + operation: + $ref: '#/paths/~1users~1tenants/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/tenants/methods/list' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/vectorize.yaml b/providers/src/cloudflare/v00.00.00000/services/vectorize.yaml index f4ee7ab6..9b062175 100644 --- a/providers/src/cloudflare/v00.00.00000/services/vectorize.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/vectorize.yaml @@ -1,3190 +1,3205 @@ -openapi: 3.0.3 -info: - title: vectorize API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/vectorize/indexes: - get: - deprecated: true - description: Returns a list of Vectorize Indexes - operationId: vectorize-(-deprecated)-list-vectorize-indexes - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - items: - $ref: '#/components/schemas/vectorizeCreateIndexResponse' - type: array - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: List Vectorize Index Response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: List Vectorize Index Failure Response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Vectorize Indexes (Deprecated) - tags: - - Vectorize Beta (Deprecated) - x-api-token-group: - - Vectorize Write - - Vectorize Read - x-cfDeprecation: - description: >- - This endpoint is deprecated in favor of the GET - `/accounts/{account_id}/vectorize/v2/indexes` endpoint. - display: true - id: vectorize_list_index_deprecation - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.vectorize.index.list - post: - deprecated: true - description: Creates and returns a new Vectorize Index. - operationId: vectorize-(-deprecated)-create-vectorize-index - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/vectorizeCreateIndexRequest' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - $ref: '#/components/schemas/vectorizeCreateIndexResponse' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Create Vectorize Index Response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Create Vectorize Index Failure Response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Vectorize Index (Deprecated) - tags: - - Vectorize Beta (Deprecated) - x-api-token-group: - - Vectorize Write - x-cfDeprecation: - description: >- - This endpoint is deprecated in favor of the POST - `/accounts/{account_id}/vectorize/v2/indexes` endpoint. - display: true - id: vectorize_create_index_deprecation - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.vectorize.index.create - /accounts/{account_id}/vectorize/indexes/{index_name}: - delete: - deprecated: true - description: Deletes the specified Vectorize Index. - operationId: vectorize-(-deprecated)-delete-vectorize-index - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: index_name - in: path - required: true - description: The Vectorize index name. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Delete Vectorize Index Response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Delete Vectorize Index Failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Vectorize Index (Deprecated) - tags: - - Vectorize Beta (Deprecated) - x-api-token-group: - - Vectorize Write - x-cfDeprecation: - description: >- - This endpoint is deprecated in favor of the DELETE - `/accounts/{account_id}/vectorize/v2/indexes/{index_name}` endpoint. - display: true - id: vectorize_delete_index_deprecation - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.vectorize.index.delete - get: - deprecated: true - description: Returns the specified Vectorize Index. - operationId: vectorize-(-deprecated)-get-vectorize-index - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: index_name - in: path - required: true - description: The Vectorize index name. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - $ref: '#/components/schemas/vectorizeCreateIndexResponse' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Get Vectorize Index Response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Get Vectorize Index Failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Vectorize Index (Deprecated) - tags: - - Vectorize Beta (Deprecated) - x-api-token-group: - - Vectorize Write - - Vectorize Read - x-cfDeprecation: - description: >- - This endpoint is deprecated in favor of the GET - `/accounts/{account_id}/vectorize/v2/indexes/{index_name}` endpoint. - display: true - id: vectorize_get_index_deprecation - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.vectorize.index.read - put: - deprecated: true - description: Updates and returns the specified Vectorize Index. - operationId: vectorize-(-deprecated)-update-vectorize-index - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: index_name - in: path - required: true - description: The Vectorize index name. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/vectorizeUpdateIndexRequest' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - $ref: '#/components/schemas/vectorizeCreateIndexResponse' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Update Vectorize Index Response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Update Vectorize Index Failure Response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Vectorize Index (Deprecated) - tags: - - Vectorize Beta (Deprecated) - x-api-token-group: - - Vectorize Write - x-cfDeprecation: - description: This endpoint has been deprecated and will soon be removed. - display: true - id: vectorize_update_index_deprecation - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.vectorize.index.update - /accounts/{account_id}/vectorize/indexes/{index_name}/delete-by-ids: - post: - deprecated: true - description: Delete a set of vectors from an index by their vector identifiers. - operationId: vectorize-(-deprecated)-delete-vectors-by-id - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: index_name - in: path - required: true - description: The Vectorize index name. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/vectorizeIndexDeleteVectorsByIdRequest' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - $ref: >- - #/components/schemas/vectorizeIndexDeleteVectorsByIdResponse - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Delete Vector Identifiers Response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Delete Vector Identifiers Failure Response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Vectors By Identifier (Deprecated) - tags: - - Vectorize Beta (Deprecated) - x-api-token-group: - - Vectorize Write - x-cfDeprecation: - description: >- - This endpoint is deprecated in favor of the POST - `/accounts/{account_id}/vectorize/v2/indexes/{index_name}/delete_by_ids` - endpoint. - display: true - id: vectorize_delete_by_ids_deprecation - /accounts/{account_id}/vectorize/indexes/{index_name}/get-by-ids: - post: - deprecated: true - description: Get a set of vectors from an index by their vector identifiers. - operationId: vectorize-(-deprecated)-get-vectors-by-id - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: index_name - in: path - required: true - description: The Vectorize index name. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/vectorizeIndexGetVectorsByIdRequest' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - $ref: '#/components/schemas/vectorizeIndexGetVectorsByIdResponse' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Get Vectors By Identifier Response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Get Vectors By Identifier Failure Response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Vectors By Identifier (Deprecated) - tags: - - Vectorize Beta (Deprecated) - x-api-token-group: - - Vectorize Write - - Vectorize Read - x-cfDeprecation: - description: >- - This endpoint is deprecated in favor of the POST - `/accounts/{account_id}/vectorize/v2/indexes/{index_name}/get_by_ids` - endpoint. - display: true - id: vectorize_get_by_ids_deprecation - /accounts/{account_id}/vectorize/indexes/{index_name}/insert: - post: - deprecated: true - description: >- - Inserts vectors into the specified index and returns the count of the - vectors successfully inserted. - operationId: vectorize-(-deprecated)-insert-vector - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: index_name - in: path - required: true - description: The Vectorize index name. - schema: - type: string - requestBody: - content: - application/x-ndjson: - schema: - description: ndjson file containing vectors to insert. - format: binary - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - $ref: '#/components/schemas/vectorizeIndexInsertResponse' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Insert Vectors Response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Insert Vectors Failure Response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Insert Vectors (Deprecated) - tags: - - Vectorize Beta (Deprecated) - x-api-token-group: - - Vectorize Write - x-cfDeprecation: - description: >- - This endpoint is deprecated in favor of the POST - `/accounts/{account_id}/vectorize/v2/indexes/{index_name}/insert` - endpoint. - display: true - id: vectorize_insert_deprecation - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.vectorize.index.update - /accounts/{account_id}/vectorize/indexes/{index_name}/query: - post: - deprecated: true - description: Finds vectors closest to a given vector in an index. - operationId: vectorize-(-deprecated)-query-vector - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: index_name - in: path - required: true - description: The Vectorize index name. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/vectorizeIndexQueryRequest' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - $ref: '#/components/schemas/vectorizeIndexQueryResponse' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Query Vectors Response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Query Vectors Failure Response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Query Vectors (Deprecated) - tags: - - Vectorize Beta (Deprecated) - x-api-token-group: - - Vectorize Write - - Vectorize Read - x-cfDeprecation: - description: >- - This endpoint is deprecated in favor of the POST - `/accounts/{account_id}/vectorize/v2/indexes/{index_name}/query` - endpoint. - display: true - id: vectorize_query_deprecation - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.vectorize.index.read - /accounts/{account_id}/vectorize/indexes/{index_name}/upsert: - post: - deprecated: true - description: >- - Upserts vectors into the specified index, creating them if they do not - exist and returns the count of values and ids successfully inserted. - operationId: vectorize-(-deprecated)-upsert-vector - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: index_name - in: path - required: true - description: The Vectorize index name. - schema: - type: string - requestBody: - content: - application/x-ndjson: - schema: - description: ndjson file containing vectors to upsert. - format: binary - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - $ref: '#/components/schemas/vectorizeIndexUpsertResponse' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Insert Vectors Response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Insert Vectors Failure Response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Upsert Vectors (Deprecated) - tags: - - Vectorize Beta (Deprecated) - x-api-token-group: - - Vectorize Write - x-cfDeprecation: - description: >- - This endpoint is deprecated in favor of the POST - `/accounts/{account_id}/vectorize/v2/indexes/{index_name}/upsert` - endpoint. - display: true - id: vectorize_upsert_deprecation - /accounts/{account_id}/vectorize/v2/indexes: - get: - description: Returns a list of Vectorize Indexes - operationId: vectorize-list-vectorize-indexes - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - items: - $ref: '#/components/schemas/vectorizeCreateIndexResponse' - type: array - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: List Vectorize Index Response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: List Vectorize Index Failure Response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Vectorize Indexes - tags: - - Vectorize - x-api-token-group: - - Vectorize Write - - Vectorize Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.vectorize.index.list - x-stackql-sdk: - service: vectorize - resource_chain: - - indexes - method: list - post: - description: Creates and returns a new Vectorize Index. - operationId: vectorize-create-vectorize-index - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/vectorizeCreateIndexRequest' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - $ref: '#/components/schemas/vectorizeCreateIndexResponse' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Create Vectorize Index Response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Create Vectorize Index Failure Response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Vectorize Index - tags: - - Vectorize - x-api-token-group: - - Vectorize Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.vectorize.index.create - x-stackql-sdk: - service: vectorize - resource_chain: - - indexes - method: create - /accounts/{account_id}/vectorize/v2/indexes/{index_name}: - delete: - description: Deletes the specified Vectorize Index. - operationId: vectorize-delete-vectorize-index - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: index_name - in: path - required: true - description: The Vectorize index name. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Delete Vectorize Index Response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Delete Vectorize Index Failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Vectorize Index - tags: - - Vectorize - x-api-token-group: - - Vectorize Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.vectorize.index.delete - x-stackql-sdk: - service: vectorize - resource_chain: - - indexes - method: delete - get: - description: Returns the specified Vectorize Index. - operationId: vectorize-get-vectorize-index - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: index_name - in: path - required: true - description: The Vectorize index name. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - $ref: '#/components/schemas/vectorizeCreateIndexResponse' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Get Vectorize Index Response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Get Vectorize Index Failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Vectorize Index - tags: - - Vectorize - x-api-token-group: - - Vectorize Write - - Vectorize Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.vectorize.index.read - x-stackql-sdk: - service: vectorize - resource_chain: - - indexes - method: get - /accounts/{account_id}/vectorize/v2/indexes/{index_name}/delete_by_ids: - post: - description: Delete a set of vectors from an index by their vector identifiers. - operationId: vectorize-delete-vectors-by-id - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: index_name - in: path - required: true - description: The Vectorize index name. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/vectorizeIndexDeleteVectorsByIdRequest' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - $ref: >- - #/components/schemas/vectorizeIndexDeleteVectorsByIdV2Response - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Delete Vector Identifiers Response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Delete Vector Identifiers Failure Response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Vectors By Identifier - tags: - - Vectorize - x-api-token-group: - - Vectorize Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.vectorize.index.delete - x-stackql-sdk: - service: vectorize - resource_chain: - - indexes - method: delete_by_ids - /accounts/{account_id}/vectorize/v2/indexes/{index_name}/get_by_ids: - post: - description: Get a set of vectors from an index by their vector identifiers. - operationId: vectorize-get-vectors-by-id - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: index_name - in: path - required: true - description: The Vectorize index name. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/vectorizeIndexGetVectorsByIdRequest' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - $ref: '#/components/schemas/vectorizeIndexGetVectorsByIdResponse' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Get Vectors By Identifier Response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Get Vectors By Identifier Failure Response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Vectors By Identifier - tags: - - Vectorize - x-api-token-group: - - Vectorize Write - - Vectorize Read - x-stackql-sdk: - service: vectorize - resource_chain: - - indexes - method: get_by_ids - /accounts/{account_id}/vectorize/v2/indexes/{index_name}/info: - get: - description: Get information about a vectorize index. - operationId: vectorize-index-info - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: index_name - in: path - required: true - description: The Vectorize index name. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - $ref: '#/components/schemas/vectorizeIndexInfoResponse' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Get Vectorize Index Info Response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Get Vectorize Index Info Failure Response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Vectorize Index Info - tags: - - Vectorize - x-api-token-group: - - Vectorize Write - - Vectorize Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.vectorize.index.read - x-stackql-sdk: - service: vectorize - resource_chain: - - indexes - method: info - /accounts/{account_id}/vectorize/v2/indexes/{index_name}/insert: - post: - description: >- - Inserts vectors into the specified index and returns a mutation id - corresponding to the vectors enqueued for insertion. - operationId: vectorize-insert-vector - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: index_name - in: path - required: true - description: The Vectorize index name. - schema: - type: string - - in: query - name: unparsable-behavior - schema: - description: Behavior for ndjson parse failures. - enum: - - error - - discard - type: string - requestBody: - content: - application/x-ndjson: - schema: - description: ndjson file containing vectors to insert. - format: binary - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - $ref: '#/components/schemas/vectorizeIndexInsertV2Response' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Insert Vectors Response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Insert Vectors Failure Response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Insert Vectors - tags: - - Vectorize - x-api-token-group: - - Vectorize Write - x-stackql-sdk: - service: vectorize - resource_chain: - - indexes - method: insert - /accounts/{account_id}/vectorize/v2/indexes/{index_name}/list: - get: - description: Returns a paginated list of vector identifiers from the specified index. - operationId: vectorize-list-vectors - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: index_name - in: path - required: true - description: The Vectorize index name. - schema: - type: string - - in: query - name: count - schema: - default: 100 - description: Maximum number of vectors to return - maximum: 1000 - minimum: 1 - type: integer - - in: query - name: cursor - schema: - description: Cursor for pagination to get the next page of results - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - $ref: '#/components/schemas/vectorizeIndexListVectorsResponse' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: List Vectors Response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: List Vectors Failure Response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Vectors - tags: - - Vectorize - x-api-token-group: - - Vectorize Write - - Vectorize Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.vectorize.index.read - x-stackql-sdk: - service: vectorize - resource_chain: - - indexes - method: list_vectors - /accounts/{account_id}/vectorize/v2/indexes/{index_name}/metadata_index/create: - post: - description: >- - Enable metadata filtering based on metadata property. Limited to 10 - properties. - operationId: vectorize-create-metadata-index - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: index_name - in: path - required: true - description: The Vectorize index name. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/vectorizeCreateMetadataIndexRequest' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - $ref: '#/components/schemas/vectorizeCreateMetadataIndexResponse' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Create Metadata Index Response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Create Metadata Index Failure Response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Metadata Index - tags: - - Vectorize - x-api-token-group: - - Vectorize Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.vectorize.index.create - x-stackql-sdk: - service: vectorize - resource_chain: - - indexes - - metadata_index - method: create - /accounts/{account_id}/vectorize/v2/indexes/{index_name}/metadata_index/delete: - post: - description: Allow Vectorize to delete the specified metadata index. - operationId: vectorize-delete-metadata-index - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: index_name - in: path - required: true - description: The Vectorize index name. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/vectorizeDeleteMetadataIndexRequest' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - $ref: '#/components/schemas/vectorizeDeleteMetadataIndexResponse' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Delete Metadata Index Response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Delete Metadata Index Failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Metadata Index - tags: - - Vectorize - x-api-token-group: - - Vectorize Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.vectorize.index.delete - x-stackql-sdk: - service: vectorize - resource_chain: - - indexes - - metadata_index - method: delete - /accounts/{account_id}/vectorize/v2/indexes/{index_name}/metadata_index/list: - get: - description: List Metadata Indexes for the specified Vectorize Index. - operationId: vectorize-list-metadata-indexes - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: index_name - in: path - required: true - description: The Vectorize index name. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - $ref: '#/components/schemas/vectorizeListMetadataIndexResponse' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: List Metadata Index Response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: List Metadata Index Failure Response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Metadata Indexes - tags: - - Vectorize - x-api-token-group: - - Vectorize Write - - Vectorize Read - x-stackql-sdk: - service: vectorize - resource_chain: - - indexes - - metadata_index - method: list - /accounts/{account_id}/vectorize/v2/indexes/{index_name}/query: - post: - description: Finds vectors closest to a given vector in an index. - operationId: vectorize-query-vector - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: index_name - in: path - required: true - description: The Vectorize index name. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/vectorizeIndexQueryV2Request' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - $ref: '#/components/schemas/vectorizeIndexQueryV2Response' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Query Vectors Response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Query Vectors Failure Response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Query Vectors - tags: - - Vectorize - x-api-token-group: - - Vectorize Write - - Vectorize Read - x-stackql-sdk: - service: vectorize - resource_chain: - - indexes - method: query - /accounts/{account_id}/vectorize/v2/indexes/{index_name}/upsert: - post: - description: >- - Upserts vectors into the specified index, creating them if they do not - exist and returns a mutation id corresponding to the vectors enqueued - for upsertion. - operationId: vectorize-upsert-vector - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: index_name - in: path - required: true - description: The Vectorize index name. - schema: - type: string - - in: query - name: unparsable-behavior - schema: - description: Behavior for ndjson parse failures. - enum: - - error - - discard - type: string - requestBody: - content: - application/x-ndjson: - schema: - description: ndjson file containing vectors to upsert. - format: binary - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - $ref: '#/components/schemas/vectorizeIndexUpsertV2Response' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Upsert Vectors Response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vectorizeMessages' - messages: - $ref: '#/components/schemas/vectorizeMessages' - result: - nullable: true - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Upsert Vectors Failure Response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Upsert Vectors - tags: - - Vectorize - x-api-token-group: - - Vectorize Write - x-stackql-sdk: - service: vectorize - resource_chain: - - indexes - method: upsert -components: - schemas: - responseInfo: - properties: - code: - minimum: 1000 - type: integer - message: - type: string - documentation_url: - type: string - source: - type: object - properties: - pointer: - type: string - required: - - code - - message - type: object - uniqueItems: true - vectorizeCreateIndexRequest: - properties: - config: - $ref: '#/components/schemas/vectorizeIndexConfiguration' - description: - $ref: '#/components/schemas/vectorizeIndexDescription' - name: - $ref: '#/components/schemas/vectorizeIndexName' - required: - - name - - config - type: object - vectorizeCreateIndexResponse: - properties: - config: - $ref: '#/components/schemas/vectorizeIndexDimensionConfiguration' - created_on: - description: >- - Specifies the timestamp the resource was created as an ISO8601 - string. - example: '2022-11-15T18:25:44.442097Z' - format: date-time - readOnly: true - type: string - x-auditable: true - description: - $ref: '#/components/schemas/vectorizeIndexDescription' - modified_on: - description: >- - Specifies the timestamp the resource was modified as an ISO8601 - string. - example: '2022-11-15T18:25:44.442097Z' - format: date-time - readOnly: true - type: string - x-auditable: true - name: - $ref: '#/components/schemas/vectorizeIndexName' - type: object - vectorizeCreateMetadataIndexRequest: - properties: - indexType: - description: Specifies the type of metadata property to index. - enum: - - string - - number - - boolean - type: string - x-auditable: true - propertyName: - description: Specifies the metadata property to index. - example: random_metadata_property - type: string - x-auditable: true - required: - - propertyName - - indexType - type: object - vectorizeCreateMetadataIndexResponse: - properties: - mutationId: - $ref: '#/components/schemas/vectorizeMutationUuid' - type: object - vectorizeDeleteMetadataIndexRequest: - properties: - propertyName: - description: Specifies the metadata property for which the index must be deleted. - example: random_metadata_property - type: string - x-auditable: true - required: - - propertyName - type: object - vectorizeDeleteMetadataIndexResponse: - properties: - mutationId: - $ref: '#/components/schemas/vectorizeMutationUuid' - type: object - vectorizeIndexConfiguration: - description: Specifies the type of configuration to use for the index. - type: object - properties: - dimensions: - $ref: '#/components/schemas/vectorizeIndexDimensions' - metric: - $ref: '#/components/schemas/vectorizeIndexMetric' - preset: - $ref: '#/components/schemas/vectorizeIndexPreset' - required: [] - vectorizeIndexDeleteVectorsByIdRequest: - properties: - ids: - description: >- - A list of vector identifiers to delete from the index indicated by - the path. - example: - - 5121db81354a40c6aedc3fe1ace51c59 - - f90eb49c2107486abdfd78c67e853430 - items: - $ref: '#/components/schemas/vectorizeVectorIdentifier' - type: array - type: object - vectorizeIndexDeleteVectorsByIdResponse: - properties: - count: - description: The count of the vectors successfully deleted. - example: 42 - type: integer - ids: - description: >- - Array of vector identifiers of the vectors that were successfully - processed for deletion. - items: - $ref: '#/components/schemas/vectorizeVectorIdentifier' - type: array - type: object - vectorizeIndexDeleteVectorsByIdV2Response: - properties: - mutationId: - $ref: '#/components/schemas/vectorizeMutationUuid' - type: object - vectorizeIndexDescription: - description: Specifies the description of the index. - example: This is my example index. - type: string - x-auditable: true - vectorizeIndexDimensionConfiguration: - properties: - dimensions: - $ref: '#/components/schemas/vectorizeIndexDimensions' - metric: - $ref: '#/components/schemas/vectorizeIndexMetric' - required: - - dimensions - - metric - type: object - vectorizeIndexDimensions: - description: Specifies the number of dimensions for the index - example: 768 - maximum: 1536 - minimum: 1 - type: integer - x-auditable: true - vectorizeIndexGetVectorsByIdRequest: - properties: - ids: - description: >- - A list of vector identifiers to retrieve from the index indicated by - the path. - example: - - 5121db81354a40c6aedc3fe1ace51c59 - - f90eb49c2107486abdfd78c67e853430 - items: - $ref: '#/components/schemas/vectorizeVectorIdentifier' - type: array - type: object - vectorizeIndexGetVectorsByIdResponse: - description: Array of vectors with matching ids. - example: - - id: some-vector-id - metadata: - another-key: another-value - customer-id: 442 - values: - - 0.812 - - 0.621 - - 0.261 - - id: other-vector-id - metadata: - another-key: with-a-value - customer-id: 2151 - namespace: namespaced - values: - - 0.961 - - 0.751 - - 0.661 - items: - properties: - id: - $ref: '#/components/schemas/vectorizeVectorIdentifier' - metadata: - type: object - namespace: - nullable: true - type: string - values: - items: - type: number - type: array - type: object - type: array - vectorizeIndexInfoResponse: - properties: - dimensions: - $ref: '#/components/schemas/vectorizeIndexDimensions' - processedUpToDatetime: - description: >- - Specifies the timestamp the last mutation batch was processed as an - ISO8601 string. - example: '2024-07-22T18:25:44.442097Z' - format: date-time - nullable: true - readOnly: true - type: string - x-auditable: true - processedUpToMutation: - $ref: '#/components/schemas/vectorizeMutationUuid' - vectorCount: - description: Specifies the number of vectors present in the index - example: 300000 - type: integer - x-auditable: true - type: object - vectorizeIndexInsertResponse: - properties: - count: - description: Specifies the count of the vectors successfully inserted. - example: 768 - type: integer - x-auditable: true - ids: - description: Array of vector identifiers of the vectors successfully inserted. - items: - $ref: '#/components/schemas/vectorizeVectorIdentifier' - type: array - type: object - vectorizeIndexInsertV2Response: - properties: - mutationId: - $ref: '#/components/schemas/vectorizeMutationUuid' - type: object - vectorizeIndexListVectorsResponse: - properties: - count: - description: Number of vectors returned in this response - example: 100 - type: integer - cursorExpirationTimestamp: - description: When the cursor expires as an ISO8601 string - example: '2025-08-12T20:32:52.469144957+00:00' - format: date-time - nullable: true - type: string - isTruncated: - description: Whether there are more vectors available beyond this response - example: true - type: boolean - nextCursor: - description: Cursor for the next page of results - example: suUTaDY5PFUiRweVccnzyt9n75suNPbXHPshvCzue5mHjtj7Letjvzlza9eGj099 - nullable: true - type: string - totalCount: - description: Total number of vectors in the index - example: 500 - type: integer - vectors: - description: Array of vector items - items: - $ref: '#/components/schemas/vectorizeVectorListItem' - type: array - required: - - count - - totalCount - - isTruncated - - vectors - type: object - vectorizeIndexMetric: - description: Specifies the type of metric to use calculating distance. - enum: - - cosine - - euclidean - - dot-product - type: string - x-auditable: true - vectorizeIndexName: - example: example-index - type: string - x-auditable: true - vectorizeIndexPreset: - description: Specifies the preset to use for the index. - enum: - - '@cf/baai/bge-small-en-v1.5' - - '@cf/baai/bge-base-en-v1.5' - - '@cf/baai/bge-large-en-v1.5' - - openai/text-embedding-ada-002 - - cohere/embed-multilingual-v2.0 - example: '@cf/baai/bge-small-en-v1.5' - type: string - x-auditable: true - vectorizeIndexQueryRequest: - properties: - filter: - description: A metadata filter expression used to limit nearest neighbor results. - example: - has_viewed: - $ne: true - streaming_platform: netflix - type: object - returnMetadata: - default: false - description: Whether to return the metadata associated with the closest vectors. - type: boolean - returnValues: - default: false - description: Whether to return the values associated with the closest vectors. - type: boolean - topK: - default: 5 - description: The number of nearest neighbors to find. - example: 5 - type: number - vector: - description: The search vector that will be used to find the nearest neighbors. - example: - - 0.5 - - 0.5 - - 0.5 - items: - type: number - type: array - required: - - vector - type: object - vectorizeIndexQueryResponse: - properties: - count: - description: Specifies the count of vectors returned by the search - type: integer - matches: - description: Array of vectors matched by the search - items: - properties: - id: - $ref: '#/components/schemas/vectorizeVectorIdentifier' - metadata: - nullable: true - type: object - score: - description: >- - The score of the vector according to the index's distance - metric - type: number - values: - items: - type: number - nullable: true - type: array - type: object - type: array - type: object - vectorizeIndexQueryV2Request: - properties: - filter: - description: A metadata filter expression used to limit nearest neighbor results. - example: - has_viewed: - $ne: true - streaming_platform: netflix - type: object - returnMetadata: - default: none - description: >- - Whether to return no metadata, indexed metadata or all metadata - associated with the closest vectors. - enum: - - none - - indexed - - all - type: string - returnValues: - default: false - description: Whether to return the values associated with the closest vectors. - type: boolean - topK: - default: 5 - description: The number of nearest neighbors to find. - example: 5 - type: number - vector: - description: The search vector that will be used to find the nearest neighbors. - example: - - 0.5 - - 0.5 - - 0.5 - items: - type: number - type: array - required: - - vector - type: object - vectorizeIndexQueryV2Response: - properties: - count: - description: Specifies the count of vectors returned by the search - type: integer - matches: - description: Array of vectors matched by the search - items: - properties: - id: - $ref: '#/components/schemas/vectorizeVectorIdentifier' - metadata: - nullable: true - type: object - namespace: - nullable: true - type: string - score: - description: >- - The score of the vector according to the index's distance - metric - type: number - values: - items: - type: number - nullable: true - type: array - type: object - type: array - type: object - vectorizeIndexUpsertResponse: - properties: - count: - description: Specifies the count of the vectors successfully inserted. - example: 768 - type: integer - x-auditable: true - ids: - description: Array of vector identifiers of the vectors successfully inserted. - items: - $ref: '#/components/schemas/vectorizeVectorIdentifier' - type: array - type: object - vectorizeIndexUpsertV2Response: - properties: - mutationId: - $ref: '#/components/schemas/vectorizeMutationUuid' - type: object - vectorizeListMetadataIndexResponse: - example: - metadataIndexes: - - indexType: number - propertyName: some-num-prop - - indexType: string - propertyName: some-str-prop - - indexType: boolean - propertyName: some-bool-prop - properties: - metadataIndexes: - description: Array of indexed metadata properties. - items: - properties: - indexType: - description: Specifies the type of indexed metadata property. - enum: - - string - - number - - boolean - type: string - x-auditable: true - propertyName: - description: Specifies the indexed metadata property. - example: random_metadata_property - type: string - x-auditable: true - type: object - type: array - type: object - vectorizeMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - vectorizeMutationUuid: - description: >- - The unique identifier for the async mutation operation containing the - changeset. - example: 0000aaaa-11bb-22cc-33dd-444444eeeeee - maxLength: 36 - x-auditable: true - type: string - vectorizeUpdateIndexRequest: - properties: - description: - $ref: '#/components/schemas/vectorizeIndexDescription' - required: - - description - type: object - vectorizeVectorIdentifier: - description: Identifier for a Vector - example: some-vector-id-023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 64 - readOnly: true - type: string - vectorizeVectorListItem: - properties: - id: - $ref: '#/components/schemas/vectorizeVectorIdentifier' - required: - - id - type: object - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - vectorize_indexes: - id: cloudflare.vectorize.vectorize_indexes - name: vectorize_indexes - title: Vectorize Indexes - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1indexes/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - vectorize_deprecated_create_vectorize_index: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1indexes/post' - response: - mediaType: application/json - openAPIDocKey: '200' - vectorize_deprecated_delete_vectorize_index: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vectorize~1indexes~1{index_name}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vectorize~1indexes~1{index_name}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/vectorize_indexes/methods/get' - - $ref: '#/components/x-stackQL-resources/vectorize_indexes/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/vectorize_indexes/methods/vectorize_deprecated_create_vectorize_index - update: [] - delete: - - $ref: >- - #/components/x-stackQL-resources/vectorize_indexes/methods/vectorize_deprecated_delete_vectorize_index - replace: [] - vectorize: - id: cloudflare.vectorize.vectorize - name: vectorize - title: Vectorize - methods: - update_indexes: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vectorize~1indexes~1{index_name}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] - indexes: - id: cloudflare.vectorize.indexes - name: indexes - title: Indexes - methods: - create_delete_by_ids: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vectorize~1indexes~1{index_name}~1delete-by-ids/post - response: - mediaType: application/json - openAPIDocKey: '200' - get_by_ids: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vectorize~1indexes~1{index_name}~1get-by-ids/post - response: - mediaType: application/json - openAPIDocKey: '200' - create_insert: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vectorize~1indexes~1{index_name}~1insert/post - response: - mediaType: application/json - openAPIDocKey: '200' - query: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vectorize~1indexes~1{index_name}~1query/post - response: - mediaType: application/json - openAPIDocKey: '200' - upsert: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vectorize~1indexes~1{index_name}~1upsert/post - response: - mediaType: application/json - openAPIDocKey: '200' - create_delete_by_ids_v2: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes~1{index_name}~1delete_by_ids/post - response: - mediaType: application/json - openAPIDocKey: '200' - get_by_ids_v2: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes~1{index_name}~1get_by_ids/post - response: - mediaType: application/json - openAPIDocKey: '200' - create_insert_v2: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes~1{index_name}~1insert/post - response: - mediaType: application/json - openAPIDocKey: '200' - query_v2: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes~1{index_name}~1query/post - response: - mediaType: application/json - openAPIDocKey: '200' - upsert_v2: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes~1{index_name}~1upsert/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] - v2_indexes: - id: cloudflare.vectorize.v2_indexes - name: v2_indexes - title: V2 Indexes - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes~1{index_name}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes~1{index_name}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/v2_indexes/methods/get' - - $ref: '#/components/x-stackQL-resources/v2_indexes/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/v2_indexes/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/v2_indexes/methods/delete' - replace: [] - indexes_info: - id: cloudflare.vectorize.indexes_info - name: indexes_info - title: Indexes Info - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes~1{index_name}~1info/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/indexes_info/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - indexes_list: - id: cloudflare.vectorize.indexes_list - name: indexes_list - title: Indexes List - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes~1{index_name}~1list/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/indexes_list/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - metadata_index: - id: cloudflare.vectorize.metadata_index - name: metadata_index - title: Metadata Index - methods: - create_v2: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes~1{index_name}~1metadata_index~1create/post - response: - mediaType: application/json - openAPIDocKey: '200' - create_delete_v2: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes~1{index_name}~1metadata_index~1delete/post - response: - mediaType: application/json - openAPIDocKey: '200' - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes~1{index_name}~1metadata_index~1list/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result.metadataIndexes - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/metadata_index/methods/list' - insert: [] - update: [] - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: vectorize API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/vectorize/indexes: + get: + deprecated: true + description: Returns a list of Vectorize Indexes + operationId: vectorize-(-deprecated)-list-vectorize-indexes + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + items: + $ref: '#/components/schemas/vectorizeCreateIndexResponse' + type: array + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: List Vectorize Index Response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: List Vectorize Index Failure Response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Vectorize Indexes (Deprecated) + tags: + - Vectorize Beta (Deprecated) + x-api-token-group: + - Vectorize Write + - Vectorize Read + x-cfDeprecation: + description: This endpoint is deprecated in favor of the GET `/accounts/{account_id}/vectorize/v2/indexes` endpoint. + display: true + id: vectorize_list_index_deprecation + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.vectorize.index.list + post: + deprecated: true + description: Creates and returns a new Vectorize Index. + operationId: vectorize-(-deprecated)-create-vectorize-index + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/vectorizeCreateIndexRequest' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + $ref: '#/components/schemas/vectorizeCreateIndexResponse' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Create Vectorize Index Response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Create Vectorize Index Failure Response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Vectorize Index (Deprecated) + tags: + - Vectorize Beta (Deprecated) + x-api-token-group: + - Vectorize Write + x-cfDeprecation: + description: This endpoint is deprecated in favor of the POST `/accounts/{account_id}/vectorize/v2/indexes` endpoint. + display: true + id: vectorize_create_index_deprecation + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.vectorize.index.create + /accounts/{account_id}/vectorize/indexes/{index_name}: + delete: + deprecated: true + description: Deletes the specified Vectorize Index. + operationId: vectorize-(-deprecated)-delete-vectorize-index + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: index_name + in: path + required: true + description: The Vectorize index name. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Delete Vectorize Index Response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Delete Vectorize Index Failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Vectorize Index (Deprecated) + tags: + - Vectorize Beta (Deprecated) + x-api-token-group: + - Vectorize Write + x-cfDeprecation: + description: This endpoint is deprecated in favor of the DELETE `/accounts/{account_id}/vectorize/v2/indexes/{index_name}` endpoint. + display: true + id: vectorize_delete_index_deprecation + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.vectorize.index.delete + get: + deprecated: true + description: Returns the specified Vectorize Index. + operationId: vectorize-(-deprecated)-get-vectorize-index + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: index_name + in: path + required: true + description: The Vectorize index name. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + $ref: '#/components/schemas/vectorizeCreateIndexResponse' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Get Vectorize Index Response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Get Vectorize Index Failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Vectorize Index (Deprecated) + tags: + - Vectorize Beta (Deprecated) + x-api-token-group: + - Vectorize Write + - Vectorize Read + x-cfDeprecation: + description: This endpoint is deprecated in favor of the GET `/accounts/{account_id}/vectorize/v2/indexes/{index_name}` endpoint. + display: true + id: vectorize_get_index_deprecation + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.vectorize.index.read + put: + deprecated: true + description: Updates and returns the specified Vectorize Index. + operationId: vectorize-(-deprecated)-update-vectorize-index + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: index_name + in: path + required: true + description: The Vectorize index name. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/vectorizeUpdateIndexRequest' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + $ref: '#/components/schemas/vectorizeCreateIndexResponse' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Update Vectorize Index Response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Update Vectorize Index Failure Response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Vectorize Index (Deprecated) + tags: + - Vectorize Beta (Deprecated) + x-api-token-group: + - Vectorize Write + x-cfDeprecation: + description: This endpoint has been deprecated and will soon be removed. + display: true + id: vectorize_update_index_deprecation + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.vectorize.index.update + /accounts/{account_id}/vectorize/indexes/{index_name}/delete-by-ids: + post: + deprecated: true + description: Delete a set of vectors from an index by their vector identifiers. + operationId: vectorize-(-deprecated)-delete-vectors-by-id + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: index_name + in: path + required: true + description: The Vectorize index name. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/vectorizeIndexDeleteVectorsByIdRequest' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + $ref: '#/components/schemas/vectorizeIndexDeleteVectorsByIdResponse' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Delete Vector Identifiers Response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Delete Vector Identifiers Failure Response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Vectors By Identifier (Deprecated) + tags: + - Vectorize Beta (Deprecated) + x-api-token-group: + - Vectorize Write + x-cfDeprecation: + description: This endpoint is deprecated in favor of the POST `/accounts/{account_id}/vectorize/v2/indexes/{index_name}/delete_by_ids` endpoint. + display: true + id: vectorize_delete_by_ids_deprecation + /accounts/{account_id}/vectorize/indexes/{index_name}/get-by-ids: + post: + deprecated: true + description: Get a set of vectors from an index by their vector identifiers. + operationId: vectorize-(-deprecated)-get-vectors-by-id + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: index_name + in: path + required: true + description: The Vectorize index name. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/vectorizeIndexGetVectorsByIdRequest' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + $ref: '#/components/schemas/vectorizeIndexGetVectorsByIdResponse' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Get Vectors By Identifier Response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Get Vectors By Identifier Failure Response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Vectors By Identifier (Deprecated) + tags: + - Vectorize Beta (Deprecated) + x-api-token-group: + - Vectorize Write + - Vectorize Read + x-cfDeprecation: + description: This endpoint is deprecated in favor of the POST `/accounts/{account_id}/vectorize/v2/indexes/{index_name}/get_by_ids` endpoint. + display: true + id: vectorize_get_by_ids_deprecation + /accounts/{account_id}/vectorize/indexes/{index_name}/insert: + post: + deprecated: true + description: Inserts vectors into the specified index and returns the count of the vectors successfully inserted. + operationId: vectorize-(-deprecated)-insert-vector + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: index_name + in: path + required: true + description: The Vectorize index name. + schema: + type: string + requestBody: + content: + application/x-ndjson: + schema: + description: ndjson file containing vectors to insert. + format: binary + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + $ref: '#/components/schemas/vectorizeIndexInsertResponse' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Insert Vectors Response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Insert Vectors Failure Response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Insert Vectors (Deprecated) + tags: + - Vectorize Beta (Deprecated) + x-api-token-group: + - Vectorize Write + x-cfDeprecation: + description: This endpoint is deprecated in favor of the POST `/accounts/{account_id}/vectorize/v2/indexes/{index_name}/insert` endpoint. + display: true + id: vectorize_insert_deprecation + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.vectorize.index.update + /accounts/{account_id}/vectorize/indexes/{index_name}/query: + post: + deprecated: true + description: Finds vectors closest to a given vector in an index. + operationId: vectorize-(-deprecated)-query-vector + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: index_name + in: path + required: true + description: The Vectorize index name. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/vectorizeIndexQueryRequest' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + $ref: '#/components/schemas/vectorizeIndexQueryResponse' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Query Vectors Response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Query Vectors Failure Response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Query Vectors (Deprecated) + tags: + - Vectorize Beta (Deprecated) + x-api-token-group: + - Vectorize Write + - Vectorize Read + x-cfDeprecation: + description: This endpoint is deprecated in favor of the POST `/accounts/{account_id}/vectorize/v2/indexes/{index_name}/query` endpoint. + display: true + id: vectorize_query_deprecation + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.vectorize.index.read + /accounts/{account_id}/vectorize/indexes/{index_name}/upsert: + post: + deprecated: true + description: Upserts vectors into the specified index, creating them if they do not exist and returns the count of values and ids successfully inserted. + operationId: vectorize-(-deprecated)-upsert-vector + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: index_name + in: path + required: true + description: The Vectorize index name. + schema: + type: string + requestBody: + content: + application/x-ndjson: + schema: + description: ndjson file containing vectors to upsert. + format: binary + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + $ref: '#/components/schemas/vectorizeIndexUpsertResponse' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Insert Vectors Response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Insert Vectors Failure Response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Upsert Vectors (Deprecated) + tags: + - Vectorize Beta (Deprecated) + x-api-token-group: + - Vectorize Write + x-cfDeprecation: + description: This endpoint is deprecated in favor of the POST `/accounts/{account_id}/vectorize/v2/indexes/{index_name}/upsert` endpoint. + display: true + id: vectorize_upsert_deprecation + /accounts/{account_id}/vectorize/v2/indexes: + get: + description: Returns a list of Vectorize Indexes + operationId: vectorize-list-vectorize-indexes + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + items: + $ref: '#/components/schemas/vectorizeCreateIndexResponse' + type: array + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: List Vectorize Index Response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: List Vectorize Index Failure Response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Vectorize Indexes + tags: + - Vectorize + x-api-token-group: + - Vectorize Write + - Vectorize Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.vectorize.index.list + x-stackql-sdk: + service: vectorize + resource_chain: + - indexes + method: list + post: + description: Creates and returns a new Vectorize Index. + operationId: vectorize-create-vectorize-index + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/vectorizeCreateIndexRequest' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + $ref: '#/components/schemas/vectorizeCreateIndexResponse' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Create Vectorize Index Response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Create Vectorize Index Failure Response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Vectorize Index + tags: + - Vectorize + x-api-token-group: + - Vectorize Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.vectorize.index.create + x-stackql-sdk: + service: vectorize + resource_chain: + - indexes + method: create + /accounts/{account_id}/vectorize/v2/indexes/{index_name}: + delete: + description: Deletes the specified Vectorize Index. + operationId: vectorize-delete-vectorize-index + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: index_name + in: path + required: true + description: The Vectorize index name. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Delete Vectorize Index Response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Delete Vectorize Index Failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Vectorize Index + tags: + - Vectorize + x-api-token-group: + - Vectorize Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.vectorize.index.delete + x-stackql-sdk: + service: vectorize + resource_chain: + - indexes + method: delete + get: + description: Returns the specified Vectorize Index. + operationId: vectorize-get-vectorize-index + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: index_name + in: path + required: true + description: The Vectorize index name. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + $ref: '#/components/schemas/vectorizeCreateIndexResponse' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Get Vectorize Index Response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Get Vectorize Index Failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Vectorize Index + tags: + - Vectorize + x-api-token-group: + - Vectorize Write + - Vectorize Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.vectorize.index.read + x-stackql-sdk: + service: vectorize + resource_chain: + - indexes + method: get + /accounts/{account_id}/vectorize/v2/indexes/{index_name}/delete_by_ids: + post: + description: Delete a set of vectors from an index by their vector identifiers. + operationId: vectorize-delete-vectors-by-id + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: index_name + in: path + required: true + description: The Vectorize index name. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/vectorizeIndexDeleteVectorsByIdRequest' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + $ref: '#/components/schemas/vectorizeIndexDeleteVectorsByIdV2Response' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Delete Vector Identifiers Response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Delete Vector Identifiers Failure Response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Vectors By Identifier + tags: + - Vectorize + x-api-token-group: + - Vectorize Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.vectorize.index.delete + x-stackql-sdk: + service: vectorize + resource_chain: + - indexes + method: delete_by_ids + /accounts/{account_id}/vectorize/v2/indexes/{index_name}/get_by_ids: + post: + description: Get a set of vectors from an index by their vector identifiers. + operationId: vectorize-get-vectors-by-id + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: index_name + in: path + required: true + description: The Vectorize index name. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/vectorizeIndexGetVectorsByIdRequest' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + $ref: '#/components/schemas/vectorizeIndexGetVectorsByIdResponse' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Get Vectors By Identifier Response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Get Vectors By Identifier Failure Response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Vectors By Identifier + tags: + - Vectorize + x-api-token-group: + - Vectorize Write + - Vectorize Read + x-stackql-sdk: + service: vectorize + resource_chain: + - indexes + method: get_by_ids + /accounts/{account_id}/vectorize/v2/indexes/{index_name}/info: + get: + description: Get information about a vectorize index. + operationId: vectorize-index-info + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: index_name + in: path + required: true + description: The Vectorize index name. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + $ref: '#/components/schemas/vectorizeIndexInfoResponse' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Get Vectorize Index Info Response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Get Vectorize Index Info Failure Response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Vectorize Index Info + tags: + - Vectorize + x-api-token-group: + - Vectorize Write + - Vectorize Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.vectorize.index.read + x-stackql-sdk: + service: vectorize + resource_chain: + - indexes + method: info + /accounts/{account_id}/vectorize/v2/indexes/{index_name}/insert: + post: + description: Inserts vectors into the specified index and returns a mutation id corresponding to the vectors enqueued for insertion. + operationId: vectorize-insert-vector + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: index_name + in: path + required: true + description: The Vectorize index name. + schema: + type: string + - in: query + name: unparsable-behavior + schema: + description: Behavior for ndjson parse failures. + enum: + - error + - discard + type: string + requestBody: + content: + application/x-ndjson: + schema: + description: ndjson file containing vectors to insert. + format: binary + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + $ref: '#/components/schemas/vectorizeIndexInsertV2Response' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Insert Vectors Response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Insert Vectors Failure Response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Insert Vectors + tags: + - Vectorize + x-api-token-group: + - Vectorize Write + x-stackql-sdk: + service: vectorize + resource_chain: + - indexes + method: insert + /accounts/{account_id}/vectorize/v2/indexes/{index_name}/list: + get: + description: Returns a paginated list of vector identifiers from the specified index. + operationId: vectorize-list-vectors + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: index_name + in: path + required: true + description: The Vectorize index name. + schema: + type: string + - in: query + name: count + schema: + default: 100 + description: Maximum number of vectors to return + maximum: 1000 + minimum: 1 + type: integer + - in: query + name: cursor + schema: + description: Cursor for pagination to get the next page of results + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + $ref: '#/components/schemas/vectorizeIndexListVectorsResponse' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: List Vectors Response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: List Vectors Failure Response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Vectors + tags: + - Vectorize + x-api-token-group: + - Vectorize Write + - Vectorize Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.vectorize.index.read + x-stackql-sdk: + service: vectorize + resource_chain: + - indexes + method: list_vectors + /accounts/{account_id}/vectorize/v2/indexes/{index_name}/metadata_index/create: + post: + description: Enable metadata filtering based on metadata property. Limited to 10 properties. + operationId: vectorize-create-metadata-index + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: index_name + in: path + required: true + description: The Vectorize index name. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/vectorizeCreateMetadataIndexRequest' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + $ref: '#/components/schemas/vectorizeCreateMetadataIndexResponse' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Create Metadata Index Response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Create Metadata Index Failure Response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Metadata Index + tags: + - Vectorize + x-api-token-group: + - Vectorize Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.vectorize.index.create + x-stackql-sdk: + service: vectorize + resource_chain: + - indexes + - metadata_index + method: create + /accounts/{account_id}/vectorize/v2/indexes/{index_name}/metadata_index/delete: + post: + description: Allow Vectorize to delete the specified metadata index. + operationId: vectorize-delete-metadata-index + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: index_name + in: path + required: true + description: The Vectorize index name. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/vectorizeDeleteMetadataIndexRequest' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + $ref: '#/components/schemas/vectorizeDeleteMetadataIndexResponse' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Delete Metadata Index Response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Delete Metadata Index Failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Metadata Index + tags: + - Vectorize + x-api-token-group: + - Vectorize Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.vectorize.index.delete + x-stackql-sdk: + service: vectorize + resource_chain: + - indexes + - metadata_index + method: delete + /accounts/{account_id}/vectorize/v2/indexes/{index_name}/metadata_index/list: + get: + description: List Metadata Indexes for the specified Vectorize Index. + operationId: vectorize-list-metadata-indexes + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: index_name + in: path + required: true + description: The Vectorize index name. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + $ref: '#/components/schemas/vectorizeListMetadataIndexResponse' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: List Metadata Index Response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: List Metadata Index Failure Response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Metadata Indexes + tags: + - Vectorize + x-api-token-group: + - Vectorize Write + - Vectorize Read + x-stackql-sdk: + service: vectorize + resource_chain: + - indexes + - metadata_index + method: list + /accounts/{account_id}/vectorize/v2/indexes/{index_name}/query: + post: + description: Finds vectors closest to a given vector in an index. + operationId: vectorize-query-vector + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: index_name + in: path + required: true + description: The Vectorize index name. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/vectorizeIndexQueryV2Request' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + $ref: '#/components/schemas/vectorizeIndexQueryV2Response' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Query Vectors Response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Query Vectors Failure Response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Query Vectors + tags: + - Vectorize + x-api-token-group: + - Vectorize Write + - Vectorize Read + x-stackql-sdk: + service: vectorize + resource_chain: + - indexes + method: query + /accounts/{account_id}/vectorize/v2/indexes/{index_name}/upsert: + post: + description: Upserts vectors into the specified index, creating them if they do not exist and returns a mutation id corresponding to the vectors enqueued for upsertion. + operationId: vectorize-upsert-vector + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: index_name + in: path + required: true + description: The Vectorize index name. + schema: + type: string + - in: query + name: unparsable-behavior + schema: + description: Behavior for ndjson parse failures. + enum: + - error + - discard + type: string + requestBody: + content: + application/x-ndjson: + schema: + description: ndjson file containing vectors to upsert. + format: binary + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + $ref: '#/components/schemas/vectorizeIndexUpsertV2Response' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Upsert Vectors Response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vectorizeMessages' + messages: + $ref: '#/components/schemas/vectorizeMessages' + result: + nullable: true + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Upsert Vectors Failure Response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Upsert Vectors + tags: + - Vectorize + x-api-token-group: + - Vectorize Write + x-stackql-sdk: + service: vectorize + resource_chain: + - indexes + method: upsert +components: + schemas: + responseInfo: + properties: + code: + minimum: 1000 + type: integer + message: + type: string + documentation_url: + type: string + source: + type: object + properties: + pointer: + type: string + required: + - code + - message + type: object + uniqueItems: true + vectorizeCreateIndexRequest: + properties: + config: + $ref: '#/components/schemas/vectorizeIndexConfiguration' + description: + $ref: '#/components/schemas/vectorizeIndexDescription' + name: + $ref: '#/components/schemas/vectorizeIndexName' + required: + - name + - config + type: object + vectorizeCreateIndexResponse: + properties: + config: + $ref: '#/components/schemas/vectorizeIndexDimensionConfiguration' + created_on: + description: Specifies the timestamp the resource was created as an ISO8601 string. + example: '2022-11-15T18:25:44.442097Z' + format: date-time + readOnly: true + type: string + x-auditable: true + description: + $ref: '#/components/schemas/vectorizeIndexDescription' + modified_on: + description: Specifies the timestamp the resource was modified as an ISO8601 string. + example: '2022-11-15T18:25:44.442097Z' + format: date-time + readOnly: true + type: string + x-auditable: true + name: + $ref: '#/components/schemas/vectorizeIndexName' + type: object + vectorizeCreateMetadataIndexRequest: + properties: + indexType: + description: Specifies the type of metadata property to index. + enum: + - string + - number + - boolean + type: string + x-auditable: true + propertyName: + description: Specifies the metadata property to index. + example: random_metadata_property + type: string + x-auditable: true + required: + - propertyName + - indexType + type: object + vectorizeCreateMetadataIndexResponse: + properties: + mutationId: + $ref: '#/components/schemas/vectorizeMutationUuid' + type: object + vectorizeDeleteMetadataIndexRequest: + properties: + propertyName: + description: Specifies the metadata property for which the index must be deleted. + example: random_metadata_property + type: string + x-auditable: true + required: + - propertyName + type: object + vectorizeDeleteMetadataIndexResponse: + properties: + mutationId: + $ref: '#/components/schemas/vectorizeMutationUuid' + type: object + vectorizeIndexConfiguration: + description: Specifies the type of configuration to use for the index. + type: object + properties: + dimensions: + $ref: '#/components/schemas/vectorizeIndexDimensions' + metric: + $ref: '#/components/schemas/vectorizeIndexMetric' + preset: + $ref: '#/components/schemas/vectorizeIndexPreset' + required: [] + vectorizeIndexDeleteVectorsByIdRequest: + properties: + ids: + description: A list of vector identifiers to delete from the index indicated by the path. + example: + - 5121db81354a40c6aedc3fe1ace51c59 + - f90eb49c2107486abdfd78c67e853430 + items: + $ref: '#/components/schemas/vectorizeVectorIdentifier' + type: array + type: object + vectorizeIndexDeleteVectorsByIdResponse: + properties: + count: + description: The count of the vectors successfully deleted. + example: 42 + type: integer + ids: + description: Array of vector identifiers of the vectors that were successfully processed for deletion. + items: + $ref: '#/components/schemas/vectorizeVectorIdentifier' + type: array + type: object + vectorizeIndexDeleteVectorsByIdV2Response: + properties: + mutationId: + $ref: '#/components/schemas/vectorizeMutationUuid' + type: object + vectorizeIndexDescription: + description: Specifies the description of the index. + example: This is my example index. + type: string + x-auditable: true + vectorizeIndexDimensionConfiguration: + properties: + dimensions: + $ref: '#/components/schemas/vectorizeIndexDimensions' + metric: + $ref: '#/components/schemas/vectorizeIndexMetric' + required: + - dimensions + - metric + type: object + vectorizeIndexDimensions: + description: Specifies the number of dimensions for the index + example: 768 + maximum: 1536 + minimum: 1 + type: integer + x-auditable: true + vectorizeIndexGetVectorsByIdRequest: + properties: + ids: + description: A list of vector identifiers to retrieve from the index indicated by the path. + example: + - 5121db81354a40c6aedc3fe1ace51c59 + - f90eb49c2107486abdfd78c67e853430 + items: + $ref: '#/components/schemas/vectorizeVectorIdentifier' + type: array + type: object + vectorizeIndexGetVectorsByIdResponse: + description: Array of vectors with matching ids. + example: + - id: some-vector-id + metadata: + another-key: another-value + customer-id: 442 + values: + - 0.812 + - 0.621 + - 0.261 + - id: other-vector-id + metadata: + another-key: with-a-value + customer-id: 2151 + namespace: namespaced + values: + - 0.961 + - 0.751 + - 0.661 + items: + properties: + id: + $ref: '#/components/schemas/vectorizeVectorIdentifier' + metadata: + type: object + namespace: + nullable: true + type: string + values: + items: + type: number + type: array + type: object + type: array + vectorizeIndexInfoResponse: + properties: + dimensions: + $ref: '#/components/schemas/vectorizeIndexDimensions' + processedUpToDatetime: + description: Specifies the timestamp the last mutation batch was processed as an ISO8601 string. + example: '2024-07-22T18:25:44.442097Z' + format: date-time + nullable: true + readOnly: true + type: string + x-auditable: true + processedUpToMutation: + $ref: '#/components/schemas/vectorizeMutationUuid' + vectorCount: + description: Specifies the number of vectors present in the index + example: 300000 + type: integer + x-auditable: true + type: object + vectorizeIndexInsertResponse: + properties: + count: + description: Specifies the count of the vectors successfully inserted. + example: 768 + type: integer + x-auditable: true + ids: + description: Array of vector identifiers of the vectors successfully inserted. + items: + $ref: '#/components/schemas/vectorizeVectorIdentifier' + type: array + type: object + vectorizeIndexInsertV2Response: + properties: + mutationId: + $ref: '#/components/schemas/vectorizeMutationUuid' + type: object + vectorizeIndexListVectorsResponse: + properties: + count: + description: Number of vectors returned in this response + example: 100 + type: integer + cursorExpirationTimestamp: + description: When the cursor expires as an ISO8601 string + example: '2025-08-12T20:32:52.469144957+00:00' + format: date-time + nullable: true + type: string + isTruncated: + description: Whether there are more vectors available beyond this response + example: true + type: boolean + nextCursor: + description: Cursor for the next page of results + example: suUTaDY5PFUiRweVccnzyt9n75suNPbXHPshvCzue5mHjtj7Letjvzlza9eGj099 + nullable: true + type: string + totalCount: + description: Total number of vectors in the index + example: 500 + type: integer + vectors: + description: Array of vector items + items: + $ref: '#/components/schemas/vectorizeVectorListItem' + type: array + required: + - count + - totalCount + - isTruncated + - vectors + type: object + vectorizeIndexMetric: + description: Specifies the type of metric to use calculating distance. + enum: + - cosine + - euclidean + - dot-product + type: string + x-auditable: true + vectorizeIndexName: + example: example-index + type: string + x-auditable: true + vectorizeIndexPreset: + description: Specifies the preset to use for the index. + enum: + - '@cf/baai/bge-small-en-v1.5' + - '@cf/baai/bge-base-en-v1.5' + - '@cf/baai/bge-large-en-v1.5' + - openai/text-embedding-ada-002 + - cohere/embed-multilingual-v2.0 + example: '@cf/baai/bge-small-en-v1.5' + type: string + x-auditable: true + vectorizeIndexQueryRequest: + properties: + filter: + description: A metadata filter expression used to limit nearest neighbor results. + example: + has_viewed: + $ne: true + streaming_platform: netflix + type: object + returnMetadata: + default: false + description: Whether to return the metadata associated with the closest vectors. + type: boolean + returnValues: + default: false + description: Whether to return the values associated with the closest vectors. + type: boolean + topK: + default: 5 + description: The number of nearest neighbors to find. + example: 5 + type: number + vector: + description: The search vector that will be used to find the nearest neighbors. + example: + - 0.5 + - 0.5 + - 0.5 + items: + type: number + type: array + required: + - vector + type: object + vectorizeIndexQueryResponse: + properties: + count: + description: Specifies the count of vectors returned by the search + type: integer + matches: + description: Array of vectors matched by the search + items: + properties: + id: + $ref: '#/components/schemas/vectorizeVectorIdentifier' + metadata: + nullable: true + type: object + score: + description: The score of the vector according to the index's distance metric + type: number + values: + items: + type: number + nullable: true + type: array + type: object + type: array + type: object + vectorizeIndexQueryV2Request: + properties: + filter: + description: A metadata filter expression used to limit nearest neighbor results. + example: + has_viewed: + $ne: true + streaming_platform: netflix + type: object + returnMetadata: + default: none + description: Whether to return no metadata, indexed metadata or all metadata associated with the closest vectors. + enum: + - none + - indexed + - all + type: string + returnValues: + default: false + description: Whether to return the values associated with the closest vectors. + type: boolean + topK: + default: 5 + description: The number of nearest neighbors to find. + example: 5 + type: number + vector: + description: The search vector that will be used to find the nearest neighbors. + example: + - 0.5 + - 0.5 + - 0.5 + items: + type: number + type: array + required: + - vector + type: object + vectorizeIndexQueryV2Response: + properties: + count: + description: Specifies the count of vectors returned by the search + type: integer + matches: + description: Array of vectors matched by the search + items: + properties: + id: + $ref: '#/components/schemas/vectorizeVectorIdentifier' + metadata: + nullable: true + type: object + namespace: + nullable: true + type: string + score: + description: The score of the vector according to the index's distance metric + type: number + values: + items: + type: number + nullable: true + type: array + type: object + type: array + type: object + vectorizeIndexUpsertResponse: + properties: + count: + description: Specifies the count of the vectors successfully inserted. + example: 768 + type: integer + x-auditable: true + ids: + description: Array of vector identifiers of the vectors successfully inserted. + items: + $ref: '#/components/schemas/vectorizeVectorIdentifier' + type: array + type: object + vectorizeIndexUpsertV2Response: + properties: + mutationId: + $ref: '#/components/schemas/vectorizeMutationUuid' + type: object + vectorizeListMetadataIndexResponse: + example: + metadataIndexes: + - indexType: number + propertyName: some-num-prop + - indexType: string + propertyName: some-str-prop + - indexType: boolean + propertyName: some-bool-prop + properties: + metadataIndexes: + description: Array of indexed metadata properties. + items: + properties: + indexType: + description: Specifies the type of indexed metadata property. + enum: + - string + - number + - boolean + type: string + x-auditable: true + propertyName: + description: Specifies the indexed metadata property. + example: random_metadata_property + type: string + x-auditable: true + type: object + type: array + type: object + vectorizeMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + vectorizeMutationUuid: + description: The unique identifier for the async mutation operation containing the changeset. + example: 0000aaaa-11bb-22cc-33dd-444444eeeeee + maxLength: 36 + x-auditable: true + type: string + vectorizeUpdateIndexRequest: + properties: + description: + $ref: '#/components/schemas/vectorizeIndexDescription' + required: + - description + type: object + vectorizeVectorIdentifier: + description: Identifier for a Vector + example: some-vector-id-023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 64 + readOnly: true + type: string + vectorizeVectorListItem: + properties: + id: + $ref: '#/components/schemas/vectorizeVectorIdentifier' + required: + - id + type: object + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + vectorize_indexes: + id: cloudflare.vectorize.vectorize_indexes + name: vectorize_indexes + title: Vectorize Indexes + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1indexes/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + vectorize_deprecated_create_vectorize_index: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1indexes/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .config }}{{ $sep }}"config": {{ if eq (kindOf .config) "string" }}{{ .config }}{{ else }}{{ toJson .config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + } + + ' + vectorize_deprecated_delete_vectorize_index: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1indexes~1{index_name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1indexes~1{index_name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/vectorize_indexes/methods/get' + - $ref: '#/components/x-stackQL-resources/vectorize_indexes/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/vectorize_indexes/methods/vectorize_deprecated_create_vectorize_index' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/vectorize_indexes/methods/vectorize_deprecated_delete_vectorize_index' + replace: [] + vectorize: + id: cloudflare.vectorize.vectorize + name: vectorize + title: Vectorize + methods: + update_indexes: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1indexes~1{index_name}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + indexes: + id: cloudflare.vectorize.indexes + name: indexes + title: Indexes + methods: + create_delete_by_ids: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1indexes~1{index_name}~1delete-by-ids/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ids }}{{ $sep }}"ids": {{ if eq (kindOf .ids) "string" }}{{ .ids }}{{ else }}{{ toJson .ids }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + get_by_ids: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1indexes~1{index_name}~1get-by-ids/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ids }}{{ $sep }}"ids": {{ if eq (kindOf .ids) "string" }}{{ .ids }}{{ else }}{{ toJson .ids }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + create_insert: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1indexes~1{index_name}~1insert/post' + response: + mediaType: application/json + openAPIDocKey: '200' + query: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1indexes~1{index_name}~1query/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .filter }}{{ $sep }}"filter": {{ if eq (kindOf .filter) "string" }}{{ .filter }}{{ else }}{{ toJson .filter }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .returnMetadata }}{{ $sep }}"returnMetadata": {{ toJson .returnMetadata }}{{- $sep = "," -}}{{ end }} + + {{- if .returnValues }}{{ $sep }}"returnValues": {{ toJson .returnValues }}{{- $sep = "," -}}{{ end }} + + {{- if .topK }}{{ $sep }}"topK": {{ toJson .topK }}{{- $sep = "," -}}{{ end }} + + {{- if .vector }}{{ $sep }}"vector": {{ if eq (kindOf .vector) "string" }}{{ .vector }}{{ else }}{{ toJson .vector }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + upsert: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1indexes~1{index_name}~1upsert/post' + response: + mediaType: application/json + openAPIDocKey: '200' + create_delete_by_ids_v2: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes~1{index_name}~1delete_by_ids/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ids }}{{ $sep }}"ids": {{ if eq (kindOf .ids) "string" }}{{ .ids }}{{ else }}{{ toJson .ids }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + get_by_ids_v2: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes~1{index_name}~1get_by_ids/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ids }}{{ $sep }}"ids": {{ if eq (kindOf .ids) "string" }}{{ .ids }}{{ else }}{{ toJson .ids }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + create_insert_v2: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes~1{index_name}~1insert/post' + response: + mediaType: application/json + openAPIDocKey: '200' + query_v2: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes~1{index_name}~1query/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .filter }}{{ $sep }}"filter": {{ if eq (kindOf .filter) "string" }}{{ .filter }}{{ else }}{{ toJson .filter }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .returnMetadata }}{{ $sep }}"returnMetadata": {{ toJson .returnMetadata }}{{- $sep = "," -}}{{ end }} + + {{- if .returnValues }}{{ $sep }}"returnValues": {{ toJson .returnValues }}{{- $sep = "," -}}{{ end }} + + {{- if .topK }}{{ $sep }}"topK": {{ toJson .topK }}{{- $sep = "," -}}{{ end }} + + {{- if .vector }}{{ $sep }}"vector": {{ if eq (kindOf .vector) "string" }}{{ .vector }}{{ else }}{{ toJson .vector }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + upsert_v2: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes~1{index_name}~1upsert/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + v2_indexes: + id: cloudflare.vectorize.v2_indexes + name: v2_indexes + title: V2 Indexes + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .config }}{{ $sep }}"config": {{ if eq (kindOf .config) "string" }}{{ .config }}{{ else }}{{ toJson .config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes~1{index_name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes~1{index_name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/v2_indexes/methods/get' + - $ref: '#/components/x-stackQL-resources/v2_indexes/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/v2_indexes/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/v2_indexes/methods/delete' + replace: [] + indexes_info: + id: cloudflare.vectorize.indexes_info + name: indexes_info + title: Indexes Info + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes~1{index_name}~1info/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/indexes_info/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + indexes_list: + id: cloudflare.vectorize.indexes_list + name: indexes_list + title: Indexes List + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes~1{index_name}~1list/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/indexes_list/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + metadata_index: + id: cloudflare.vectorize.metadata_index + name: metadata_index + title: Metadata Index + methods: + create_v2: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes~1{index_name}~1metadata_index~1create/post' + response: + mediaType: application/json + openAPIDocKey: '200' + create_delete_v2: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes~1{index_name}~1metadata_index~1delete/post' + response: + mediaType: application/json + openAPIDocKey: '200' + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vectorize~1v2~1indexes~1{index_name}~1metadata_index~1list/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result.metadataIndexes + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/metadata_index/methods/list' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/vulnerability_scanner.yaml b/providers/src/cloudflare/v00.00.00000/services/vulnerability_scanner.yaml index 27576168..d2a3d7cc 100644 --- a/providers/src/cloudflare/v00.00.00000/services/vulnerability_scanner.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/vulnerability_scanner.yaml @@ -1,2535 +1,2470 @@ -openapi: 3.0.3 -info: - title: vulnerability_scanner API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/vuln_scanner/credential_sets: - get: - description: Returns all credential sets for the account. - operationId: list-credential-sets - parameters: - - description: Page number of paginated results. - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - description: Number of results per page. - in: query - name: per_page - schema: - default: 20 - maximum: 50 - minimum: 5 - type: integer - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vulnScannerMessages' - messages: - $ref: '#/components/schemas/vulnScannerMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: '#/components/schemas/vulnScannerCredentialSet' - type: array - required: - - success - - errors - - messages - description: Successful response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' - description: Client error. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Credential Sets - tags: - - Credential Sets - x-stackql-sdk: - service: vulnerability_scanner - resource_chain: - - credential_sets - method: list - post: - description: Creates a new credential set. - operationId: create-credential-set - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerCreateCredentialSetRequest' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/vulnScannerMessages' - messages: - $ref: '#/components/schemas/vulnScannerMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/vulnScannerCredentialSet' - result_info: - nullable: true - type: object - required: - - success - - errors - - messages - type: object - description: Successful response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' - description: Client error. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Credential Set - tags: - - Credential Sets - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - x-stackql-sdk: - service: vulnerability_scanner - resource_chain: - - credential_sets - method: create - /accounts/{account_id}/vuln_scanner/credential_sets/{credential_set_id}: - delete: - description: Deletes a credential set and all of its credentials. - operationId: delete-credential-set - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerEmptyResponse' - description: Successful response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' - description: Client error. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Credential Set - tags: - - Credential Sets - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Credential set identifier. - in: path - name: credential_set_id - schema: - format: uuid - type: string - required: true - x-stackql-sdk: - service: vulnerability_scanner - resource_chain: - - credential_sets - method: delete - get: - description: Returns a single credential set by ID. - operationId: get-credential-set - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/vulnScannerMessages' - messages: - $ref: '#/components/schemas/vulnScannerMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/vulnScannerCredentialSet' - result_info: - nullable: true - type: object - required: - - success - - errors - - messages - type: object - description: Successful response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' - description: Client error. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Credential Set - tags: - - Credential Sets - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Credential set identifier. - in: path - name: credential_set_id - schema: - format: uuid - type: string - required: true - x-stackql-sdk: - service: vulnerability_scanner - resource_chain: - - credential_sets - method: get - patch: - description: >- - Updates a credential set with only the provided fields; omitted fields - remain unchanged. - operationId: edit-credential-set - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerPatchCredentialSetRequest' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/vulnScannerMessages' - messages: - $ref: '#/components/schemas/vulnScannerMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/vulnScannerCredentialSet' - result_info: - nullable: true - type: object - required: - - success - - errors - - messages - type: object - description: Successful response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' - description: Client error. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Edit Credential Set - tags: - - Credential Sets - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Credential set identifier. - in: path - name: credential_set_id - schema: - format: uuid - type: string - required: true - x-stackql-sdk: - service: vulnerability_scanner - resource_chain: - - credential_sets - method: edit - put: - description: Replaces a credential set. All fields must be provided. - operationId: update-credential-set - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerUpdateCredentialSetRequest' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/vulnScannerMessages' - messages: - $ref: '#/components/schemas/vulnScannerMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/vulnScannerCredentialSet' - result_info: - nullable: true - type: object - required: - - success - - errors - - messages - type: object - description: Successful response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' - description: Client error. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Credential Set - tags: - - Credential Sets - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Credential set identifier. - in: path - name: credential_set_id - schema: - format: uuid - type: string - required: true - x-stackql-sdk: - service: vulnerability_scanner - resource_chain: - - credential_sets - method: update - /accounts/{account_id}/vuln_scanner/credential_sets/{credential_set_id}/credentials: - get: - description: Returns all credentials within a credential set. - operationId: list-credentials - parameters: - - description: Page number of paginated results. - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - description: Number of results per page. - in: query - name: per_page - schema: - default: 20 - maximum: 50 - minimum: 5 - type: integer - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Credential set identifier. - in: path - name: credential_set_id - schema: - format: uuid - type: string - required: true - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vulnScannerMessages' - messages: - $ref: '#/components/schemas/vulnScannerMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: '#/components/schemas/vulnScannerCredential' - type: array - required: - - success - - errors - - messages - description: Successful response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' - description: Client error. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Credentials - tags: - - Credentials - x-stackql-sdk: - service: vulnerability_scanner - resource_chain: - - credential_sets - - credentials - method: list - post: - description: Creates a new credential within a credential set. - operationId: create-credential - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerCreateCredentialRequest' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/vulnScannerMessages' - messages: - $ref: '#/components/schemas/vulnScannerMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/vulnScannerCredential' - result_info: - nullable: true - type: object - required: - - success - - errors - - messages - type: object - description: Successful response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' - description: Client error. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Credential - tags: - - Credentials - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Credential set identifier. - in: path - name: credential_set_id - schema: - format: uuid - type: string - required: true - x-stackql-sdk: - service: vulnerability_scanner - resource_chain: - - credential_sets - - credentials - method: create - /accounts/{account_id}/vuln_scanner/credential_sets/{credential_set_id}/credentials/{credential_id}: - delete: - description: Deletes a credential. - operationId: delete-credential - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerEmptyResponse' - description: Successful response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' - description: Client error. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Credential - tags: - - Credentials - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Credential set identifier. - in: path - name: credential_set_id - schema: - format: uuid - type: string - required: true - - description: Credential identifier. - in: path - name: credential_id - schema: - format: uuid - type: string - required: true - x-stackql-sdk: - service: vulnerability_scanner - resource_chain: - - credential_sets - - credentials - method: delete - get: - description: Returns a single credential by ID. - operationId: get-credential - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/vulnScannerMessages' - messages: - $ref: '#/components/schemas/vulnScannerMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/vulnScannerCredential' - result_info: - nullable: true - type: object - required: - - success - - errors - - messages - type: object - description: Successful response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' - description: Client error. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Credential - tags: - - Credentials - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Credential set identifier. - in: path - name: credential_set_id - schema: - format: uuid - type: string - required: true - - description: Credential identifier. - in: path - name: credential_id - schema: - format: uuid - type: string - required: true - x-stackql-sdk: - service: vulnerability_scanner - resource_chain: - - credential_sets - - credentials - method: get - patch: - description: >- - Updates a credential with only the provided fields; omitted fields - remain unchanged. - operationId: edit-credential - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerPatchCredentialRequest' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/vulnScannerMessages' - messages: - $ref: '#/components/schemas/vulnScannerMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/vulnScannerCredential' - result_info: - nullable: true - type: object - required: - - success - - errors - - messages - type: object - description: Successful response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' - description: Client error. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Edit Credential - tags: - - Credentials - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Credential set identifier. - in: path - name: credential_set_id - schema: - format: uuid - type: string - required: true - - description: Credential identifier. - in: path - name: credential_id - schema: - format: uuid - type: string - required: true - x-stackql-sdk: - service: vulnerability_scanner - resource_chain: - - credential_sets - - credentials - method: edit - put: - description: Replaces a credential. All fields must be provided. - operationId: update-credential - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerUpdateCredentialRequest' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/vulnScannerMessages' - messages: - $ref: '#/components/schemas/vulnScannerMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/vulnScannerCredential' - result_info: - nullable: true - type: object - required: - - success - - errors - - messages - type: object - description: Successful response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' - description: Client error. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Credential - tags: - - Credentials - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Credential set identifier. - in: path - name: credential_set_id - schema: - format: uuid - type: string - required: true - - description: Credential identifier. - in: path - name: credential_id - schema: - format: uuid - type: string - required: true - x-stackql-sdk: - service: vulnerability_scanner - resource_chain: - - credential_sets - - credentials - method: update - /accounts/{account_id}/vuln_scanner/scans: - get: - description: Returns all scans for the account. - operationId: list-scans - parameters: - - description: Page number of paginated results. - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - description: Number of results per page. - in: query - name: per_page - schema: - default: 20 - maximum: 50 - minimum: 5 - type: integer - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vulnScannerMessages' - messages: - $ref: '#/components/schemas/vulnScannerMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: '#/components/schemas/vulnScannerScan' - type: array - required: - - success - - errors - - messages - description: Successful response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' - description: Client error. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Scans - tags: - - Scans - x-stackql-sdk: - service: vulnerability_scanner - resource_chain: - - scans - method: list - post: - description: >- - Creates and starts a new vulnerability scan. The response may include - non-fatal warnings in the `messages` array. - operationId: create-scan - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerCreateScanRequest' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/vulnScannerMessages' - messages: - $ref: '#/components/schemas/vulnScannerMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/vulnScannerScan' - result_info: - nullable: true - type: object - required: - - success - - errors - - messages - type: object - description: >- - Successful response. Check the `messages` array for non-fatal - warnings that arose during scan creation. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' - description: Client error. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Scan - tags: - - Scans - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - x-stackql-sdk: - service: vulnerability_scanner - resource_chain: - - scans - method: create - /accounts/{account_id}/vuln_scanner/scans/{scan_id}: - delete: - description: >- - Deletes a scan and all associated data. Only scans in a terminal state - (`finished`, `failed`) may be deleted. Attempting to delete a scan that - is still being created or executed (`created`, `scheduled`, `planning`, - `running`) returns `400`. - operationId: delete-scan - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/vulnScannerMessages' - messages: - $ref: '#/components/schemas/vulnScannerMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/vulnScannerDeleteScanResponse' - result_info: - nullable: true - type: object - required: - - success - - errors - - messages - type: object - description: Successful response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' - description: Client error. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Scan - tags: - - Scans - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Scan identifier. - in: path - name: scan_id - schema: - format: uuid - type: string - required: true - get: - description: Returns a single scan by ID. - operationId: get-scan - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/vulnScannerMessages' - messages: - $ref: '#/components/schemas/vulnScannerMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/vulnScannerScan' - result_info: - nullable: true - type: object - required: - - success - - errors - - messages - type: object - description: Successful response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' - description: Client error. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Scan - tags: - - Scans - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Scan identifier. - in: path - name: scan_id - schema: - format: uuid - type: string - required: true - x-stackql-sdk: - service: vulnerability_scanner - resource_chain: - - scans - method: get - /accounts/{account_id}/vuln_scanner/target_environments: - get: - description: Returns all target environments for the account. - operationId: list-target-environments - parameters: - - description: Page number of paginated results. - in: query - name: page - schema: - default: 1 - minimum: 1 - type: integer - - description: Number of results per page. - in: query - name: per_page - schema: - default: 20 - maximum: 50 - minimum: 5 - type: integer - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/vulnScannerMessages' - messages: - $ref: '#/components/schemas/vulnScannerMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: '#/components/schemas/vulnScannerTargetEnvironment' - type: array - required: - - success - - errors - - messages - description: Successful response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' - description: Client error. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Target Environments - tags: - - Target Environments - x-stackql-sdk: - service: vulnerability_scanner - resource_chain: - - target_environments - method: list - post: - description: Creates a new target environment for the account. - operationId: create-target-environment - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerCreateTargetEnvironmentRequest' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/vulnScannerMessages' - messages: - $ref: '#/components/schemas/vulnScannerMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/vulnScannerTargetEnvironment' - result_info: - nullable: true - type: object - required: - - success - - errors - - messages - type: object - description: Successful response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' - description: Client error. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Target Environment - tags: - - Target Environments - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - x-stackql-sdk: - service: vulnerability_scanner - resource_chain: - - target_environments - method: create - /accounts/{account_id}/vuln_scanner/target_environments/{target_environment_id}: - delete: - description: Removes a target environment. - operationId: delete-target-environment - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerEmptyResponse' - description: Successful response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' - description: Client error. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Target Environment - tags: - - Target Environments - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Target environment identifier. - in: path - name: target_environment_id - schema: - format: uuid - type: string - required: true - x-stackql-sdk: - service: vulnerability_scanner - resource_chain: - - target_environments - method: delete - get: - description: Returns a single target environment by ID. - operationId: get-target-environment - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/vulnScannerMessages' - messages: - $ref: '#/components/schemas/vulnScannerMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/vulnScannerTargetEnvironment' - result_info: - nullable: true - type: object - required: - - success - - errors - - messages - type: object - description: Successful response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' - description: Client error. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Target Environment - tags: - - Target Environments - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Target environment identifier. - in: path - name: target_environment_id - schema: - format: uuid - type: string - required: true - x-stackql-sdk: - service: vulnerability_scanner - resource_chain: - - target_environments - method: get - patch: - description: >- - Updates a target environment with only the provided fields; omitted - fields remain unchanged. - operationId: edit-target-environment - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerPatchTargetEnvironmentRequest' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/vulnScannerMessages' - messages: - $ref: '#/components/schemas/vulnScannerMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/vulnScannerTargetEnvironment' - result_info: - nullable: true - type: object - required: - - success - - errors - - messages - type: object - description: Successful response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' - description: Client error. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Edit Target Environment - tags: - - Target Environments - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Target environment identifier. - in: path - name: target_environment_id - schema: - format: uuid - type: string - required: true - x-stackql-sdk: - service: vulnerability_scanner - resource_chain: - - target_environments - method: edit - put: - description: Replaces a target environment. All fields must be provided. - operationId: update-target-environment - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerUpdateTargetEnvironmentRequest' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/vulnScannerMessages' - messages: - $ref: '#/components/schemas/vulnScannerMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/vulnScannerTargetEnvironment' - result_info: - nullable: true - type: object - required: - - success - - errors - - messages - type: object - description: Successful response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' - description: Client error. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Target Environment - tags: - - Target Environments - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Target environment identifier. - in: path - name: target_environment_id - schema: - format: uuid - type: string - required: true - x-stackql-sdk: - service: vulnerability_scanner - resource_chain: - - target_environments - method: update -components: - schemas: - vulnScannerApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/vulnScannerMessages' - messages: - example: [] - $ref: '#/components/schemas/vulnScannerMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - vulnScannerBolaAssertionKind: - description: >- - Assert that an HTTP status code is within a range, e.g. to assert - success for the 2xx range, or expected failure for the 4xx/5xx range. - properties: - parameters: - $ref: '#/components/schemas/vulnScannerBolaHttpStatusRange' - type: - enum: - - http_status_within_range - type: string - required: - - type - - parameters - type: object - vulnScannerBolaBodyResponse: - description: HTTP response body preview. - type: object - properties: - kind: - enum: - - not_found - type: string - contents: - type: string - truncated: - type: boolean - required: - - kind - vulnScannerBolaCredentialRole: - description: >- - Identifies the role a request was made with. The credential set governs - this role. `owner` is the resource owner, `attacker` attempts to access - resources. - enum: - - owner - - attacker - type: string - vulnScannerBolaCredentialSets: - description: >- - Credential set references for a BOLA scan. The scanner uses the `owner` - credentials for legitimate requests and the `attacker` credentials to - attempt unauthorized access. - properties: - attacker: - description: Credential set ID for the attacker. - format: uuid - type: string - owner: - description: Credential set ID for the resource owner. - format: uuid - type: string - required: - - owner - - attacker - type: object - vulnScannerBolaHttpStatusRange: - description: Range of HTTP status codes. - properties: - max: - description: Maximum (inclusive) status code of the range. - maximum: 65535 - minimum: 0 - type: integer - min: - description: Minimum (inclusive) status code of the range. - maximum: 65535 - minimum: 0 - type: integer - required: - - min - - max - type: object - vulnScannerBolaMethod: - description: HTTP method. - enum: - - GET - - DELETE - - PATCH - - POST - - PUT - type: string - vulnScannerBolaOutcome: - description: >- - Outcome of an assertion. `ok` means the assertion passed, `fail` means - the assertion failed, `inconclusive` means the scanner could not - evaluate the assertion. - enum: - - ok - - fail - - inconclusive - type: string - vulnScannerBolaReport: - description: A BOLA vulnerability scan report, versioned for future evolution. - properties: - report: - $ref: '#/components/schemas/vulnScannerBolaReportV1' - report_schema_version: - description: Version of the report schema. - enum: - - v1 - type: string - required: - - report_schema_version - - report - type: object - vulnScannerBolaReportSummary: - description: Overall report summary. - properties: - verdict: - description: Overall verdict of the vulnerability scan. - $ref: '#/components/schemas/vulnScannerBolaVerdict' - required: - - verdict - type: object - vulnScannerBolaReportV1: - description: Version 1 of the BOLA vulnerability scan report. - properties: - summary: - description: Summary of all steps and findings. - $ref: '#/components/schemas/vulnScannerBolaReportSummary' - tests: - description: List of tests that were run. - items: - $ref: '#/components/schemas/vulnScannerBolaTest' - type: array - required: - - summary - - tests - type: object - vulnScannerBolaTest: - description: Result of a single test. - properties: - preflight_errors: - description: Errors that prevented step execution. - items: - $ref: '#/components/schemas/vulnScannerBolaTestError' - type: array - steps: - description: Steps that were executed. - items: - $ref: '#/components/schemas/vulnScannerBolaTestStep' - type: array - verdict: - description: Verdict of this single test. - $ref: '#/components/schemas/vulnScannerBolaVerdict' - required: - - verdict - - steps - type: object - vulnScannerBolaTestAssertion: - description: Assertion that was made against the received response. - properties: - description: - description: >- - Human-readable description of the assertion, explaining what was - checked. - type: string - kind: - description: Kind of assertion. - $ref: '#/components/schemas/vulnScannerBolaAssertionKind' - observed: - description: Observed value on which the assertion was made. - nullable: true - type: integer - outcome: - description: Outcome of the assertion. - $ref: '#/components/schemas/vulnScannerBolaOutcome' - required: - - description - - kind - - observed - - outcome - type: object - vulnScannerBolaTestCredentialSet: - description: Credential set that was used. - properties: - id: - description: ID of the credential set. - format: uuid - type: string - role: - description: Role of the credential set. - $ref: '#/components/schemas/vulnScannerBolaCredentialRole' - required: - - id - - role - type: object - vulnScannerBolaTestError: - description: Error that occurred during a test. - properties: - description: - description: Human-readable error description. - type: string - error_code: - description: Numeric error code identifying the class of error, if available. - format: uint32 - minimum: 0 - nullable: true - type: integer - required: - - description - type: object - vulnScannerBolaTestRequest: - description: HTTP request that was made. - properties: - body: - description: Request body, if any. - nullable: true - type: object - credential_set: - description: Credential set that was used. - $ref: '#/components/schemas/vulnScannerBolaTestCredentialSet' - header_names: - description: Names of headers that were sent. - items: - type: string - type: array - method: - description: HTTP method. - $ref: '#/components/schemas/vulnScannerBolaMethod' - url: - description: >- - Exact and full URL (including host, query parameters) that was - requested. - format: uri - type: string - variable_captures: - description: Variable captures requested for this step. - items: - $ref: '#/components/schemas/vulnScannerBolaVariableCapture' - type: array - required: - - method - - url - - credential_set - - header_names - - variable_captures - type: object - vulnScannerBolaTestResponse: - description: HTTP response that was received. - properties: - body: - description: HTTP response body. - $ref: '#/components/schemas/vulnScannerBolaBodyResponse' - header_names: - description: Names of headers that were received. - items: - type: string - type: array - status: - description: HTTP status code. - maximum: 65535 - minimum: 0 - type: integer - status_text: - description: HTTP status text, if available for the status code. - nullable: true - type: string - required: - - status - - header_names - - body - type: object - vulnScannerBolaTestStep: - description: A single step in a test. - properties: - assertions: - description: Assertions that were made against the received response. - items: - $ref: '#/components/schemas/vulnScannerBolaTestAssertion' - type: array - errors: - description: >- - Errors the step encountered that may explain absent or incomplete - fields. - items: - $ref: '#/components/schemas/vulnScannerBolaTestError' - type: array - request: - description: HTTP request that was made, if any. - nullable: true - type: object - $ref: '#/components/schemas/vulnScannerBolaTestRequest' - response: - description: HTTP response that was received, if any. - nullable: true - type: object - $ref: '#/components/schemas/vulnScannerBolaTestResponse' - required: - - assertions - type: object - vulnScannerBolaVariableCapture: - description: A variable to capture from the response body. - properties: - json_path: - description: JSONPath expression used for capture, e.g. `"$.id"`. - type: string - name: - description: Variable name, e.g. `"resource_id"`. - type: string - required: - - name - - json_path - type: object - vulnScannerBolaVerdict: - description: >- - A verdict. `ok` means the scan passed, `warning` means the scan detected - issues, `inconclusive` means errors prevented the scanner from reaching - an accurate verdict. - enum: - - ok - - warning - - inconclusive - type: string - vulnScannerCreateBolaScanRequest: - properties: - credential_sets: - $ref: '#/components/schemas/vulnScannerBolaCredentialSets' - open_api: - description: >- - OpenAPI schema definition for the API under test. The scanner uses - this to discover endpoints and construct requests. - type: string - scan_type: - enum: - - bola - type: string - target_environment_id: - description: The target environment to scan. - format: uuid - type: string - required: - - target_environment_id - - scan_type - - open_api - - credential_sets - type: object - vulnScannerCreateCredentialRequest: - properties: - location: - $ref: '#/components/schemas/vulnScannerCredentialLocation' - location_name: - description: Name of the header or cookie where the credential is attached. - example: Authorization - type: string - name: - description: Human-readable name. - example: Admin API key - type: string - value: - description: >- - The credential value (e.g. API key, session token). Write-only. - Never returned in responses. - example: Bearer EXAMPLE_TOKEN - type: string - writeOnly: true - x-sensitive: true - required: - - name - - location - - location_name - - value - type: object - vulnScannerCreateCredentialSetRequest: - properties: - name: - description: Human-readable name. - example: Production API credentials - type: string - required: - - name - type: object - vulnScannerCreateScanRequest: - description: >- - Create a new vulnerability scan. The `scan_type` discriminator selects - the scan variant and its required context fields. - $ref: '#/components/schemas/vulnScannerCreateBolaScanRequest' - vulnScannerCreateTargetEnvironmentRequest: - properties: - description: - description: Optional description. - example: Main production environment - nullable: true - type: string - name: - description: Human-readable name. - example: Production Zone - type: string - target: - $ref: '#/components/schemas/vulnScannerTargetType' - required: - - name - - target - type: object - vulnScannerCredential: - description: >- - A credential attached to API requests during scanning. The credential - `value` is write-only and never returned in responses. - properties: - credential_set_id: - description: Parent credential set identifier. - format: uuid - type: string - x-auditable: true - id: - description: Credential identifier. - format: uuid - type: string - x-auditable: true - location: - $ref: '#/components/schemas/vulnScannerCredentialLocation' - location_name: - description: Name of the header or cookie where the credential is attached. - example: Authorization - type: string - x-auditable: true - name: - description: Human-readable name. - example: Admin API key - type: string - x-auditable: true - required: - - id - - credential_set_id - - name - - location - - location_name - type: object - vulnScannerCredentialLocation: - description: Where the credential is attached in outgoing requests. - enum: - - header - - cookie - type: string - x-auditable: true - vulnScannerCredentialSet: - properties: - id: - description: Credential set identifier. - format: uuid - type: string - x-auditable: true - name: - description: Human-readable name. - example: Production API credentials - type: string - x-auditable: true - required: - - id - - name - type: object - vulnScannerDeleteScanResponse: - description: Successful scan deletion result. - properties: - id: - description: ID of the deleted scan. - format: uuid - type: string - x-auditable: true - required: - - id - type: object - vulnScannerEmptyResponse: - description: >- - Standard response envelope with a `null` result. Operations that produce - no result body return this response. - properties: - errors: - $ref: '#/components/schemas/vulnScannerMessages' - messages: - $ref: '#/components/schemas/vulnScannerMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - nullable: true - type: object - result_info: - nullable: true - type: object - required: - - success - - errors - - messages - type: object - vulnScannerMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - vulnScannerPatchCredentialRequest: - description: >- - Applies a partial update. Only the provided fields change; omitted - fields remain unchanged. - properties: - location: - $ref: '#/components/schemas/vulnScannerCredentialLocation' - location_name: - description: Name of the header or cookie where the credential is attached. - example: Authorization - type: string - name: - description: Human-readable name. - example: Admin API key - type: string - value: - description: The credential value. Write-only. Never returned in responses. - example: Bearer EXAMPLE_TOKEN - type: string - writeOnly: true - x-sensitive: true - type: object - vulnScannerPatchCredentialSetRequest: - description: >- - Applies a partial update. Only the provided fields change; omitted - fields remain unchanged. - properties: - name: - description: Human-readable name. - example: Production API credentials - type: string - type: object - vulnScannerPatchTargetEnvironmentRequest: - description: >- - Applies a partial update. Only the provided fields change; omitted - fields remain unchanged. The `description` field supports three states: - - **omitted**: leave unchanged - **`null`**: clear the description - - **`"value"`**: set to the given string - properties: - description: - description: >- - Optional description. Omit to leave unchanged, set to `null` to - clear, or provide a string to update. - example: Main production environment - nullable: true - type: string - name: - description: Human-readable name. - example: Production Zone - type: string - target: - $ref: '#/components/schemas/vulnScannerTargetType' - type: object - vulnScannerScan: - properties: - id: - description: Scan identifier. - format: uuid - type: string - x-auditable: true - report: - description: >- - Vulnerability report produced after the scan completes. The shape - depends on the scan type. Present only for finished scans. - nullable: true - type: object - $ref: '#/components/schemas/vulnScannerBolaReport' - scan_type: - description: The type of vulnerability scan. - enum: - - bola - type: string - x-auditable: true - status: - description: Current lifecycle status of the scan. - enum: - - created - - scheduled - - planning - - running - - finished - - failed - type: string - x-auditable: true - target_environment_id: - description: The target environment this scan runs against. - format: uuid - type: string - x-auditable: true - required: - - id - - target_environment_id - - scan_type - - status - type: object - vulnScannerTargetEnvironment: - properties: - description: - description: Optional description providing additional context. - example: Main production environment - nullable: true - type: string - id: - description: Target environment identifier. - format: uuid - type: string - x-auditable: true - name: - description: Human-readable name. - example: Production Zone - type: string - x-auditable: true - target: - $ref: '#/components/schemas/vulnScannerTargetType' - required: - - id - - name - - target - type: object - vulnScannerTargetType: - description: >- - Identifies the Cloudflare asset to scan. Uses a `type` discriminator. - Currently the service supports only `zone` targets. - x-auditable: true - $ref: '#/components/schemas/vulnScannerZoneTarget' - vulnScannerUpdateCredentialRequest: - description: Full replacement. Provide all fields. - properties: - location: - $ref: '#/components/schemas/vulnScannerCredentialLocation' - location_name: - description: Name of the header or cookie where the credential is attached. - example: Authorization - type: string - name: - description: Human-readable name. - example: Admin API key - type: string - value: - description: The credential value. Write-only. Never returned in responses. - example: Bearer EXAMPLE_TOKEN - type: string - writeOnly: true - x-sensitive: true - required: - - name - - location - - location_name - - value - type: object - vulnScannerUpdateCredentialSetRequest: - description: Full replacement. Provide all fields. - properties: - name: - description: Human-readable name. - example: Production API credentials - type: string - required: - - name - type: object - vulnScannerUpdateTargetEnvironmentRequest: - description: Full replacement. - properties: - description: - description: Optional description. - example: Main production environment - nullable: true - type: string - name: - description: Human-readable name. - example: Production Zone - type: string - target: - $ref: '#/components/schemas/vulnScannerTargetType' - required: - - name - - target - type: object - vulnScannerZoneTarget: - properties: - type: - enum: - - zone - type: string - zone_tag: - description: Cloudflare zone tag. The zone must belong to the account. - example: d8e8fca2dc0f896fd7cb4cb0031ba249 - maxLength: 32 - type: string - required: - - type - - zone_tag - type: object - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - credential_sets: - id: cloudflare.vulnerability_scanner.credential_sets - name: credential_sets - title: Credential Sets - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vuln_scanner~1credential_sets/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vuln_scanner~1credential_sets/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vuln_scanner~1credential_sets~1{credential_set_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vuln_scanner~1credential_sets~1{credential_set_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vuln_scanner~1credential_sets~1{credential_set_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vuln_scanner~1credential_sets~1{credential_set_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/credential_sets/methods/get' - - $ref: '#/components/x-stackQL-resources/credential_sets/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/credential_sets/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/credential_sets/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/credential_sets/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/credential_sets/methods/update' - credentials: - id: cloudflare.vulnerability_scanner.credentials - name: credentials - title: Credentials - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vuln_scanner~1credential_sets~1{credential_set_id}~1credentials/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vuln_scanner~1credential_sets~1{credential_set_id}~1credentials/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vuln_scanner~1credential_sets~1{credential_set_id}~1credentials~1{credential_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vuln_scanner~1credential_sets~1{credential_set_id}~1credentials~1{credential_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vuln_scanner~1credential_sets~1{credential_set_id}~1credentials~1{credential_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vuln_scanner~1credential_sets~1{credential_set_id}~1credentials~1{credential_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/credentials/methods/get' - - $ref: '#/components/x-stackQL-resources/credentials/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/credentials/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/credentials/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/credentials/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/credentials/methods/update' - scans: - id: cloudflare.vulnerability_scanner.scans - name: scans - title: Scans - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1vuln_scanner~1scans/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1vuln_scanner~1scans/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete_scan: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vuln_scanner~1scans~1{scan_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vuln_scanner~1scans~1{scan_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/scans/methods/get' - - $ref: '#/components/x-stackQL-resources/scans/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/scans/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/scans/methods/delete_scan' - replace: [] - target_environments: - id: cloudflare.vulnerability_scanner.target_environments - name: target_environments - title: Target Environments - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vuln_scanner~1target_environments/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vuln_scanner~1target_environments/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vuln_scanner~1target_environments~1{target_environment_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vuln_scanner~1target_environments~1{target_environment_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vuln_scanner~1target_environments~1{target_environment_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1vuln_scanner~1target_environments~1{target_environment_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/target_environments/methods/get' - - $ref: '#/components/x-stackQL-resources/target_environments/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/target_environments/methods/create - update: - - $ref: '#/components/x-stackQL-resources/target_environments/methods/edit' - delete: - - $ref: >- - #/components/x-stackQL-resources/target_environments/methods/delete - replace: - - $ref: >- - #/components/x-stackQL-resources/target_environments/methods/update +openapi: 3.0.3 +info: + title: vulnerability_scanner API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/vuln_scanner/credential_sets: + get: + description: Returns all credential sets for the account. + operationId: list-credential-sets + parameters: + - description: Page number of paginated results. + in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - description: Number of results per page. + in: query + name: per_page + schema: + default: 20 + maximum: 50 + minimum: 5 + type: integer + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vulnScannerMessages' + messages: + $ref: '#/components/schemas/vulnScannerMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/vulnScannerCredentialSet' + type: array + required: + - success + - errors + - messages + description: Successful response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' + description: Client error. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Credential Sets + tags: + - Credential Sets + x-stackql-sdk: + service: vulnerability_scanner + resource_chain: + - credential_sets + method: list + post: + description: Creates a new credential set. + operationId: create-credential-set + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerCreateCredentialSetRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/vulnScannerMessages' + messages: + $ref: '#/components/schemas/vulnScannerMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/vulnScannerCredentialSet' + result_info: + nullable: true + type: object + required: + - success + - errors + - messages + type: object + description: Successful response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' + description: Client error. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Credential Set + tags: + - Credential Sets + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + x-stackql-sdk: + service: vulnerability_scanner + resource_chain: + - credential_sets + method: create + /accounts/{account_id}/vuln_scanner/credential_sets/{credential_set_id}: + delete: + description: Deletes a credential set and all of its credentials. + operationId: delete-credential-set + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerEmptyResponse' + description: Successful response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' + description: Client error. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Credential Set + tags: + - Credential Sets + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Credential set identifier. + in: path + name: credential_set_id + schema: + format: uuid + type: string + required: true + x-stackql-sdk: + service: vulnerability_scanner + resource_chain: + - credential_sets + method: delete + get: + description: Returns a single credential set by ID. + operationId: get-credential-set + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/vulnScannerMessages' + messages: + $ref: '#/components/schemas/vulnScannerMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/vulnScannerCredentialSet' + result_info: + nullable: true + type: object + required: + - success + - errors + - messages + type: object + description: Successful response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' + description: Client error. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Credential Set + tags: + - Credential Sets + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Credential set identifier. + in: path + name: credential_set_id + schema: + format: uuid + type: string + required: true + x-stackql-sdk: + service: vulnerability_scanner + resource_chain: + - credential_sets + method: get + patch: + description: Updates a credential set with only the provided fields; omitted fields remain unchanged. + operationId: edit-credential-set + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerPatchCredentialSetRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/vulnScannerMessages' + messages: + $ref: '#/components/schemas/vulnScannerMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/vulnScannerCredentialSet' + result_info: + nullable: true + type: object + required: + - success + - errors + - messages + type: object + description: Successful response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' + description: Client error. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Edit Credential Set + tags: + - Credential Sets + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Credential set identifier. + in: path + name: credential_set_id + schema: + format: uuid + type: string + required: true + x-stackql-sdk: + service: vulnerability_scanner + resource_chain: + - credential_sets + method: edit + put: + description: Replaces a credential set. All fields must be provided. + operationId: update-credential-set + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerUpdateCredentialSetRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/vulnScannerMessages' + messages: + $ref: '#/components/schemas/vulnScannerMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/vulnScannerCredentialSet' + result_info: + nullable: true + type: object + required: + - success + - errors + - messages + type: object + description: Successful response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' + description: Client error. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Credential Set + tags: + - Credential Sets + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Credential set identifier. + in: path + name: credential_set_id + schema: + format: uuid + type: string + required: true + x-stackql-sdk: + service: vulnerability_scanner + resource_chain: + - credential_sets + method: update + /accounts/{account_id}/vuln_scanner/credential_sets/{credential_set_id}/credentials: + get: + description: Returns all credentials within a credential set. + operationId: list-credentials + parameters: + - description: Page number of paginated results. + in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - description: Number of results per page. + in: query + name: per_page + schema: + default: 20 + maximum: 50 + minimum: 5 + type: integer + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Credential set identifier. + in: path + name: credential_set_id + schema: + format: uuid + type: string + required: true + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vulnScannerMessages' + messages: + $ref: '#/components/schemas/vulnScannerMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/vulnScannerCredential' + type: array + required: + - success + - errors + - messages + description: Successful response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' + description: Client error. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Credentials + tags: + - Credentials + x-stackql-sdk: + service: vulnerability_scanner + resource_chain: + - credential_sets + - credentials + method: list + post: + description: Creates a new credential within a credential set. + operationId: create-credential + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerCreateCredentialRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/vulnScannerMessages' + messages: + $ref: '#/components/schemas/vulnScannerMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/vulnScannerCredential' + result_info: + nullable: true + type: object + required: + - success + - errors + - messages + type: object + description: Successful response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' + description: Client error. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Credential + tags: + - Credentials + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Credential set identifier. + in: path + name: credential_set_id + schema: + format: uuid + type: string + required: true + x-stackql-sdk: + service: vulnerability_scanner + resource_chain: + - credential_sets + - credentials + method: create + /accounts/{account_id}/vuln_scanner/credential_sets/{credential_set_id}/credentials/{credential_id}: + delete: + description: Deletes a credential. + operationId: delete-credential + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerEmptyResponse' + description: Successful response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' + description: Client error. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Credential + tags: + - Credentials + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Credential set identifier. + in: path + name: credential_set_id + schema: + format: uuid + type: string + required: true + - description: Credential identifier. + in: path + name: credential_id + schema: + format: uuid + type: string + required: true + x-stackql-sdk: + service: vulnerability_scanner + resource_chain: + - credential_sets + - credentials + method: delete + get: + description: Returns a single credential by ID. + operationId: get-credential + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/vulnScannerMessages' + messages: + $ref: '#/components/schemas/vulnScannerMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/vulnScannerCredential' + result_info: + nullable: true + type: object + required: + - success + - errors + - messages + type: object + description: Successful response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' + description: Client error. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Credential + tags: + - Credentials + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Credential set identifier. + in: path + name: credential_set_id + schema: + format: uuid + type: string + required: true + - description: Credential identifier. + in: path + name: credential_id + schema: + format: uuid + type: string + required: true + x-stackql-sdk: + service: vulnerability_scanner + resource_chain: + - credential_sets + - credentials + method: get + patch: + description: Updates a credential with only the provided fields; omitted fields remain unchanged. + operationId: edit-credential + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerPatchCredentialRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/vulnScannerMessages' + messages: + $ref: '#/components/schemas/vulnScannerMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/vulnScannerCredential' + result_info: + nullable: true + type: object + required: + - success + - errors + - messages + type: object + description: Successful response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' + description: Client error. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Edit Credential + tags: + - Credentials + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Credential set identifier. + in: path + name: credential_set_id + schema: + format: uuid + type: string + required: true + - description: Credential identifier. + in: path + name: credential_id + schema: + format: uuid + type: string + required: true + x-stackql-sdk: + service: vulnerability_scanner + resource_chain: + - credential_sets + - credentials + method: edit + put: + description: Replaces a credential. All fields must be provided. + operationId: update-credential + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerUpdateCredentialRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/vulnScannerMessages' + messages: + $ref: '#/components/schemas/vulnScannerMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/vulnScannerCredential' + result_info: + nullable: true + type: object + required: + - success + - errors + - messages + type: object + description: Successful response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' + description: Client error. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Credential + tags: + - Credentials + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Credential set identifier. + in: path + name: credential_set_id + schema: + format: uuid + type: string + required: true + - description: Credential identifier. + in: path + name: credential_id + schema: + format: uuid + type: string + required: true + x-stackql-sdk: + service: vulnerability_scanner + resource_chain: + - credential_sets + - credentials + method: update + /accounts/{account_id}/vuln_scanner/scans: + get: + description: Returns all scans for the account. + operationId: list-scans + parameters: + - description: Page number of paginated results. + in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - description: Number of results per page. + in: query + name: per_page + schema: + default: 20 + maximum: 50 + minimum: 5 + type: integer + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vulnScannerMessages' + messages: + $ref: '#/components/schemas/vulnScannerMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/vulnScannerScan' + type: array + required: + - success + - errors + - messages + description: Successful response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' + description: Client error. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Scans + tags: + - Scans + x-stackql-sdk: + service: vulnerability_scanner + resource_chain: + - scans + method: list + post: + description: Creates and starts a new vulnerability scan. The response may include non-fatal warnings in the `messages` array. + operationId: create-scan + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerCreateScanRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/vulnScannerMessages' + messages: + $ref: '#/components/schemas/vulnScannerMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/vulnScannerScan' + result_info: + nullable: true + type: object + required: + - success + - errors + - messages + type: object + description: Successful response. Check the `messages` array for non-fatal warnings that arose during scan creation. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' + description: Client error. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Scan + tags: + - Scans + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + x-stackql-sdk: + service: vulnerability_scanner + resource_chain: + - scans + method: create + /accounts/{account_id}/vuln_scanner/scans/{scan_id}: + delete: + description: Deletes a scan and all associated data. Only scans in a terminal state (`finished`, `failed`) may be deleted. Attempting to delete a scan that is still being created or executed (`created`, `scheduled`, `planning`, `running`) returns `400`. + operationId: delete-scan + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/vulnScannerMessages' + messages: + $ref: '#/components/schemas/vulnScannerMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/vulnScannerDeleteScanResponse' + result_info: + nullable: true + type: object + required: + - success + - errors + - messages + type: object + description: Successful response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' + description: Client error. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Scan + tags: + - Scans + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Scan identifier. + in: path + name: scan_id + schema: + format: uuid + type: string + required: true + get: + description: Returns a single scan by ID. + operationId: get-scan + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/vulnScannerMessages' + messages: + $ref: '#/components/schemas/vulnScannerMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/vulnScannerScan' + result_info: + nullable: true + type: object + required: + - success + - errors + - messages + type: object + description: Successful response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' + description: Client error. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Scan + tags: + - Scans + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Scan identifier. + in: path + name: scan_id + schema: + format: uuid + type: string + required: true + x-stackql-sdk: + service: vulnerability_scanner + resource_chain: + - scans + method: get + /accounts/{account_id}/vuln_scanner/target_environments: + get: + description: Returns all target environments for the account. + operationId: list-target-environments + parameters: + - description: Page number of paginated results. + in: query + name: page + schema: + default: 1 + minimum: 1 + type: integer + - description: Number of results per page. + in: query + name: per_page + schema: + default: 20 + maximum: 50 + minimum: 5 + type: integer + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/vulnScannerMessages' + messages: + $ref: '#/components/schemas/vulnScannerMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/vulnScannerTargetEnvironment' + type: array + required: + - success + - errors + - messages + description: Successful response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' + description: Client error. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Target Environments + tags: + - Target Environments + x-stackql-sdk: + service: vulnerability_scanner + resource_chain: + - target_environments + method: list + post: + description: Creates a new target environment for the account. + operationId: create-target-environment + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerCreateTargetEnvironmentRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/vulnScannerMessages' + messages: + $ref: '#/components/schemas/vulnScannerMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/vulnScannerTargetEnvironment' + result_info: + nullable: true + type: object + required: + - success + - errors + - messages + type: object + description: Successful response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' + description: Client error. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Target Environment + tags: + - Target Environments + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + x-stackql-sdk: + service: vulnerability_scanner + resource_chain: + - target_environments + method: create + /accounts/{account_id}/vuln_scanner/target_environments/{target_environment_id}: + delete: + description: Removes a target environment. + operationId: delete-target-environment + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerEmptyResponse' + description: Successful response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' + description: Client error. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Target Environment + tags: + - Target Environments + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Target environment identifier. + in: path + name: target_environment_id + schema: + format: uuid + type: string + required: true + x-stackql-sdk: + service: vulnerability_scanner + resource_chain: + - target_environments + method: delete + get: + description: Returns a single target environment by ID. + operationId: get-target-environment + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/vulnScannerMessages' + messages: + $ref: '#/components/schemas/vulnScannerMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/vulnScannerTargetEnvironment' + result_info: + nullable: true + type: object + required: + - success + - errors + - messages + type: object + description: Successful response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' + description: Client error. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Target Environment + tags: + - Target Environments + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Target environment identifier. + in: path + name: target_environment_id + schema: + format: uuid + type: string + required: true + x-stackql-sdk: + service: vulnerability_scanner + resource_chain: + - target_environments + method: get + patch: + description: Updates a target environment with only the provided fields; omitted fields remain unchanged. + operationId: edit-target-environment + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerPatchTargetEnvironmentRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/vulnScannerMessages' + messages: + $ref: '#/components/schemas/vulnScannerMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/vulnScannerTargetEnvironment' + result_info: + nullable: true + type: object + required: + - success + - errors + - messages + type: object + description: Successful response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' + description: Client error. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Edit Target Environment + tags: + - Target Environments + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Target environment identifier. + in: path + name: target_environment_id + schema: + format: uuid + type: string + required: true + x-stackql-sdk: + service: vulnerability_scanner + resource_chain: + - target_environments + method: edit + put: + description: Replaces a target environment. All fields must be provided. + operationId: update-target-environment + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerUpdateTargetEnvironmentRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/vulnScannerMessages' + messages: + $ref: '#/components/schemas/vulnScannerMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/vulnScannerTargetEnvironment' + result_info: + nullable: true + type: object + required: + - success + - errors + - messages + type: object + description: Successful response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/vulnScannerApiResponseCommonFailure' + description: Client error. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Target Environment + tags: + - Target Environments + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Target environment identifier. + in: path + name: target_environment_id + schema: + format: uuid + type: string + required: true + x-stackql-sdk: + service: vulnerability_scanner + resource_chain: + - target_environments + method: update +components: + schemas: + vulnScannerApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/vulnScannerMessages' + messages: + example: [] + $ref: '#/components/schemas/vulnScannerMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + vulnScannerBolaAssertionKind: + description: Assert that an HTTP status code is within a range, e.g. to assert success for the 2xx range, or expected failure for the 4xx/5xx range. + properties: + parameters: + $ref: '#/components/schemas/vulnScannerBolaHttpStatusRange' + type: + enum: + - http_status_within_range + type: string + required: + - type + - parameters + type: object + vulnScannerBolaBodyResponse: + description: HTTP response body preview. + type: object + properties: + kind: + enum: + - not_found + type: string + contents: + type: string + truncated: + type: boolean + required: + - kind + vulnScannerBolaCredentialRole: + description: Identifies the role a request was made with. The credential set governs this role. `owner` is the resource owner, `attacker` attempts to access resources. + enum: + - owner + - attacker + type: string + vulnScannerBolaCredentialSets: + description: Credential set references for a BOLA scan. The scanner uses the `owner` credentials for legitimate requests and the `attacker` credentials to attempt unauthorized access. + properties: + attacker: + description: Credential set ID for the attacker. + format: uuid + type: string + owner: + description: Credential set ID for the resource owner. + format: uuid + type: string + required: + - owner + - attacker + type: object + vulnScannerBolaHttpStatusRange: + description: Range of HTTP status codes. + properties: + max: + description: Maximum (inclusive) status code of the range. + maximum: 65535 + minimum: 0 + type: integer + min: + description: Minimum (inclusive) status code of the range. + maximum: 65535 + minimum: 0 + type: integer + required: + - min + - max + type: object + vulnScannerBolaMethod: + description: HTTP method. + enum: + - GET + - DELETE + - PATCH + - POST + - PUT + type: string + vulnScannerBolaOutcome: + description: Outcome of an assertion. `ok` means the assertion passed, `fail` means the assertion failed, `inconclusive` means the scanner could not evaluate the assertion. + enum: + - ok + - fail + - inconclusive + type: string + vulnScannerBolaReport: + description: A BOLA vulnerability scan report, versioned for future evolution. + properties: + report: + $ref: '#/components/schemas/vulnScannerBolaReportV1' + report_schema_version: + description: Version of the report schema. + enum: + - v1 + type: string + required: + - report_schema_version + - report + type: object + vulnScannerBolaReportSummary: + description: Overall report summary. + properties: + verdict: + description: Overall verdict of the vulnerability scan. + $ref: '#/components/schemas/vulnScannerBolaVerdict' + required: + - verdict + type: object + vulnScannerBolaReportV1: + description: Version 1 of the BOLA vulnerability scan report. + properties: + summary: + description: Summary of all steps and findings. + $ref: '#/components/schemas/vulnScannerBolaReportSummary' + tests: + description: List of tests that were run. + items: + $ref: '#/components/schemas/vulnScannerBolaTest' + type: array + required: + - summary + - tests + type: object + vulnScannerBolaTest: + description: Result of a single test. + properties: + preflight_errors: + description: Errors that prevented step execution. + items: + $ref: '#/components/schemas/vulnScannerBolaTestError' + type: array + steps: + description: Steps that were executed. + items: + $ref: '#/components/schemas/vulnScannerBolaTestStep' + type: array + verdict: + description: Verdict of this single test. + $ref: '#/components/schemas/vulnScannerBolaVerdict' + required: + - verdict + - steps + type: object + vulnScannerBolaTestAssertion: + description: Assertion that was made against the received response. + properties: + description: + description: Human-readable description of the assertion, explaining what was checked. + type: string + kind: + description: Kind of assertion. + $ref: '#/components/schemas/vulnScannerBolaAssertionKind' + observed: + description: Observed value on which the assertion was made. + nullable: true + type: integer + outcome: + description: Outcome of the assertion. + $ref: '#/components/schemas/vulnScannerBolaOutcome' + required: + - description + - kind + - observed + - outcome + type: object + vulnScannerBolaTestCredentialSet: + description: Credential set that was used. + properties: + id: + description: ID of the credential set. + format: uuid + type: string + role: + description: Role of the credential set. + $ref: '#/components/schemas/vulnScannerBolaCredentialRole' + required: + - id + - role + type: object + vulnScannerBolaTestError: + description: Error that occurred during a test. + properties: + description: + description: Human-readable error description. + type: string + error_code: + description: Numeric error code identifying the class of error, if available. + format: uint32 + minimum: 0 + nullable: true + type: integer + required: + - description + type: object + vulnScannerBolaTestRequest: + description: HTTP request that was made. + properties: + body: + description: Request body, if any. + nullable: true + type: object + credential_set: + description: Credential set that was used. + $ref: '#/components/schemas/vulnScannerBolaTestCredentialSet' + header_names: + description: Names of headers that were sent. + items: + type: string + type: array + method: + description: HTTP method. + $ref: '#/components/schemas/vulnScannerBolaMethod' + url: + description: Exact and full URL (including host, query parameters) that was requested. + format: uri + type: string + variable_captures: + description: Variable captures requested for this step. + items: + $ref: '#/components/schemas/vulnScannerBolaVariableCapture' + type: array + required: + - method + - url + - credential_set + - header_names + - variable_captures + type: object + vulnScannerBolaTestResponse: + description: HTTP response that was received. + properties: + body: + description: HTTP response body. + $ref: '#/components/schemas/vulnScannerBolaBodyResponse' + header_names: + description: Names of headers that were received. + items: + type: string + type: array + status: + description: HTTP status code. + maximum: 65535 + minimum: 0 + type: integer + status_text: + description: HTTP status text, if available for the status code. + nullable: true + type: string + required: + - status + - header_names + - body + type: object + vulnScannerBolaTestStep: + description: A single step in a test. + properties: + assertions: + description: Assertions that were made against the received response. + items: + $ref: '#/components/schemas/vulnScannerBolaTestAssertion' + type: array + errors: + description: Errors the step encountered that may explain absent or incomplete fields. + items: + $ref: '#/components/schemas/vulnScannerBolaTestError' + type: array + request: + description: HTTP request that was made, if any. + nullable: true + type: object + $ref: '#/components/schemas/vulnScannerBolaTestRequest' + response: + description: HTTP response that was received, if any. + nullable: true + type: object + $ref: '#/components/schemas/vulnScannerBolaTestResponse' + required: + - assertions + type: object + vulnScannerBolaVariableCapture: + description: A variable to capture from the response body. + properties: + json_path: + description: JSONPath expression used for capture, e.g. `"$.id"`. + type: string + name: + description: Variable name, e.g. `"resource_id"`. + type: string + required: + - name + - json_path + type: object + vulnScannerBolaVerdict: + description: A verdict. `ok` means the scan passed, `warning` means the scan detected issues, `inconclusive` means errors prevented the scanner from reaching an accurate verdict. + enum: + - ok + - warning + - inconclusive + type: string + vulnScannerCreateBolaScanRequest: + properties: + credential_sets: + $ref: '#/components/schemas/vulnScannerBolaCredentialSets' + open_api: + description: OpenAPI schema definition for the API under test. The scanner uses this to discover endpoints and construct requests. + type: string + scan_type: + enum: + - bola + type: string + target_environment_id: + description: The target environment to scan. + format: uuid + type: string + required: + - target_environment_id + - scan_type + - open_api + - credential_sets + type: object + vulnScannerCreateCredentialRequest: + properties: + location: + $ref: '#/components/schemas/vulnScannerCredentialLocation' + location_name: + description: Name of the header or cookie where the credential is attached. + example: Authorization + type: string + name: + description: Human-readable name. + example: Admin API key + type: string + value: + description: The credential value (e.g. API key, session token). Write-only. Never returned in responses. + example: Bearer EXAMPLE_TOKEN + type: string + writeOnly: true + x-sensitive: true + required: + - name + - location + - location_name + - value + type: object + vulnScannerCreateCredentialSetRequest: + properties: + name: + description: Human-readable name. + example: Production API credentials + type: string + required: + - name + type: object + vulnScannerCreateScanRequest: + description: Create a new vulnerability scan. The `scan_type` discriminator selects the scan variant and its required context fields. + $ref: '#/components/schemas/vulnScannerCreateBolaScanRequest' + vulnScannerCreateTargetEnvironmentRequest: + properties: + description: + description: Optional description. + example: Main production environment + nullable: true + type: string + name: + description: Human-readable name. + example: Production Zone + type: string + target: + $ref: '#/components/schemas/vulnScannerTargetType' + required: + - name + - target + type: object + vulnScannerCredential: + description: A credential attached to API requests during scanning. The credential `value` is write-only and never returned in responses. + properties: + credential_set_id: + description: Parent credential set identifier. + format: uuid + type: string + x-auditable: true + id: + description: Credential identifier. + format: uuid + type: string + x-auditable: true + location: + $ref: '#/components/schemas/vulnScannerCredentialLocation' + location_name: + description: Name of the header or cookie where the credential is attached. + example: Authorization + type: string + x-auditable: true + name: + description: Human-readable name. + example: Admin API key + type: string + x-auditable: true + required: + - id + - credential_set_id + - name + - location + - location_name + type: object + vulnScannerCredentialLocation: + description: Where the credential is attached in outgoing requests. + enum: + - header + - cookie + type: string + x-auditable: true + vulnScannerCredentialSet: + properties: + id: + description: Credential set identifier. + format: uuid + type: string + x-auditable: true + name: + description: Human-readable name. + example: Production API credentials + type: string + x-auditable: true + required: + - id + - name + type: object + vulnScannerDeleteScanResponse: + description: Successful scan deletion result. + properties: + id: + description: ID of the deleted scan. + format: uuid + type: string + x-auditable: true + required: + - id + type: object + vulnScannerEmptyResponse: + description: Standard response envelope with a `null` result. Operations that produce no result body return this response. + properties: + errors: + $ref: '#/components/schemas/vulnScannerMessages' + messages: + $ref: '#/components/schemas/vulnScannerMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + nullable: true + type: object + result_info: + nullable: true + type: object + required: + - success + - errors + - messages + type: object + vulnScannerMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + vulnScannerPatchCredentialRequest: + description: Applies a partial update. Only the provided fields change; omitted fields remain unchanged. + properties: + location: + $ref: '#/components/schemas/vulnScannerCredentialLocation' + location_name: + description: Name of the header or cookie where the credential is attached. + example: Authorization + type: string + name: + description: Human-readable name. + example: Admin API key + type: string + value: + description: The credential value. Write-only. Never returned in responses. + example: Bearer EXAMPLE_TOKEN + type: string + writeOnly: true + x-sensitive: true + type: object + vulnScannerPatchCredentialSetRequest: + description: Applies a partial update. Only the provided fields change; omitted fields remain unchanged. + properties: + name: + description: Human-readable name. + example: Production API credentials + type: string + type: object + vulnScannerPatchTargetEnvironmentRequest: + description: 'Applies a partial update. Only the provided fields change; omitted fields remain unchanged. The `description` field supports three states: - **omitted**: leave unchanged - **`null`**: clear the description - **`"value"`**: set to the given string' + properties: + description: + description: Optional description. Omit to leave unchanged, set to `null` to clear, or provide a string to update. + example: Main production environment + nullable: true + type: string + name: + description: Human-readable name. + example: Production Zone + type: string + target: + $ref: '#/components/schemas/vulnScannerTargetType' + type: object + vulnScannerScan: + properties: + id: + description: Scan identifier. + format: uuid + type: string + x-auditable: true + report: + description: Vulnerability report produced after the scan completes. The shape depends on the scan type. Present only for finished scans. + nullable: true + type: object + $ref: '#/components/schemas/vulnScannerBolaReport' + scan_type: + description: The type of vulnerability scan. + enum: + - bola + type: string + x-auditable: true + status: + description: Current lifecycle status of the scan. + enum: + - created + - scheduled + - planning + - running + - finished + - failed + type: string + x-auditable: true + target_environment_id: + description: The target environment this scan runs against. + format: uuid + type: string + x-auditable: true + required: + - id + - target_environment_id + - scan_type + - status + type: object + vulnScannerTargetEnvironment: + properties: + description: + description: Optional description providing additional context. + example: Main production environment + nullable: true + type: string + id: + description: Target environment identifier. + format: uuid + type: string + x-auditable: true + name: + description: Human-readable name. + example: Production Zone + type: string + x-auditable: true + target: + $ref: '#/components/schemas/vulnScannerTargetType' + required: + - id + - name + - target + type: object + vulnScannerTargetType: + description: Identifies the Cloudflare asset to scan. Uses a `type` discriminator. Currently the service supports only `zone` targets. + x-auditable: true + $ref: '#/components/schemas/vulnScannerZoneTarget' + vulnScannerUpdateCredentialRequest: + description: Full replacement. Provide all fields. + properties: + location: + $ref: '#/components/schemas/vulnScannerCredentialLocation' + location_name: + description: Name of the header or cookie where the credential is attached. + example: Authorization + type: string + name: + description: Human-readable name. + example: Admin API key + type: string + value: + description: The credential value. Write-only. Never returned in responses. + example: Bearer EXAMPLE_TOKEN + type: string + writeOnly: true + x-sensitive: true + required: + - name + - location + - location_name + - value + type: object + vulnScannerUpdateCredentialSetRequest: + description: Full replacement. Provide all fields. + properties: + name: + description: Human-readable name. + example: Production API credentials + type: string + required: + - name + type: object + vulnScannerUpdateTargetEnvironmentRequest: + description: Full replacement. + properties: + description: + description: Optional description. + example: Main production environment + nullable: true + type: string + name: + description: Human-readable name. + example: Production Zone + type: string + target: + $ref: '#/components/schemas/vulnScannerTargetType' + required: + - name + - target + type: object + vulnScannerZoneTarget: + properties: + type: + enum: + - zone + type: string + zone_tag: + description: Cloudflare zone tag. The zone must belong to the account. + example: d8e8fca2dc0f896fd7cb4cb0031ba249 + maxLength: 32 + type: string + required: + - type + - zone_tag + type: object + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + credential_sets: + id: cloudflare.vulnerability_scanner.credential_sets + name: credential_sets + title: Credential Sets + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vuln_scanner~1credential_sets/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vuln_scanner~1credential_sets/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vuln_scanner~1credential_sets~1{credential_set_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vuln_scanner~1credential_sets~1{credential_set_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vuln_scanner~1credential_sets~1{credential_set_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vuln_scanner~1credential_sets~1{credential_set_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/credential_sets/methods/get' + - $ref: '#/components/x-stackQL-resources/credential_sets/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/credential_sets/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/credential_sets/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/credential_sets/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/credential_sets/methods/update' + credentials: + id: cloudflare.vulnerability_scanner.credentials + name: credentials + title: Credentials + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vuln_scanner~1credential_sets~1{credential_set_id}~1credentials/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vuln_scanner~1credential_sets~1{credential_set_id}~1credentials/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vuln_scanner~1credential_sets~1{credential_set_id}~1credentials~1{credential_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vuln_scanner~1credential_sets~1{credential_set_id}~1credentials~1{credential_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vuln_scanner~1credential_sets~1{credential_set_id}~1credentials~1{credential_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vuln_scanner~1credential_sets~1{credential_set_id}~1credentials~1{credential_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/credentials/methods/get' + - $ref: '#/components/x-stackQL-resources/credentials/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/credentials/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/credentials/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/credentials/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/credentials/methods/update' + scans: + id: cloudflare.vulnerability_scanner.scans + name: scans + title: Scans + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vuln_scanner~1scans/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vuln_scanner~1scans/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete_scan: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vuln_scanner~1scans~1{scan_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vuln_scanner~1scans~1{scan_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/scans/methods/get' + - $ref: '#/components/x-stackQL-resources/scans/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/scans/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/scans/methods/delete_scan' + replace: [] + target_environments: + id: cloudflare.vulnerability_scanner.target_environments + name: target_environments + title: Target Environments + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vuln_scanner~1target_environments/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vuln_scanner~1target_environments/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .target }}{{ $sep }}"target": {{ if eq (kindOf .target) "string" }}{{ .target }}{{ else }}{{ toJson .target }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vuln_scanner~1target_environments~1{target_environment_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vuln_scanner~1target_environments~1{target_environment_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vuln_scanner~1target_environments~1{target_environment_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .target }}{{ $sep }}"target": {{ if eq (kindOf .target) "string" }}{{ .target }}{{ else }}{{ toJson .target }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1vuln_scanner~1target_environments~1{target_environment_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .target }}{{ $sep }}"target": {{ if eq (kindOf .target) "string" }}{{ .target }}{{ else }}{{ toJson .target }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/target_environments/methods/get' + - $ref: '#/components/x-stackQL-resources/target_environments/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/target_environments/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/target_environments/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/target_environments/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/target_environments/methods/update' diff --git a/providers/src/cloudflare/v00.00.00000/services/waiting_rooms.yaml b/providers/src/cloudflare/v00.00.00000/services/waiting_rooms.yaml index fc16fca6..a4ebcf35 100644 --- a/providers/src/cloudflare/v00.00.00000/services/waiting_rooms.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/waiting_rooms.yaml @@ -1,3864 +1,3573 @@ -openapi: 3.0.3 -info: - title: waiting_rooms API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /zones/{zone_id}/waiting_rooms: - get: - description: Lists waiting rooms for account or zone. - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: Page number of paginated results. - in: query - name: page - schema: - default: 1 - minimum: 1 - type: number - - description: Maximum number of results per page. Must be a multiple of 5. - in: query - name: per_page - schema: - default: 25 - maximum: 1000 - minimum: 5 - type: number - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomResponseCollection' - description: List waiting rooms for account or zone response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/waitingroomMessages' - messages: - $ref: '#/components/schemas/waitingroomMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: '#/components/schemas/waitingroomWaitingroom' - type: array - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: List waiting rooms for account or zone response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List waiting rooms for account or zone - tags: [] - x-api-token-group: - - Account Waiting Rooms Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: waiting_rooms - resource_chain: [] - method: list - operationId: get_zones_zone_id_waiting_rooms - /zones/{zone_id}/waiting_rooms/preview: - post: - description: >- - Creates a waiting room page preview. Upload a custom waiting room page - for preview. You will receive a preview URL in the form - `http://waitingrooms.dev/preview/`. You can use the following - query parameters to change the state of the preview: 1. `force_queue`: - Boolean indicating if all users will be queued in the waiting room and - no one will be let into the origin website (also known as queueAll). 2. - `queue_is_full`: Boolean indicating if the waiting room's queue is - currently full and not accepting new users at the moment. 3. - `queueing_method`: The queueing method currently used by the waiting - room. - **fifo** indicates a FIFO queue. - **random** indicates a Random - queue. - **passthrough** indicates a Passthrough queue. Keep in mind - that the waiting room page will only be displayed if `force_queue=true` - or `event=prequeueing` — for other cases the request will pass through - to the origin. For our preview, this will be a fake origin website - returning \"Welcome\". - **reject** indicates a Reject queue. 4. - `event`: Used to preview a waiting room event. - **none** indicates no - event is occurring. - **prequeueing** indicates that an event is - prequeueing (between `prequeue_start_time` and `event_start_time`). - - **started** indicates that an event has started (between - `event_start_time` and `event_end_time`). 5. `shuffle_at_event_start`: - Boolean indicating if the event will shuffle users in the prequeue when - it starts. This can only be set to **true** if an event is active - (`event` is not **none**). For example, you can make a request to - `http://waitingrooms.dev/preview/?force_queue=false&queue_is_full=false&queueing_method=random&event=started&shuffle_at_event_start=true` - 6. `waitTime`: Non-zero, positive integer indicating the estimated wait - time in minutes. The default value is 10 minutes. For example, you can - make a request to `http://waitingrooms.dev/preview/?waitTime=50` - to configure the estimated wait time as 50 minutes. - operationId: waiting-room-create-a-custom-waiting-room-page-preview - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomQueryPreview' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomPreviewResponse' - description: Create a custom waiting room page preview response - 4XX: - content: - application/json: - schema: - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - properties: - result: - type: object - properties: - preview_url: - $ref: '#/components/schemas/waitingroomPreviewUrl' - enum: - - null - errors: - minLength: 1 - $ref: '#/components/schemas/waitingroomMessages' - messages: - $ref: '#/components/schemas/waitingroomMessages' - success: - description: Whether the API call was successful. - enum: - - false - type: boolean - description: Create a custom waiting room page preview response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a custom waiting room page preview - tags: - - Waiting Room - x-api-token-group: - - Waiting Rooms Write - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: waiting_rooms - resource_chain: - - page - method: preview - /zones/{zone_id}/waiting_rooms/settings: - get: - description: >- - Gets the zone-level Waiting Room settings that apply as defaults to all - waiting rooms on the zone. - operationId: waiting-room-get-zone-settings - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomZoneSettingsResponse' - description: The current zone-level Waiting Room settings - 4XX: - content: - application/json: - schema: - type: object - required: - - success - - errors - - messages - - result - - result - - success - - errors - - messages - - result - properties: - result: - $ref: '#/components/schemas/waitingRoomSetting' - errors: - minLength: 1 - $ref: '#/components/schemas/waitingroomMessages' - messages: - $ref: '#/components/schemas/waitingroomMessages' - success: - description: Whether the API call was successful. - enum: - - false - type: boolean - description: The current zone-level Waiting Room settings response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get zone-level Waiting Room settings - tags: - - Waiting Room - x-api-token-group: - - Waiting Rooms Read - - Waiting Rooms Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: waiting_rooms - resource_chain: - - settings - method: get - patch: - description: >- - Partially updates zone-level Waiting Room settings using PATCH - semantics. - operationId: waiting-room-patch-zone-settings - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomZoneSettings' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomZoneSettingsResponse' - description: The updated zone-level Waiting Room settings - 4XX: - content: - application/json: - schema: - type: object - required: - - success - - errors - - messages - - result - - result - - success - - errors - - messages - - result - properties: - result: - $ref: '#/components/schemas/waitingRoomSetting' - errors: - minLength: 1 - $ref: '#/components/schemas/waitingroomMessages' - messages: - $ref: '#/components/schemas/waitingroomMessages' - success: - description: Whether the API call was successful. - enum: - - false - type: boolean - description: The zone-level Waiting Room settings response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Patch zone-level Waiting Room settings - tags: - - Waiting Room - x-api-token-group: - - Waiting Rooms Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: waiting_rooms - resource_chain: - - settings - method: edit - put: - description: >- - Fully updates zone-level Waiting Room settings, replacing the existing - configuration. - operationId: waiting-room-update-zone-settings - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomZoneSettings' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomZoneSettingsResponse' - description: The updated zone-level Waiting Room settings - 4XX: - content: - application/json: - schema: - type: object - required: - - success - - errors - - messages - - result - - result - - success - - errors - - messages - - result - properties: - result: - $ref: '#/components/schemas/waitingRoomSetting' - errors: - minLength: 1 - $ref: '#/components/schemas/waitingroomMessages' - messages: - $ref: '#/components/schemas/waitingroomMessages' - success: - description: Whether the API call was successful. - enum: - - false - type: boolean - description: The zone-level Waiting Room settings response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update zone-level Waiting Room settings - tags: - - Waiting Room - x-api-token-group: - - Waiting Rooms Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: waiting_rooms - resource_chain: - - settings - method: update - /zones/{zone_id}/waiting_rooms/{waiting_room_id}: - delete: - description: Deletes a waiting room. - operationId: waiting-room-delete-waiting-room - parameters: - - name: waiting_room_id - in: path - required: true - description: The Waiting Room ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomWaitingRoomIdResponse' - description: Delete waiting room response - 4XX: - content: - application/json: - schema: - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - properties: - result: - type: object - properties: - id: - $ref: '#/components/schemas/waitingroomWaitingRoomId' - enum: - - null - errors: - minLength: 1 - $ref: '#/components/schemas/waitingroomMessages' - messages: - $ref: '#/components/schemas/waitingroomMessages' - success: - description: Whether the API call was successful. - enum: - - false - type: boolean - description: Delete waiting room response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete waiting room - tags: - - Waiting Room - x-api-token-group: - - Waiting Rooms Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: waiting_rooms - resource_chain: [] - method: delete - get: - description: Fetches a single configured waiting room. - operationId: waiting-room-waiting-room-details - parameters: - - name: waiting_room_id - in: path - required: true - description: The Waiting Room ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomSingleResponse' - description: Waiting room details response - 4XX: - content: - application/json: - schema: - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - properties: - result: - type: object - properties: - additional_routes: - $ref: '#/components/schemas/waitingroomAdditionalRoutes' - cookie_attributes: - $ref: '#/components/schemas/waitingroomCookieAttributes' - cookie_suffix: - $ref: '#/components/schemas/waitingroomCookieSuffix' - created_on: - $ref: '#/components/schemas/waitingroomTimestamp' - readOnly: true - custom_page_html: - $ref: '#/components/schemas/waitingroomCustomPageHtml' - default_template_language: - $ref: >- - #/components/schemas/waitingroomDefaultTemplateLanguage - description: - $ref: '#/components/schemas/waitingroomDescription' - disable_session_renewal: - $ref: '#/components/schemas/waitingroomDisableSessionRenewal' - enabled_origin_commands: - $ref: '#/components/schemas/waitingroomEnabledOriginCommands' - host: - $ref: '#/components/schemas/waitingroomHost' - id: - $ref: '#/components/schemas/waitingroomWaitingRoomId' - json_response_enabled: - $ref: '#/components/schemas/waitingroomJsonResponseEnabled' - modified_on: - $ref: '#/components/schemas/waitingroomTimestamp' - readOnly: true - name: - $ref: '#/components/schemas/waitingroomName' - new_users_per_minute: - $ref: '#/components/schemas/waitingroomNewUsersPerMinute' - next_event_prequeue_start_time: - $ref: >- - #/components/schemas/waitingroomNextEventPrequeueStartTime - next_event_start_time: - $ref: '#/components/schemas/waitingroomNextEventStartTime' - path: - $ref: '#/components/schemas/waitingroomPath' - queue_all: - $ref: '#/components/schemas/waitingroomQueueAll' - queueing_method: - $ref: '#/components/schemas/waitingroomQueueingMethod' - queueing_status_code: - $ref: '#/components/schemas/waitingroomQueueingStatusCode' - session_duration: - $ref: '#/components/schemas/waitingroomSessionDuration' - suspended: - $ref: '#/components/schemas/waitingroomSuspended' - total_active_users: - $ref: '#/components/schemas/waitingroomTotalActiveUsers' - turnstile_action: - $ref: '#/components/schemas/waitingroomTurnstileAction' - turnstile_mode: - $ref: '#/components/schemas/waitingroomTurnstileMode' - enum: - - null - errors: - minLength: 1 - $ref: '#/components/schemas/waitingroomMessages' - messages: - $ref: '#/components/schemas/waitingroomMessages' - success: - description: Whether the API call was successful. - enum: - - false - type: boolean - description: Waiting room details response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Waiting room details - tags: - - Waiting Room - x-api-token-group: - - Waiting Rooms Read - - Waiting Rooms Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: waiting_rooms - resource_chain: [] - method: get - patch: - description: Patches a configured waiting room. - operationId: waiting-room-patch-waiting-room - parameters: - - name: waiting_room_id - in: path - required: true - description: The Waiting Room ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomQueryWaitingroom' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomSingleResponse' - description: Patch waiting room response - 4XX: - content: - application/json: - schema: - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - properties: - result: - type: object - properties: - additional_routes: - $ref: '#/components/schemas/waitingroomAdditionalRoutes' - cookie_attributes: - $ref: '#/components/schemas/waitingroomCookieAttributes' - cookie_suffix: - $ref: '#/components/schemas/waitingroomCookieSuffix' - created_on: - $ref: '#/components/schemas/waitingroomTimestamp' - readOnly: true - custom_page_html: - $ref: '#/components/schemas/waitingroomCustomPageHtml' - default_template_language: - $ref: >- - #/components/schemas/waitingroomDefaultTemplateLanguage - description: - $ref: '#/components/schemas/waitingroomDescription' - disable_session_renewal: - $ref: '#/components/schemas/waitingroomDisableSessionRenewal' - enabled_origin_commands: - $ref: '#/components/schemas/waitingroomEnabledOriginCommands' - host: - $ref: '#/components/schemas/waitingroomHost' - id: - $ref: '#/components/schemas/waitingroomWaitingRoomId' - json_response_enabled: - $ref: '#/components/schemas/waitingroomJsonResponseEnabled' - modified_on: - $ref: '#/components/schemas/waitingroomTimestamp' - readOnly: true - name: - $ref: '#/components/schemas/waitingroomName' - new_users_per_minute: - $ref: '#/components/schemas/waitingroomNewUsersPerMinute' - next_event_prequeue_start_time: - $ref: >- - #/components/schemas/waitingroomNextEventPrequeueStartTime - next_event_start_time: - $ref: '#/components/schemas/waitingroomNextEventStartTime' - path: - $ref: '#/components/schemas/waitingroomPath' - queue_all: - $ref: '#/components/schemas/waitingroomQueueAll' - queueing_method: - $ref: '#/components/schemas/waitingroomQueueingMethod' - queueing_status_code: - $ref: '#/components/schemas/waitingroomQueueingStatusCode' - session_duration: - $ref: '#/components/schemas/waitingroomSessionDuration' - suspended: - $ref: '#/components/schemas/waitingroomSuspended' - total_active_users: - $ref: '#/components/schemas/waitingroomTotalActiveUsers' - turnstile_action: - $ref: '#/components/schemas/waitingroomTurnstileAction' - turnstile_mode: - $ref: '#/components/schemas/waitingroomTurnstileMode' - enum: - - null - errors: - minLength: 1 - $ref: '#/components/schemas/waitingroomMessages' - messages: - $ref: '#/components/schemas/waitingroomMessages' - success: - description: Whether the API call was successful. - enum: - - false - type: boolean - description: Patch waiting room response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Patch waiting room - tags: - - Waiting Room - x-api-token-group: - - Waiting Rooms Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: waiting_rooms - resource_chain: [] - method: edit - put: - description: Updates a configured waiting room. - operationId: waiting-room-update-waiting-room - parameters: - - name: waiting_room_id - in: path - required: true - description: The Waiting Room ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomQueryWaitingroom' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomSingleResponse' - description: Update waiting room response - 4XX: - content: - application/json: - schema: - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - properties: - result: - type: object - properties: - additional_routes: - $ref: '#/components/schemas/waitingroomAdditionalRoutes' - cookie_attributes: - $ref: '#/components/schemas/waitingroomCookieAttributes' - cookie_suffix: - $ref: '#/components/schemas/waitingroomCookieSuffix' - created_on: - $ref: '#/components/schemas/waitingroomTimestamp' - readOnly: true - custom_page_html: - $ref: '#/components/schemas/waitingroomCustomPageHtml' - default_template_language: - $ref: >- - #/components/schemas/waitingroomDefaultTemplateLanguage - description: - $ref: '#/components/schemas/waitingroomDescription' - disable_session_renewal: - $ref: '#/components/schemas/waitingroomDisableSessionRenewal' - enabled_origin_commands: - $ref: '#/components/schemas/waitingroomEnabledOriginCommands' - host: - $ref: '#/components/schemas/waitingroomHost' - id: - $ref: '#/components/schemas/waitingroomWaitingRoomId' - json_response_enabled: - $ref: '#/components/schemas/waitingroomJsonResponseEnabled' - modified_on: - $ref: '#/components/schemas/waitingroomTimestamp' - readOnly: true - name: - $ref: '#/components/schemas/waitingroomName' - new_users_per_minute: - $ref: '#/components/schemas/waitingroomNewUsersPerMinute' - next_event_prequeue_start_time: - $ref: >- - #/components/schemas/waitingroomNextEventPrequeueStartTime - next_event_start_time: - $ref: '#/components/schemas/waitingroomNextEventStartTime' - path: - $ref: '#/components/schemas/waitingroomPath' - queue_all: - $ref: '#/components/schemas/waitingroomQueueAll' - queueing_method: - $ref: '#/components/schemas/waitingroomQueueingMethod' - queueing_status_code: - $ref: '#/components/schemas/waitingroomQueueingStatusCode' - session_duration: - $ref: '#/components/schemas/waitingroomSessionDuration' - suspended: - $ref: '#/components/schemas/waitingroomSuspended' - total_active_users: - $ref: '#/components/schemas/waitingroomTotalActiveUsers' - turnstile_action: - $ref: '#/components/schemas/waitingroomTurnstileAction' - turnstile_mode: - $ref: '#/components/schemas/waitingroomTurnstileMode' - enum: - - null - errors: - minLength: 1 - $ref: '#/components/schemas/waitingroomMessages' - messages: - $ref: '#/components/schemas/waitingroomMessages' - success: - description: Whether the API call was successful. - enum: - - false - type: boolean - description: Update waiting room response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update waiting room - tags: - - Waiting Room - x-api-token-group: - - Waiting Rooms Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: waiting_rooms - resource_chain: [] - method: update - /zones/{zone_id}/waiting_rooms/{waiting_room_id}/events: - get: - description: Lists events for a waiting room. - operationId: waiting-room-list-events - parameters: - - name: waiting_room_id - in: path - required: true - description: The Waiting Room ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: Page number of paginated results. - in: query - name: page - schema: - default: 1 - minimum: 1 - type: number - - description: Maximum number of results per page. Must be a multiple of 5. - in: query - name: per_page - schema: - default: 25 - maximum: 1000 - minimum: 5 - type: number - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomEventResponseCollection' - description: List events response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/waitingroomMessages' - messages: - $ref: '#/components/schemas/waitingroomMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: '#/components/schemas/waitingroomEventResult' - type: array - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: List events response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List events - tags: - - Waiting Room - x-api-token-group: - - Waiting Rooms Read - - Waiting Rooms Write - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: waiting_rooms - resource_chain: - - events - method: list - post: - description: >- - Only available for the Waiting Room Advanced subscription. Creates an - event for a waiting room. An event takes place during a specified period - of time, temporarily changing the behavior of a waiting room. While the - event is active, some of the properties in the event's configuration may - either override or inherit from the waiting room's configuration. Note - that events cannot overlap with each other, so only one event can be - active at a time. - operationId: waiting-room-create-event - parameters: - - name: waiting_room_id - in: path - required: true - description: The Waiting Room ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomQueryEvent' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomEventResponse' - description: Create event response - 4XX: - content: - application/json: - schema: - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - properties: - result: - $ref: >- - #/components/schemas/unnamedSchemaRef229c159575bc68a9c21f5a1615629cf6 - errors: - minLength: 1 - $ref: '#/components/schemas/waitingroomMessages' - messages: - $ref: '#/components/schemas/waitingroomMessages' - success: - description: Whether the API call was successful. - enum: - - false - type: boolean - description: Create event response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create event - tags: - - Waiting Room - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: waiting_rooms - resource_chain: - - events - method: create - /zones/{zone_id}/waiting_rooms/{waiting_room_id}/events/{event_id}: - delete: - description: Deletes an event for a waiting room. - operationId: waiting-room-delete-event - parameters: - - name: event_id - in: path - required: true - description: The event ID. - schema: - type: string - - name: waiting_room_id - in: path - required: true - description: The Waiting Room ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomEventIdResponse' - description: Delete event response - 4XX: - content: - application/json: - schema: - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - properties: - result: - type: object - properties: - id: - $ref: '#/components/schemas/waitingroomEventId' - enum: - - null - errors: - minLength: 1 - $ref: '#/components/schemas/waitingroomMessages' - messages: - $ref: '#/components/schemas/waitingroomMessages' - success: - description: Whether the API call was successful. - enum: - - false - type: boolean - description: Delete event response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete event - tags: - - Waiting Room - x-api-token-group: - - Waiting Rooms Write - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: waiting_rooms - resource_chain: - - events - method: delete - get: - description: Fetches a single configured event for a waiting room. - operationId: waiting-room-event-details - parameters: - - name: event_id - in: path - required: true - description: The event ID. - schema: - type: string - - name: waiting_room_id - in: path - required: true - description: The Waiting Room ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomEventResponse' - description: Event details response - 4XX: - content: - application/json: - schema: - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - properties: - result: - $ref: >- - #/components/schemas/unnamedSchemaRef229c159575bc68a9c21f5a1615629cf6 - errors: - minLength: 1 - $ref: '#/components/schemas/waitingroomMessages' - messages: - $ref: '#/components/schemas/waitingroomMessages' - success: - description: Whether the API call was successful. - enum: - - false - type: boolean - description: Event details response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Event details - tags: - - Waiting Room - x-api-token-group: - - Waiting Rooms Read - - Waiting Rooms Write - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: waiting_rooms - resource_chain: - - events - method: get - patch: - description: Patches a configured event for a waiting room. - operationId: waiting-room-patch-event - parameters: - - name: event_id - in: path - required: true - description: The event ID. - schema: - type: string - - name: waiting_room_id - in: path - required: true - description: The Waiting Room ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomQueryEvent' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomEventResponse' - description: Patch event response - 4XX: - content: - application/json: - schema: - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - properties: - result: - $ref: >- - #/components/schemas/unnamedSchemaRef229c159575bc68a9c21f5a1615629cf6 - errors: - minLength: 1 - $ref: '#/components/schemas/waitingroomMessages' - messages: - $ref: '#/components/schemas/waitingroomMessages' - success: - description: Whether the API call was successful. - enum: - - false - type: boolean - description: Patch event response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Patch event - tags: - - Waiting Room - x-api-token-group: - - Waiting Rooms Write - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: waiting_rooms - resource_chain: - - events - method: edit - put: - description: Updates a configured event for a waiting room. - operationId: waiting-room-update-event - parameters: - - name: event_id - in: path - required: true - description: The event ID. - schema: - type: string - - name: waiting_room_id - in: path - required: true - description: The Waiting Room ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomQueryEvent' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomEventResponse' - description: Update event response - 4XX: - content: - application/json: - schema: - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - properties: - result: - $ref: >- - #/components/schemas/unnamedSchemaRef229c159575bc68a9c21f5a1615629cf6 - errors: - minLength: 1 - $ref: '#/components/schemas/waitingroomMessages' - messages: - $ref: '#/components/schemas/waitingroomMessages' - success: - description: Whether the API call was successful. - enum: - - false - type: boolean - description: Update event response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update event - tags: - - Waiting Room - x-api-token-group: - - Waiting Rooms Write - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: waiting_rooms - resource_chain: - - events - method: update - /zones/{zone_id}/waiting_rooms/{waiting_room_id}/events/{event_id}/details: - get: - description: >- - Previews an event's configuration as if it was active. Inherited fields - from the waiting room will be displayed with their current values. - operationId: waiting-room-preview-active-event-details - parameters: - - name: event_id - in: path - required: true - description: The event ID. - schema: - type: string - - name: waiting_room_id - in: path - required: true - description: The Waiting Room ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomEventDetailsResponse' - description: Preview active event details response - 4XX: - content: - application/json: - schema: - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - properties: - result: - type: object - properties: - created_on: - $ref: '#/components/schemas/waitingroomTimestamp' - readOnly: true - custom_page_html: - $ref: >- - #/components/schemas/waitingroomEventDetailsCustomPageHtml - description: - $ref: '#/components/schemas/waitingroomEventDescription' - disable_session_renewal: - $ref: >- - #/components/schemas/waitingroomEventDetailsDisableSessionRenewal - event_end_time: - $ref: '#/components/schemas/waitingroomEventEndTime' - event_start_time: - $ref: '#/components/schemas/waitingroomEventStartTime' - id: - $ref: '#/components/schemas/waitingroomEventId' - modified_on: - $ref: '#/components/schemas/waitingroomTimestamp' - readOnly: true - name: - $ref: '#/components/schemas/waitingroomEventName' - new_users_per_minute: - $ref: >- - #/components/schemas/waitingroomEventDetailsNewUsersPerMinute - prequeue_start_time: - $ref: '#/components/schemas/waitingroomEventPrequeueStartTime' - queueing_method: - $ref: >- - #/components/schemas/waitingroomEventDetailsQueueingMethod - session_duration: - $ref: >- - #/components/schemas/waitingroomEventDetailsSessionDuration - shuffle_at_event_start: - $ref: >- - #/components/schemas/waitingroomEventShuffleAtEventStart - suspended: - $ref: '#/components/schemas/waitingroomEventSuspended' - total_active_users: - $ref: >- - #/components/schemas/waitingroomEventDetailsTotalActiveUsers - enum: - - null - errors: - minLength: 1 - $ref: '#/components/schemas/waitingroomMessages' - messages: - $ref: '#/components/schemas/waitingroomMessages' - success: - description: Whether the API call was successful. - enum: - - false - type: boolean - description: Preview active event details response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Preview active event details - tags: - - Waiting Room - x-api-token-group: - - Waiting Rooms Read - - Waiting Rooms Write - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: waiting_rooms - resource_chain: - - events - - details - method: get - /zones/{zone_id}/waiting_rooms/{waiting_room_id}/rules: - get: - description: Lists rules for a waiting room. - operationId: waiting-room-list-waiting-room-rules - parameters: - - name: waiting_room_id - in: path - required: true - description: The Waiting Room ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomRulesResponseCollection' - description: List Waiting Room Rules response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/waitingroomMessages' - messages: - $ref: '#/components/schemas/waitingroomMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - $ref: >- - #/components/schemas/unnamedSchemaRefF1c0ba8f44601f2db2e07b9397b6c430 - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: List Waiting Room Rules response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Waiting Room Rules - tags: - - Waiting Room - x-api-token-group: - - Waiting Rooms Read - - Waiting Rooms Write - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: waiting_rooms - resource_chain: - - rules - method: create - post: - description: >- - Only available for the Waiting Room Advanced subscription. Creates a - rule for a waiting room. - operationId: waiting-room-create-waiting-room-rule - parameters: - - name: waiting_room_id - in: path - required: true - description: The Waiting Room ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomCreateRule' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomRulesResponseCollection' - description: Create Waiting Room Rule response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/waitingroomMessages' - messages: - $ref: '#/components/schemas/waitingroomMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - $ref: >- - #/components/schemas/unnamedSchemaRefF1c0ba8f44601f2db2e07b9397b6c430 - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Create Waiting Room Rule response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Waiting Room Rule - tags: - - Waiting Room - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - put: - description: >- - Only available for the Waiting Room Advanced subscription. Replaces all - rules for a waiting room. - operationId: waiting-room-replace-waiting-room-rules - parameters: - - name: waiting_room_id - in: path - required: true - description: The Waiting Room ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomUpdateRules' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomRulesResponseCollection' - description: Replace Waiting Room Rules response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/waitingroomMessages' - messages: - $ref: '#/components/schemas/waitingroomMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - $ref: >- - #/components/schemas/unnamedSchemaRefF1c0ba8f44601f2db2e07b9397b6c430 - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Replace Waiting Room Rules response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Replace Waiting Room Rules - tags: - - Waiting Room - x-api-token-group: - - Waiting Rooms Write - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - /zones/{zone_id}/waiting_rooms/{waiting_room_id}/rules/{rule_id}: - delete: - description: Deletes a rule for a waiting room. - operationId: waiting-room-delete-waiting-room-rule - parameters: - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - - name: waiting_room_id - in: path - required: true - description: The Waiting Room ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomRulesResponseCollection' - description: Delete Waiting Room Rule response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/waitingroomMessages' - messages: - $ref: '#/components/schemas/waitingroomMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - $ref: >- - #/components/schemas/unnamedSchemaRefF1c0ba8f44601f2db2e07b9397b6c430 - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Delete Waiting Room Rule response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Waiting Room Rule - tags: - - Waiting Room - x-api-token-group: - - Waiting Rooms Write - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - patch: - description: Patches a rule for a waiting room. - operationId: waiting-room-patch-waiting-room-rule - parameters: - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - - name: waiting_room_id - in: path - required: true - description: The Waiting Room ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomPatchRule' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomRulesResponseCollection' - description: Patch Waiting Room Rule response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/waitingroomMessages' - messages: - $ref: '#/components/schemas/waitingroomMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - $ref: >- - #/components/schemas/unnamedSchemaRefF1c0ba8f44601f2db2e07b9397b6c430 - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Patch Waiting Room Rule response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Patch Waiting Room Rule - tags: - - Waiting Room - x-api-token-group: - - Waiting Rooms Write - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - /zones/{zone_id}/waiting_rooms/{waiting_room_id}/status: - get: - description: >- - Fetches the status of a configured waiting room. Response fields - include: 1. `status`: String indicating the status of the waiting room. - The possible status are: - **not_queueing** indicates that the - configured thresholds have not been met and all users are going through - to the origin. - **queueing** indicates that the thresholds have been - met and some users are held in the waiting room. - **event_prequeueing** - indicates that an event is active and is currently prequeueing users - before it starts. - **suspended** indicates that the room is suspended. - 2. `event_id`: String of the current event's `id` if an event is active, - otherwise an empty string. 3. `estimated_queued_users`: Integer of the - estimated number of users currently waiting in the queue. 4. - `estimated_total_active_users`: Integer of the estimated number of users - currently active on the origin. 5. `max_estimated_time_minutes`: Integer - of the maximum estimated time currently presented to the users. - operationId: waiting-room-get-waiting-room-status - parameters: - - name: waiting_room_id - in: path - required: true - description: The Waiting Room ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomStatusResponse' - description: Get waiting room status response - 4XX: - content: - application/json: - schema: - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - properties: - result: - type: object - properties: - estimated_queued_users: - $ref: '#/components/schemas/waitingroomEstimatedQueuedUsers' - estimated_total_active_users: - $ref: >- - #/components/schemas/waitingroomEstimatedTotalActiveUsers - event_id: - $ref: '#/components/schemas/waitingroomStatusEventId' - max_estimated_time_minutes: - $ref: >- - #/components/schemas/waitingroomMaxEstimatedTimeMinutes - status: - $ref: '#/components/schemas/waitingroomStatus' - enum: - - null - errors: - minLength: 1 - $ref: '#/components/schemas/waitingroomMessages' - messages: - $ref: '#/components/schemas/waitingroomMessages' - success: - description: Whether the API call was successful. - enum: - - false - type: boolean - description: Get waiting room status response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get waiting room status - tags: - - Waiting Room - x-api-token-group: - - Waiting Rooms Read - - Waiting Rooms Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: waiting_rooms - resource_chain: - - statuses - method: get - /accounts/{account_id}/waiting_rooms: - get: - description: Lists waiting rooms for account or zone. - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - description: Page number of paginated results. - in: query - name: page - schema: - default: 1 - minimum: 1 - type: number - - description: Maximum number of results per page. Must be a multiple of 5. - in: query - name: per_page - schema: - default: 25 - maximum: 1000 - minimum: 5 - type: number - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/waitingroomResponseCollection' - description: List waiting rooms for account or zone response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/waitingroomMessages' - messages: - $ref: '#/components/schemas/waitingroomMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - total_pages: - description: The number of total pages in the entire result set. - type: number - type: object - result: - items: - $ref: '#/components/schemas/waitingroomWaitingroom' - type: array - enum: - - null - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: List waiting rooms for account or zone response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List waiting rooms for account or zone - tags: [] - x-api-token-group: - - Account Waiting Rooms Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: waiting_rooms - resource_chain: [] - method: list - operationId: get_accounts_account_id_waiting_rooms -components: - schemas: - unnamedSchemaRef229c159575bc68a9c21f5a1615629cf6: - type: object - properties: - created_on: - $ref: '#/components/schemas/waitingroomTimestamp' - readOnly: true - custom_page_html: - $ref: '#/components/schemas/waitingroomEventCustomPageHtml' - description: - $ref: '#/components/schemas/waitingroomEventDescription' - disable_session_renewal: - $ref: '#/components/schemas/waitingroomEventDisableSessionRenewal' - event_end_time: - $ref: '#/components/schemas/waitingroomEventEndTime' - event_start_time: - $ref: '#/components/schemas/waitingroomEventStartTime' - id: - $ref: '#/components/schemas/waitingroomEventId' - modified_on: - $ref: '#/components/schemas/waitingroomTimestamp' - readOnly: true - name: - $ref: '#/components/schemas/waitingroomEventName' - new_users_per_minute: - $ref: '#/components/schemas/waitingroomEventNewUsersPerMinute' - prequeue_start_time: - $ref: '#/components/schemas/waitingroomEventPrequeueStartTime' - queueing_method: - $ref: '#/components/schemas/waitingroomEventQueueingMethod' - session_duration: - $ref: '#/components/schemas/waitingroomEventSessionDuration' - shuffle_at_event_start: - $ref: '#/components/schemas/waitingroomEventShuffleAtEventStart' - suspended: - $ref: '#/components/schemas/waitingroomEventSuspended' - total_active_users: - $ref: '#/components/schemas/waitingroomEventTotalActiveUsers' - turnstile_action: - $ref: '#/components/schemas/waitingroomEventTurnstileAction' - turnstile_mode: - $ref: '#/components/schemas/waitingroomEventTurnstileMode' - enum: - - null - unnamedSchemaRefF1c0ba8f44601f2db2e07b9397b6c430: - items: - $ref: '#/components/schemas/waitingroomRuleResult' - type: array - enum: - - null - waitingRoomSetting: - type: object - properties: - search_engine_crawler_bypass: - $ref: '#/components/schemas/waitingroomSearchEngineCrawlerBypass' - required: - - search_engine_crawler_bypass - enum: - - null - waitingroomAdditionalRoutes: - description: >- - Only available for the Waiting Room Advanced subscription. Additional - hostname and path combinations to which this waiting room will be - applied. There is an implied wildcard at the end of the path. The - hostname and path combination must be unique to this and all other - waiting rooms. - items: - properties: - host: - description: >- - The hostname to which this waiting room will be applied (no - wildcards). The hostname must be the primary domain, subdomain, or - custom hostname (if using SSL for SaaS) of this zone. Please do - not include the scheme (http:// or https://). - example: shop2.example.com - type: string - x-auditable: true - path: - default: / - description: >- - Sets the path within the host to enable the waiting room on. The - waiting room will be enabled for all subpaths as well. If there - are two waiting rooms on the same subpath, the waiting room for - the most specific path will be chosen. Wildcards and query - parameters are not supported. - example: /shop2/checkout - type: string - x-auditable: true - type: object - type: array - waitingroomCookieAttributes: - description: >- - Configures cookie attributes for the waiting room cookie. This encrypted - cookie stores a user's status in the waiting room, such as queue - position. - properties: - samesite: - default: auto - description: >- - Configures the SameSite attribute on the waiting room cookie. Value - `auto` will be translated to `lax` or `none` depending if **Always - Use HTTPS** is enabled. Note that when using value `none`, the - secure attribute cannot be set to `never`. - enum: - - auto - - lax - - none - - strict - example: auto - type: string - x-auditable: true - secure: - default: auto - description: >- - Configures the Secure attribute on the waiting room cookie. Value - `always` indicates that the Secure attribute will be set in the - Set-Cookie header, `never` indicates that the Secure attribute will - not be set, and `auto` will set the Secure attribute depending if - **Always Use HTTPS** is enabled. - enum: - - auto - - always - - never - example: auto - type: string - x-auditable: true - type: object - waitingroomCookieSuffix: - default: '' - description: >- - Appends a '_' + a custom suffix to the end of Cloudflare Waiting Room's - cookie name(__cf_waitingroom). If `cookie_suffix` is "abcd", the cookie - name will be `__cf_waitingroom_abcd`. This field is required if using - `additional_routes`. - example: abcd - type: string - x-auditable: true - waitingroomCreateRule: - properties: - action: - $ref: '#/components/schemas/waitingroomRuleAction' - description: - $ref: '#/components/schemas/waitingroomRuleDescription' - enabled: - $ref: '#/components/schemas/waitingroomRuleEnabled' - expression: - $ref: '#/components/schemas/waitingroomRuleExpression' - required: - - action - - expression - type: object - waitingroomCustomPageHtml: - default: '' - description: >- - Only available for the Waiting Room Advanced subscription. This is a - template html file that will be rendered at the edge. If no - custom_page_html is provided, the default waiting room will be used. The - template is based on mustache ( https://mustache.github.io/ ). There are - several variables that are evaluated by the Cloudflare edge: 1. - {{`waitTimeKnown`}} Acts like a boolean value that indicates the - behavior to take when wait time is not available, for instance when - queue_all is **true**. 2. {{`waitTimeFormatted`}} Estimated wait time - for the user. For example, five minutes. Alternatively, you can use: 3. - {{`waitTime`}} Number of minutes of estimated wait for a user. 4. - {{`waitTimeHours`}} Number of hours of estimated wait for a user - (`Math.floor(waitTime/60)`). 5. {{`waitTimeHourMinutes`}} Number of - minutes above the `waitTimeHours` value (`waitTime%60`). 6. - {{`queueIsFull`}} Changes to **true** when no more people can be added - to the queue. To view the full list of variables, look at the - `cfWaitingRoom` object described under the `json_response_enabled` - property in other Waiting Room API calls. - example: >- - {{#waitTimeKnown}} {{waitTime}} mins {{/waitTimeKnown}} - {{^waitTimeKnown}} Queue all enabled {{/waitTimeKnown}} - type: string - x-auditable: true - waitingroomDefaultTemplateLanguage: - default: en-US - description: >- - The language of the default page template. If no - default_template_language is provided, then `en-US` (English) will be - used. - enum: - - en-US - - es-ES - - de-DE - - fr-FR - - it-IT - - ja-JP - - ko-KR - - pt-BR - - zh-CN - - zh-TW - - nl-NL - - pl-PL - - id-ID - - tr-TR - - ar-EG - - ru-RU - - fa-IR - - bg-BG - - hr-HR - - cs-CZ - - da-DK - - fi-FI - - lt-LT - - ms-MY - - nb-NO - - ro-RO - - el-GR - - he-IL - - hi-IN - - hu-HU - - sr-BA - - sk-SK - - sl-SI - - sv-SE - - tl-PH - - th-TH - - uk-UA - - vi-VN - example: es-ES - type: string - x-auditable: true - waitingroomDescription: - default: '' - description: A note that you can use to add more details about the waiting room. - example: Production - DO NOT MODIFY - type: string - x-auditable: true - waitingroomDisableSessionRenewal: - default: false - description: >- - Only available for the Waiting Room Advanced subscription. Disables - automatic renewal of session cookies. If `true`, an accepted user will - have session_duration minutes to browse the site. After that, they will - have to go through the waiting room again. If `false`, a user's session - cookie will be automatically renewed on every request. - example: false - type: boolean - x-auditable: true - waitingroomEnabledOriginCommands: - default: [] - description: A list of enabled origin commands. - items: - enum: - - revoke - type: string - uniqueItems: true - x-auditable: true - type: array - waitingroomEstimatedQueuedUsers: - type: integer - x-auditable: true - waitingroomEstimatedTotalActiveUsers: - type: integer - x-auditable: true - waitingroomEventCustomPageHtml: - description: >- - If set, the event will override the waiting room's `custom_page_html` - property while it is active. If null, the event will inherit it. - example: >- - {{#waitTimeKnown}} {{waitTime}} mins {{/waitTimeKnown}} - {{^waitTimeKnown}} Event is prequeueing / Queue all enabled - {{/waitTimeKnown}} - nullable: true - type: string - x-auditable: true - waitingroomEventDescription: - default: '' - description: A note that you can use to add more details about the event. - example: Production event - DO NOT MODIFY - type: string - x-auditable: true - waitingroomEventDetailsCustomPageHtml: - example: >- - {{#waitTimeKnown}} {{waitTime}} mins {{/waitTimeKnown}} - {{^waitTimeKnown}} Event is prequeueing / Queue all enabled - {{/waitTimeKnown}} - type: string - x-auditable: true - waitingroomEventDetailsDisableSessionRenewal: - example: false - type: boolean - x-auditable: true - waitingroomEventDetailsNewUsersPerMinute: - type: integer - x-auditable: true - waitingroomEventDetailsQueueingMethod: - example: random - type: string - x-auditable: true - waitingroomEventDetailsResponse: - type: object - required: - - success - - errors - - messages - - result - properties: - result: - type: object - $ref: '#/components/schemas/waitingroomEventDetailsResult' - waitingroomEventDetailsResult: - properties: - created_on: - $ref: '#/components/schemas/waitingroomTimestamp' - readOnly: true - custom_page_html: - $ref: '#/components/schemas/waitingroomEventDetailsCustomPageHtml' - description: - $ref: '#/components/schemas/waitingroomEventDescription' - disable_session_renewal: - $ref: '#/components/schemas/waitingroomEventDetailsDisableSessionRenewal' - event_end_time: - $ref: '#/components/schemas/waitingroomEventEndTime' - event_start_time: - $ref: '#/components/schemas/waitingroomEventStartTime' - id: - $ref: '#/components/schemas/waitingroomEventId' - modified_on: - $ref: '#/components/schemas/waitingroomTimestamp' - readOnly: true - name: - $ref: '#/components/schemas/waitingroomEventName' - new_users_per_minute: - $ref: '#/components/schemas/waitingroomEventDetailsNewUsersPerMinute' - prequeue_start_time: - $ref: '#/components/schemas/waitingroomEventPrequeueStartTime' - queueing_method: - $ref: '#/components/schemas/waitingroomEventDetailsQueueingMethod' - session_duration: - $ref: '#/components/schemas/waitingroomEventDetailsSessionDuration' - shuffle_at_event_start: - $ref: '#/components/schemas/waitingroomEventShuffleAtEventStart' - suspended: - $ref: '#/components/schemas/waitingroomEventSuspended' - total_active_users: - $ref: '#/components/schemas/waitingroomEventDetailsTotalActiveUsers' - type: object - waitingroomEventDetailsSessionDuration: - type: integer - x-auditable: true - waitingroomEventDetailsTotalActiveUsers: - type: integer - x-auditable: true - waitingroomEventDisableSessionRenewal: - description: >- - If set, the event will override the waiting room's - `disable_session_renewal` property while it is active. If null, the - event will inherit it. - nullable: true - type: boolean - x-auditable: true - waitingroomEventEndTime: - description: An ISO 8601 timestamp that marks the end of the event. - example: '2021-09-28T17:00:00.000Z' - type: string - x-auditable: true - waitingroomEventId: - example: 25756b2dfe6e378a06b033b670413757 - type: string - x-auditable: true - waitingroomEventIdResponse: - type: object - required: - - success - - errors - - messages - - result - properties: - result: - type: object - properties: - id: - $ref: '#/components/schemas/waitingroomEventId' - waitingroomEventName: - description: >- - A unique name to identify the event. Only alphanumeric characters, - hyphens and underscores are allowed. - example: production_webinar_event - type: string - x-auditable: true - waitingroomEventNewUsersPerMinute: - description: >- - If set, the event will override the waiting room's - `new_users_per_minute` property while it is active. If null, the event - will inherit it. This can only be set if the event's - `total_active_users` property is also set. - maximum: 2147483647 - minimum: 200 - nullable: true - type: integer - x-auditable: true - waitingroomEventPrequeueStartTime: - description: >- - An ISO 8601 timestamp that marks when to begin queueing all users before - the event starts. The prequeue must start at least five minutes before - `event_start_time`. - example: '2021-09-28T15:00:00.000Z' - nullable: true - type: string - x-auditable: true - waitingroomEventQueueingMethod: - description: >- - If set, the event will override the waiting room's `queueing_method` - property while it is active. If null, the event will inherit it. - example: random - nullable: true - type: string - x-auditable: true - waitingroomEventResponse: - type: object - required: - - success - - errors - - messages - - result - properties: - result: - type: object - $ref: '#/components/schemas/waitingroomEventResult' - waitingroomEventResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/waitingroomMessages' - messages: - $ref: '#/components/schemas/waitingroomMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 2000 - type: number - total_pages: - description: The number of total pages in the entire result set. - example: 100 - type: number - type: object - result: - items: - $ref: '#/components/schemas/waitingroomEventResult' - type: array - required: - - success - - errors - - messages - waitingroomEventResult: - properties: - created_on: - $ref: '#/components/schemas/waitingroomTimestamp' - readOnly: true - custom_page_html: - $ref: '#/components/schemas/waitingroomEventCustomPageHtml' - description: - $ref: '#/components/schemas/waitingroomEventDescription' - disable_session_renewal: - $ref: '#/components/schemas/waitingroomEventDisableSessionRenewal' - event_end_time: - $ref: '#/components/schemas/waitingroomEventEndTime' - event_start_time: - $ref: '#/components/schemas/waitingroomEventStartTime' - id: - $ref: '#/components/schemas/waitingroomEventId' - modified_on: - $ref: '#/components/schemas/waitingroomTimestamp' - readOnly: true - name: - $ref: '#/components/schemas/waitingroomEventName' - new_users_per_minute: - $ref: '#/components/schemas/waitingroomEventNewUsersPerMinute' - prequeue_start_time: - $ref: '#/components/schemas/waitingroomEventPrequeueStartTime' - queueing_method: - $ref: '#/components/schemas/waitingroomEventQueueingMethod' - session_duration: - $ref: '#/components/schemas/waitingroomEventSessionDuration' - shuffle_at_event_start: - $ref: '#/components/schemas/waitingroomEventShuffleAtEventStart' - suspended: - $ref: '#/components/schemas/waitingroomEventSuspended' - total_active_users: - $ref: '#/components/schemas/waitingroomEventTotalActiveUsers' - turnstile_action: - $ref: '#/components/schemas/waitingroomEventTurnstileAction' - turnstile_mode: - $ref: '#/components/schemas/waitingroomEventTurnstileMode' - type: object - waitingroomEventSessionDuration: - description: >- - If set, the event will override the waiting room's `session_duration` - property while it is active. If null, the event will inherit it. - maximum: 30 - minimum: 1 - nullable: true - type: integer - x-auditable: true - waitingroomEventShuffleAtEventStart: - default: false - description: >- - If enabled, users in the prequeue will be shuffled randomly at the - `event_start_time`. Requires that `prequeue_start_time` is not null. - This is useful for situations when many users will join the event - prequeue at the same time and you want to shuffle them to ensure - fairness. Naturally, it makes the most sense to enable this feature when - the `queueing_method` during the event respects ordering such as - **fifo**, or else the shuffling may be unnecessary. - type: boolean - x-auditable: true - waitingroomEventStartTime: - description: >- - An ISO 8601 timestamp that marks the start of the event. At this time, - queued users will be processed with the event's configuration. The start - time must be at least one minute before `event_end_time`. - example: '2021-09-28T15:30:00.000Z' - type: string - x-auditable: true - waitingroomEventSuspended: - default: false - description: >- - Suspends or allows an event. If set to `true`, the event is ignored and - traffic will be handled based on the waiting room configuration. - type: boolean - x-auditable: true - waitingroomEventTotalActiveUsers: - description: >- - If set, the event will override the waiting room's `total_active_users` - property while it is active. If null, the event will inherit it. This - can only be set if the event's `new_users_per_minute` property is also - set. - maximum: 2147483647 - minimum: 200 - nullable: true - type: integer - x-auditable: true - waitingroomEventTurnstileAction: - description: >- - If set, the event will override the waiting room's `turnstile_action` - property while it is active. If null, the event will inherit it. - enum: - - log - - infinite_queue - nullable: true - type: string - x-auditable: true - waitingroomEventTurnstileMode: - description: >- - If set, the event will override the waiting room's `turnstile_mode` - property while it is active. If null, the event will inherit it. - enum: - - 'off' - - invisible - - visible_non_interactive - - visible_managed - nullable: true - type: string - x-auditable: true - waitingroomHost: - description: >- - The host name to which the waiting room will be applied (no wildcards). - Please do not include the scheme (http:// or https://). The host and - path combination must be unique. - example: shop.example.com - type: string - x-auditable: true - waitingroomJsonResponseEnabled: - default: false - description: >- - Only available for the Waiting Room Advanced subscription. If `true`, - requests to the waiting room with the header `Accept: application/json` - will receive a JSON response object with information on the user's - status in the waiting room as opposed to the configured static HTML - page. This JSON response object has one property `cfWaitingRoom` which - is an object containing the following fields: 1. `inWaitingRoom`: - Boolean indicating if the user is in the waiting room (always **true**). - 2. `waitTimeKnown`: Boolean indicating if the current estimated wait - times are accurate. If **false**, they are not available. 3. `waitTime`: - Valid only when `waitTimeKnown` is **true**. Integer indicating the - current estimated time in minutes the user will wait in the waiting - room. When `queueingMethod` is **random**, this is set to - `waitTime50Percentile`. 4. `waitTime25Percentile`: Valid only when - `queueingMethod` is **random** and `waitTimeKnown` is **true**. Integer - indicating the current estimated maximum wait time for the 25% of users - that gain entry the fastest (25th percentile). 5. - `waitTime50Percentile`: Valid only when `queueingMethod` is **random** - and `waitTimeKnown` is **true**. Integer indicating the current - estimated maximum wait time for the 50% of users that gain entry the - fastest (50th percentile). In other words, half of the queued users are - expected to let into the origin website before `waitTime50Percentile` - and half are expected to be let in after it. 6. `waitTime75Percentile`: - Valid only when `queueingMethod` is **random** and `waitTimeKnown` is - **true**. Integer indicating the current estimated maximum wait time for - the 75% of users that gain entry the fastest (75th percentile). 7. - `waitTimeFormatted`: String displaying the `waitTime` formatted in - English for users. If `waitTimeKnown` is **false**, `waitTimeFormatted` - will display **unavailable**. 8. `queueIsFull`: Boolean indicating if - the waiting room's queue is currently full and not accepting new users - at the moment. 9. `queueAll`: Boolean indicating if all users will be - queued in the waiting room and no one will be let into the origin - website. 10. `lastUpdated`: String displaying the timestamp as an ISO - 8601 string of the user's last attempt to leave the waiting room and be - let into the origin website. The user is able to make another attempt - after `refreshIntervalSeconds` past this time. If the user makes a - request too soon, it will be ignored and `lastUpdated` will not change. - 11. `refreshIntervalSeconds`: Integer indicating the number of seconds - after `lastUpdated` until the user is able to make another attempt to - leave the waiting room and be let into the origin website. When the - `queueingMethod` is `reject`, there is no specified refresh time —\_it - will always be **zero**. 12. `queueingMethod`: The queueing method - currently used by the waiting room. It is either **fifo**, **random**, - **passthrough**, or **reject**. 13. `isFIFOQueue`: Boolean indicating if - the waiting room uses a FIFO (First-In-First-Out) queue. 14. - `isRandomQueue`: Boolean indicating if the waiting room uses a Random - queue where users gain access randomly. 15. `isPassthroughQueue`: - Boolean indicating if the waiting room uses a passthrough queue. Keep in - mind that when passthrough is enabled, this JSON response will only - exist when `queueAll` is **true** or `isEventPrequeueing` is **true** - because in all other cases requests will go directly to the origin. 16. - `isRejectQueue`: Boolean indicating if the waiting room uses a reject - queue. 17. `isEventActive`: Boolean indicating if an event is currently - occurring. Events are able to change a waiting room's behavior during a - specified period of time. For additional information, look at the event - properties `prequeue_start_time`, `event_start_time`, and - `event_end_time` in the documentation for creating waiting room events. - Events are considered active between these start and end times, as well - as during the prequeueing period if it exists. 18. `isEventPrequeueing`: - Valid only when `isEventActive` is **true**. Boolean indicating if an - event is currently prequeueing users before it starts. 19. - `timeUntilEventStart`: Valid only when `isEventPrequeueing` is **true**. - Integer indicating the number of minutes until the event starts. 20. - `timeUntilEventStartFormatted`: String displaying the - `timeUntilEventStart` formatted in English for users. If - `isEventPrequeueing` is **false**, `timeUntilEventStartFormatted` will - display **unavailable**. 21. `timeUntilEventEnd`: Valid only when - `isEventActive` is **true**. Integer indicating the number of minutes - until the event ends. 22. `timeUntilEventEndFormatted`: String - displaying the `timeUntilEventEnd` formatted in English for users. If - `isEventActive` is **false**, `timeUntilEventEndFormatted` will display - **unavailable**. 23. `shuffleAtEventStart`: Valid only when - `isEventActive` is **true**. Boolean indicating if the users in the - prequeue are shuffled randomly when the event starts. 24. `turnstile`: - Empty when turnstile isn't enabled. String displaying an html tag to - display the Turnstile widget. Please add the `{{{turnstile}}}` tag to - the `custom_html` template to ensure the Turnstile widget appears. 25. - `infiniteQueue`: Boolean indicating whether the response is for a user - in the infinite queue. An example cURL to a waiting room could be: curl - -X GET "https://example.com/waitingroom" \ -H "Accept: application/json" - If `json_response_enabled` is **true** and the request hits the waiting - room, an example JSON response when `queueingMethod` is **fifo** and no - event is active could be: { "cfWaitingRoom": { "inWaitingRoom": true, - "waitTimeKnown": true, "waitTime": 10, "waitTime25Percentile": 0, - "waitTime50Percentile": 0, "waitTime75Percentile": 0, - "waitTimeFormatted": "10 minutes", "queueIsFull": false, "queueAll": - false, "lastUpdated": "2020-08-03T23:46:00.000Z", - "refreshIntervalSeconds": 20, "queueingMethod": "fifo", "isFIFOQueue": - true, "isRandomQueue": false, "isPassthroughQueue": false, - "isRejectQueue": false, "isEventActive": false, "isEventPrequeueing": - false, "timeUntilEventStart": 0, "timeUntilEventStartFormatted": - "unavailable", "timeUntilEventEnd": 0, "timeUntilEventEndFormatted": - "unavailable", "shuffleAtEventStart": false } } If - `json_response_enabled` is **true** and the request hits the waiting - room, an example JSON response when `queueingMethod` is **random** and - an event is active could be: { "cfWaitingRoom": { "inWaitingRoom": true, - "waitTimeKnown": true, "waitTime": 10, "waitTime25Percentile": 5, - "waitTime50Percentile": 10, "waitTime75Percentile": 15, - "waitTimeFormatted": "5 minutes to 15 minutes", "queueIsFull": false, - "queueAll": false, "lastUpdated": "2020-08-03T23:46:00.000Z", - "refreshIntervalSeconds": 20, "queueingMethod": "random", "isFIFOQueue": - false, "isRandomQueue": true, "isPassthroughQueue": false, - "isRejectQueue": false, "isEventActive": true, "isEventPrequeueing": - false, "timeUntilEventStart": 0, "timeUntilEventStartFormatted": - "unavailable", "timeUntilEventEnd": 15, "timeUntilEventEndFormatted": - "15 minutes", "shuffleAtEventStart": true } } - example: false - type: boolean - x-auditable: true - waitingroomMaxEstimatedTimeMinutes: - type: integer - x-auditable: true - waitingroomMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - waitingroomName: - description: >- - A unique name to identify the waiting room. Only alphanumeric - characters, hyphens and underscores are allowed. - example: production_webinar - type: string - x-auditable: true - waitingroomNewUsersPerMinute: - description: >- - Sets the number of new users that will be let into the route every - minute. This value is used as baseline for the number of users that are - let in per minute. So it is possible that there is a little more or - little less traffic coming to the route based on the traffic patterns at - that time around the world. - maximum: 2147483647 - minimum: 200 - type: integer - x-auditable: true - waitingroomNextEventPrequeueStartTime: - description: >- - An ISO 8601 timestamp that marks when the next event will begin - queueing. - example: '2021-09-28T15:00:00.000Z' - nullable: true - type: string - x-auditable: true - waitingroomNextEventStartTime: - description: An ISO 8601 timestamp that marks when the next event will start. - example: '2021-09-28T15:00:00.000Z' - nullable: true - type: string - x-auditable: true - waitingroomPatchRule: - properties: - action: - $ref: '#/components/schemas/waitingroomRuleAction' - description: - $ref: '#/components/schemas/waitingroomRuleDescription' - enabled: - $ref: '#/components/schemas/waitingroomRuleEnabled' - expression: - $ref: '#/components/schemas/waitingroomRuleExpression' - position: - $ref: '#/components/schemas/waitingroomRulePosition' - required: - - action - - expression - type: object - waitingroomPath: - default: / - description: >- - Sets the path within the host to enable the waiting room on. The waiting - room will be enabled for all subpaths as well. If there are two waiting - rooms on the same subpath, the waiting room for the most specific path - will be chosen. Wildcards and query parameters are not supported. - example: /shop/checkout - type: string - x-auditable: true - waitingroomPreviewResponse: - type: object - required: - - success - - errors - - messages - - result - properties: - result: - type: object - properties: - preview_url: - $ref: '#/components/schemas/waitingroomPreviewUrl' - waitingroomPreviewUrl: - description: URL where the custom waiting room page can temporarily be previewed. - example: http://waitingrooms.dev/preview/35af8c12-6d68-4608-babb-b53435a5ddfb - type: string - x-auditable: true - waitingroomQueryEvent: - properties: - custom_page_html: - $ref: '#/components/schemas/waitingroomEventCustomPageHtml' - description: - $ref: '#/components/schemas/waitingroomEventDescription' - disable_session_renewal: - $ref: '#/components/schemas/waitingroomEventDisableSessionRenewal' - event_end_time: - $ref: '#/components/schemas/waitingroomEventEndTime' - event_start_time: - $ref: '#/components/schemas/waitingroomEventStartTime' - name: - $ref: '#/components/schemas/waitingroomEventName' - new_users_per_minute: - $ref: '#/components/schemas/waitingroomEventNewUsersPerMinute' - prequeue_start_time: - $ref: '#/components/schemas/waitingroomEventPrequeueStartTime' - queueing_method: - $ref: '#/components/schemas/waitingroomEventQueueingMethod' - session_duration: - $ref: '#/components/schemas/waitingroomEventSessionDuration' - shuffle_at_event_start: - $ref: '#/components/schemas/waitingroomEventShuffleAtEventStart' - suspended: - $ref: '#/components/schemas/waitingroomEventSuspended' - total_active_users: - $ref: '#/components/schemas/waitingroomEventTotalActiveUsers' - turnstile_action: - $ref: '#/components/schemas/waitingroomEventTurnstileAction' - turnstile_mode: - $ref: '#/components/schemas/waitingroomEventTurnstileMode' - required: - - name - - event_start_time - - event_end_time - type: object - waitingroomQueryPreview: - properties: - custom_html: - $ref: '#/components/schemas/waitingroomCustomPageHtml' - required: - - custom_html - type: object - waitingroomQueryWaitingroom: - properties: - additional_routes: - $ref: '#/components/schemas/waitingroomAdditionalRoutes' - cookie_attributes: - $ref: '#/components/schemas/waitingroomCookieAttributes' - cookie_suffix: - $ref: '#/components/schemas/waitingroomCookieSuffix' - custom_page_html: - $ref: '#/components/schemas/waitingroomCustomPageHtml' - default_template_language: - $ref: '#/components/schemas/waitingroomDefaultTemplateLanguage' - description: - $ref: '#/components/schemas/waitingroomDescription' - disable_session_renewal: - $ref: '#/components/schemas/waitingroomDisableSessionRenewal' - enabled_origin_commands: - $ref: '#/components/schemas/waitingroomEnabledOriginCommands' - host: - $ref: '#/components/schemas/waitingroomHost' - json_response_enabled: - $ref: '#/components/schemas/waitingroomJsonResponseEnabled' - name: - $ref: '#/components/schemas/waitingroomName' - new_users_per_minute: - $ref: '#/components/schemas/waitingroomNewUsersPerMinute' - path: - $ref: '#/components/schemas/waitingroomPath' - queue_all: - $ref: '#/components/schemas/waitingroomQueueAll' - queueing_method: - $ref: '#/components/schemas/waitingroomQueueingMethod' - queueing_status_code: - $ref: '#/components/schemas/waitingroomQueueingStatusCode' - session_duration: - $ref: '#/components/schemas/waitingroomSessionDuration' - suspended: - $ref: '#/components/schemas/waitingroomSuspended' - total_active_users: - $ref: '#/components/schemas/waitingroomTotalActiveUsers' - turnstile_action: - $ref: '#/components/schemas/waitingroomTurnstileAction' - turnstile_mode: - $ref: '#/components/schemas/waitingroomTurnstileMode' - required: - - name - - host - - new_users_per_minute - - total_active_users - type: object - waitingroomQueueAll: - default: false - description: >- - If queue_all is `true`, all the traffic that is coming to a route will - be sent to the waiting room. No new traffic can get to the route once - this field is set and estimated time will become unavailable. - example: true - type: boolean - x-auditable: true - waitingroomQueueingMethod: - default: fifo - description: >- - Sets the queueing method used by the waiting room. Changing this - parameter from the **default** queueing method is only available for the - Waiting Room Advanced subscription. Regardless of the queueing method, - if `queue_all` is enabled or an event is prequeueing, users in the - waiting room will not be accepted to the origin. These users will always - see a waiting room page that refreshes automatically. The valid queueing - methods are: 1. `fifo` **(default)**: First-In-First-Out queue where - customers gain access in the order they arrived. 2. `random`: Random - queue where customers gain access randomly, regardless of arrival time. - 3. `passthrough`: Users will pass directly through the waiting room and - into the origin website. As a result, any configured limits will not be - respected while this is enabled. This method can be used as an - alternative to disabling a waiting room (with `suspended`) so that - analytics are still reported. This can be used if you wish to allow all - traffic normally, but want to restrict traffic during a waiting room - event, or vice versa. 4. `reject`: Users will be immediately rejected - from the waiting room. As a result, no users will reach the origin - website while this is enabled. This can be used if you wish to reject - all traffic while performing maintenance, block traffic during a - specified period of time (an event), or block traffic while events are - not occurring. Consider a waiting room used for vaccine distribution - that only allows traffic during sign-up events, and otherwise blocks all - traffic. For this case, the waiting room uses `reject`, and its events - override this with `fifo`, `random`, or `passthrough`. When this - queueing method is enabled and neither `queueAll` is enabled nor an - event is prequeueing, the waiting room page **will not refresh - automatically**. - enum: - - fifo - - random - - passthrough - - reject - example: fifo - type: string - x-auditable: true - waitingroomQueueingStatusCode: - default: 200 - description: HTTP status code returned to a user while in the queue. - enum: - - 200 - - 202 - - 429 - example: 202 - type: integer - x-auditable: true - waitingroomResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/waitingroomMessages' - messages: - $ref: '#/components/schemas/waitingroomMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 2000 - type: number - total_pages: - description: The number of total pages in the entire result set. - example: 100 - type: number - type: object - result: - items: - $ref: '#/components/schemas/waitingroomWaitingroom' - type: array - required: - - success - - errors - - messages - waitingroomRuleAction: - description: The action to take when the expression matches. - enum: - - bypass_waiting_room - example: bypass_waiting_room - type: string - x-auditable: true - waitingroomRuleDescription: - default: '' - description: The description of the rule. - example: allow all traffic from 10.20.30.40 - type: string - x-auditable: true - waitingroomRuleEnabled: - default: true - description: When set to true, the rule is enabled. - example: true - type: boolean - x-auditable: true - waitingroomRuleExpression: - description: Criteria defining when there is a match for the current rule. - example: ip.src in {10.20.30.40} - type: string - x-auditable: true - waitingroomRuleId: - description: The ID of the rule. - example: 25756b2dfe6e378a06b033b670413757 - type: string - x-auditable: true - waitingroomRulePosition: - description: Reorder the position of a rule - type: object - properties: - index: - description: >- - Places the rule in the exact position specified by the integer - number . Position numbers start with 1. Existing - rules in the ruleset from the specified position number onward are - shifted one position (no rule is overwritten). - type: integer - x-auditable: true - before: - description: >- - Places the rule before rule . Use this argument with an - empty rule ID value ("") to set the rule as the first rule in the - ruleset. - example: - type: string - x-auditable: true - after: - description: >- - Places the rule after rule . Use this argument with an - empty rule ID value ("") to set the rule as the last rule in the - ruleset. - example: - type: string - x-auditable: true - waitingroomRuleResult: - properties: - action: - $ref: '#/components/schemas/waitingroomRuleAction' - description: - $ref: '#/components/schemas/waitingroomRuleDescription' - enabled: - $ref: '#/components/schemas/waitingroomRuleEnabled' - expression: - $ref: '#/components/schemas/waitingroomRuleExpression' - id: - $ref: '#/components/schemas/waitingroomRuleId' - last_updated: - $ref: '#/components/schemas/waitingroomTimestamp' - version: - $ref: '#/components/schemas/waitingroomRuleVersion' - type: object - waitingroomRuleVersion: - description: The version of the rule. - example: '1' - type: string - x-auditable: true - waitingroomRulesResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/waitingroomMessages' - messages: - $ref: '#/components/schemas/waitingroomMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 2000 - type: number - total_pages: - description: The number of total pages in the entire result set. - example: 100 - type: number - type: object - result: - items: - $ref: '#/components/schemas/waitingroomRuleResult' - type: array - required: - - success - - errors - - messages - waitingroomSearchEngineCrawlerBypass: - default: false - description: >- - Whether to allow verified search engine crawlers to bypass all waiting - rooms on this zone. Verified search engine crawlers will not be tracked - or counted by the waiting room system, and will not appear in waiting - room analytics. - example: true - type: boolean - x-auditable: true - waitingroomSessionDuration: - default: 5 - description: >- - Lifetime of a cookie (in minutes) set by Cloudflare for users who get - access to the route. If a user is not seen by Cloudflare again in that - time period, they will be treated as a new user that visits the route. - maximum: 30 - minimum: 1 - type: integer - x-auditable: true - waitingroomSingleResponse: - type: object - required: - - success - - errors - - messages - - result - properties: - result: - type: object - $ref: '#/components/schemas/waitingroomWaitingroom' - waitingroomStatus: - enum: - - event_prequeueing - - not_queueing - - queueing - - suspended - example: queueing - type: string - x-auditable: true - waitingroomStatusEventId: - example: 25756b2dfe6e378a06b033b670413757 - type: string - x-auditable: true - waitingroomStatusResponse: - type: object - required: - - success - - errors - - messages - - result - properties: - result: - type: object - properties: - estimated_queued_users: - $ref: '#/components/schemas/waitingroomEstimatedQueuedUsers' - estimated_total_active_users: - $ref: '#/components/schemas/waitingroomEstimatedTotalActiveUsers' - event_id: - $ref: '#/components/schemas/waitingroomStatusEventId' - max_estimated_time_minutes: - $ref: '#/components/schemas/waitingroomMaxEstimatedTimeMinutes' - status: - $ref: '#/components/schemas/waitingroomStatus' - waitingroomSuspended: - default: false - description: >- - Suspends or allows traffic going to the waiting room. If set to `true`, - the traffic will not go to the waiting room. - type: boolean - x-auditable: true - waitingroomTimestamp: - example: '2014-01-01T05:20:00.12345Z' - format: date-time - readOnly: true - type: string - x-auditable: true - waitingroomTotalActiveUsers: - description: >- - Sets the total number of active user sessions on the route at a point in - time. A route is a combination of host and path on which a waiting room - is available. This value is used as a baseline for the total number of - active user sessions on the route. It is possible to have a situation - where there are more or less active users sessions on the route based on - the traffic patterns at that time around the world. - maximum: 2147483647 - minimum: 200 - type: integer - x-auditable: true - waitingroomTurnstileAction: - default: log - description: >- - Which action to take when a bot is detected using Turnstile. `log` will - have no impact on queueing behavior, simply keeping track of how many - bots are detected in Waiting Room Analytics. `infinite_queue` will send - bots to a false queueing state, where they will never reach your origin. - `infinite_queue` requires Advanced Waiting Room. - enum: - - log - - infinite_queue - type: string - x-auditable: true - waitingroomTurnstileMode: - default: invisible - description: >- - Which Turnstile widget type to use for detecting bot traffic. See [the - Turnstile - documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types) - for the definitions of these widget types. Set to `off` to disable the - Turnstile integration entirely. Setting this to anything other than - `off` or `invisible` requires Advanced Waiting Room. - enum: - - 'off' - - invisible - - visible_non_interactive - - visible_managed - type: string - x-auditable: true - waitingroomUpdateRules: - items: - $ref: '#/components/schemas/waitingroomCreateRule' - type: array - waitingroomWaitingRoomId: - example: 699d98642c564d2e855e9661899b7252 - type: string - x-auditable: true - waitingroomWaitingRoomIdResponse: - type: object - required: - - success - - errors - - messages - - result - properties: - result: - type: object - properties: - id: - $ref: '#/components/schemas/waitingroomWaitingRoomId' - waitingroomWaitingroom: - properties: - additional_routes: - $ref: '#/components/schemas/waitingroomAdditionalRoutes' - cookie_attributes: - $ref: '#/components/schemas/waitingroomCookieAttributes' - cookie_suffix: - $ref: '#/components/schemas/waitingroomCookieSuffix' - created_on: - $ref: '#/components/schemas/waitingroomTimestamp' - readOnly: true - custom_page_html: - $ref: '#/components/schemas/waitingroomCustomPageHtml' - default_template_language: - $ref: '#/components/schemas/waitingroomDefaultTemplateLanguage' - description: - $ref: '#/components/schemas/waitingroomDescription' - disable_session_renewal: - $ref: '#/components/schemas/waitingroomDisableSessionRenewal' - enabled_origin_commands: - $ref: '#/components/schemas/waitingroomEnabledOriginCommands' - host: - $ref: '#/components/schemas/waitingroomHost' - id: - $ref: '#/components/schemas/waitingroomWaitingRoomId' - json_response_enabled: - $ref: '#/components/schemas/waitingroomJsonResponseEnabled' - modified_on: - $ref: '#/components/schemas/waitingroomTimestamp' - readOnly: true - name: - $ref: '#/components/schemas/waitingroomName' - new_users_per_minute: - $ref: '#/components/schemas/waitingroomNewUsersPerMinute' - next_event_prequeue_start_time: - $ref: '#/components/schemas/waitingroomNextEventPrequeueStartTime' - next_event_start_time: - $ref: '#/components/schemas/waitingroomNextEventStartTime' - path: - $ref: '#/components/schemas/waitingroomPath' - queue_all: - $ref: '#/components/schemas/waitingroomQueueAll' - queueing_method: - $ref: '#/components/schemas/waitingroomQueueingMethod' - queueing_status_code: - $ref: '#/components/schemas/waitingroomQueueingStatusCode' - session_duration: - $ref: '#/components/schemas/waitingroomSessionDuration' - suspended: - $ref: '#/components/schemas/waitingroomSuspended' - total_active_users: - $ref: '#/components/schemas/waitingroomTotalActiveUsers' - turnstile_action: - $ref: '#/components/schemas/waitingroomTurnstileAction' - turnstile_mode: - $ref: '#/components/schemas/waitingroomTurnstileMode' - type: object - waitingroomZoneSettings: - properties: - search_engine_crawler_bypass: - $ref: '#/components/schemas/waitingroomSearchEngineCrawlerBypass' - type: object - waitingroomZoneSettingsResponse: - type: object - required: - - success - - errors - - messages - - result - - result - properties: - result: - type: object - properties: - search_engine_crawler_bypass: - $ref: '#/components/schemas/waitingroomSearchEngineCrawlerBypass' - required: - - search_engine_crawler_bypass - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - waiting_rooms: - id: cloudflare.waiting_rooms.waiting_rooms - name: waiting_rooms - title: Waiting Rooms - methods: - list_by_zone: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - preview: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1preview/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - list_by_account: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1waiting_rooms/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/waiting_rooms/methods/get' - - $ref: >- - #/components/x-stackQL-resources/waiting_rooms/methods/list_by_zone - - $ref: >- - #/components/x-stackQL-resources/waiting_rooms/methods/list_by_account - insert: [] - update: - - $ref: '#/components/x-stackQL-resources/waiting_rooms/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/waiting_rooms/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/waiting_rooms/methods/update' - settings: - id: cloudflare.waiting_rooms.settings - name: settings - title: Settings - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1settings/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1settings/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1settings/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/settings/methods/list' - insert: [] - update: - - $ref: '#/components/x-stackQL-resources/settings/methods/edit' - delete: [] - replace: - - $ref: '#/components/x-stackQL-resources/settings/methods/update' - events: - id: cloudflare.waiting_rooms.events - name: events - title: Events - methods: - list: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}~1events/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}~1events/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}~1events~1{event_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}~1events~1{event_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}~1events~1{event_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}~1events~1{event_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/events/methods/get' - - $ref: '#/components/x-stackQL-resources/events/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/events/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/events/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/events/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/events/methods/update' - details: - id: cloudflare.waiting_rooms.details - name: details - title: Details - methods: - list: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}~1events~1{event_id}~1details/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/details/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - rules: - id: cloudflare.waiting_rooms.rules - name: rules - title: Rules - methods: - list: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}~1rules/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - waiting_room_create_waiting_room_rule: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}~1rules/post - response: - mediaType: application/json - openAPIDocKey: '200' - waiting_room_replace_waiting_room_rules: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}~1rules/put - response: - mediaType: application/json - openAPIDocKey: '200' - waiting_room_delete_waiting_room_rule: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}~1rules~1{rule_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - waiting_room_patch_waiting_room_rule: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}~1rules~1{rule_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/rules/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/rules/methods/waiting_room_create_waiting_room_rule - update: - - $ref: >- - #/components/x-stackQL-resources/rules/methods/waiting_room_patch_waiting_room_rule - delete: - - $ref: >- - #/components/x-stackQL-resources/rules/methods/waiting_room_delete_waiting_room_rule - replace: - - $ref: >- - #/components/x-stackQL-resources/rules/methods/waiting_room_replace_waiting_room_rules - statuses: - id: cloudflare.waiting_rooms.statuses - name: statuses - title: Statuses - methods: - list: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}~1status/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/statuses/methods/list' - insert: [] - update: [] - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: waiting_rooms API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /zones/{zone_id}/waiting_rooms: + get: + description: Lists waiting rooms for account or zone. + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Page number of paginated results. + in: query + name: page + schema: + default: 1 + minimum: 1 + type: number + - description: Maximum number of results per page. Must be a multiple of 5. + in: query + name: per_page + schema: + default: 25 + maximum: 1000 + minimum: 5 + type: number + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomResponseCollection' + description: List waiting rooms for account or zone response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/waitingroomMessages' + messages: + $ref: '#/components/schemas/waitingroomMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/waitingroomWaitingroom' + type: array + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: List waiting rooms for account or zone response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List waiting rooms for account or zone + tags: [] + x-api-token-group: + - Account Waiting Rooms Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: waiting_rooms + resource_chain: [] + method: list + operationId: get_zones_zone_id_waiting_rooms + /zones/{zone_id}/waiting_rooms/preview: + post: + description: "Creates a waiting room page preview. Upload a custom waiting room page for preview. You will receive a preview URL in the form `http://waitingrooms.dev/preview/`. You can use the following query parameters to change the state of the preview: 1. `force_queue`: Boolean indicating if all users will be queued in the waiting room and no one will be let into the origin website (also known as queueAll). 2. `queue_is_full`: Boolean indicating if the waiting room's queue is currently full and not accepting new users at the moment. 3. `queueing_method`: The queueing method currently used by the waiting room. - **fifo** indicates a FIFO queue. - **random** indicates a Random queue. - **passthrough** indicates a Passthrough queue. Keep in mind that the waiting room page will only be displayed if `force_queue=true` or `event=prequeueing` \u2014 for other cases the request will pass through to the origin. For our preview, this will be a fake origin website returning \\\"Welcome\\\ + \". - **reject** indicates a Reject queue. 4. `event`: Used to preview a waiting room event. - **none** indicates no event is occurring. - **prequeueing** indicates that an event is prequeueing (between `prequeue_start_time` and `event_start_time`). - **started** indicates that an event has started (between `event_start_time` and `event_end_time`). 5. `shuffle_at_event_start`: Boolean indicating if the event will shuffle users in the prequeue when it starts. This can only be set to **true** if an event is active (`event` is not **none**). For example, you can make a request to `http://waitingrooms.dev/preview/?force_queue=false&queue_is_full=false&queueing_method=random&event=started&shuffle_at_event_start=true` 6. `waitTime`: Non-zero, positive integer indicating the estimated wait time in minutes. The default value is 10 minutes. For example, you can make a request to `http://waitingrooms.dev/preview/?waitTime=50` to configure the estimated wait time as 50 minutes." + operationId: waiting-room-create-a-custom-waiting-room-page-preview + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomQueryPreview' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomPreviewResponse' + description: Create a custom waiting room page preview response + 4XX: + content: + application/json: + schema: + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + properties: + result: + type: object + properties: + preview_url: + $ref: '#/components/schemas/waitingroomPreviewUrl' + enum: + - null + errors: + minLength: 1 + $ref: '#/components/schemas/waitingroomMessages' + messages: + $ref: '#/components/schemas/waitingroomMessages' + success: + description: Whether the API call was successful. + enum: + - false + type: boolean + description: Create a custom waiting room page preview response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a custom waiting room page preview + tags: + - Waiting Room + x-api-token-group: + - Waiting Rooms Write + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: waiting_rooms + resource_chain: + - page + method: preview + /zones/{zone_id}/waiting_rooms/settings: + get: + description: Gets the zone-level Waiting Room settings that apply as defaults to all waiting rooms on the zone. + operationId: waiting-room-get-zone-settings + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomZoneSettingsResponse' + description: The current zone-level Waiting Room settings + 4XX: + content: + application/json: + schema: + type: object + required: + - success + - errors + - messages + - result + - result + - success + - errors + - messages + - result + properties: + result: + $ref: '#/components/schemas/waitingRoomSetting' + errors: + minLength: 1 + $ref: '#/components/schemas/waitingroomMessages' + messages: + $ref: '#/components/schemas/waitingroomMessages' + success: + description: Whether the API call was successful. + enum: + - false + type: boolean + description: The current zone-level Waiting Room settings response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get zone-level Waiting Room settings + tags: + - Waiting Room + x-api-token-group: + - Waiting Rooms Read + - Waiting Rooms Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: waiting_rooms + resource_chain: + - settings + method: get + patch: + description: Partially updates zone-level Waiting Room settings using PATCH semantics. + operationId: waiting-room-patch-zone-settings + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomZoneSettings' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomZoneSettingsResponse' + description: The updated zone-level Waiting Room settings + 4XX: + content: + application/json: + schema: + type: object + required: + - success + - errors + - messages + - result + - result + - success + - errors + - messages + - result + properties: + result: + $ref: '#/components/schemas/waitingRoomSetting' + errors: + minLength: 1 + $ref: '#/components/schemas/waitingroomMessages' + messages: + $ref: '#/components/schemas/waitingroomMessages' + success: + description: Whether the API call was successful. + enum: + - false + type: boolean + description: The zone-level Waiting Room settings response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Patch zone-level Waiting Room settings + tags: + - Waiting Room + x-api-token-group: + - Waiting Rooms Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: waiting_rooms + resource_chain: + - settings + method: edit + put: + description: Fully updates zone-level Waiting Room settings, replacing the existing configuration. + operationId: waiting-room-update-zone-settings + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomZoneSettings' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomZoneSettingsResponse' + description: The updated zone-level Waiting Room settings + 4XX: + content: + application/json: + schema: + type: object + required: + - success + - errors + - messages + - result + - result + - success + - errors + - messages + - result + properties: + result: + $ref: '#/components/schemas/waitingRoomSetting' + errors: + minLength: 1 + $ref: '#/components/schemas/waitingroomMessages' + messages: + $ref: '#/components/schemas/waitingroomMessages' + success: + description: Whether the API call was successful. + enum: + - false + type: boolean + description: The zone-level Waiting Room settings response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update zone-level Waiting Room settings + tags: + - Waiting Room + x-api-token-group: + - Waiting Rooms Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: waiting_rooms + resource_chain: + - settings + method: update + /zones/{zone_id}/waiting_rooms/{waiting_room_id}: + delete: + description: Deletes a waiting room. + operationId: waiting-room-delete-waiting-room + parameters: + - name: waiting_room_id + in: path + required: true + description: The Waiting Room ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomWaitingRoomIdResponse' + description: Delete waiting room response + 4XX: + content: + application/json: + schema: + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + properties: + result: + type: object + properties: + id: + $ref: '#/components/schemas/waitingroomWaitingRoomId' + enum: + - null + errors: + minLength: 1 + $ref: '#/components/schemas/waitingroomMessages' + messages: + $ref: '#/components/schemas/waitingroomMessages' + success: + description: Whether the API call was successful. + enum: + - false + type: boolean + description: Delete waiting room response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete waiting room + tags: + - Waiting Room + x-api-token-group: + - Waiting Rooms Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: waiting_rooms + resource_chain: [] + method: delete + get: + description: Fetches a single configured waiting room. + operationId: waiting-room-waiting-room-details + parameters: + - name: waiting_room_id + in: path + required: true + description: The Waiting Room ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomSingleResponse' + description: Waiting room details response + 4XX: + content: + application/json: + schema: + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + properties: + result: + type: object + properties: + additional_routes: + $ref: '#/components/schemas/waitingroomAdditionalRoutes' + cookie_attributes: + $ref: '#/components/schemas/waitingroomCookieAttributes' + cookie_suffix: + $ref: '#/components/schemas/waitingroomCookieSuffix' + created_on: + $ref: '#/components/schemas/waitingroomTimestamp' + readOnly: true + custom_page_html: + $ref: '#/components/schemas/waitingroomCustomPageHtml' + default_template_language: + $ref: '#/components/schemas/waitingroomDefaultTemplateLanguage' + description: + $ref: '#/components/schemas/waitingroomDescription' + disable_session_renewal: + $ref: '#/components/schemas/waitingroomDisableSessionRenewal' + enabled_origin_commands: + $ref: '#/components/schemas/waitingroomEnabledOriginCommands' + host: + $ref: '#/components/schemas/waitingroomHost' + id: + $ref: '#/components/schemas/waitingroomWaitingRoomId' + json_response_enabled: + $ref: '#/components/schemas/waitingroomJsonResponseEnabled' + modified_on: + $ref: '#/components/schemas/waitingroomTimestamp' + readOnly: true + name: + $ref: '#/components/schemas/waitingroomName' + new_users_per_minute: + $ref: '#/components/schemas/waitingroomNewUsersPerMinute' + next_event_prequeue_start_time: + $ref: '#/components/schemas/waitingroomNextEventPrequeueStartTime' + next_event_start_time: + $ref: '#/components/schemas/waitingroomNextEventStartTime' + path: + $ref: '#/components/schemas/waitingroomPath' + queue_all: + $ref: '#/components/schemas/waitingroomQueueAll' + queueing_method: + $ref: '#/components/schemas/waitingroomQueueingMethod' + queueing_status_code: + $ref: '#/components/schemas/waitingroomQueueingStatusCode' + session_duration: + $ref: '#/components/schemas/waitingroomSessionDuration' + suspended: + $ref: '#/components/schemas/waitingroomSuspended' + total_active_users: + $ref: '#/components/schemas/waitingroomTotalActiveUsers' + turnstile_action: + $ref: '#/components/schemas/waitingroomTurnstileAction' + turnstile_mode: + $ref: '#/components/schemas/waitingroomTurnstileMode' + enum: + - null + errors: + minLength: 1 + $ref: '#/components/schemas/waitingroomMessages' + messages: + $ref: '#/components/schemas/waitingroomMessages' + success: + description: Whether the API call was successful. + enum: + - false + type: boolean + description: Waiting room details response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Waiting room details + tags: + - Waiting Room + x-api-token-group: + - Waiting Rooms Read + - Waiting Rooms Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: waiting_rooms + resource_chain: [] + method: get + patch: + description: Patches a configured waiting room. + operationId: waiting-room-patch-waiting-room + parameters: + - name: waiting_room_id + in: path + required: true + description: The Waiting Room ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomQueryWaitingroom' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomSingleResponse' + description: Patch waiting room response + 4XX: + content: + application/json: + schema: + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + properties: + result: + type: object + properties: + additional_routes: + $ref: '#/components/schemas/waitingroomAdditionalRoutes' + cookie_attributes: + $ref: '#/components/schemas/waitingroomCookieAttributes' + cookie_suffix: + $ref: '#/components/schemas/waitingroomCookieSuffix' + created_on: + $ref: '#/components/schemas/waitingroomTimestamp' + readOnly: true + custom_page_html: + $ref: '#/components/schemas/waitingroomCustomPageHtml' + default_template_language: + $ref: '#/components/schemas/waitingroomDefaultTemplateLanguage' + description: + $ref: '#/components/schemas/waitingroomDescription' + disable_session_renewal: + $ref: '#/components/schemas/waitingroomDisableSessionRenewal' + enabled_origin_commands: + $ref: '#/components/schemas/waitingroomEnabledOriginCommands' + host: + $ref: '#/components/schemas/waitingroomHost' + id: + $ref: '#/components/schemas/waitingroomWaitingRoomId' + json_response_enabled: + $ref: '#/components/schemas/waitingroomJsonResponseEnabled' + modified_on: + $ref: '#/components/schemas/waitingroomTimestamp' + readOnly: true + name: + $ref: '#/components/schemas/waitingroomName' + new_users_per_minute: + $ref: '#/components/schemas/waitingroomNewUsersPerMinute' + next_event_prequeue_start_time: + $ref: '#/components/schemas/waitingroomNextEventPrequeueStartTime' + next_event_start_time: + $ref: '#/components/schemas/waitingroomNextEventStartTime' + path: + $ref: '#/components/schemas/waitingroomPath' + queue_all: + $ref: '#/components/schemas/waitingroomQueueAll' + queueing_method: + $ref: '#/components/schemas/waitingroomQueueingMethod' + queueing_status_code: + $ref: '#/components/schemas/waitingroomQueueingStatusCode' + session_duration: + $ref: '#/components/schemas/waitingroomSessionDuration' + suspended: + $ref: '#/components/schemas/waitingroomSuspended' + total_active_users: + $ref: '#/components/schemas/waitingroomTotalActiveUsers' + turnstile_action: + $ref: '#/components/schemas/waitingroomTurnstileAction' + turnstile_mode: + $ref: '#/components/schemas/waitingroomTurnstileMode' + enum: + - null + errors: + minLength: 1 + $ref: '#/components/schemas/waitingroomMessages' + messages: + $ref: '#/components/schemas/waitingroomMessages' + success: + description: Whether the API call was successful. + enum: + - false + type: boolean + description: Patch waiting room response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Patch waiting room + tags: + - Waiting Room + x-api-token-group: + - Waiting Rooms Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: waiting_rooms + resource_chain: [] + method: edit + put: + description: Updates a configured waiting room. + operationId: waiting-room-update-waiting-room + parameters: + - name: waiting_room_id + in: path + required: true + description: The Waiting Room ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomQueryWaitingroom' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomSingleResponse' + description: Update waiting room response + 4XX: + content: + application/json: + schema: + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + properties: + result: + type: object + properties: + additional_routes: + $ref: '#/components/schemas/waitingroomAdditionalRoutes' + cookie_attributes: + $ref: '#/components/schemas/waitingroomCookieAttributes' + cookie_suffix: + $ref: '#/components/schemas/waitingroomCookieSuffix' + created_on: + $ref: '#/components/schemas/waitingroomTimestamp' + readOnly: true + custom_page_html: + $ref: '#/components/schemas/waitingroomCustomPageHtml' + default_template_language: + $ref: '#/components/schemas/waitingroomDefaultTemplateLanguage' + description: + $ref: '#/components/schemas/waitingroomDescription' + disable_session_renewal: + $ref: '#/components/schemas/waitingroomDisableSessionRenewal' + enabled_origin_commands: + $ref: '#/components/schemas/waitingroomEnabledOriginCommands' + host: + $ref: '#/components/schemas/waitingroomHost' + id: + $ref: '#/components/schemas/waitingroomWaitingRoomId' + json_response_enabled: + $ref: '#/components/schemas/waitingroomJsonResponseEnabled' + modified_on: + $ref: '#/components/schemas/waitingroomTimestamp' + readOnly: true + name: + $ref: '#/components/schemas/waitingroomName' + new_users_per_minute: + $ref: '#/components/schemas/waitingroomNewUsersPerMinute' + next_event_prequeue_start_time: + $ref: '#/components/schemas/waitingroomNextEventPrequeueStartTime' + next_event_start_time: + $ref: '#/components/schemas/waitingroomNextEventStartTime' + path: + $ref: '#/components/schemas/waitingroomPath' + queue_all: + $ref: '#/components/schemas/waitingroomQueueAll' + queueing_method: + $ref: '#/components/schemas/waitingroomQueueingMethod' + queueing_status_code: + $ref: '#/components/schemas/waitingroomQueueingStatusCode' + session_duration: + $ref: '#/components/schemas/waitingroomSessionDuration' + suspended: + $ref: '#/components/schemas/waitingroomSuspended' + total_active_users: + $ref: '#/components/schemas/waitingroomTotalActiveUsers' + turnstile_action: + $ref: '#/components/schemas/waitingroomTurnstileAction' + turnstile_mode: + $ref: '#/components/schemas/waitingroomTurnstileMode' + enum: + - null + errors: + minLength: 1 + $ref: '#/components/schemas/waitingroomMessages' + messages: + $ref: '#/components/schemas/waitingroomMessages' + success: + description: Whether the API call was successful. + enum: + - false + type: boolean + description: Update waiting room response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update waiting room + tags: + - Waiting Room + x-api-token-group: + - Waiting Rooms Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: waiting_rooms + resource_chain: [] + method: update + /zones/{zone_id}/waiting_rooms/{waiting_room_id}/events: + get: + description: Lists events for a waiting room. + operationId: waiting-room-list-events + parameters: + - name: waiting_room_id + in: path + required: true + description: The Waiting Room ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Page number of paginated results. + in: query + name: page + schema: + default: 1 + minimum: 1 + type: number + - description: Maximum number of results per page. Must be a multiple of 5. + in: query + name: per_page + schema: + default: 25 + maximum: 1000 + minimum: 5 + type: number + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomEventResponseCollection' + description: List events response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/waitingroomMessages' + messages: + $ref: '#/components/schemas/waitingroomMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/waitingroomEventResult' + type: array + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: List events response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List events + tags: + - Waiting Room + x-api-token-group: + - Waiting Rooms Read + - Waiting Rooms Write + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: waiting_rooms + resource_chain: + - events + method: list + post: + description: Only available for the Waiting Room Advanced subscription. Creates an event for a waiting room. An event takes place during a specified period of time, temporarily changing the behavior of a waiting room. While the event is active, some of the properties in the event's configuration may either override or inherit from the waiting room's configuration. Note that events cannot overlap with each other, so only one event can be active at a time. + operationId: waiting-room-create-event + parameters: + - name: waiting_room_id + in: path + required: true + description: The Waiting Room ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomQueryEvent' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomEventResponse' + description: Create event response + 4XX: + content: + application/json: + schema: + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + properties: + result: + $ref: '#/components/schemas/unnamedSchemaRef229c159575bc68a9c21f5a1615629cf6' + errors: + minLength: 1 + $ref: '#/components/schemas/waitingroomMessages' + messages: + $ref: '#/components/schemas/waitingroomMessages' + success: + description: Whether the API call was successful. + enum: + - false + type: boolean + description: Create event response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create event + tags: + - Waiting Room + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: waiting_rooms + resource_chain: + - events + method: create + /zones/{zone_id}/waiting_rooms/{waiting_room_id}/events/{event_id}: + delete: + description: Deletes an event for a waiting room. + operationId: waiting-room-delete-event + parameters: + - name: event_id + in: path + required: true + description: The event ID. + schema: + type: string + - name: waiting_room_id + in: path + required: true + description: The Waiting Room ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomEventIdResponse' + description: Delete event response + 4XX: + content: + application/json: + schema: + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + properties: + result: + type: object + properties: + id: + $ref: '#/components/schemas/waitingroomEventId' + enum: + - null + errors: + minLength: 1 + $ref: '#/components/schemas/waitingroomMessages' + messages: + $ref: '#/components/schemas/waitingroomMessages' + success: + description: Whether the API call was successful. + enum: + - false + type: boolean + description: Delete event response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete event + tags: + - Waiting Room + x-api-token-group: + - Waiting Rooms Write + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: waiting_rooms + resource_chain: + - events + method: delete + get: + description: Fetches a single configured event for a waiting room. + operationId: waiting-room-event-details + parameters: + - name: event_id + in: path + required: true + description: The event ID. + schema: + type: string + - name: waiting_room_id + in: path + required: true + description: The Waiting Room ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomEventResponse' + description: Event details response + 4XX: + content: + application/json: + schema: + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + properties: + result: + $ref: '#/components/schemas/unnamedSchemaRef229c159575bc68a9c21f5a1615629cf6' + errors: + minLength: 1 + $ref: '#/components/schemas/waitingroomMessages' + messages: + $ref: '#/components/schemas/waitingroomMessages' + success: + description: Whether the API call was successful. + enum: + - false + type: boolean + description: Event details response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Event details + tags: + - Waiting Room + x-api-token-group: + - Waiting Rooms Read + - Waiting Rooms Write + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: waiting_rooms + resource_chain: + - events + method: get + patch: + description: Patches a configured event for a waiting room. + operationId: waiting-room-patch-event + parameters: + - name: event_id + in: path + required: true + description: The event ID. + schema: + type: string + - name: waiting_room_id + in: path + required: true + description: The Waiting Room ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomQueryEvent' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomEventResponse' + description: Patch event response + 4XX: + content: + application/json: + schema: + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + properties: + result: + $ref: '#/components/schemas/unnamedSchemaRef229c159575bc68a9c21f5a1615629cf6' + errors: + minLength: 1 + $ref: '#/components/schemas/waitingroomMessages' + messages: + $ref: '#/components/schemas/waitingroomMessages' + success: + description: Whether the API call was successful. + enum: + - false + type: boolean + description: Patch event response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Patch event + tags: + - Waiting Room + x-api-token-group: + - Waiting Rooms Write + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: waiting_rooms + resource_chain: + - events + method: edit + put: + description: Updates a configured event for a waiting room. + operationId: waiting-room-update-event + parameters: + - name: event_id + in: path + required: true + description: The event ID. + schema: + type: string + - name: waiting_room_id + in: path + required: true + description: The Waiting Room ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomQueryEvent' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomEventResponse' + description: Update event response + 4XX: + content: + application/json: + schema: + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + properties: + result: + $ref: '#/components/schemas/unnamedSchemaRef229c159575bc68a9c21f5a1615629cf6' + errors: + minLength: 1 + $ref: '#/components/schemas/waitingroomMessages' + messages: + $ref: '#/components/schemas/waitingroomMessages' + success: + description: Whether the API call was successful. + enum: + - false + type: boolean + description: Update event response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update event + tags: + - Waiting Room + x-api-token-group: + - Waiting Rooms Write + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: waiting_rooms + resource_chain: + - events + method: update + /zones/{zone_id}/waiting_rooms/{waiting_room_id}/events/{event_id}/details: + get: + description: Previews an event's configuration as if it was active. Inherited fields from the waiting room will be displayed with their current values. + operationId: waiting-room-preview-active-event-details + parameters: + - name: event_id + in: path + required: true + description: The event ID. + schema: + type: string + - name: waiting_room_id + in: path + required: true + description: The Waiting Room ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomEventDetailsResponse' + description: Preview active event details response + 4XX: + content: + application/json: + schema: + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + properties: + result: + type: object + properties: + created_on: + $ref: '#/components/schemas/waitingroomTimestamp' + readOnly: true + custom_page_html: + $ref: '#/components/schemas/waitingroomEventDetailsCustomPageHtml' + description: + $ref: '#/components/schemas/waitingroomEventDescription' + disable_session_renewal: + $ref: '#/components/schemas/waitingroomEventDetailsDisableSessionRenewal' + event_end_time: + $ref: '#/components/schemas/waitingroomEventEndTime' + event_start_time: + $ref: '#/components/schemas/waitingroomEventStartTime' + id: + $ref: '#/components/schemas/waitingroomEventId' + modified_on: + $ref: '#/components/schemas/waitingroomTimestamp' + readOnly: true + name: + $ref: '#/components/schemas/waitingroomEventName' + new_users_per_minute: + $ref: '#/components/schemas/waitingroomEventDetailsNewUsersPerMinute' + prequeue_start_time: + $ref: '#/components/schemas/waitingroomEventPrequeueStartTime' + queueing_method: + $ref: '#/components/schemas/waitingroomEventDetailsQueueingMethod' + session_duration: + $ref: '#/components/schemas/waitingroomEventDetailsSessionDuration' + shuffle_at_event_start: + $ref: '#/components/schemas/waitingroomEventShuffleAtEventStart' + suspended: + $ref: '#/components/schemas/waitingroomEventSuspended' + total_active_users: + $ref: '#/components/schemas/waitingroomEventDetailsTotalActiveUsers' + enum: + - null + errors: + minLength: 1 + $ref: '#/components/schemas/waitingroomMessages' + messages: + $ref: '#/components/schemas/waitingroomMessages' + success: + description: Whether the API call was successful. + enum: + - false + type: boolean + description: Preview active event details response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Preview active event details + tags: + - Waiting Room + x-api-token-group: + - Waiting Rooms Read + - Waiting Rooms Write + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: waiting_rooms + resource_chain: + - events + - details + method: get + /zones/{zone_id}/waiting_rooms/{waiting_room_id}/rules: + get: + description: Lists rules for a waiting room. + operationId: waiting-room-list-waiting-room-rules + parameters: + - name: waiting_room_id + in: path + required: true + description: The Waiting Room ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomRulesResponseCollection' + description: List Waiting Room Rules response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/waitingroomMessages' + messages: + $ref: '#/components/schemas/waitingroomMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + $ref: '#/components/schemas/unnamedSchemaRefF1c0ba8f44601f2db2e07b9397b6c430' + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: List Waiting Room Rules response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Waiting Room Rules + tags: + - Waiting Room + x-api-token-group: + - Waiting Rooms Read + - Waiting Rooms Write + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: waiting_rooms + resource_chain: + - rules + method: create + post: + description: Only available for the Waiting Room Advanced subscription. Creates a rule for a waiting room. + operationId: waiting-room-create-waiting-room-rule + parameters: + - name: waiting_room_id + in: path + required: true + description: The Waiting Room ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomCreateRule' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomRulesResponseCollection' + description: Create Waiting Room Rule response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/waitingroomMessages' + messages: + $ref: '#/components/schemas/waitingroomMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + $ref: '#/components/schemas/unnamedSchemaRefF1c0ba8f44601f2db2e07b9397b6c430' + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Create Waiting Room Rule response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Waiting Room Rule + tags: + - Waiting Room + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + put: + description: Only available for the Waiting Room Advanced subscription. Replaces all rules for a waiting room. + operationId: waiting-room-replace-waiting-room-rules + parameters: + - name: waiting_room_id + in: path + required: true + description: The Waiting Room ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomUpdateRules' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomRulesResponseCollection' + description: Replace Waiting Room Rules response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/waitingroomMessages' + messages: + $ref: '#/components/schemas/waitingroomMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + $ref: '#/components/schemas/unnamedSchemaRefF1c0ba8f44601f2db2e07b9397b6c430' + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Replace Waiting Room Rules response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Replace Waiting Room Rules + tags: + - Waiting Room + x-api-token-group: + - Waiting Rooms Write + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + /zones/{zone_id}/waiting_rooms/{waiting_room_id}/rules/{rule_id}: + delete: + description: Deletes a rule for a waiting room. + operationId: waiting-room-delete-waiting-room-rule + parameters: + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + - name: waiting_room_id + in: path + required: true + description: The Waiting Room ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomRulesResponseCollection' + description: Delete Waiting Room Rule response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/waitingroomMessages' + messages: + $ref: '#/components/schemas/waitingroomMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + $ref: '#/components/schemas/unnamedSchemaRefF1c0ba8f44601f2db2e07b9397b6c430' + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Delete Waiting Room Rule response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Waiting Room Rule + tags: + - Waiting Room + x-api-token-group: + - Waiting Rooms Write + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + patch: + description: Patches a rule for a waiting room. + operationId: waiting-room-patch-waiting-room-rule + parameters: + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + - name: waiting_room_id + in: path + required: true + description: The Waiting Room ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomPatchRule' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomRulesResponseCollection' + description: Patch Waiting Room Rule response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/waitingroomMessages' + messages: + $ref: '#/components/schemas/waitingroomMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + $ref: '#/components/schemas/unnamedSchemaRefF1c0ba8f44601f2db2e07b9397b6c430' + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Patch Waiting Room Rule response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Patch Waiting Room Rule + tags: + - Waiting Room + x-api-token-group: + - Waiting Rooms Write + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + /zones/{zone_id}/waiting_rooms/{waiting_room_id}/status: + get: + description: 'Fetches the status of a configured waiting room. Response fields include: 1. `status`: String indicating the status of the waiting room. The possible status are: - **not_queueing** indicates that the configured thresholds have not been met and all users are going through to the origin. - **queueing** indicates that the thresholds have been met and some users are held in the waiting room. - **event_prequeueing** indicates that an event is active and is currently prequeueing users before it starts. - **suspended** indicates that the room is suspended. 2. `event_id`: String of the current event''s `id` if an event is active, otherwise an empty string. 3. `estimated_queued_users`: Integer of the estimated number of users currently waiting in the queue. 4. `estimated_total_active_users`: Integer of the estimated number of users currently active on the origin. 5. `max_estimated_time_minutes`: Integer of the maximum estimated time currently presented to the users.' + operationId: waiting-room-get-waiting-room-status + parameters: + - name: waiting_room_id + in: path + required: true + description: The Waiting Room ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomStatusResponse' + description: Get waiting room status response + 4XX: + content: + application/json: + schema: + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + properties: + result: + type: object + properties: + estimated_queued_users: + $ref: '#/components/schemas/waitingroomEstimatedQueuedUsers' + estimated_total_active_users: + $ref: '#/components/schemas/waitingroomEstimatedTotalActiveUsers' + event_id: + $ref: '#/components/schemas/waitingroomStatusEventId' + max_estimated_time_minutes: + $ref: '#/components/schemas/waitingroomMaxEstimatedTimeMinutes' + status: + $ref: '#/components/schemas/waitingroomStatus' + enum: + - null + errors: + minLength: 1 + $ref: '#/components/schemas/waitingroomMessages' + messages: + $ref: '#/components/schemas/waitingroomMessages' + success: + description: Whether the API call was successful. + enum: + - false + type: boolean + description: Get waiting room status response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get waiting room status + tags: + - Waiting Room + x-api-token-group: + - Waiting Rooms Read + - Waiting Rooms Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: waiting_rooms + resource_chain: + - statuses + method: get + /accounts/{account_id}/waiting_rooms: + get: + description: Lists waiting rooms for account or zone. + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - description: Page number of paginated results. + in: query + name: page + schema: + default: 1 + minimum: 1 + type: number + - description: Maximum number of results per page. Must be a multiple of 5. + in: query + name: per_page + schema: + default: 25 + maximum: 1000 + minimum: 5 + type: number + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/waitingroomResponseCollection' + description: List waiting rooms for account or zone response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/waitingroomMessages' + messages: + $ref: '#/components/schemas/waitingroomMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + total_pages: + description: The number of total pages in the entire result set. + type: number + type: object + result: + items: + $ref: '#/components/schemas/waitingroomWaitingroom' + type: array + enum: + - null + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: List waiting rooms for account or zone response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List waiting rooms for account or zone + tags: [] + x-api-token-group: + - Account Waiting Rooms Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: waiting_rooms + resource_chain: [] + method: list + operationId: get_accounts_account_id_waiting_rooms +components: + schemas: + unnamedSchemaRef229c159575bc68a9c21f5a1615629cf6: + type: object + properties: + created_on: + $ref: '#/components/schemas/waitingroomTimestamp' + readOnly: true + custom_page_html: + $ref: '#/components/schemas/waitingroomEventCustomPageHtml' + description: + $ref: '#/components/schemas/waitingroomEventDescription' + disable_session_renewal: + $ref: '#/components/schemas/waitingroomEventDisableSessionRenewal' + event_end_time: + $ref: '#/components/schemas/waitingroomEventEndTime' + event_start_time: + $ref: '#/components/schemas/waitingroomEventStartTime' + id: + $ref: '#/components/schemas/waitingroomEventId' + modified_on: + $ref: '#/components/schemas/waitingroomTimestamp' + readOnly: true + name: + $ref: '#/components/schemas/waitingroomEventName' + new_users_per_minute: + $ref: '#/components/schemas/waitingroomEventNewUsersPerMinute' + prequeue_start_time: + $ref: '#/components/schemas/waitingroomEventPrequeueStartTime' + queueing_method: + $ref: '#/components/schemas/waitingroomEventQueueingMethod' + session_duration: + $ref: '#/components/schemas/waitingroomEventSessionDuration' + shuffle_at_event_start: + $ref: '#/components/schemas/waitingroomEventShuffleAtEventStart' + suspended: + $ref: '#/components/schemas/waitingroomEventSuspended' + total_active_users: + $ref: '#/components/schemas/waitingroomEventTotalActiveUsers' + turnstile_action: + $ref: '#/components/schemas/waitingroomEventTurnstileAction' + turnstile_mode: + $ref: '#/components/schemas/waitingroomEventTurnstileMode' + enum: + - null + unnamedSchemaRefF1c0ba8f44601f2db2e07b9397b6c430: + items: + $ref: '#/components/schemas/waitingroomRuleResult' + type: array + enum: + - null + waitingRoomSetting: + type: object + properties: + search_engine_crawler_bypass: + $ref: '#/components/schemas/waitingroomSearchEngineCrawlerBypass' + required: + - search_engine_crawler_bypass + enum: + - null + waitingroomAdditionalRoutes: + description: Only available for the Waiting Room Advanced subscription. Additional hostname and path combinations to which this waiting room will be applied. There is an implied wildcard at the end of the path. The hostname and path combination must be unique to this and all other waiting rooms. + items: + properties: + host: + description: The hostname to which this waiting room will be applied (no wildcards). The hostname must be the primary domain, subdomain, or custom hostname (if using SSL for SaaS) of this zone. Please do not include the scheme (http:// or https://). + example: shop2.example.com + type: string + x-auditable: true + path: + default: / + description: Sets the path within the host to enable the waiting room on. The waiting room will be enabled for all subpaths as well. If there are two waiting rooms on the same subpath, the waiting room for the most specific path will be chosen. Wildcards and query parameters are not supported. + example: /shop2/checkout + type: string + x-auditable: true + type: object + type: array + waitingroomCookieAttributes: + description: Configures cookie attributes for the waiting room cookie. This encrypted cookie stores a user's status in the waiting room, such as queue position. + properties: + samesite: + default: auto + description: Configures the SameSite attribute on the waiting room cookie. Value `auto` will be translated to `lax` or `none` depending if **Always Use HTTPS** is enabled. Note that when using value `none`, the secure attribute cannot be set to `never`. + enum: + - auto + - lax + - none + - strict + example: auto + type: string + x-auditable: true + secure: + default: auto + description: Configures the Secure attribute on the waiting room cookie. Value `always` indicates that the Secure attribute will be set in the Set-Cookie header, `never` indicates that the Secure attribute will not be set, and `auto` will set the Secure attribute depending if **Always Use HTTPS** is enabled. + enum: + - auto + - always + - never + example: auto + type: string + x-auditable: true + type: object + waitingroomCookieSuffix: + default: '' + description: Appends a '_' + a custom suffix to the end of Cloudflare Waiting Room's cookie name(__cf_waitingroom). If `cookie_suffix` is "abcd", the cookie name will be `__cf_waitingroom_abcd`. This field is required if using `additional_routes`. + example: abcd + type: string + x-auditable: true + waitingroomCreateRule: + properties: + action: + $ref: '#/components/schemas/waitingroomRuleAction' + description: + $ref: '#/components/schemas/waitingroomRuleDescription' + enabled: + $ref: '#/components/schemas/waitingroomRuleEnabled' + expression: + $ref: '#/components/schemas/waitingroomRuleExpression' + required: + - action + - expression + type: object + waitingroomCustomPageHtml: + default: '' + description: 'Only available for the Waiting Room Advanced subscription. This is a template html file that will be rendered at the edge. If no custom_page_html is provided, the default waiting room will be used. The template is based on mustache ( https://mustache.github.io/ ). There are several variables that are evaluated by the Cloudflare edge: 1. {{`waitTimeKnown`}} Acts like a boolean value that indicates the behavior to take when wait time is not available, for instance when queue_all is **true**. 2. {{`waitTimeFormatted`}} Estimated wait time for the user. For example, five minutes. Alternatively, you can use: 3. {{`waitTime`}} Number of minutes of estimated wait for a user. 4. {{`waitTimeHours`}} Number of hours of estimated wait for a user (`Math.floor(waitTime/60)`). 5. {{`waitTimeHourMinutes`}} Number of minutes above the `waitTimeHours` value (`waitTime%60`). 6. {{`queueIsFull`}} Changes to **true** when no more people can be added to the queue. To view the full list of + variables, look at the `cfWaitingRoom` object described under the `json_response_enabled` property in other Waiting Room API calls.' + example: '{{#waitTimeKnown}} {{waitTime}} mins {{/waitTimeKnown}} {{^waitTimeKnown}} Queue all enabled {{/waitTimeKnown}}' + type: string + x-auditable: true + waitingroomDefaultTemplateLanguage: + default: en-US + description: The language of the default page template. If no default_template_language is provided, then `en-US` (English) will be used. + enum: + - en-US + - es-ES + - de-DE + - fr-FR + - it-IT + - ja-JP + - ko-KR + - pt-BR + - zh-CN + - zh-TW + - nl-NL + - pl-PL + - id-ID + - tr-TR + - ar-EG + - ru-RU + - fa-IR + - bg-BG + - hr-HR + - cs-CZ + - da-DK + - fi-FI + - lt-LT + - ms-MY + - nb-NO + - ro-RO + - el-GR + - he-IL + - hi-IN + - hu-HU + - sr-BA + - sk-SK + - sl-SI + - sv-SE + - tl-PH + - th-TH + - uk-UA + - vi-VN + example: es-ES + type: string + x-auditable: true + waitingroomDescription: + default: '' + description: A note that you can use to add more details about the waiting room. + example: Production - DO NOT MODIFY + type: string + x-auditable: true + waitingroomDisableSessionRenewal: + default: false + description: Only available for the Waiting Room Advanced subscription. Disables automatic renewal of session cookies. If `true`, an accepted user will have session_duration minutes to browse the site. After that, they will have to go through the waiting room again. If `false`, a user's session cookie will be automatically renewed on every request. + example: false + type: boolean + x-auditable: true + waitingroomEnabledOriginCommands: + default: [] + description: A list of enabled origin commands. + items: + enum: + - revoke + type: string + uniqueItems: true + x-auditable: true + type: array + waitingroomEstimatedQueuedUsers: + type: integer + x-auditable: true + waitingroomEstimatedTotalActiveUsers: + type: integer + x-auditable: true + waitingroomEventCustomPageHtml: + description: If set, the event will override the waiting room's `custom_page_html` property while it is active. If null, the event will inherit it. + example: '{{#waitTimeKnown}} {{waitTime}} mins {{/waitTimeKnown}} {{^waitTimeKnown}} Event is prequeueing / Queue all enabled {{/waitTimeKnown}}' + nullable: true + type: string + x-auditable: true + waitingroomEventDescription: + default: '' + description: A note that you can use to add more details about the event. + example: Production event - DO NOT MODIFY + type: string + x-auditable: true + waitingroomEventDetailsCustomPageHtml: + example: '{{#waitTimeKnown}} {{waitTime}} mins {{/waitTimeKnown}} {{^waitTimeKnown}} Event is prequeueing / Queue all enabled {{/waitTimeKnown}}' + type: string + x-auditable: true + waitingroomEventDetailsDisableSessionRenewal: + example: false + type: boolean + x-auditable: true + waitingroomEventDetailsNewUsersPerMinute: + type: integer + x-auditable: true + waitingroomEventDetailsQueueingMethod: + example: random + type: string + x-auditable: true + waitingroomEventDetailsResponse: + type: object + required: + - success + - errors + - messages + - result + properties: + result: + type: object + $ref: '#/components/schemas/waitingroomEventDetailsResult' + waitingroomEventDetailsResult: + properties: + created_on: + $ref: '#/components/schemas/waitingroomTimestamp' + readOnly: true + custom_page_html: + $ref: '#/components/schemas/waitingroomEventDetailsCustomPageHtml' + description: + $ref: '#/components/schemas/waitingroomEventDescription' + disable_session_renewal: + $ref: '#/components/schemas/waitingroomEventDetailsDisableSessionRenewal' + event_end_time: + $ref: '#/components/schemas/waitingroomEventEndTime' + event_start_time: + $ref: '#/components/schemas/waitingroomEventStartTime' + id: + $ref: '#/components/schemas/waitingroomEventId' + modified_on: + $ref: '#/components/schemas/waitingroomTimestamp' + readOnly: true + name: + $ref: '#/components/schemas/waitingroomEventName' + new_users_per_minute: + $ref: '#/components/schemas/waitingroomEventDetailsNewUsersPerMinute' + prequeue_start_time: + $ref: '#/components/schemas/waitingroomEventPrequeueStartTime' + queueing_method: + $ref: '#/components/schemas/waitingroomEventDetailsQueueingMethod' + session_duration: + $ref: '#/components/schemas/waitingroomEventDetailsSessionDuration' + shuffle_at_event_start: + $ref: '#/components/schemas/waitingroomEventShuffleAtEventStart' + suspended: + $ref: '#/components/schemas/waitingroomEventSuspended' + total_active_users: + $ref: '#/components/schemas/waitingroomEventDetailsTotalActiveUsers' + type: object + waitingroomEventDetailsSessionDuration: + type: integer + x-auditable: true + waitingroomEventDetailsTotalActiveUsers: + type: integer + x-auditable: true + waitingroomEventDisableSessionRenewal: + description: If set, the event will override the waiting room's `disable_session_renewal` property while it is active. If null, the event will inherit it. + nullable: true + type: boolean + x-auditable: true + waitingroomEventEndTime: + description: An ISO 8601 timestamp that marks the end of the event. + example: '2021-09-28T17:00:00.000Z' + type: string + x-auditable: true + waitingroomEventId: + example: 25756b2dfe6e378a06b033b670413757 + type: string + x-auditable: true + waitingroomEventIdResponse: + type: object + required: + - success + - errors + - messages + - result + properties: + result: + type: object + properties: + id: + $ref: '#/components/schemas/waitingroomEventId' + waitingroomEventName: + description: A unique name to identify the event. Only alphanumeric characters, hyphens and underscores are allowed. + example: production_webinar_event + type: string + x-auditable: true + waitingroomEventNewUsersPerMinute: + description: If set, the event will override the waiting room's `new_users_per_minute` property while it is active. If null, the event will inherit it. This can only be set if the event's `total_active_users` property is also set. + maximum: 2147483647 + minimum: 200 + nullable: true + type: integer + x-auditable: true + waitingroomEventPrequeueStartTime: + description: An ISO 8601 timestamp that marks when to begin queueing all users before the event starts. The prequeue must start at least five minutes before `event_start_time`. + example: '2021-09-28T15:00:00.000Z' + nullable: true + type: string + x-auditable: true + waitingroomEventQueueingMethod: + description: If set, the event will override the waiting room's `queueing_method` property while it is active. If null, the event will inherit it. + example: random + nullable: true + type: string + x-auditable: true + waitingroomEventResponse: + type: object + required: + - success + - errors + - messages + - result + properties: + result: + type: object + $ref: '#/components/schemas/waitingroomEventResult' + waitingroomEventResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/waitingroomMessages' + messages: + $ref: '#/components/schemas/waitingroomMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 2000 + type: number + total_pages: + description: The number of total pages in the entire result set. + example: 100 + type: number + type: object + result: + items: + $ref: '#/components/schemas/waitingroomEventResult' + type: array + required: + - success + - errors + - messages + waitingroomEventResult: + properties: + created_on: + $ref: '#/components/schemas/waitingroomTimestamp' + readOnly: true + custom_page_html: + $ref: '#/components/schemas/waitingroomEventCustomPageHtml' + description: + $ref: '#/components/schemas/waitingroomEventDescription' + disable_session_renewal: + $ref: '#/components/schemas/waitingroomEventDisableSessionRenewal' + event_end_time: + $ref: '#/components/schemas/waitingroomEventEndTime' + event_start_time: + $ref: '#/components/schemas/waitingroomEventStartTime' + id: + $ref: '#/components/schemas/waitingroomEventId' + modified_on: + $ref: '#/components/schemas/waitingroomTimestamp' + readOnly: true + name: + $ref: '#/components/schemas/waitingroomEventName' + new_users_per_minute: + $ref: '#/components/schemas/waitingroomEventNewUsersPerMinute' + prequeue_start_time: + $ref: '#/components/schemas/waitingroomEventPrequeueStartTime' + queueing_method: + $ref: '#/components/schemas/waitingroomEventQueueingMethod' + session_duration: + $ref: '#/components/schemas/waitingroomEventSessionDuration' + shuffle_at_event_start: + $ref: '#/components/schemas/waitingroomEventShuffleAtEventStart' + suspended: + $ref: '#/components/schemas/waitingroomEventSuspended' + total_active_users: + $ref: '#/components/schemas/waitingroomEventTotalActiveUsers' + turnstile_action: + $ref: '#/components/schemas/waitingroomEventTurnstileAction' + turnstile_mode: + $ref: '#/components/schemas/waitingroomEventTurnstileMode' + type: object + waitingroomEventSessionDuration: + description: If set, the event will override the waiting room's `session_duration` property while it is active. If null, the event will inherit it. + maximum: 30 + minimum: 1 + nullable: true + type: integer + x-auditable: true + waitingroomEventShuffleAtEventStart: + default: false + description: If enabled, users in the prequeue will be shuffled randomly at the `event_start_time`. Requires that `prequeue_start_time` is not null. This is useful for situations when many users will join the event prequeue at the same time and you want to shuffle them to ensure fairness. Naturally, it makes the most sense to enable this feature when the `queueing_method` during the event respects ordering such as **fifo**, or else the shuffling may be unnecessary. + type: boolean + x-auditable: true + waitingroomEventStartTime: + description: An ISO 8601 timestamp that marks the start of the event. At this time, queued users will be processed with the event's configuration. The start time must be at least one minute before `event_end_time`. + example: '2021-09-28T15:30:00.000Z' + type: string + x-auditable: true + waitingroomEventSuspended: + default: false + description: Suspends or allows an event. If set to `true`, the event is ignored and traffic will be handled based on the waiting room configuration. + type: boolean + x-auditable: true + waitingroomEventTotalActiveUsers: + description: If set, the event will override the waiting room's `total_active_users` property while it is active. If null, the event will inherit it. This can only be set if the event's `new_users_per_minute` property is also set. + maximum: 2147483647 + minimum: 200 + nullable: true + type: integer + x-auditable: true + waitingroomEventTurnstileAction: + description: If set, the event will override the waiting room's `turnstile_action` property while it is active. If null, the event will inherit it. + enum: + - log + - infinite_queue + nullable: true + type: string + x-auditable: true + waitingroomEventTurnstileMode: + description: If set, the event will override the waiting room's `turnstile_mode` property while it is active. If null, the event will inherit it. + enum: + - 'off' + - invisible + - visible_non_interactive + - visible_managed + nullable: true + type: string + x-auditable: true + waitingroomHost: + description: The host name to which the waiting room will be applied (no wildcards). Please do not include the scheme (http:// or https://). The host and path combination must be unique. + example: shop.example.com + type: string + x-auditable: true + waitingroomJsonResponseEnabled: + default: false + description: "Only available for the Waiting Room Advanced subscription. If `true`, requests to the waiting room with the header `Accept: application/json` will receive a JSON response object with information on the user's status in the waiting room as opposed to the configured static HTML page. This JSON response object has one property `cfWaitingRoom` which is an object containing the following fields: 1. `inWaitingRoom`: Boolean indicating if the user is in the waiting room (always **true**). 2. `waitTimeKnown`: Boolean indicating if the current estimated wait times are accurate. If **false**, they are not available. 3. `waitTime`: Valid only when `waitTimeKnown` is **true**. Integer indicating the current estimated time in minutes the user will wait in the waiting room. When `queueingMethod` is **random**, this is set to `waitTime50Percentile`. 4. `waitTime25Percentile`: Valid only when `queueingMethod` is **random** and `waitTimeKnown` is **true**. Integer indicating the current\ + \ estimated maximum wait time for the 25% of users that gain entry the fastest (25th percentile). 5. `waitTime50Percentile`: Valid only when `queueingMethod` is **random** and `waitTimeKnown` is **true**. Integer indicating the current estimated maximum wait time for the 50% of users that gain entry the fastest (50th percentile). In other words, half of the queued users are expected to let into the origin website before `waitTime50Percentile` and half are expected to be let in after it. 6. `waitTime75Percentile`: Valid only when `queueingMethod` is **random** and `waitTimeKnown` is **true**. Integer indicating the current estimated maximum wait time for the 75% of users that gain entry the fastest (75th percentile). 7. `waitTimeFormatted`: String displaying the `waitTime` formatted in English for users. If `waitTimeKnown` is **false**, `waitTimeFormatted` will display **unavailable**. 8. `queueIsFull`: Boolean indicating if the waiting room's queue is currently full and not accepting\ + \ new users at the moment. 9. `queueAll`: Boolean indicating if all users will be queued in the waiting room and no one will be let into the origin website. 10. `lastUpdated`: String displaying the timestamp as an ISO 8601 string of the user's last attempt to leave the waiting room and be let into the origin website. The user is able to make another attempt after `refreshIntervalSeconds` past this time. If the user makes a request too soon, it will be ignored and `lastUpdated` will not change. 11. `refreshIntervalSeconds`: Integer indicating the number of seconds after `lastUpdated` until the user is able to make another attempt to leave the waiting room and be let into the origin website. When the `queueingMethod` is `reject`, there is no specified refresh time \u2014\\_it will always be **zero**. 12. `queueingMethod`: The queueing method currently used by the waiting room. It is either **fifo**, **random**, **passthrough**, or **reject**. 13. `isFIFOQueue`: Boolean indicating if\ + \ the waiting room uses a FIFO (First-In-First-Out) queue. 14. `isRandomQueue`: Boolean indicating if the waiting room uses a Random queue where users gain access randomly. 15. `isPassthroughQueue`: Boolean indicating if the waiting room uses a passthrough queue. Keep in mind that when passthrough is enabled, this JSON response will only exist when `queueAll` is **true** or `isEventPrequeueing` is **true** because in all other cases requests will go directly to the origin. 16. `isRejectQueue`: Boolean indicating if the waiting room uses a reject queue. 17. `isEventActive`: Boolean indicating if an event is currently occurring. Events are able to change a waiting room's behavior during a specified period of time. For additional information, look at the event properties `prequeue_start_time`, `event_start_time`, and `event_end_time` in the documentation for creating waiting room events. Events are considered active between these start and end times, as well as during the prequeueing\ + \ period if it exists. 18. `isEventPrequeueing`: Valid only when `isEventActive` is **true**. Boolean indicating if an event is currently prequeueing users before it starts. 19. `timeUntilEventStart`: Valid only when `isEventPrequeueing` is **true**. Integer indicating the number of minutes until the event starts. 20. `timeUntilEventStartFormatted`: String displaying the `timeUntilEventStart` formatted in English for users. If `isEventPrequeueing` is **false**, `timeUntilEventStartFormatted` will display **unavailable**. 21. `timeUntilEventEnd`: Valid only when `isEventActive` is **true**. Integer indicating the number of minutes until the event ends. 22. `timeUntilEventEndFormatted`: String displaying the `timeUntilEventEnd` formatted in English for users. If `isEventActive` is **false**, `timeUntilEventEndFormatted` will display **unavailable**. 23. `shuffleAtEventStart`: Valid only when `isEventActive` is **true**. Boolean indicating if the users in the prequeue are shuffled randomly\ + \ when the event starts. 24. `turnstile`: Empty when turnstile isn't enabled. String displaying an html tag to display the Turnstile widget. Please add the `{{{turnstile}}}` tag to the `custom_html` template to ensure the Turnstile widget appears. 25. `infiniteQueue`: Boolean indicating whether the response is for a user in the infinite queue. An example cURL to a waiting room could be: curl -X GET \"https://example.com/waitingroom\" \\ -H \"Accept: application/json\" If `json_response_enabled` is **true** and the request hits the waiting room, an example JSON response when `queueingMethod` is **fifo** and no event is active could be: { \"cfWaitingRoom\": { \"inWaitingRoom\": true, \"waitTimeKnown\": true, \"waitTime\": 10, \"waitTime25Percentile\": 0, \"waitTime50Percentile\": 0, \"waitTime75Percentile\": 0, \"waitTimeFormatted\": \"10 minutes\", \"queueIsFull\": false, \"queueAll\": false, \"lastUpdated\": \"2020-08-03T23:46:00.000Z\", \"refreshIntervalSeconds\": 20, \"queueingMethod\"\ + : \"fifo\", \"isFIFOQueue\": true, \"isRandomQueue\": false, \"isPassthroughQueue\": false, \"isRejectQueue\": false, \"isEventActive\": false, \"isEventPrequeueing\": false, \"timeUntilEventStart\": 0, \"timeUntilEventStartFormatted\": \"unavailable\", \"timeUntilEventEnd\": 0, \"timeUntilEventEndFormatted\": \"unavailable\", \"shuffleAtEventStart\": false } } If `json_response_enabled` is **true** and the request hits the waiting room, an example JSON response when `queueingMethod` is **random** and an event is active could be: { \"cfWaitingRoom\": { \"inWaitingRoom\": true, \"waitTimeKnown\": true, \"waitTime\": 10, \"waitTime25Percentile\": 5, \"waitTime50Percentile\": 10, \"waitTime75Percentile\": 15, \"waitTimeFormatted\": \"5 minutes to 15 minutes\", \"queueIsFull\": false, \"queueAll\": false, \"lastUpdated\": \"2020-08-03T23:46:00.000Z\", \"refreshIntervalSeconds\": 20, \"queueingMethod\": \"random\", \"isFIFOQueue\": false, \"isRandomQueue\": true, \"isPassthroughQueue\"\ + : false, \"isRejectQueue\": false, \"isEventActive\": true, \"isEventPrequeueing\": false, \"timeUntilEventStart\": 0, \"timeUntilEventStartFormatted\": \"unavailable\", \"timeUntilEventEnd\": 15, \"timeUntilEventEndFormatted\": \"15 minutes\", \"shuffleAtEventStart\": true } }" + example: false + type: boolean + x-auditable: true + waitingroomMaxEstimatedTimeMinutes: + type: integer + x-auditable: true + waitingroomMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + waitingroomName: + description: A unique name to identify the waiting room. Only alphanumeric characters, hyphens and underscores are allowed. + example: production_webinar + type: string + x-auditable: true + waitingroomNewUsersPerMinute: + description: Sets the number of new users that will be let into the route every minute. This value is used as baseline for the number of users that are let in per minute. So it is possible that there is a little more or little less traffic coming to the route based on the traffic patterns at that time around the world. + maximum: 2147483647 + minimum: 200 + type: integer + x-auditable: true + waitingroomNextEventPrequeueStartTime: + description: An ISO 8601 timestamp that marks when the next event will begin queueing. + example: '2021-09-28T15:00:00.000Z' + nullable: true + type: string + x-auditable: true + waitingroomNextEventStartTime: + description: An ISO 8601 timestamp that marks when the next event will start. + example: '2021-09-28T15:00:00.000Z' + nullable: true + type: string + x-auditable: true + waitingroomPatchRule: + properties: + action: + $ref: '#/components/schemas/waitingroomRuleAction' + description: + $ref: '#/components/schemas/waitingroomRuleDescription' + enabled: + $ref: '#/components/schemas/waitingroomRuleEnabled' + expression: + $ref: '#/components/schemas/waitingroomRuleExpression' + position: + $ref: '#/components/schemas/waitingroomRulePosition' + required: + - action + - expression + type: object + waitingroomPath: + default: / + description: Sets the path within the host to enable the waiting room on. The waiting room will be enabled for all subpaths as well. If there are two waiting rooms on the same subpath, the waiting room for the most specific path will be chosen. Wildcards and query parameters are not supported. + example: /shop/checkout + type: string + x-auditable: true + waitingroomPreviewResponse: + type: object + required: + - success + - errors + - messages + - result + properties: + result: + type: object + properties: + preview_url: + $ref: '#/components/schemas/waitingroomPreviewUrl' + waitingroomPreviewUrl: + description: URL where the custom waiting room page can temporarily be previewed. + example: http://waitingrooms.dev/preview/35af8c12-6d68-4608-babb-b53435a5ddfb + type: string + x-auditable: true + waitingroomQueryEvent: + properties: + custom_page_html: + $ref: '#/components/schemas/waitingroomEventCustomPageHtml' + description: + $ref: '#/components/schemas/waitingroomEventDescription' + disable_session_renewal: + $ref: '#/components/schemas/waitingroomEventDisableSessionRenewal' + event_end_time: + $ref: '#/components/schemas/waitingroomEventEndTime' + event_start_time: + $ref: '#/components/schemas/waitingroomEventStartTime' + name: + $ref: '#/components/schemas/waitingroomEventName' + new_users_per_minute: + $ref: '#/components/schemas/waitingroomEventNewUsersPerMinute' + prequeue_start_time: + $ref: '#/components/schemas/waitingroomEventPrequeueStartTime' + queueing_method: + $ref: '#/components/schemas/waitingroomEventQueueingMethod' + session_duration: + $ref: '#/components/schemas/waitingroomEventSessionDuration' + shuffle_at_event_start: + $ref: '#/components/schemas/waitingroomEventShuffleAtEventStart' + suspended: + $ref: '#/components/schemas/waitingroomEventSuspended' + total_active_users: + $ref: '#/components/schemas/waitingroomEventTotalActiveUsers' + turnstile_action: + $ref: '#/components/schemas/waitingroomEventTurnstileAction' + turnstile_mode: + $ref: '#/components/schemas/waitingroomEventTurnstileMode' + required: + - name + - event_start_time + - event_end_time + type: object + waitingroomQueryPreview: + properties: + custom_html: + $ref: '#/components/schemas/waitingroomCustomPageHtml' + required: + - custom_html + type: object + waitingroomQueryWaitingroom: + properties: + additional_routes: + $ref: '#/components/schemas/waitingroomAdditionalRoutes' + cookie_attributes: + $ref: '#/components/schemas/waitingroomCookieAttributes' + cookie_suffix: + $ref: '#/components/schemas/waitingroomCookieSuffix' + custom_page_html: + $ref: '#/components/schemas/waitingroomCustomPageHtml' + default_template_language: + $ref: '#/components/schemas/waitingroomDefaultTemplateLanguage' + description: + $ref: '#/components/schemas/waitingroomDescription' + disable_session_renewal: + $ref: '#/components/schemas/waitingroomDisableSessionRenewal' + enabled_origin_commands: + $ref: '#/components/schemas/waitingroomEnabledOriginCommands' + host: + $ref: '#/components/schemas/waitingroomHost' + json_response_enabled: + $ref: '#/components/schemas/waitingroomJsonResponseEnabled' + name: + $ref: '#/components/schemas/waitingroomName' + new_users_per_minute: + $ref: '#/components/schemas/waitingroomNewUsersPerMinute' + path: + $ref: '#/components/schemas/waitingroomPath' + queue_all: + $ref: '#/components/schemas/waitingroomQueueAll' + queueing_method: + $ref: '#/components/schemas/waitingroomQueueingMethod' + queueing_status_code: + $ref: '#/components/schemas/waitingroomQueueingStatusCode' + session_duration: + $ref: '#/components/schemas/waitingroomSessionDuration' + suspended: + $ref: '#/components/schemas/waitingroomSuspended' + total_active_users: + $ref: '#/components/schemas/waitingroomTotalActiveUsers' + turnstile_action: + $ref: '#/components/schemas/waitingroomTurnstileAction' + turnstile_mode: + $ref: '#/components/schemas/waitingroomTurnstileMode' + required: + - name + - host + - new_users_per_minute + - total_active_users + type: object + waitingroomQueueAll: + default: false + description: If queue_all is `true`, all the traffic that is coming to a route will be sent to the waiting room. No new traffic can get to the route once this field is set and estimated time will become unavailable. + example: true + type: boolean + x-auditable: true + waitingroomQueueingMethod: + default: fifo + description: 'Sets the queueing method used by the waiting room. Changing this parameter from the **default** queueing method is only available for the Waiting Room Advanced subscription. Regardless of the queueing method, if `queue_all` is enabled or an event is prequeueing, users in the waiting room will not be accepted to the origin. These users will always see a waiting room page that refreshes automatically. The valid queueing methods are: 1. `fifo` **(default)**: First-In-First-Out queue where customers gain access in the order they arrived. 2. `random`: Random queue where customers gain access randomly, regardless of arrival time. 3. `passthrough`: Users will pass directly through the waiting room and into the origin website. As a result, any configured limits will not be respected while this is enabled. This method can be used as an alternative to disabling a waiting room (with `suspended`) so that analytics are still reported. This can be used if you wish to allow all traffic + normally, but want to restrict traffic during a waiting room event, or vice versa. 4. `reject`: Users will be immediately rejected from the waiting room. As a result, no users will reach the origin website while this is enabled. This can be used if you wish to reject all traffic while performing maintenance, block traffic during a specified period of time (an event), or block traffic while events are not occurring. Consider a waiting room used for vaccine distribution that only allows traffic during sign-up events, and otherwise blocks all traffic. For this case, the waiting room uses `reject`, and its events override this with `fifo`, `random`, or `passthrough`. When this queueing method is enabled and neither `queueAll` is enabled nor an event is prequeueing, the waiting room page **will not refresh automatically**.' + enum: + - fifo + - random + - passthrough + - reject + example: fifo + type: string + x-auditable: true + waitingroomQueueingStatusCode: + default: 200 + description: HTTP status code returned to a user while in the queue. + enum: + - 200 + - 202 + - 429 + example: 202 + type: integer + x-auditable: true + waitingroomResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/waitingroomMessages' + messages: + $ref: '#/components/schemas/waitingroomMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 2000 + type: number + total_pages: + description: The number of total pages in the entire result set. + example: 100 + type: number + type: object + result: + items: + $ref: '#/components/schemas/waitingroomWaitingroom' + type: array + required: + - success + - errors + - messages + waitingroomRuleAction: + description: The action to take when the expression matches. + enum: + - bypass_waiting_room + example: bypass_waiting_room + type: string + x-auditable: true + waitingroomRuleDescription: + default: '' + description: The description of the rule. + example: allow all traffic from 10.20.30.40 + type: string + x-auditable: true + waitingroomRuleEnabled: + default: true + description: When set to true, the rule is enabled. + example: true + type: boolean + x-auditable: true + waitingroomRuleExpression: + description: Criteria defining when there is a match for the current rule. + example: ip.src in {10.20.30.40} + type: string + x-auditable: true + waitingroomRuleId: + description: The ID of the rule. + example: 25756b2dfe6e378a06b033b670413757 + type: string + x-auditable: true + waitingroomRulePosition: + description: Reorder the position of a rule + type: object + properties: + index: + description: Places the rule in the exact position specified by the integer number . Position numbers start with 1. Existing rules in the ruleset from the specified position number onward are shifted one position (no rule is overwritten). + type: integer + x-auditable: true + before: + description: Places the rule before rule . Use this argument with an empty rule ID value ("") to set the rule as the first rule in the ruleset. + example: + type: string + x-auditable: true + after: + description: Places the rule after rule . Use this argument with an empty rule ID value ("") to set the rule as the last rule in the ruleset. + example: + type: string + x-auditable: true + waitingroomRuleResult: + properties: + action: + $ref: '#/components/schemas/waitingroomRuleAction' + description: + $ref: '#/components/schemas/waitingroomRuleDescription' + enabled: + $ref: '#/components/schemas/waitingroomRuleEnabled' + expression: + $ref: '#/components/schemas/waitingroomRuleExpression' + id: + $ref: '#/components/schemas/waitingroomRuleId' + last_updated: + $ref: '#/components/schemas/waitingroomTimestamp' + version: + $ref: '#/components/schemas/waitingroomRuleVersion' + type: object + waitingroomRuleVersion: + description: The version of the rule. + example: '1' + type: string + x-auditable: true + waitingroomRulesResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/waitingroomMessages' + messages: + $ref: '#/components/schemas/waitingroomMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 2000 + type: number + total_pages: + description: The number of total pages in the entire result set. + example: 100 + type: number + type: object + result: + items: + $ref: '#/components/schemas/waitingroomRuleResult' + type: array + required: + - success + - errors + - messages + waitingroomSearchEngineCrawlerBypass: + default: false + description: Whether to allow verified search engine crawlers to bypass all waiting rooms on this zone. Verified search engine crawlers will not be tracked or counted by the waiting room system, and will not appear in waiting room analytics. + example: true + type: boolean + x-auditable: true + waitingroomSessionDuration: + default: 5 + description: Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to the route. If a user is not seen by Cloudflare again in that time period, they will be treated as a new user that visits the route. + maximum: 30 + minimum: 1 + type: integer + x-auditable: true + waitingroomSingleResponse: + type: object + required: + - success + - errors + - messages + - result + properties: + result: + type: object + $ref: '#/components/schemas/waitingroomWaitingroom' + waitingroomStatus: + enum: + - event_prequeueing + - not_queueing + - queueing + - suspended + example: queueing + type: string + x-auditable: true + waitingroomStatusEventId: + example: 25756b2dfe6e378a06b033b670413757 + type: string + x-auditable: true + waitingroomStatusResponse: + type: object + required: + - success + - errors + - messages + - result + properties: + result: + type: object + properties: + estimated_queued_users: + $ref: '#/components/schemas/waitingroomEstimatedQueuedUsers' + estimated_total_active_users: + $ref: '#/components/schemas/waitingroomEstimatedTotalActiveUsers' + event_id: + $ref: '#/components/schemas/waitingroomStatusEventId' + max_estimated_time_minutes: + $ref: '#/components/schemas/waitingroomMaxEstimatedTimeMinutes' + status: + $ref: '#/components/schemas/waitingroomStatus' + waitingroomSuspended: + default: false + description: Suspends or allows traffic going to the waiting room. If set to `true`, the traffic will not go to the waiting room. + type: boolean + x-auditable: true + waitingroomTimestamp: + example: '2014-01-01T05:20:00.12345Z' + format: date-time + readOnly: true + type: string + x-auditable: true + waitingroomTotalActiveUsers: + description: Sets the total number of active user sessions on the route at a point in time. A route is a combination of host and path on which a waiting room is available. This value is used as a baseline for the total number of active user sessions on the route. It is possible to have a situation where there are more or less active users sessions on the route based on the traffic patterns at that time around the world. + maximum: 2147483647 + minimum: 200 + type: integer + x-auditable: true + waitingroomTurnstileAction: + default: log + description: Which action to take when a bot is detected using Turnstile. `log` will have no impact on queueing behavior, simply keeping track of how many bots are detected in Waiting Room Analytics. `infinite_queue` will send bots to a false queueing state, where they will never reach your origin. `infinite_queue` requires Advanced Waiting Room. + enum: + - log + - infinite_queue + type: string + x-auditable: true + waitingroomTurnstileMode: + default: invisible + description: Which Turnstile widget type to use for detecting bot traffic. See [the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types) for the definitions of these widget types. Set to `off` to disable the Turnstile integration entirely. Setting this to anything other than `off` or `invisible` requires Advanced Waiting Room. + enum: + - 'off' + - invisible + - visible_non_interactive + - visible_managed + type: string + x-auditable: true + waitingroomUpdateRules: + items: + $ref: '#/components/schemas/waitingroomCreateRule' + type: array + waitingroomWaitingRoomId: + example: 699d98642c564d2e855e9661899b7252 + type: string + x-auditable: true + waitingroomWaitingRoomIdResponse: + type: object + required: + - success + - errors + - messages + - result + properties: + result: + type: object + properties: + id: + $ref: '#/components/schemas/waitingroomWaitingRoomId' + waitingroomWaitingroom: + properties: + additional_routes: + $ref: '#/components/schemas/waitingroomAdditionalRoutes' + cookie_attributes: + $ref: '#/components/schemas/waitingroomCookieAttributes' + cookie_suffix: + $ref: '#/components/schemas/waitingroomCookieSuffix' + created_on: + $ref: '#/components/schemas/waitingroomTimestamp' + readOnly: true + custom_page_html: + $ref: '#/components/schemas/waitingroomCustomPageHtml' + default_template_language: + $ref: '#/components/schemas/waitingroomDefaultTemplateLanguage' + description: + $ref: '#/components/schemas/waitingroomDescription' + disable_session_renewal: + $ref: '#/components/schemas/waitingroomDisableSessionRenewal' + enabled_origin_commands: + $ref: '#/components/schemas/waitingroomEnabledOriginCommands' + host: + $ref: '#/components/schemas/waitingroomHost' + id: + $ref: '#/components/schemas/waitingroomWaitingRoomId' + json_response_enabled: + $ref: '#/components/schemas/waitingroomJsonResponseEnabled' + modified_on: + $ref: '#/components/schemas/waitingroomTimestamp' + readOnly: true + name: + $ref: '#/components/schemas/waitingroomName' + new_users_per_minute: + $ref: '#/components/schemas/waitingroomNewUsersPerMinute' + next_event_prequeue_start_time: + $ref: '#/components/schemas/waitingroomNextEventPrequeueStartTime' + next_event_start_time: + $ref: '#/components/schemas/waitingroomNextEventStartTime' + path: + $ref: '#/components/schemas/waitingroomPath' + queue_all: + $ref: '#/components/schemas/waitingroomQueueAll' + queueing_method: + $ref: '#/components/schemas/waitingroomQueueingMethod' + queueing_status_code: + $ref: '#/components/schemas/waitingroomQueueingStatusCode' + session_duration: + $ref: '#/components/schemas/waitingroomSessionDuration' + suspended: + $ref: '#/components/schemas/waitingroomSuspended' + total_active_users: + $ref: '#/components/schemas/waitingroomTotalActiveUsers' + turnstile_action: + $ref: '#/components/schemas/waitingroomTurnstileAction' + turnstile_mode: + $ref: '#/components/schemas/waitingroomTurnstileMode' + type: object + waitingroomZoneSettings: + properties: + search_engine_crawler_bypass: + $ref: '#/components/schemas/waitingroomSearchEngineCrawlerBypass' + type: object + waitingroomZoneSettingsResponse: + type: object + required: + - success + - errors + - messages + - result + - result + properties: + result: + type: object + properties: + search_engine_crawler_bypass: + $ref: '#/components/schemas/waitingroomSearchEngineCrawlerBypass' + required: + - search_engine_crawler_bypass + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + waiting_rooms: + id: cloudflare.waiting_rooms.waiting_rooms + name: waiting_rooms + title: Waiting Rooms + methods: + list_by_zone: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + preview: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1preview/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .additional_routes }}{{ $sep }}"additional_routes": {{ if eq (kindOf .additional_routes) "string" }}{{ .additional_routes }}{{ else }}{{ toJson .additional_routes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .cookie_attributes }}{{ $sep }}"cookie_attributes": {{ if eq (kindOf .cookie_attributes) "string" }}{{ .cookie_attributes }}{{ else }}{{ toJson .cookie_attributes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .cookie_suffix }}{{ $sep }}"cookie_suffix": {{ toJson .cookie_suffix }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_page_html }}{{ $sep }}"custom_page_html": {{ toJson .custom_page_html }}{{- $sep = "," -}}{{ end }} + + {{- if .default_template_language }}{{ $sep }}"default_template_language": {{ toJson .default_template_language }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .disable_session_renewal }}{{ $sep }}"disable_session_renewal": {{ toJson .disable_session_renewal }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled_origin_commands }}{{ $sep }}"enabled_origin_commands": {{ if eq (kindOf .enabled_origin_commands) "string" }}{{ .enabled_origin_commands }}{{ else }}{{ toJson .enabled_origin_commands }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .host }}{{ $sep }}"host": {{ toJson .host }}{{- $sep = "," -}}{{ end }} + + {{- if .json_response_enabled }}{{ $sep }}"json_response_enabled": {{ toJson .json_response_enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .new_users_per_minute }}{{ $sep }}"new_users_per_minute": {{ toJson .new_users_per_minute }}{{- $sep = "," -}}{{ end }} + + {{- if .path }}{{ $sep }}"path": {{ toJson .path }}{{- $sep = "," -}}{{ end }} + + {{- if .queue_all }}{{ $sep }}"queue_all": {{ toJson .queue_all }}{{- $sep = "," -}}{{ end }} + + {{- if .queueing_method }}{{ $sep }}"queueing_method": {{ toJson .queueing_method }}{{- $sep = "," -}}{{ end }} + + {{- if .queueing_status_code }}{{ $sep }}"queueing_status_code": {{ toJson .queueing_status_code }}{{- $sep = "," -}}{{ end }} + + {{- if .session_duration }}{{ $sep }}"session_duration": {{ toJson .session_duration }}{{- $sep = "," -}}{{ end }} + + {{- if .suspended }}{{ $sep }}"suspended": {{ toJson .suspended }}{{- $sep = "," -}}{{ end }} + + {{- if .total_active_users }}{{ $sep }}"total_active_users": {{ toJson .total_active_users }}{{- $sep = "," -}}{{ end }} + + {{- if .turnstile_action }}{{ $sep }}"turnstile_action": {{ toJson .turnstile_action }}{{- $sep = "," -}}{{ end }} + + {{- if .turnstile_mode }}{{ $sep }}"turnstile_mode": {{ toJson .turnstile_mode }}{{- $sep = "," -}}{{ end }} + + } + + ' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .additional_routes }}{{ $sep }}"additional_routes": {{ if eq (kindOf .additional_routes) "string" }}{{ .additional_routes }}{{ else }}{{ toJson .additional_routes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .cookie_attributes }}{{ $sep }}"cookie_attributes": {{ if eq (kindOf .cookie_attributes) "string" }}{{ .cookie_attributes }}{{ else }}{{ toJson .cookie_attributes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .cookie_suffix }}{{ $sep }}"cookie_suffix": {{ toJson .cookie_suffix }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_page_html }}{{ $sep }}"custom_page_html": {{ toJson .custom_page_html }}{{- $sep = "," -}}{{ end }} + + {{- if .default_template_language }}{{ $sep }}"default_template_language": {{ toJson .default_template_language }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .disable_session_renewal }}{{ $sep }}"disable_session_renewal": {{ toJson .disable_session_renewal }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled_origin_commands }}{{ $sep }}"enabled_origin_commands": {{ if eq (kindOf .enabled_origin_commands) "string" }}{{ .enabled_origin_commands }}{{ else }}{{ toJson .enabled_origin_commands }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .host }}{{ $sep }}"host": {{ toJson .host }}{{- $sep = "," -}}{{ end }} + + {{- if .json_response_enabled }}{{ $sep }}"json_response_enabled": {{ toJson .json_response_enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .new_users_per_minute }}{{ $sep }}"new_users_per_minute": {{ toJson .new_users_per_minute }}{{- $sep = "," -}}{{ end }} + + {{- if .path }}{{ $sep }}"path": {{ toJson .path }}{{- $sep = "," -}}{{ end }} + + {{- if .queue_all }}{{ $sep }}"queue_all": {{ toJson .queue_all }}{{- $sep = "," -}}{{ end }} + + {{- if .queueing_method }}{{ $sep }}"queueing_method": {{ toJson .queueing_method }}{{- $sep = "," -}}{{ end }} + + {{- if .queueing_status_code }}{{ $sep }}"queueing_status_code": {{ toJson .queueing_status_code }}{{- $sep = "," -}}{{ end }} + + {{- if .session_duration }}{{ $sep }}"session_duration": {{ toJson .session_duration }}{{- $sep = "," -}}{{ end }} + + {{- if .suspended }}{{ $sep }}"suspended": {{ toJson .suspended }}{{- $sep = "," -}}{{ end }} + + {{- if .total_active_users }}{{ $sep }}"total_active_users": {{ toJson .total_active_users }}{{- $sep = "," -}}{{ end }} + + {{- if .turnstile_action }}{{ $sep }}"turnstile_action": {{ toJson .turnstile_action }}{{- $sep = "," -}}{{ end }} + + {{- if .turnstile_mode }}{{ $sep }}"turnstile_mode": {{ toJson .turnstile_mode }}{{- $sep = "," -}}{{ end }} + + } + + ' + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1waiting_rooms/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/waiting_rooms/methods/get' + - $ref: '#/components/x-stackQL-resources/waiting_rooms/methods/list_by_zone' + - $ref: '#/components/x-stackQL-resources/waiting_rooms/methods/list_by_account' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/waiting_rooms/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/waiting_rooms/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/waiting_rooms/methods/update' + settings: + id: cloudflare.waiting_rooms.settings + name: settings + title: Settings + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1settings/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1settings/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1settings/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/settings/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/settings/methods/edit' + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/settings/methods/update' + events: + id: cloudflare.waiting_rooms.events + name: events + title: Events + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}~1events/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}~1events/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}~1events~1{event_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}~1events~1{event_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}~1events~1{event_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}~1events~1{event_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/events/methods/get' + - $ref: '#/components/x-stackQL-resources/events/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/events/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/events/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/events/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/events/methods/update' + details: + id: cloudflare.waiting_rooms.details + name: details + title: Details + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}~1events~1{event_id}~1details/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/details/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + rules: + id: cloudflare.waiting_rooms.rules + name: rules + title: Rules + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}~1rules/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + waiting_room_create_waiting_room_rule: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}~1rules/post' + response: + mediaType: application/json + openAPIDocKey: '200' + waiting_room_replace_waiting_room_rules: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}~1rules/put' + response: + mediaType: application/json + openAPIDocKey: '200' + waiting_room_delete_waiting_room_rule: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}~1rules~1{rule_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + waiting_room_patch_waiting_room_rule: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}~1rules~1{rule_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .action }}{{ $sep }}"action": {{ toJson .action }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .expression }}{{ $sep }}"expression": {{ toJson .expression }}{{- $sep = "," -}}{{ end }} + + {{- if .position }}{{ $sep }}"position": {{ if eq (kindOf .position) "string" }}{{ .position }}{{ else }}{{ toJson .position }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/rules/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/rules/methods/waiting_room_create_waiting_room_rule' + update: + - $ref: '#/components/x-stackQL-resources/rules/methods/waiting_room_patch_waiting_room_rule' + delete: + - $ref: '#/components/x-stackQL-resources/rules/methods/waiting_room_delete_waiting_room_rule' + replace: + - $ref: '#/components/x-stackQL-resources/rules/methods/waiting_room_replace_waiting_room_rules' + statuses: + id: cloudflare.waiting_rooms.statuses + name: statuses + title: Statuses + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1waiting_rooms~1{waiting_room_id}~1status/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/statuses/methods/list' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/web3.yaml b/providers/src/cloudflare/v00.00.00000/services/web3.yaml index 4a035ace..bcc1f4e8 100644 --- a/providers/src/cloudflare/v00.00.00000/services/web3.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/web3.yaml @@ -1,2002 +1,1942 @@ -openapi: 3.0.3 -info: - title: web3 API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /zones/{zone_id}/web3/hostnames: - get: - operationId: web3-hostname-list-web3-hostnames - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/web3CollectionResponse' - description: List Web3 Hostnames response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - items: - $ref: '#/components/schemas/web3Web3Hostname' - nullable: true - type: array - enum: - - null - success: - description: Specifies whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/web3ResultInfo' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: List Web3 Hostnames error response (4XX). - 5XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - items: - $ref: '#/components/schemas/web3Web3Hostname' - nullable: true - type: array - enum: - - null - success: - description: Specifies whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/web3ResultInfo' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: List Web3 Hostnames response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Web3 Hostnames - tags: - - Web3 Hostname - x-api-token-group: - - Web3 Hostnames Write - - Web3 Hostnames Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: web3 - resource_chain: - - hostnames - method: list - post: - operationId: web3-hostname-create-web3-hostname - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/web3CreateRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/web3SingleResponse' - description: Create Web3 Hostname response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - items: - $ref: '#/components/schemas/web3Web3Hostname' - nullable: true - type: array - enum: - - null - success: - description: Specifies whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/web3ResultInfo' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Create Web3 Hostname error response (4XX). - 5XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - $ref: >- - #/components/schemas/unnamedSchemaRef2e420942fb77cd2cd2ba3ca7b5f32e1e - success: - description: Specifies whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - description: Provides the API response. - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Create Web3 Hostname response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Web3 Hostname - tags: - - Web3 Hostname - x-api-token-group: - - Web3 Hostnames Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: web3 - resource_chain: - - hostnames - method: create - /zones/{zone_id}/web3/hostnames/{identifier}: - delete: - operationId: web3-hostname-delete-web3-hostname - parameters: - - name: identifier - in: path - required: true - description: Resource identifier. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/web3ApiResponseSingleId' - description: Delete Web3 Hostname response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - items: - $ref: '#/components/schemas/web3Web3Hostname' - nullable: true - type: array - enum: - - null - success: - description: Specifies whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/web3ResultInfo' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Delete Web3 Hostname error response (4XX). - 5XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - nullable: true - properties: - id: - $ref: '#/components/schemas/web3Identifier' - required: - - id - type: object - enum: - - null - success: - description: Specifies whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Delete Web3 Hostname response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Web3 Hostname - tags: - - Web3 Hostname - x-api-token-group: - - Web3 Hostnames Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: web3 - resource_chain: - - hostnames - method: delete - get: - operationId: web3-hostname-web3-hostname-details - parameters: - - name: identifier - in: path - required: true - description: Resource identifier. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/web3SingleResponse' - description: Web3 Hostname Details response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - items: - $ref: '#/components/schemas/web3Web3Hostname' - nullable: true - type: array - enum: - - null - success: - description: Specifies whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/web3ResultInfo' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Web3 Hostname Details error response (4XX). - 5XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - $ref: >- - #/components/schemas/unnamedSchemaRef2e420942fb77cd2cd2ba3ca7b5f32e1e - success: - description: Specifies whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - description: Provides the API response. - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Web3 Hostname Details response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Web3 Hostname Details - tags: - - Web3 Hostname - x-api-token-group: - - Web3 Hostnames Write - - Web3 Hostnames Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: web3 - resource_chain: - - hostnames - method: get - patch: - operationId: web3-hostname-edit-web3-hostname - parameters: - - name: identifier - in: path - required: true - description: Resource identifier. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/web3ModifyRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/web3SingleResponse' - description: Edit Web3 Hostname response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - items: - $ref: '#/components/schemas/web3Web3Hostname' - nullable: true - type: array - enum: - - null - success: - description: Specifies whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/web3ResultInfo' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Edit Web3 Hostname error response (4XX). - 5XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - $ref: >- - #/components/schemas/unnamedSchemaRef2e420942fb77cd2cd2ba3ca7b5f32e1e - success: - description: Specifies whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - description: Provides the API response. - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Edit Web3 Hostname response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Edit Web3 Hostname - tags: - - Web3 Hostname - x-api-token-group: - - Web3 Hostnames Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: web3 - resource_chain: - - hostnames - method: edit - /zones/{zone_id}/web3/hostnames/{identifier}/ipfs_universal_path/content_list: - get: - operationId: web3-hostname-ipfs-universal-path-gateway-content-list-details - parameters: - - name: identifier - in: path - required: true - description: Resource identifier. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/web3ContentListDetailsResponse' - description: IPFS Universal Path Gateway Content List Details response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - properties: - action: - $ref: '#/components/schemas/web3ContentListAction' - type: object - enum: - - null - success: - description: Specifies whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - description: Provides the API response. - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: >- - IPFS Universal Path Gateway Content List Details error response - (4XX). - 5XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - properties: - action: - $ref: '#/components/schemas/web3ContentListAction' - type: object - enum: - - null - success: - description: Specifies whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - description: Provides the API response. - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: IPFS Universal Path Gateway Content List Details response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: IPFS Universal Path Gateway Content List Details - tags: - - Web3 Hostname - x-api-token-group: - - Web3 Hostnames Write - - Web3 Hostnames Read - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: web3 - resource_chain: - - hostnames - - ipfs_universal_paths - - content_lists - method: get - put: - operationId: web3-hostname-update-ipfs-universal-path-gateway-content-list - parameters: - - name: identifier - in: path - required: true - description: Resource identifier. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/web3ContentListUpdateRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/web3ContentListDetailsResponse' - description: Update IPFS Universal Path Gateway Content List response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - properties: - action: - $ref: '#/components/schemas/web3ContentListAction' - type: object - enum: - - null - success: - description: Specifies whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - description: Provides the API response. - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: >- - Update IPFS Universal Path Gateway Content List error response - (4XX). - 5XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - properties: - action: - $ref: '#/components/schemas/web3ContentListAction' - type: object - enum: - - null - success: - description: Specifies whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - description: Provides the API response. - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Update IPFS Universal Path Gateway Content List response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update IPFS Universal Path Gateway Content List - tags: - - Web3 Hostname - x-api-token-group: - - Web3 Hostnames Write - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: web3 - resource_chain: - - hostnames - - ipfs_universal_paths - - content_lists - method: update - /zones/{zone_id}/web3/hostnames/{identifier}/ipfs_universal_path/content_list/entries: - get: - operationId: web3-hostname-list-ipfs-universal-path-gateway-content-list-entries - parameters: - - name: identifier - in: path - required: true - description: Resource identifier. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/web3ContentListEntryCollectionResponse' - description: List IPFS Universal Path Gateway Content List Entries response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - items: {} - nullable: true - type: object - properties: - entries: - $ref: '#/components/schemas/web3ContentListEntries' - enum: - - null - success: - description: Specifies whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/web3ResultInfo' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: >- - List IPFS Universal Path Gateway Content List Entries error response - (4XX). - 5XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - items: {} - nullable: true - type: object - properties: - entries: - $ref: '#/components/schemas/web3ContentListEntries' - enum: - - null - success: - description: Specifies whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/web3ResultInfo' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: >- - List IPFS Universal Path Gateway Content List Entries response - failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List IPFS Universal Path Gateway Content List Entries - tags: - - Web3 Hostname - x-api-token-group: - - Web3 Hostnames Write - - Web3 Hostnames Read - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: web3 - resource_chain: - - hostnames - - ipfs_universal_paths - - content_lists - - entries - method: list - post: - operationId: web3-hostname-create-ipfs-universal-path-gateway-content-list-entry - parameters: - - name: identifier - in: path - required: true - description: Resource identifier. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/web3ContentListEntryCreateRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/web3ContentListEntrySingleResponse' - description: Create IPFS Universal Path Gateway Content List Entry response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - $ref: >- - #/components/schemas/unnamedSchemaRef5e618833803e286db9ee7c73727f8b86 - success: - description: Specifies whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - description: Provides the API response. - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: >- - Create IPFS Universal Path Gateway Content List Entry error response - (4XX). - 5XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - $ref: >- - #/components/schemas/unnamedSchemaRef5e618833803e286db9ee7c73727f8b86 - success: - description: Specifies whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - description: Provides the API response. - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: >- - Create IPFS Universal Path Gateway Content List Entry response - failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create IPFS Universal Path Gateway Content List Entry - tags: - - Web3 Hostname - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: web3 - resource_chain: - - hostnames - - ipfs_universal_paths - - content_lists - - entries - method: create - /zones/{zone_id}/web3/hostnames/{identifier}/ipfs_universal_path/content_list/entries/{content_list_entry_identifier}: - delete: - operationId: web3-hostname-delete-ipfs-universal-path-gateway-content-list-entry - parameters: - - in: path - name: content_list_entry_identifier - schema: - $ref: '#/components/schemas/web3Identifier' - required: true - - name: identifier - in: path - required: true - description: Resource identifier. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/web3ApiResponseSingleId' - description: Delete IPFS Universal Path Gateway Content List Entry response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - nullable: true - properties: - id: - $ref: '#/components/schemas/web3Identifier' - required: - - id - type: object - enum: - - null - success: - description: Specifies whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: >- - Delete IPFS Universal Path Gateway Content List Entry error response - (4XX). - 5XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - nullable: true - properties: - id: - $ref: '#/components/schemas/web3Identifier' - required: - - id - type: object - enum: - - null - success: - description: Specifies whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: >- - Delete IPFS Universal Path Gateway Content List Entry response - failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete IPFS Universal Path Gateway Content List Entry - tags: - - Web3 Hostname - x-api-token-group: - - Web3 Hostnames Write - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: web3 - resource_chain: - - hostnames - - ipfs_universal_paths - - content_lists - - entries - method: delete - get: - operationId: web3-hostname-ipfs-universal-path-gateway-content-list-entry-details - parameters: - - in: path - name: content_list_entry_identifier - schema: - $ref: '#/components/schemas/web3Identifier' - required: true - - name: identifier - in: path - required: true - description: Resource identifier. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/web3ContentListEntrySingleResponse' - description: IPFS Universal Path Gateway Content List Entry Details response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - $ref: >- - #/components/schemas/unnamedSchemaRef5e618833803e286db9ee7c73727f8b86 - success: - description: Specifies whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - description: Provides the API response. - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: >- - IPFS Universal Path Gateway Content List Entry Details error - response (4XX). - 5XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - $ref: >- - #/components/schemas/unnamedSchemaRef5e618833803e286db9ee7c73727f8b86 - success: - description: Specifies whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - description: Provides the API response. - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: >- - IPFS Universal Path Gateway Content List Entry Details response - failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: IPFS Universal Path Gateway Content List Entry Details - tags: - - Web3 Hostname - x-api-token-group: - - Web3 Hostnames Write - - Web3 Hostnames Read - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: web3 - resource_chain: - - hostnames - - ipfs_universal_paths - - content_lists - - entries - method: get - put: - operationId: web3-hostname-edit-ipfs-universal-path-gateway-content-list-entry - parameters: - - in: path - name: content_list_entry_identifier - schema: - $ref: '#/components/schemas/web3Identifier' - required: true - - name: identifier - in: path - required: true - description: Resource identifier. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/web3ContentListEntryCreateRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/web3ContentListEntrySingleResponse' - description: Edit IPFS Universal Path Gateway Content List Entry response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - $ref: >- - #/components/schemas/unnamedSchemaRef5e618833803e286db9ee7c73727f8b86 - success: - description: Specifies whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - description: Provides the API response. - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: >- - Edit IPFS Universal Path Gateway Content List Entry error response - (4XX). - 5XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - $ref: >- - #/components/schemas/unnamedSchemaRef5e618833803e286db9ee7c73727f8b86 - success: - description: Specifies whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - description: Provides the API response. - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: >- - Edit IPFS Universal Path Gateway Content List Entry response - failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Edit IPFS Universal Path Gateway Content List Entry - tags: - - Web3 Hostname - x-api-token-group: - - Web3 Hostnames Write - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: web3 - resource_chain: - - hostnames - - ipfs_universal_paths - - content_lists - - entries - method: update -components: - schemas: - responseInfo: - properties: - code: - minimum: 1000 - type: integer - message: - type: string - documentation_url: - type: string - source: - type: object - properties: - pointer: - type: string - required: - - code - - message - type: object - uniqueItems: true - unnamedSchemaRef2e420942fb77cd2cd2ba3ca7b5f32e1e: - properties: - created_on: - $ref: '#/components/schemas/web3Timestamp' - readOnly: true - description: - $ref: '#/components/schemas/web3Description' - dnslink: - $ref: '#/components/schemas/web3Dnslink' - id: - $ref: '#/components/schemas/web3Identifier' - modified_on: - $ref: '#/components/schemas/web3Timestamp' - readOnly: true - name: - $ref: '#/components/schemas/web3Name' - status: - $ref: '#/components/schemas/web3Status' - target: - $ref: '#/components/schemas/web3Target' - type: object - enum: - - null - unnamedSchemaRef5e618833803e286db9ee7c73727f8b86: - description: Specify a content list entry to block. - properties: - content: - $ref: '#/components/schemas/web3ContentListEntryContent' - created_on: - $ref: '#/components/schemas/web3Timestamp' - readOnly: true - description: - $ref: '#/components/schemas/web3ContentListEntryDescription' - id: - $ref: '#/components/schemas/web3Identifier' - modified_on: - $ref: '#/components/schemas/web3Timestamp' - readOnly: true - type: - $ref: '#/components/schemas/web3ContentListEntryType' - type: object - enum: - - null - web3ApiResponseSingleId: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - nullable: true - properties: - id: - $ref: '#/components/schemas/web3Identifier' - required: - - id - type: object - success: - description: Specifies whether the API call was successful. - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - web3CollectionResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - items: - $ref: '#/components/schemas/web3Web3Hostname' - nullable: true - type: array - success: - description: Specifies whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/web3ResultInfo' - required: - - success - - errors - - messages - - result - web3ContentListAction: - description: Behavior of the content list. - enum: - - block - example: block - type: string - web3ContentListDetails: - properties: - action: - $ref: '#/components/schemas/web3ContentListAction' - type: object - web3ContentListDetailsResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - $ref: '#/components/schemas/web3ContentListDetails' - success: - description: Specifies whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - description: Provides the API response. - type: object - required: - - success - - errors - - messages - - result - web3ContentListEntries: - description: Provides content list entries. - items: - $ref: '#/components/schemas/web3ContentListEntry' - type: array - web3ContentListEntry: - description: Specify a content list entry to block. - properties: - content: - $ref: '#/components/schemas/web3ContentListEntryContent' - created_on: - $ref: '#/components/schemas/web3Timestamp' - readOnly: true - description: - $ref: '#/components/schemas/web3ContentListEntryDescription' - id: - $ref: '#/components/schemas/web3Identifier' - modified_on: - $ref: '#/components/schemas/web3Timestamp' - readOnly: true - type: - $ref: '#/components/schemas/web3ContentListEntryType' - type: object - web3ContentListEntryCollectionResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - items: {} - nullable: true - type: object - properties: - entries: - $ref: '#/components/schemas/web3ContentListEntries' - success: - description: Specifies whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/web3ResultInfo' - required: - - success - - errors - - messages - - result - web3ContentListEntryContent: - description: Specify the CID or content path of content to block. - example: QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB - maxLength: 500 - type: string - web3ContentListEntryCreateRequest: - properties: - content: - $ref: '#/components/schemas/web3ContentListEntryContent' - description: - $ref: '#/components/schemas/web3ContentListEntryDescription' - type: - $ref: '#/components/schemas/web3ContentListEntryType' - required: - - type - - content - type: object - web3ContentListEntryDescription: - description: Specify an optional description of the content list entry. - example: this is my content list entry - maxLength: 500 - type: string - web3ContentListEntrySingleResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - $ref: '#/components/schemas/web3ContentListEntry' - success: - description: Specifies whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - description: Provides the API response. - type: object - required: - - success - - errors - - messages - - result - web3ContentListEntryType: - description: Specify the type of content list entry to block. - enum: - - cid - - content_path - example: cid - type: string - web3ContentListUpdateRequest: - properties: - action: - $ref: '#/components/schemas/web3ContentListAction' - entries: - $ref: '#/components/schemas/web3ContentListEntries' - required: - - action - - entries - type: object - web3CreateRequest: - properties: - description: - $ref: '#/components/schemas/web3Description' - dnslink: - $ref: '#/components/schemas/web3Dnslink' - name: - $ref: '#/components/schemas/web3Name' - target: - $ref: '#/components/schemas/web3Target' - required: - - name - - target - type: object - web3Description: - description: Specify an optional description of the hostname. - example: This is my IPFS gateway. - maxLength: 500 - type: string - web3Dnslink: - description: Specify the DNSLink value used if the target is ipfs. - example: /ipns/onboarding.ipfs.cloudflare.com - type: string - web3Identifier: - description: Specify the identifier of the hostname. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - readOnly: true - type: string - web3Messages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - web3ModifyRequest: - properties: - description: - $ref: '#/components/schemas/web3Description' - dnslink: - $ref: '#/components/schemas/web3Dnslink' - type: object - web3Name: - description: Specify the hostname that points to the target gateway via CNAME. - example: gateway.example.com - maxLength: 255 - type: string - web3ResultInfo: - properties: - count: - description: Specifies the total number of results for the requested service. - example: 1 - type: number - page: - description: Specifies the current page within paginated list of results. - example: 1 - type: number - per_page: - description: Specifies the number of results per page of results. - example: 20 - type: number - total_count: - description: Specifies the total results available without any search parameters. - example: 2000 - type: number - type: object - web3SingleResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/web3Messages' - messages: - $ref: '#/components/schemas/web3Messages' - result: - $ref: '#/components/schemas/web3Web3Hostname' - success: - description: Specifies whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - description: Provides the API response. - type: object - required: - - success - - errors - - messages - - result - web3Status: - description: Specifies the status of the hostname's activation. - enum: - - active - - pending - - deleting - - error - example: active - readOnly: true - type: string - web3Target: - description: Specify the target gateway of the hostname. - enum: - - ethereum - - ipfs - - ipfs_universal_path - example: ipfs - type: string - web3Timestamp: - example: '2014-01-01T05:20:00.12345Z' - format: date-time - readOnly: true - type: string - web3Web3Hostname: - properties: - created_on: - $ref: '#/components/schemas/web3Timestamp' - readOnly: true - description: - $ref: '#/components/schemas/web3Description' - dnslink: - $ref: '#/components/schemas/web3Dnslink' - id: - $ref: '#/components/schemas/web3Identifier' - modified_on: - $ref: '#/components/schemas/web3Timestamp' - readOnly: true - name: - $ref: '#/components/schemas/web3Name' - status: - $ref: '#/components/schemas/web3Status' - target: - $ref: '#/components/schemas/web3Target' - type: object - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - hostnames: - id: cloudflare.web3.hostnames - name: hostnames - title: Hostnames - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1web3~1hostnames/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1web3~1hostnames/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1web3~1hostnames~1{identifier}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1web3~1hostnames~1{identifier}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1web3~1hostnames~1{identifier}/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/hostnames/methods/get' - - $ref: '#/components/x-stackQL-resources/hostnames/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/hostnames/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/hostnames/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/hostnames/methods/delete' - replace: [] - content_lists: - id: cloudflare.web3.content_lists - name: content_lists - title: Content Lists - methods: - list: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1web3~1hostnames~1{identifier}~1ipfs_universal_path~1content_list/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1web3~1hostnames~1{identifier}~1ipfs_universal_path~1content_list/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/content_lists/methods/list' - insert: [] - update: [] - delete: [] - replace: - - $ref: '#/components/x-stackQL-resources/content_lists/methods/update' - entries: - id: cloudflare.web3.entries - name: entries - title: Entries - methods: - list: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1web3~1hostnames~1{identifier}~1ipfs_universal_path~1content_list~1entries/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result.entries - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1web3~1hostnames~1{identifier}~1ipfs_universal_path~1content_list~1entries/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1web3~1hostnames~1{identifier}~1ipfs_universal_path~1content_list~1entries~1{content_list_entry_identifier}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1web3~1hostnames~1{identifier}~1ipfs_universal_path~1content_list~1entries~1{content_list_entry_identifier}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1web3~1hostnames~1{identifier}~1ipfs_universal_path~1content_list~1entries~1{content_list_entry_identifier}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/entries/methods/get' - - $ref: '#/components/x-stackQL-resources/entries/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/entries/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/entries/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/entries/methods/update' +openapi: 3.0.3 +info: + title: web3 API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /zones/{zone_id}/web3/hostnames: + get: + operationId: web3-hostname-list-web3-hostnames + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/web3CollectionResponse' + description: List Web3 Hostnames response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + items: + $ref: '#/components/schemas/web3Web3Hostname' + nullable: true + type: array + enum: + - null + success: + description: Specifies whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/web3ResultInfo' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: List Web3 Hostnames error response (4XX). + 5XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + items: + $ref: '#/components/schemas/web3Web3Hostname' + nullable: true + type: array + enum: + - null + success: + description: Specifies whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/web3ResultInfo' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: List Web3 Hostnames response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Web3 Hostnames + tags: + - Web3 Hostname + x-api-token-group: + - Web3 Hostnames Write + - Web3 Hostnames Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: web3 + resource_chain: + - hostnames + method: list + post: + operationId: web3-hostname-create-web3-hostname + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/web3CreateRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/web3SingleResponse' + description: Create Web3 Hostname response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + items: + $ref: '#/components/schemas/web3Web3Hostname' + nullable: true + type: array + enum: + - null + success: + description: Specifies whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/web3ResultInfo' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Create Web3 Hostname error response (4XX). + 5XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + $ref: '#/components/schemas/unnamedSchemaRef2e420942fb77cd2cd2ba3ca7b5f32e1e' + success: + description: Specifies whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + description: Provides the API response. + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Create Web3 Hostname response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Web3 Hostname + tags: + - Web3 Hostname + x-api-token-group: + - Web3 Hostnames Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: web3 + resource_chain: + - hostnames + method: create + /zones/{zone_id}/web3/hostnames/{identifier}: + delete: + operationId: web3-hostname-delete-web3-hostname + parameters: + - name: identifier + in: path + required: true + description: Resource identifier. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/web3ApiResponseSingleId' + description: Delete Web3 Hostname response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + items: + $ref: '#/components/schemas/web3Web3Hostname' + nullable: true + type: array + enum: + - null + success: + description: Specifies whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/web3ResultInfo' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Delete Web3 Hostname error response (4XX). + 5XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + nullable: true + properties: + id: + $ref: '#/components/schemas/web3Identifier' + required: + - id + type: object + enum: + - null + success: + description: Specifies whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Delete Web3 Hostname response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Web3 Hostname + tags: + - Web3 Hostname + x-api-token-group: + - Web3 Hostnames Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: web3 + resource_chain: + - hostnames + method: delete + get: + operationId: web3-hostname-web3-hostname-details + parameters: + - name: identifier + in: path + required: true + description: Resource identifier. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/web3SingleResponse' + description: Web3 Hostname Details response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + items: + $ref: '#/components/schemas/web3Web3Hostname' + nullable: true + type: array + enum: + - null + success: + description: Specifies whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/web3ResultInfo' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Web3 Hostname Details error response (4XX). + 5XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + $ref: '#/components/schemas/unnamedSchemaRef2e420942fb77cd2cd2ba3ca7b5f32e1e' + success: + description: Specifies whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + description: Provides the API response. + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Web3 Hostname Details response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Web3 Hostname Details + tags: + - Web3 Hostname + x-api-token-group: + - Web3 Hostnames Write + - Web3 Hostnames Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: web3 + resource_chain: + - hostnames + method: get + patch: + operationId: web3-hostname-edit-web3-hostname + parameters: + - name: identifier + in: path + required: true + description: Resource identifier. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/web3ModifyRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/web3SingleResponse' + description: Edit Web3 Hostname response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + items: + $ref: '#/components/schemas/web3Web3Hostname' + nullable: true + type: array + enum: + - null + success: + description: Specifies whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/web3ResultInfo' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Edit Web3 Hostname error response (4XX). + 5XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + $ref: '#/components/schemas/unnamedSchemaRef2e420942fb77cd2cd2ba3ca7b5f32e1e' + success: + description: Specifies whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + description: Provides the API response. + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Edit Web3 Hostname response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Edit Web3 Hostname + tags: + - Web3 Hostname + x-api-token-group: + - Web3 Hostnames Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: web3 + resource_chain: + - hostnames + method: edit + /zones/{zone_id}/web3/hostnames/{identifier}/ipfs_universal_path/content_list: + get: + operationId: web3-hostname-ipfs-universal-path-gateway-content-list-details + parameters: + - name: identifier + in: path + required: true + description: Resource identifier. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/web3ContentListDetailsResponse' + description: IPFS Universal Path Gateway Content List Details response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + properties: + action: + $ref: '#/components/schemas/web3ContentListAction' + type: object + enum: + - null + success: + description: Specifies whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + description: Provides the API response. + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: IPFS Universal Path Gateway Content List Details error response (4XX). + 5XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + properties: + action: + $ref: '#/components/schemas/web3ContentListAction' + type: object + enum: + - null + success: + description: Specifies whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + description: Provides the API response. + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: IPFS Universal Path Gateway Content List Details response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: IPFS Universal Path Gateway Content List Details + tags: + - Web3 Hostname + x-api-token-group: + - Web3 Hostnames Write + - Web3 Hostnames Read + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: web3 + resource_chain: + - hostnames + - ipfs_universal_paths + - content_lists + method: get + put: + operationId: web3-hostname-update-ipfs-universal-path-gateway-content-list + parameters: + - name: identifier + in: path + required: true + description: Resource identifier. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/web3ContentListUpdateRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/web3ContentListDetailsResponse' + description: Update IPFS Universal Path Gateway Content List response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + properties: + action: + $ref: '#/components/schemas/web3ContentListAction' + type: object + enum: + - null + success: + description: Specifies whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + description: Provides the API response. + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Update IPFS Universal Path Gateway Content List error response (4XX). + 5XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + properties: + action: + $ref: '#/components/schemas/web3ContentListAction' + type: object + enum: + - null + success: + description: Specifies whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + description: Provides the API response. + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Update IPFS Universal Path Gateway Content List response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update IPFS Universal Path Gateway Content List + tags: + - Web3 Hostname + x-api-token-group: + - Web3 Hostnames Write + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: web3 + resource_chain: + - hostnames + - ipfs_universal_paths + - content_lists + method: update + /zones/{zone_id}/web3/hostnames/{identifier}/ipfs_universal_path/content_list/entries: + get: + operationId: web3-hostname-list-ipfs-universal-path-gateway-content-list-entries + parameters: + - name: identifier + in: path + required: true + description: Resource identifier. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/web3ContentListEntryCollectionResponse' + description: List IPFS Universal Path Gateway Content List Entries response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + items: {} + nullable: true + type: object + properties: + entries: + $ref: '#/components/schemas/web3ContentListEntries' + enum: + - null + success: + description: Specifies whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/web3ResultInfo' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: List IPFS Universal Path Gateway Content List Entries error response (4XX). + 5XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + items: {} + nullable: true + type: object + properties: + entries: + $ref: '#/components/schemas/web3ContentListEntries' + enum: + - null + success: + description: Specifies whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/web3ResultInfo' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: List IPFS Universal Path Gateway Content List Entries response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List IPFS Universal Path Gateway Content List Entries + tags: + - Web3 Hostname + x-api-token-group: + - Web3 Hostnames Write + - Web3 Hostnames Read + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: web3 + resource_chain: + - hostnames + - ipfs_universal_paths + - content_lists + - entries + method: list + post: + operationId: web3-hostname-create-ipfs-universal-path-gateway-content-list-entry + parameters: + - name: identifier + in: path + required: true + description: Resource identifier. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/web3ContentListEntryCreateRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/web3ContentListEntrySingleResponse' + description: Create IPFS Universal Path Gateway Content List Entry response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + $ref: '#/components/schemas/unnamedSchemaRef5e618833803e286db9ee7c73727f8b86' + success: + description: Specifies whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + description: Provides the API response. + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Create IPFS Universal Path Gateway Content List Entry error response (4XX). + 5XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + $ref: '#/components/schemas/unnamedSchemaRef5e618833803e286db9ee7c73727f8b86' + success: + description: Specifies whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + description: Provides the API response. + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Create IPFS Universal Path Gateway Content List Entry response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create IPFS Universal Path Gateway Content List Entry + tags: + - Web3 Hostname + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: web3 + resource_chain: + - hostnames + - ipfs_universal_paths + - content_lists + - entries + method: create + /zones/{zone_id}/web3/hostnames/{identifier}/ipfs_universal_path/content_list/entries/{content_list_entry_identifier}: + delete: + operationId: web3-hostname-delete-ipfs-universal-path-gateway-content-list-entry + parameters: + - in: path + name: content_list_entry_identifier + schema: + $ref: '#/components/schemas/web3Identifier' + required: true + - name: identifier + in: path + required: true + description: Resource identifier. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/web3ApiResponseSingleId' + description: Delete IPFS Universal Path Gateway Content List Entry response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + nullable: true + properties: + id: + $ref: '#/components/schemas/web3Identifier' + required: + - id + type: object + enum: + - null + success: + description: Specifies whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Delete IPFS Universal Path Gateway Content List Entry error response (4XX). + 5XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + nullable: true + properties: + id: + $ref: '#/components/schemas/web3Identifier' + required: + - id + type: object + enum: + - null + success: + description: Specifies whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Delete IPFS Universal Path Gateway Content List Entry response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete IPFS Universal Path Gateway Content List Entry + tags: + - Web3 Hostname + x-api-token-group: + - Web3 Hostnames Write + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: web3 + resource_chain: + - hostnames + - ipfs_universal_paths + - content_lists + - entries + method: delete + get: + operationId: web3-hostname-ipfs-universal-path-gateway-content-list-entry-details + parameters: + - in: path + name: content_list_entry_identifier + schema: + $ref: '#/components/schemas/web3Identifier' + required: true + - name: identifier + in: path + required: true + description: Resource identifier. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/web3ContentListEntrySingleResponse' + description: IPFS Universal Path Gateway Content List Entry Details response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + $ref: '#/components/schemas/unnamedSchemaRef5e618833803e286db9ee7c73727f8b86' + success: + description: Specifies whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + description: Provides the API response. + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: IPFS Universal Path Gateway Content List Entry Details error response (4XX). + 5XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + $ref: '#/components/schemas/unnamedSchemaRef5e618833803e286db9ee7c73727f8b86' + success: + description: Specifies whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + description: Provides the API response. + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: IPFS Universal Path Gateway Content List Entry Details response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: IPFS Universal Path Gateway Content List Entry Details + tags: + - Web3 Hostname + x-api-token-group: + - Web3 Hostnames Write + - Web3 Hostnames Read + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: web3 + resource_chain: + - hostnames + - ipfs_universal_paths + - content_lists + - entries + method: get + put: + operationId: web3-hostname-edit-ipfs-universal-path-gateway-content-list-entry + parameters: + - in: path + name: content_list_entry_identifier + schema: + $ref: '#/components/schemas/web3Identifier' + required: true + - name: identifier + in: path + required: true + description: Resource identifier. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/web3ContentListEntryCreateRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/web3ContentListEntrySingleResponse' + description: Edit IPFS Universal Path Gateway Content List Entry response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + $ref: '#/components/schemas/unnamedSchemaRef5e618833803e286db9ee7c73727f8b86' + success: + description: Specifies whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + description: Provides the API response. + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Edit IPFS Universal Path Gateway Content List Entry error response (4XX). + 5XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + $ref: '#/components/schemas/unnamedSchemaRef5e618833803e286db9ee7c73727f8b86' + success: + description: Specifies whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + description: Provides the API response. + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Edit IPFS Universal Path Gateway Content List Entry response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Edit IPFS Universal Path Gateway Content List Entry + tags: + - Web3 Hostname + x-api-token-group: + - Web3 Hostnames Write + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: web3 + resource_chain: + - hostnames + - ipfs_universal_paths + - content_lists + - entries + method: update +components: + schemas: + responseInfo: + properties: + code: + minimum: 1000 + type: integer + message: + type: string + documentation_url: + type: string + source: + type: object + properties: + pointer: + type: string + required: + - code + - message + type: object + uniqueItems: true + unnamedSchemaRef2e420942fb77cd2cd2ba3ca7b5f32e1e: + properties: + created_on: + $ref: '#/components/schemas/web3Timestamp' + readOnly: true + description: + $ref: '#/components/schemas/web3Description' + dnslink: + $ref: '#/components/schemas/web3Dnslink' + id: + $ref: '#/components/schemas/web3Identifier' + modified_on: + $ref: '#/components/schemas/web3Timestamp' + readOnly: true + name: + $ref: '#/components/schemas/web3Name' + status: + $ref: '#/components/schemas/web3Status' + target: + $ref: '#/components/schemas/web3Target' + type: object + enum: + - null + unnamedSchemaRef5e618833803e286db9ee7c73727f8b86: + description: Specify a content list entry to block. + properties: + content: + $ref: '#/components/schemas/web3ContentListEntryContent' + created_on: + $ref: '#/components/schemas/web3Timestamp' + readOnly: true + description: + $ref: '#/components/schemas/web3ContentListEntryDescription' + id: + $ref: '#/components/schemas/web3Identifier' + modified_on: + $ref: '#/components/schemas/web3Timestamp' + readOnly: true + type: + $ref: '#/components/schemas/web3ContentListEntryType' + type: object + enum: + - null + web3ApiResponseSingleId: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + nullable: true + properties: + id: + $ref: '#/components/schemas/web3Identifier' + required: + - id + type: object + success: + description: Specifies whether the API call was successful. + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + web3CollectionResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + items: + $ref: '#/components/schemas/web3Web3Hostname' + nullable: true + type: array + success: + description: Specifies whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/web3ResultInfo' + required: + - success + - errors + - messages + - result + web3ContentListAction: + description: Behavior of the content list. + enum: + - block + example: block + type: string + web3ContentListDetails: + properties: + action: + $ref: '#/components/schemas/web3ContentListAction' + type: object + web3ContentListDetailsResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + $ref: '#/components/schemas/web3ContentListDetails' + success: + description: Specifies whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + description: Provides the API response. + type: object + required: + - success + - errors + - messages + - result + web3ContentListEntries: + description: Provides content list entries. + items: + $ref: '#/components/schemas/web3ContentListEntry' + type: array + web3ContentListEntry: + description: Specify a content list entry to block. + properties: + content: + $ref: '#/components/schemas/web3ContentListEntryContent' + created_on: + $ref: '#/components/schemas/web3Timestamp' + readOnly: true + description: + $ref: '#/components/schemas/web3ContentListEntryDescription' + id: + $ref: '#/components/schemas/web3Identifier' + modified_on: + $ref: '#/components/schemas/web3Timestamp' + readOnly: true + type: + $ref: '#/components/schemas/web3ContentListEntryType' + type: object + web3ContentListEntryCollectionResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + items: {} + nullable: true + type: object + properties: + entries: + $ref: '#/components/schemas/web3ContentListEntries' + success: + description: Specifies whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/web3ResultInfo' + required: + - success + - errors + - messages + - result + web3ContentListEntryContent: + description: Specify the CID or content path of content to block. + example: QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB + maxLength: 500 + type: string + web3ContentListEntryCreateRequest: + properties: + content: + $ref: '#/components/schemas/web3ContentListEntryContent' + description: + $ref: '#/components/schemas/web3ContentListEntryDescription' + type: + $ref: '#/components/schemas/web3ContentListEntryType' + required: + - type + - content + type: object + web3ContentListEntryDescription: + description: Specify an optional description of the content list entry. + example: this is my content list entry + maxLength: 500 + type: string + web3ContentListEntrySingleResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + $ref: '#/components/schemas/web3ContentListEntry' + success: + description: Specifies whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + description: Provides the API response. + type: object + required: + - success + - errors + - messages + - result + web3ContentListEntryType: + description: Specify the type of content list entry to block. + enum: + - cid + - content_path + example: cid + type: string + web3ContentListUpdateRequest: + properties: + action: + $ref: '#/components/schemas/web3ContentListAction' + entries: + $ref: '#/components/schemas/web3ContentListEntries' + required: + - action + - entries + type: object + web3CreateRequest: + properties: + description: + $ref: '#/components/schemas/web3Description' + dnslink: + $ref: '#/components/schemas/web3Dnslink' + name: + $ref: '#/components/schemas/web3Name' + target: + $ref: '#/components/schemas/web3Target' + required: + - name + - target + type: object + web3Description: + description: Specify an optional description of the hostname. + example: This is my IPFS gateway. + maxLength: 500 + type: string + web3Dnslink: + description: Specify the DNSLink value used if the target is ipfs. + example: /ipns/onboarding.ipfs.cloudflare.com + type: string + web3Identifier: + description: Specify the identifier of the hostname. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + readOnly: true + type: string + web3Messages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + web3ModifyRequest: + properties: + description: + $ref: '#/components/schemas/web3Description' + dnslink: + $ref: '#/components/schemas/web3Dnslink' + type: object + web3Name: + description: Specify the hostname that points to the target gateway via CNAME. + example: gateway.example.com + maxLength: 255 + type: string + web3ResultInfo: + properties: + count: + description: Specifies the total number of results for the requested service. + example: 1 + type: number + page: + description: Specifies the current page within paginated list of results. + example: 1 + type: number + per_page: + description: Specifies the number of results per page of results. + example: 20 + type: number + total_count: + description: Specifies the total results available without any search parameters. + example: 2000 + type: number + type: object + web3SingleResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/web3Messages' + messages: + $ref: '#/components/schemas/web3Messages' + result: + $ref: '#/components/schemas/web3Web3Hostname' + success: + description: Specifies whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + description: Provides the API response. + type: object + required: + - success + - errors + - messages + - result + web3Status: + description: Specifies the status of the hostname's activation. + enum: + - active + - pending + - deleting + - error + example: active + readOnly: true + type: string + web3Target: + description: Specify the target gateway of the hostname. + enum: + - ethereum + - ipfs + - ipfs_universal_path + example: ipfs + type: string + web3Timestamp: + example: '2014-01-01T05:20:00.12345Z' + format: date-time + readOnly: true + type: string + web3Web3Hostname: + properties: + created_on: + $ref: '#/components/schemas/web3Timestamp' + readOnly: true + description: + $ref: '#/components/schemas/web3Description' + dnslink: + $ref: '#/components/schemas/web3Dnslink' + id: + $ref: '#/components/schemas/web3Identifier' + modified_on: + $ref: '#/components/schemas/web3Timestamp' + readOnly: true + name: + $ref: '#/components/schemas/web3Name' + status: + $ref: '#/components/schemas/web3Status' + target: + $ref: '#/components/schemas/web3Target' + type: object + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + hostnames: + id: cloudflare.web3.hostnames + name: hostnames + title: Hostnames + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1web3~1hostnames/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1web3~1hostnames/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1web3~1hostnames~1{identifier}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1web3~1hostnames~1{identifier}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1web3~1hostnames~1{identifier}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/hostnames/methods/get' + - $ref: '#/components/x-stackQL-resources/hostnames/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/hostnames/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/hostnames/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/hostnames/methods/delete' + replace: [] + content_lists: + id: cloudflare.web3.content_lists + name: content_lists + title: Content Lists + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1web3~1hostnames~1{identifier}~1ipfs_universal_path~1content_list/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1web3~1hostnames~1{identifier}~1ipfs_universal_path~1content_list/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .action }}{{ $sep }}"action": {{ toJson .action }}{{- $sep = "," -}}{{ end }} + + {{- if .entries }}{{ $sep }}"entries": {{ if eq (kindOf .entries) "string" }}{{ .entries }}{{ else }}{{ toJson .entries }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/content_lists/methods/list' + insert: [] + update: [] + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/content_lists/methods/update' + entries: + id: cloudflare.web3.entries + name: entries + title: Entries + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1web3~1hostnames~1{identifier}~1ipfs_universal_path~1content_list~1entries/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result.entries + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1web3~1hostnames~1{identifier}~1ipfs_universal_path~1content_list~1entries/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1web3~1hostnames~1{identifier}~1ipfs_universal_path~1content_list~1entries~1{content_list_entry_identifier}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1web3~1hostnames~1{identifier}~1ipfs_universal_path~1content_list~1entries~1{content_list_entry_identifier}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1web3~1hostnames~1{identifier}~1ipfs_universal_path~1content_list~1entries~1{content_list_entry_identifier}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/entries/methods/get' + - $ref: '#/components/x-stackQL-resources/entries/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/entries/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/entries/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/entries/methods/update' diff --git a/providers/src/cloudflare/v00.00.00000/services/workers.yaml b/providers/src/cloudflare/v00.00.00000/services/workers.yaml index b2107bfa..64ae7d5d 100644 --- a/providers/src/cloudflare/v00.00.00000/services/workers.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/workers.yaml @@ -2254,7 +2254,48 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/workersDomain' + properties: + cert_id: + description: ID of the TLS certificate issued for the domain. + format: uuid + readOnly: true + type: string + x-auditable: true + environment: + deprecated: true + description: Worker environment associated with the domain. + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + hostname: + description: Hostname of the domain. Can be either the zone apex or a subdomain of the zone. Requests to this hostname will be routed to the configured Worker. + type: string + x-auditable: true + id: + description: Immutable ID of the domain. + readOnly: true + type: string + x-auditable: true + service: + description: Name of the Worker associated with the domain. Requests to the configured hostname will be routed to this Worker. + type: string + x-auditable: true + zone_id: + description: ID of the zone containing the domain hostname. + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + zone_name: + description: Name of the zone containing the domain hostname. + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + required: + - zone_id + - zone_name + - hostname + - service + - environment type: object responses: '200': @@ -4709,7 +4750,6 @@ paths: value: description: "Comparison value. Must match actual values in your data \u2014 verify with the values endpoint. Ensure the value type (string/number/boolean) matches the field type. String comparisons are case-sensitive. Regex uses RE2 syntax (no lookaheads/lookbehinds)." type: string - required: [] type: array from: type: number @@ -5117,7 +5157,6 @@ paths: value: description: "Comparison value. Must match actual values in your data \u2014 verify with the values endpoint. Ensure the value type (string/number/boolean) matches the field type. String comparisons are case-sensitive. Regex uses RE2 syntax (no lookaheads/lookbehinds)." type: string - required: [] type: array groupBys: description: Fields to group calculation results by. Only applicable when the query view is 'calculations'. Produces per-group aggregate values. @@ -5483,7 +5522,6 @@ paths: value: description: "Comparison value. Must match actual values in your data \u2014 verify with the values endpoint. Ensure the value type (string/number/boolean) matches the field type. String comparisons are case-sensitive. Regex uses RE2 syntax (no lookaheads/lookbehinds)." type: string - required: [] type: array key: type: string @@ -6575,7 +6613,65 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/workersDeployment' + properties: + annotations: + properties: + workers/message: + description: Human-readable message about the deployment. Truncated to 1000 bytes if longer. + maxLength: 1000 + type: string + x-auditable: true + workers/triggered_by: + description: Operation that triggered the creation of the deployment. + readOnly: true + type: string + type: object + author_email: + format: email + readOnly: true + type: string + x-auditable: true + created_on: + format: date-time + readOnly: true + type: string + x-auditable: true + id: + format: uuid + readOnly: true + type: string + x-auditable: true + source: + readOnly: true + type: string + x-auditable: true + strategy: + enum: + - percentage + type: string + x-auditable: true + versions: + items: + properties: + percentage: + maximum: 100 + minimum: 0.01 + type: number + x-auditable: true + version_id: + format: uuid + type: string + x-auditable: true + required: + - version_id + - percentage + type: object + type: array + x-auditable: true + required: + - strategy + - versions + type: object responses: '200': content: @@ -9012,7 +9108,272 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/workersWorker' + properties: + created_on: + description: When the Worker was created. + format: date-time + readOnly: true + type: string + x-auditable: true + deployed_on: + description: When the Worker's most recent deployment was created. `null` if the Worker has never been deployed. + format: date-time + nullable: true + readOnly: true + type: string + id: + description: Immutable ID of the Worker. + readOnly: true + type: string + x-auditable: true + logpush: + default: false + description: Whether logpush is enabled for the Worker. + type: boolean + x-auditable: true + name: + description: Name of the Worker. + type: string + x-auditable: true + observability: + description: Observability settings for the Worker. + properties: + enabled: + default: false + description: Whether observability is enabled for the Worker. + type: boolean + x-auditable: true + head_sampling_rate: + default: 1 + description: The sampling rate for observability. From 0 to 1 (1 = 100%, 0.1 = 10%). + type: number + x-auditable: true + logs: + description: Log settings for the Worker. + properties: + destinations: + default: [] + description: A list of destinations where logs will be exported to. + items: + type: string + type: array + x-auditable: true + enabled: + default: false + description: Whether logs are enabled for the Worker. + type: boolean + x-auditable: true + head_sampling_rate: + default: 1 + description: The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%). + type: number + x-auditable: true + invocation_logs: + default: true + description: Whether [invocation logs](https://developers.cloudflare.com/workers/observability/logs/workers-logs/#invocation-logs) are enabled for the Worker. + type: boolean + x-auditable: true + persist: + default: true + description: Whether log persistence is enabled for the Worker. + type: boolean + x-auditable: true + type: object + traces: + description: Trace settings for the Worker. + properties: + destinations: + default: [] + description: A list of destinations where traces will be exported to. + items: + type: string + type: array + x-auditable: true + enabled: + default: false + description: Whether traces are enabled for the Worker. + type: boolean + x-auditable: true + head_sampling_rate: + default: 1 + description: The sampling rate for traces. From 0 to 1 (1 = 100%, 0.1 = 10%). + type: number + x-auditable: true + persist: + default: true + description: Whether trace persistence is enabled for the Worker. + type: boolean + x-auditable: true + type: object + type: object + references: + description: Other resources that reference the Worker and depend on it existing. + properties: + dispatch_namespace_outbounds: + description: Other Workers that reference the Worker as an outbound for a dispatch namespace. + items: + properties: + namespace_id: + description: ID of the dispatch namespace. + type: string + namespace_name: + description: Name of the dispatch namespace. + type: string + worker_id: + description: ID of the Worker using the dispatch namespace. + type: string + worker_name: + description: Name of the Worker using the dispatch namespace. + type: string + required: + - worker_id + - worker_name + - namespace_id + - namespace_name + type: object + type: array + domains: + description: Custom domains connected to the Worker. + items: + properties: + certificate_id: + description: ID of the TLS certificate issued for the custom domain. + type: string + hostname: + description: Full hostname of the custom domain, including the zone name. + type: string + id: + description: ID of the custom domain. + type: string + zone_id: + description: ID of the zone. + type: string + zone_name: + description: Name of the zone. + type: string + required: + - id + - hostname + - zone_id + - zone_name + - certificate_id + type: object + type: array + durable_objects: + description: Other Workers that reference Durable Object classes implemented by the Worker. + items: + properties: + namespace_id: + description: ID of the Durable Object namespace being used. + type: string + namespace_name: + description: Name of the Durable Object namespace being used. + type: string + worker_id: + description: ID of the Worker using the Durable Object implementation. + type: string + worker_name: + description: Name of the Worker using the Durable Object implementation. + type: string + required: + - worker_id + - worker_name + - namespace_id + - namespace_name + type: object + type: array + queues: + description: Queues that send messages to the Worker. + items: + properties: + queue_consumer_id: + description: ID of the queue consumer configuration. + type: string + queue_id: + description: ID of the queue. + type: string + queue_name: + description: Name of the queue. + type: string + required: + - queue_id + - queue_name + - queue_consumer_id + type: object + type: array + workers: + description: Other Workers that reference the Worker using [service bindings](https://developers.cloudflare.com/workers/runtime-apis/bindings/service-bindings/). + items: + properties: + id: + description: ID of the referencing Worker. + type: string + name: + description: Name of the referencing Worker. + type: string + required: + - id + - name + type: object + type: array + readOnly: true + required: + - workers + - domains + - dispatch_namespace_outbounds + - durable_objects + - queues + type: object + subdomain: + description: Subdomain settings for the Worker. + properties: + enabled: + default: false + description: Whether the *.workers.dev subdomain is enabled for the Worker. + type: boolean + x-auditable: true + previews_enabled: + description: Whether [preview URLs](https://developers.cloudflare.com/workers/configuration/previews/) are enabled for the Worker. + type: boolean + x-auditable: true + x-stainless-terraform-configurability: computed_optional + type: object + tags: + default: [] + description: Tags associated with the Worker. + items: + maxLength: 1024 + type: string + maxItems: 8 + type: array + x-stainless-collection-type: set + tail_consumers: + default: [] + description: Other Workers that should consume logs from the Worker. + items: + properties: + name: + description: Name of the consumer Worker. + type: string + x-auditable: true + required: + - name + type: object + type: array + x-stainless-collection-type: set + updated_on: + description: When the Worker was most recently updated. + format: date-time + readOnly: true + type: string + x-auditable: true + required: + - name + - tags + - subdomain + - observability + - logpush + - tail_consumers type: object description: Worker creation parameters. responses: @@ -9794,65 +10155,595 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/workersWorker' - type: object - application/merge-patch+json: - schema: - $ref: '#/components/schemas/workersWorker' - type: object - description: Worker partial update parameters. - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/workersMessages' - messages: - $ref: '#/components/schemas/workersMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/workersWorker' - required: - - success - - errors - - messages - - result - type: object - description: Partially Update Worker success. - '400': - content: - application/json: - schema: - properties: - errors: - minLength: 1 - items: + properties: + created_on: + description: When the Worker was created. + format: date-time + readOnly: true + type: string + x-auditable: true + deployed_on: + description: When the Worker's most recent deployment was created. `null` if the Worker has never been deployed. + format: date-time + nullable: true + readOnly: true + type: string + id: + description: Immutable ID of the Worker. + readOnly: true + type: string + x-auditable: true + logpush: + default: false + description: Whether logpush is enabled for the Worker. + type: boolean + x-auditable: true + name: + description: Name of the Worker. + type: string + x-auditable: true + observability: + description: Observability settings for the Worker. + properties: + enabled: + default: false + description: Whether observability is enabled for the Worker. + type: boolean + x-auditable: true + head_sampling_rate: + default: 1 + description: The sampling rate for observability. From 0 to 1 (1 = 100%, 0.1 = 10%). + type: number + x-auditable: true + logs: + description: Log settings for the Worker. properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - messages: + destinations: + default: [] + description: A list of destinations where logs will be exported to. + items: + type: string + type: array + x-auditable: true + enabled: + default: false + description: Whether logs are enabled for the Worker. + type: boolean + x-auditable: true + head_sampling_rate: + default: 1 + description: The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%). + type: number + x-auditable: true + invocation_logs: + default: true + description: Whether [invocation logs](https://developers.cloudflare.com/workers/observability/logs/workers-logs/#invocation-logs) are enabled for the Worker. + type: boolean + x-auditable: true + persist: + default: true + description: Whether log persistence is enabled for the Worker. + type: boolean + x-auditable: true + type: object + traces: + description: Trace settings for the Worker. + properties: + destinations: + default: [] + description: A list of destinations where traces will be exported to. + items: + type: string + type: array + x-auditable: true + enabled: + default: false + description: Whether traces are enabled for the Worker. + type: boolean + x-auditable: true + head_sampling_rate: + default: 1 + description: The sampling rate for traces. From 0 to 1 (1 = 100%, 0.1 = 10%). + type: number + x-auditable: true + persist: + default: true + description: Whether trace persistence is enabled for the Worker. + type: boolean + x-auditable: true + type: object + type: object + references: + description: Other resources that reference the Worker and depend on it existing. + properties: + dispatch_namespace_outbounds: + description: Other Workers that reference the Worker as an outbound for a dispatch namespace. + items: + properties: + namespace_id: + description: ID of the dispatch namespace. + type: string + namespace_name: + description: Name of the dispatch namespace. + type: string + worker_id: + description: ID of the Worker using the dispatch namespace. + type: string + worker_name: + description: Name of the Worker using the dispatch namespace. + type: string + required: + - worker_id + - worker_name + - namespace_id + - namespace_name + type: object + type: array + domains: + description: Custom domains connected to the Worker. + items: + properties: + certificate_id: + description: ID of the TLS certificate issued for the custom domain. + type: string + hostname: + description: Full hostname of the custom domain, including the zone name. + type: string + id: + description: ID of the custom domain. + type: string + zone_id: + description: ID of the zone. + type: string + zone_name: + description: Name of the zone. + type: string + required: + - id + - hostname + - zone_id + - zone_name + - certificate_id + type: object + type: array + durable_objects: + description: Other Workers that reference Durable Object classes implemented by the Worker. + items: + properties: + namespace_id: + description: ID of the Durable Object namespace being used. + type: string + namespace_name: + description: Name of the Durable Object namespace being used. + type: string + worker_id: + description: ID of the Worker using the Durable Object implementation. + type: string + worker_name: + description: Name of the Worker using the Durable Object implementation. + type: string + required: + - worker_id + - worker_name + - namespace_id + - namespace_name + type: object + type: array + queues: + description: Queues that send messages to the Worker. + items: + properties: + queue_consumer_id: + description: ID of the queue consumer configuration. + type: string + queue_id: + description: ID of the queue. + type: string + queue_name: + description: Name of the queue. + type: string + required: + - queue_id + - queue_name + - queue_consumer_id + type: object + type: array + workers: + description: Other Workers that reference the Worker using [service bindings](https://developers.cloudflare.com/workers/runtime-apis/bindings/service-bindings/). + items: + properties: + id: + description: ID of the referencing Worker. + type: string + name: + description: Name of the referencing Worker. + type: string + required: + - id + - name + type: object + type: array + readOnly: true + required: + - workers + - domains + - dispatch_namespace_outbounds + - durable_objects + - queues + type: object + subdomain: + description: Subdomain settings for the Worker. + properties: + enabled: + default: false + description: Whether the *.workers.dev subdomain is enabled for the Worker. + type: boolean + x-auditable: true + previews_enabled: + description: Whether [preview URLs](https://developers.cloudflare.com/workers/configuration/previews/) are enabled for the Worker. + type: boolean + x-auditable: true + x-stainless-terraform-configurability: computed_optional + type: object + tags: + default: [] + description: Tags associated with the Worker. + items: + maxLength: 1024 + type: string + maxItems: 8 + type: array + x-stainless-collection-type: set + tail_consumers: + default: [] + description: Other Workers that should consume logs from the Worker. + items: + properties: + name: + description: Name of the consumer Worker. + type: string + x-auditable: true + required: + - name + type: object + type: array + x-stainless-collection-type: set + updated_on: + description: When the Worker was most recently updated. + format: date-time + readOnly: true + type: string + x-auditable: true + required: + - name + - tags + - subdomain + - observability + - logpush + - tail_consumers + type: object + application/merge-patch+json: + schema: + properties: + created_on: + description: When the Worker was created. + format: date-time + readOnly: true + type: string + x-auditable: true + deployed_on: + description: When the Worker's most recent deployment was created. `null` if the Worker has never been deployed. + format: date-time + nullable: true + readOnly: true + type: string + id: + description: Immutable ID of the Worker. + readOnly: true + type: string + x-auditable: true + logpush: + default: false + description: Whether logpush is enabled for the Worker. + type: boolean + x-auditable: true + name: + description: Name of the Worker. + type: string + x-auditable: true + observability: + description: Observability settings for the Worker. + properties: + enabled: + default: false + description: Whether observability is enabled for the Worker. + type: boolean + x-auditable: true + head_sampling_rate: + default: 1 + description: The sampling rate for observability. From 0 to 1 (1 = 100%, 0.1 = 10%). + type: number + x-auditable: true + logs: + description: Log settings for the Worker. + properties: + destinations: + default: [] + description: A list of destinations where logs will be exported to. + items: + type: string + type: array + x-auditable: true + enabled: + default: false + description: Whether logs are enabled for the Worker. + type: boolean + x-auditable: true + head_sampling_rate: + default: 1 + description: The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%). + type: number + x-auditable: true + invocation_logs: + default: true + description: Whether [invocation logs](https://developers.cloudflare.com/workers/observability/logs/workers-logs/#invocation-logs) are enabled for the Worker. + type: boolean + x-auditable: true + persist: + default: true + description: Whether log persistence is enabled for the Worker. + type: boolean + x-auditable: true + type: object + traces: + description: Trace settings for the Worker. + properties: + destinations: + default: [] + description: A list of destinations where traces will be exported to. + items: + type: string + type: array + x-auditable: true + enabled: + default: false + description: Whether traces are enabled for the Worker. + type: boolean + x-auditable: true + head_sampling_rate: + default: 1 + description: The sampling rate for traces. From 0 to 1 (1 = 100%, 0.1 = 10%). + type: number + x-auditable: true + persist: + default: true + description: Whether trace persistence is enabled for the Worker. + type: boolean + x-auditable: true + type: object + type: object + references: + description: Other resources that reference the Worker and depend on it existing. + properties: + dispatch_namespace_outbounds: + description: Other Workers that reference the Worker as an outbound for a dispatch namespace. + items: + properties: + namespace_id: + description: ID of the dispatch namespace. + type: string + namespace_name: + description: Name of the dispatch namespace. + type: string + worker_id: + description: ID of the Worker using the dispatch namespace. + type: string + worker_name: + description: Name of the Worker using the dispatch namespace. + type: string + required: + - worker_id + - worker_name + - namespace_id + - namespace_name + type: object + type: array + domains: + description: Custom domains connected to the Worker. + items: + properties: + certificate_id: + description: ID of the TLS certificate issued for the custom domain. + type: string + hostname: + description: Full hostname of the custom domain, including the zone name. + type: string + id: + description: ID of the custom domain. + type: string + zone_id: + description: ID of the zone. + type: string + zone_name: + description: Name of the zone. + type: string + required: + - id + - hostname + - zone_id + - zone_name + - certificate_id + type: object + type: array + durable_objects: + description: Other Workers that reference Durable Object classes implemented by the Worker. + items: + properties: + namespace_id: + description: ID of the Durable Object namespace being used. + type: string + namespace_name: + description: Name of the Durable Object namespace being used. + type: string + worker_id: + description: ID of the Worker using the Durable Object implementation. + type: string + worker_name: + description: Name of the Worker using the Durable Object implementation. + type: string + required: + - worker_id + - worker_name + - namespace_id + - namespace_name + type: object + type: array + queues: + description: Queues that send messages to the Worker. + items: + properties: + queue_consumer_id: + description: ID of the queue consumer configuration. + type: string + queue_id: + description: ID of the queue. + type: string + queue_name: + description: Name of the queue. + type: string + required: + - queue_id + - queue_name + - queue_consumer_id + type: object + type: array + workers: + description: Other Workers that reference the Worker using [service bindings](https://developers.cloudflare.com/workers/runtime-apis/bindings/service-bindings/). + items: + properties: + id: + description: ID of the referencing Worker. + type: string + name: + description: Name of the referencing Worker. + type: string + required: + - id + - name + type: object + type: array + readOnly: true + required: + - workers + - domains + - dispatch_namespace_outbounds + - durable_objects + - queues + type: object + subdomain: + description: Subdomain settings for the Worker. + properties: + enabled: + default: false + description: Whether the *.workers.dev subdomain is enabled for the Worker. + type: boolean + x-auditable: true + previews_enabled: + description: Whether [preview URLs](https://developers.cloudflare.com/workers/configuration/previews/) are enabled for the Worker. + type: boolean + x-auditable: true + x-stainless-terraform-configurability: computed_optional + type: object + tags: + default: [] + description: Tags associated with the Worker. + items: + maxLength: 1024 + type: string + maxItems: 8 + type: array + x-stainless-collection-type: set + tail_consumers: + default: [] + description: Other Workers that should consume logs from the Worker. + items: + properties: + name: + description: Name of the consumer Worker. + type: string + x-auditable: true + required: + - name + type: object + type: array + x-stainless-collection-type: set + updated_on: + description: When the Worker was most recently updated. + format: date-time + readOnly: true + type: string + x-auditable: true + required: + - name + - tags + - subdomain + - observability + - logpush + - tail_consumers + type: object + description: Worker partial update parameters. + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/workersMessages' + messages: + $ref: '#/components/schemas/workersMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/workersWorker' + required: + - success + - errors + - messages + - result + type: object + description: Partially Update Worker success. + '400': + content: + application/json: + schema: + properties: + errors: + minLength: 1 + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + messages: $ref: '#/components/schemas/workersMessages' result: enum: @@ -10118,53 +11009,318 @@ paths: - null nullable: true type: object - success: - description: Whether the API call was successful. - enum: - - false - type: boolean - required: - - success - - errors - - messages - - result - - errors - type: object - description: Internal Server Error - An unexpected server error occurred. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Edit Worker - tags: - - Workers - x-stackql-sdk: - service: workers - resource_chain: - - beta - - workers - method: edit - put: - description: Perform a complete replacement of a Worker, where omitted properties are set to their default values. This is the exact same as the Create Worker endpoint, but operates on an existing Worker. To perform a partial update instead, use the Edit Worker endpoint. - operationId: updateWorker - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: worker_id - schema: - description: Identifier for the Worker, which can be ID or name. - type: string - required: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/workersWorker' + success: + description: Whether the API call was successful. + enum: + - false + type: boolean + required: + - success + - errors + - messages + - result + - errors + type: object + description: Internal Server Error - An unexpected server error occurred. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Edit Worker + tags: + - Workers + x-stackql-sdk: + service: workers + resource_chain: + - beta + - workers + method: edit + put: + description: Perform a complete replacement of a Worker, where omitted properties are set to their default values. This is the exact same as the Create Worker endpoint, but operates on an existing Worker. To perform a partial update instead, use the Edit Worker endpoint. + operationId: updateWorker + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: worker_id + schema: + description: Identifier for the Worker, which can be ID or name. + type: string + required: true + requestBody: + content: + application/json: + schema: + properties: + created_on: + description: When the Worker was created. + format: date-time + readOnly: true + type: string + x-auditable: true + deployed_on: + description: When the Worker's most recent deployment was created. `null` if the Worker has never been deployed. + format: date-time + nullable: true + readOnly: true + type: string + id: + description: Immutable ID of the Worker. + readOnly: true + type: string + x-auditable: true + logpush: + default: false + description: Whether logpush is enabled for the Worker. + type: boolean + x-auditable: true + name: + description: Name of the Worker. + type: string + x-auditable: true + observability: + description: Observability settings for the Worker. + properties: + enabled: + default: false + description: Whether observability is enabled for the Worker. + type: boolean + x-auditable: true + head_sampling_rate: + default: 1 + description: The sampling rate for observability. From 0 to 1 (1 = 100%, 0.1 = 10%). + type: number + x-auditable: true + logs: + description: Log settings for the Worker. + properties: + destinations: + default: [] + description: A list of destinations where logs will be exported to. + items: + type: string + type: array + x-auditable: true + enabled: + default: false + description: Whether logs are enabled for the Worker. + type: boolean + x-auditable: true + head_sampling_rate: + default: 1 + description: The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%). + type: number + x-auditable: true + invocation_logs: + default: true + description: Whether [invocation logs](https://developers.cloudflare.com/workers/observability/logs/workers-logs/#invocation-logs) are enabled for the Worker. + type: boolean + x-auditable: true + persist: + default: true + description: Whether log persistence is enabled for the Worker. + type: boolean + x-auditable: true + type: object + traces: + description: Trace settings for the Worker. + properties: + destinations: + default: [] + description: A list of destinations where traces will be exported to. + items: + type: string + type: array + x-auditable: true + enabled: + default: false + description: Whether traces are enabled for the Worker. + type: boolean + x-auditable: true + head_sampling_rate: + default: 1 + description: The sampling rate for traces. From 0 to 1 (1 = 100%, 0.1 = 10%). + type: number + x-auditable: true + persist: + default: true + description: Whether trace persistence is enabled for the Worker. + type: boolean + x-auditable: true + type: object + type: object + references: + description: Other resources that reference the Worker and depend on it existing. + properties: + dispatch_namespace_outbounds: + description: Other Workers that reference the Worker as an outbound for a dispatch namespace. + items: + properties: + namespace_id: + description: ID of the dispatch namespace. + type: string + namespace_name: + description: Name of the dispatch namespace. + type: string + worker_id: + description: ID of the Worker using the dispatch namespace. + type: string + worker_name: + description: Name of the Worker using the dispatch namespace. + type: string + required: + - worker_id + - worker_name + - namespace_id + - namespace_name + type: object + type: array + domains: + description: Custom domains connected to the Worker. + items: + properties: + certificate_id: + description: ID of the TLS certificate issued for the custom domain. + type: string + hostname: + description: Full hostname of the custom domain, including the zone name. + type: string + id: + description: ID of the custom domain. + type: string + zone_id: + description: ID of the zone. + type: string + zone_name: + description: Name of the zone. + type: string + required: + - id + - hostname + - zone_id + - zone_name + - certificate_id + type: object + type: array + durable_objects: + description: Other Workers that reference Durable Object classes implemented by the Worker. + items: + properties: + namespace_id: + description: ID of the Durable Object namespace being used. + type: string + namespace_name: + description: Name of the Durable Object namespace being used. + type: string + worker_id: + description: ID of the Worker using the Durable Object implementation. + type: string + worker_name: + description: Name of the Worker using the Durable Object implementation. + type: string + required: + - worker_id + - worker_name + - namespace_id + - namespace_name + type: object + type: array + queues: + description: Queues that send messages to the Worker. + items: + properties: + queue_consumer_id: + description: ID of the queue consumer configuration. + type: string + queue_id: + description: ID of the queue. + type: string + queue_name: + description: Name of the queue. + type: string + required: + - queue_id + - queue_name + - queue_consumer_id + type: object + type: array + workers: + description: Other Workers that reference the Worker using [service bindings](https://developers.cloudflare.com/workers/runtime-apis/bindings/service-bindings/). + items: + properties: + id: + description: ID of the referencing Worker. + type: string + name: + description: Name of the referencing Worker. + type: string + required: + - id + - name + type: object + type: array + readOnly: true + required: + - workers + - domains + - dispatch_namespace_outbounds + - durable_objects + - queues + type: object + subdomain: + description: Subdomain settings for the Worker. + properties: + enabled: + default: false + description: Whether the *.workers.dev subdomain is enabled for the Worker. + type: boolean + x-auditable: true + previews_enabled: + description: Whether [preview URLs](https://developers.cloudflare.com/workers/configuration/previews/) are enabled for the Worker. + type: boolean + x-auditable: true + x-stainless-terraform-configurability: computed_optional + type: object + tags: + default: [] + description: Tags associated with the Worker. + items: + maxLength: 1024 + type: string + maxItems: 8 + type: array + x-stainless-collection-type: set + tail_consumers: + default: [] + description: Other Workers that should consume logs from the Worker. + items: + properties: + name: + description: Name of the consumer Worker. + type: string + x-auditable: true + required: + - name + type: object + type: array + x-stainless-collection-type: set + updated_on: + description: When the Worker was most recently updated. + format: date-time + readOnly: true + type: string + x-auditable: true + required: + - name + - tags + - subdomain + - observability + - logpush + - tail_consumers type: object description: Worker update parameters. responses: @@ -10637,7 +11793,233 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/workersVersion' + properties: + annotations: + description: Metadata about the version. + properties: + workers/message: + description: Human-readable message about the version. Truncated to 1000 bytes if longer. + maxLength: 1000 + type: string + x-auditable: true + workers/tag: + description: User-provided identifier for the version. Maximum 100 bytes. + maxLength: 100 + type: string + x-auditable: true + workers/triggered_by: + description: Operation that triggered the creation of the version. + readOnly: true + type: string + x-auditable: true + type: object + assets: + description: Configuration for assets within a Worker. [`_headers`](https://developers.cloudflare.com/workers/static-assets/headers/#custom-headers) and [`_redirects`](https://developers.cloudflare.com/workers/static-assets/redirects/) files should be included as modules named `_headers` and `_redirects` with content type `text/plain`. + properties: + config: + description: Configuration for assets within a Worker. + properties: + html_handling: + default: auto-trailing-slash + description: Determines the redirects and rewrites of requests for HTML content. + enum: + - auto-trailing-slash + - force-trailing-slash + - drop-trailing-slash + - none + type: string + x-auditable: true + not_found_handling: + default: none + description: Determines the response when a request does not match a static asset, and there is no Worker script. + enum: + - none + - 404-page + - single-page-application + type: string + x-auditable: true + run_worker_first: + default: false + type: array + description: Contains a list path rules to control routing to either the Worker or assets. Glob (*) and negative (!) rules are supported. Rules must start with either '/' or '!/'. At least one non-negative rule must be provided, and negative rules have higher precedence than non-negative rules. + items: + type: string + type: object + jwt: + description: Token provided upon successful upload of all files from a registered manifest. + type: string + x-sensitive: true + type: object + bindings: + $ref: '#/components/schemas/workersBindings' + compatibility_date: + $ref: '#/components/schemas/workersCompatibilityDate' + compatibility_flags: + $ref: '#/components/schemas/workersCompatibilityFlags' + containers: + $ref: '#/components/schemas/workersContainers' + created_on: + description: When the version was created. + format: date-time + readOnly: true + type: string + x-auditable: true + id: + description: Version identifier. + format: uuid + readOnly: true + type: string + x-auditable: true + limits: + description: Resource limits enforced at runtime. + properties: + cpu_ms: + description: CPU time limit in milliseconds. + type: integer + subrequests: + description: Subrequest limit per request. + type: integer + type: object + x-stainless-terraform-configurability: computed_optional + main_module: + description: The name of the main module in the `modules` array (e.g. the name of the module that exports a `fetch` handler). + type: string + x-auditable: true + migration_tag: + description: Durable Object migration tag. Set when the version is deployed. Omitted if the version has not been deployed or the Worker does not use Durable Objects. + readOnly: true + type: string + migrations: + description: Migrations for Durable Objects associated with the version. Migrations are applied when the version is deployed. + type: object + properties: + new_tag: + description: Tag to set as the latest migration tag. + type: string + writeOnly: true + x-auditable: true + old_tag: + description: Tag used to verify against the latest migration tag for this Worker. If they don't match, the upload is rejected. + type: string + writeOnly: true + x-auditable: true + deleted_classes: + description: A list of classes to delete Durable Object namespaces from. + items: + type: string + x-auditable: true + type: array + writeOnly: true + new_classes: + description: A list of classes to create Durable Object namespaces from. + items: + type: string + x-auditable: true + type: array + writeOnly: true + new_sqlite_classes: + description: A list of classes to create Durable Object namespaces with SQLite from. + items: + type: string + x-auditable: true + type: array + writeOnly: true + renamed_classes: + description: A list of classes with Durable Object namespaces that were renamed. + items: + properties: + from: + type: string + writeOnly: true + x-auditable: true + to: + type: string + writeOnly: true + x-auditable: true + type: object + type: array + writeOnly: true + transferred_classes: + description: A list of transfers for Durable Object namespaces from a different Worker and class to a class defined in this Worker. + items: + properties: + from: + type: string + writeOnly: true + x-auditable: true + from_script: + type: string + writeOnly: true + x-auditable: true + to: + type: string + writeOnly: true + x-auditable: true + type: object + type: array + writeOnly: true + steps: + description: Migrations to apply in order. + items: + $ref: '#/components/schemas/workersMigrationStep' + type: array + writeOnly: true + modules: + description: Code, sourcemaps, and other content used at runtime. This includes [`_headers`](https://developers.cloudflare.com/workers/static-assets/headers/#custom-headers) and [`_redirects`](https://developers.cloudflare.com/workers/static-assets/redirects/) files used to configure [Static Assets](https://developers.cloudflare.com/workers/static-assets/). `_headers` and `_redirects` files should be included as modules named `_headers` and `_redirects` with content type `text/plain`. + items: + properties: + content_base64: + description: The base64-encoded module content. + format: byte + type: string + content_type: + description: The content type of the module. + type: string + name: + description: The name of the module. + type: string + required: + - name + - content_type + - content_base64 + type: object + type: array + x-stainless-collection-type: set + number: + description: The integer version number, starting from one. + readOnly: true + type: integer + x-auditable: true + placement: + $ref: '#/components/schemas/workersPlacementInfoNoStatus' + source: + description: The client used to create the version. + readOnly: true + type: string + x-auditable: true + startup_time_ms: + description: Time in milliseconds spent on [Worker startup](https://developers.cloudflare.com/workers/platform/limits/#worker-startup-time). + readOnly: true + type: integer + x-auditable: true + urls: + description: All routable URLs that always point to this version. Does not include alias URLs, since aliases can be updated to point to a different version. + items: + format: uri + type: string + readOnly: true + type: array + usage_model: + default: standard + deprecated: true + description: Usage model for the version. + enum: + - standard + - bundled + - unbound + type: string + x-auditable: true + type: object description: Version creation parameters. responses: '200': @@ -10945,7 +12327,21 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/workersRoute' + properties: + id: + readOnly: true + $ref: '#/components/schemas/workersIdentifier' + pattern: + description: Pattern to match incoming requests against. [Learn more](https://developers.cloudflare.com/workers/configuration/routing/routes/#matching-behavior). + type: string + x-auditable: true + script: + description: Name of the script to run if the route matches. + type: string + x-auditable: true + required: + - pattern + type: object responses: '200': content: @@ -11132,7 +12528,21 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/workersRoute' + properties: + id: + readOnly: true + $ref: '#/components/schemas/workersIdentifier' + pattern: + description: Pattern to match incoming requests against. [Learn more](https://developers.cloudflare.com/workers/configuration/routing/routes/#matching-behavior). + type: string + x-auditable: true + script: + description: Name of the script to run if the route matches. + type: string + x-auditable: true + required: + - pattern + type: object responses: '200': content: @@ -12238,8 +13648,8 @@ components: type: number required: - vcpu - - memory_mib - disk_mb + - memory_mib example: lite default: lite enum: @@ -16515,6 +17925,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .branch }}{{ $sep }}"branch": {{ toJson .branch }}{{- $sep = "," -}}{{ end }} + + {{- if .commit_hash }}{{ $sep }}"commit_hash": {{ toJson .commit_hash }}{{- $sep = "," -}}{{ end }} + + {{- if .seed_repo }}{{ $sep }}"seed_repo": {{ if eq (kindOf .seed_repo) "string" }}{{ .seed_repo }}{{ else }}{{ toJson .seed_repo }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/builds/methods/get' @@ -16639,6 +18066,41 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .branch_excludes }}{{ $sep }}"branch_excludes": {{ if eq (kindOf .branch_excludes) "string" }}{{ .branch_excludes }}{{ else }}{{ toJson .branch_excludes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .branch_includes }}{{ $sep }}"branch_includes": {{ if eq (kindOf .branch_includes) "string" }}{{ .branch_includes }}{{ else }}{{ toJson .branch_includes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .build_caching_enabled }}{{ $sep }}"build_caching_enabled": {{ toJson .build_caching_enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .build_command }}{{ $sep }}"build_command": {{ toJson .build_command }}{{- $sep = "," -}}{{ end }} + + {{- if .build_token_uuid }}{{ $sep }}"build_token_uuid": {{ toJson .build_token_uuid }}{{- $sep = "," -}}{{ end }} + + {{- if .deploy_command }}{{ $sep }}"deploy_command": {{ toJson .deploy_command }}{{- $sep = "," -}}{{ end }} + + {{- if .external_script_id }}{{ $sep }}"external_script_id": {{ toJson .external_script_id }}{{- $sep = "," -}}{{ end }} + + {{- if .path_excludes }}{{ $sep }}"path_excludes": {{ if eq (kindOf .path_excludes) "string" }}{{ .path_excludes }}{{ else }}{{ toJson .path_excludes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .path_includes }}{{ $sep }}"path_includes": {{ if eq (kindOf .path_includes) "string" }}{{ .path_includes }}{{ else }}{{ toJson .path_includes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .repo_connection_uuid }}{{ $sep }}"repo_connection_uuid": {{ toJson .repo_connection_uuid }}{{- $sep = "," -}}{{ end }} + + {{- if .root_directory }}{{ $sep }}"root_directory": {{ toJson .root_directory }}{{- $sep = "," -}}{{ end }} + + {{- if .trigger_name }}{{ $sep }}"trigger_name": {{ toJson .trigger_name }}{{- $sep = "," -}}{{ end }} + + } + + ' delete_trigger: operation: $ref: '#/paths/~1accounts~1{account_id}~1builds~1triggers~1{trigger_uuid}/delete' @@ -16654,6 +18116,37 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .branch_excludes }}{{ $sep }}"branch_excludes": {{ if eq (kindOf .branch_excludes) "string" }}{{ .branch_excludes }}{{ else }}{{ toJson .branch_excludes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .branch_includes }}{{ $sep }}"branch_includes": {{ if eq (kindOf .branch_includes) "string" }}{{ .branch_includes }}{{ else }}{{ toJson .branch_includes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .build_caching_enabled }}{{ $sep }}"build_caching_enabled": {{ toJson .build_caching_enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .build_command }}{{ $sep }}"build_command": {{ toJson .build_command }}{{- $sep = "," -}}{{ end }} + + {{- if .build_token_uuid }}{{ $sep }}"build_token_uuid": {{ toJson .build_token_uuid }}{{- $sep = "," -}}{{ end }} + + {{- if .deploy_command }}{{ $sep }}"deploy_command": {{ toJson .deploy_command }}{{- $sep = "," -}}{{ end }} + + {{- if .path_excludes }}{{ $sep }}"path_excludes": {{ if eq (kindOf .path_excludes) "string" }}{{ .path_excludes }}{{ else }}{{ toJson .path_excludes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .path_includes }}{{ $sep }}"path_includes": {{ if eq (kindOf .path_includes) "string" }}{{ .path_includes }}{{ else }}{{ toJson .path_includes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .root_directory }}{{ $sep }}"root_directory": {{ toJson .root_directory }}{{- $sep = "," -}}{{ end }} + + {{- if .trigger_name }}{{ $sep }}"trigger_name": {{ toJson .trigger_name }}{{- $sep = "," -}}{{ end }} + + } + + ' purge_build_cache: operation: $ref: '#/paths/~1accounts~1{account_id}~1builds~1triggers~1{trigger_uuid}~1purge_build_cache/post' @@ -16813,6 +18306,21 @@ components: response: mediaType: application/json openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .expiration_minutes }}{{ $sep }}"expiration_minutes": {{ toJson .expiration_minutes }}{{- $sep = "," -}}{{ end }} + + {{- if .permissions }}{{ $sep }}"permissions": {{ if eq (kindOf .permissions) "string" }}{{ .permissions }}{{ else }}{{ toJson .permissions }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/containers/methods/list' @@ -16872,6 +18380,31 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .datasets }}{{ $sep }}"datasets": {{ if eq (kindOf .datasets) "string" }}{{ .datasets }}{{ else }}{{ toJson .datasets }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .filters }}{{ $sep }}"filters": {{ if eq (kindOf .filters) "string" }}{{ .filters }}{{ else }}{{ toJson .filters }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .from }}{{ $sep }}"from": {{ toJson .from }}{{- $sep = "," -}}{{ end }} + + {{- if .keyNeedle }}{{ $sep }}"keyNeedle": {{ if eq (kindOf .keyNeedle) "string" }}{{ .keyNeedle }}{{ else }}{{ toJson .keyNeedle }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .limit }}{{ $sep }}"limit": {{ toJson .limit }}{{- $sep = "," -}}{{ end }} + + {{- if .needle }}{{ $sep }}"needle": {{ if eq (kindOf .needle) "string" }}{{ .needle }}{{ else }}{{ toJson .needle }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .to }}{{ $sep }}"to": {{ toJson .to }}{{- $sep = "," -}}{{ end }} + + } + + ' query: config: requestBodyTranslate: @@ -16881,6 +18414,43 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .chart }}{{ $sep }}"chart": {{ toJson .chart }}{{- $sep = "," -}}{{ end }} + + {{- if .compare }}{{ $sep }}"compare": {{ toJson .compare }}{{- $sep = "," -}}{{ end }} + + {{- if .dry }}{{ $sep }}"dry": {{ toJson .dry }}{{- $sep = "," -}}{{ end }} + + {{- if .granularity }}{{ $sep }}"granularity": {{ toJson .granularity }}{{- $sep = "," -}}{{ end }} + + {{- if .ignoreSeries }}{{ $sep }}"ignoreSeries": {{ toJson .ignoreSeries }}{{- $sep = "," -}}{{ end }} + + {{- if .limit }}{{ $sep }}"limit": {{ toJson .limit }}{{- $sep = "," -}}{{ end }} + + {{- if .offset }}{{ $sep }}"offset": {{ toJson .offset }}{{- $sep = "," -}}{{ end }} + + {{- if .offsetBy }}{{ $sep }}"offsetBy": {{ toJson .offsetBy }}{{- $sep = "," -}}{{ end }} + + {{- if .offsetDirection }}{{ $sep }}"offsetDirection": {{ toJson .offsetDirection }}{{- $sep = "," -}}{{ end }} + + {{- if .parameters }}{{ $sep }}"parameters": {{ if eq (kindOf .parameters) "string" }}{{ .parameters }}{{ else }}{{ toJson .parameters }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .queryId }}{{ $sep }}"queryId": {{ toJson .queryId }}{{- $sep = "," -}}{{ end }} + + {{- if .timeframe }}{{ $sep }}"timeframe": {{ if eq (kindOf .timeframe) "string" }}{{ .timeframe }}{{ else }}{{ toJson .timeframe }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .view }}{{ $sep }}"view": {{ toJson .view }}{{- $sep = "," -}}{{ end }} + + } + + ' create_values: config: requestBodyTranslate: @@ -16890,6 +18460,31 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .datasets }}{{ $sep }}"datasets": {{ if eq (kindOf .datasets) "string" }}{{ .datasets }}{{ else }}{{ toJson .datasets }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .filters }}{{ $sep }}"filters": {{ if eq (kindOf .filters) "string" }}{{ .filters }}{{ else }}{{ toJson .filters }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .key }}{{ $sep }}"key": {{ toJson .key }}{{- $sep = "," -}}{{ end }} + + {{- if .limit }}{{ $sep }}"limit": {{ toJson .limit }}{{- $sep = "," -}}{{ end }} + + {{- if .needle }}{{ $sep }}"needle": {{ if eq (kindOf .needle) "string" }}{{ .needle }}{{ else }}{{ toJson .needle }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .timeframe }}{{ $sep }}"timeframe": {{ if eq (kindOf .timeframe) "string" }}{{ .timeframe }}{{ else }}{{ toJson .timeframe }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' list: operation: $ref: '#/paths/~1accounts~1{account_id}~1workers~1workers/get' @@ -16906,6 +18501,29 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .logpush }}{{ $sep }}"logpush": {{ toJson .logpush }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .observability }}{{ $sep }}"observability": {{ if eq (kindOf .observability) "string" }}{{ .observability }}{{ else }}{{ toJson .observability }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .subdomain }}{{ $sep }}"subdomain": {{ if eq (kindOf .subdomain) "string" }}{{ .subdomain }}{{ else }}{{ toJson .subdomain }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tags }}{{ $sep }}"tags": {{ if eq (kindOf .tags) "string" }}{{ .tags }}{{ else }}{{ toJson .tags }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tail_consumers }}{{ $sep }}"tail_consumers": {{ if eq (kindOf .tail_consumers) "string" }}{{ .tail_consumers }}{{ else }}{{ toJson .tail_consumers }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1workers~1workers~1{worker_id}/delete' @@ -16928,6 +18546,29 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .logpush }}{{ $sep }}"logpush": {{ toJson .logpush }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .observability }}{{ $sep }}"observability": {{ if eq (kindOf .observability) "string" }}{{ .observability }}{{ else }}{{ toJson .observability }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .subdomain }}{{ $sep }}"subdomain": {{ if eq (kindOf .subdomain) "string" }}{{ .subdomain }}{{ else }}{{ toJson .subdomain }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tags }}{{ $sep }}"tags": {{ if eq (kindOf .tags) "string" }}{{ .tags }}{{ else }}{{ toJson .tags }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tail_consumers }}{{ $sep }}"tail_consumers": {{ if eq (kindOf .tail_consumers) "string" }}{{ .tail_consumers }}{{ else }}{{ toJson .tail_consumers }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' update: config: requestBodyTranslate: @@ -16937,6 +18578,29 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .logpush }}{{ $sep }}"logpush": {{ toJson .logpush }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .observability }}{{ $sep }}"observability": {{ if eq (kindOf .observability) "string" }}{{ .observability }}{{ else }}{{ toJson .observability }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .subdomain }}{{ $sep }}"subdomain": {{ if eq (kindOf .subdomain) "string" }}{{ .subdomain }}{{ else }}{{ toJson .subdomain }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tags }}{{ $sep }}"tags": {{ if eq (kindOf .tags) "string" }}{{ .tags }}{{ else }}{{ toJson .tags }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tail_consumers }}{{ $sep }}"tail_consumers": {{ if eq (kindOf .tail_consumers) "string" }}{{ .tail_consumers }}{{ else }}{{ toJson .tail_consumers }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' delete_versions: operation: $ref: '#/paths/~1accounts~1{account_id}~1workers~1workers~1{worker_id}~1versions~1{version_id}/delete' @@ -17007,6 +18671,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .manifest }}{{ $sep }}"manifest": {{ if eq (kindOf .manifest) "string" }}{{ .manifest }}{{ else }}{{ toJson .manifest }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/scripts/methods/list' @@ -17083,6 +18760,25 @@ components: response: mediaType: application/json openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .configuration }}{{ $sep }}"configuration": {{ if eq (kindOf .configuration) "string" }}{{ .configuration }}{{ else }}{{ toJson .configuration }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .skipPreflightCheck }}{{ $sep }}"skipPreflightCheck": {{ toJson .skipPreflightCheck }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1workers~1observability~1destinations~1{slug}/delete' @@ -17098,6 +18794,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .configuration }}{{ $sep }}"configuration": {{ if eq (kindOf .configuration) "string" }}{{ .configuration }}{{ else }}{{ toJson .configuration }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/destinations/methods/list' @@ -17129,6 +18840,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .parameters }}{{ $sep }}"parameters": {{ if eq (kindOf .parameters) "string" }}{{ .parameters }}{{ else }}{{ toJson .parameters }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' queries_delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1workers~1observability~1queries~1{query_id}/delete' @@ -17151,6 +18879,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .parameters }}{{ $sep }}"parameters": {{ if eq (kindOf .parameters) "string" }}{{ .parameters }}{{ else }}{{ toJson .parameters }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/queries/methods/get' @@ -17233,6 +18978,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .files }}{{ $sep }}"files": {{ if eq (kindOf .files) "string" }}{{ .files }}{{ else }}{{ toJson .files }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .metadata }}{{ $sep }}"metadata": {{ if eq (kindOf .metadata) "string" }}{{ .metadata }}{{ else }}{{ toJson .metadata }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' worker_environment_put_script_content: config: requestBodyTranslate: @@ -17242,6 +19002,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .files }}{{ $sep }}"files": {{ if eq (kindOf .files) "string" }}{{ .files }}{{ else }}{{ toJson .files }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .metadata }}{{ $sep }}"metadata": {{ if eq (kindOf .metadata) "string" }}{{ .metadata }}{{ else }}{{ toJson .metadata }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: [] insert: [] @@ -17293,6 +19068,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .annotations }}{{ $sep }}"annotations": {{ if eq (kindOf .annotations) "string" }}{{ .annotations }}{{ else }}{{ toJson .annotations }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .strategy }}{{ $sep }}"strategy": {{ toJson .strategy }}{{- $sep = "," -}}{{ end }} + + {{- if .versions }}{{ $sep }}"versions": {{ if eq (kindOf .versions) "string" }}{{ .versions }}{{ else }}{{ toJson .versions }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1workers~1scripts~1{script_name}~1deployments~1{deployment_id}/delete' @@ -17378,6 +19170,25 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .logpush }}{{ $sep }}"logpush": {{ toJson .logpush }}{{- $sep = "," -}}{{ end }} + + {{- if .observability }}{{ $sep }}"observability": {{ if eq (kindOf .observability) "string" }}{{ .observability }}{{ else }}{{ toJson .observability }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tags }}{{ $sep }}"tags": {{ if eq (kindOf .tags) "string" }}{{ .tags }}{{ else }}{{ toJson .tags }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .tail_consumers }}{{ $sep }}"tail_consumers": {{ if eq (kindOf .tail_consumers) "string" }}{{ .tail_consumers }}{{ else }}{{ toJson .tail_consumers }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' worker_script_environment_patch_settings: config: requestBodyTranslate: @@ -17387,6 +19198,25 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .errors }}{{ $sep }}"errors": {{ if eq (kindOf .errors) "string" }}{{ .errors }}{{ else }}{{ toJson .errors }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .success }}{{ $sep }}"success": {{ toJson .success }}{{- $sep = "," -}}{{ end }} + + {{- if .result }}{{ $sep }}"result": {{ if eq (kindOf .result) "string" }}{{ .result }}{{ else }}{{ toJson .result }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: [] insert: [] @@ -17416,6 +19246,33 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .text }}{{ $sep }}"text": {{ toJson .text }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + {{- if .algorithm }}{{ $sep }}"algorithm": {{ if eq (kindOf .algorithm) "string" }}{{ .algorithm }}{{ else }}{{ toJson .algorithm }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .format }}{{ $sep }}"format": {{ toJson .format }}{{- $sep = "," -}}{{ end }} + + {{- if .key_base64 }}{{ $sep }}"key_base64": {{ toJson .key_base64 }}{{- $sep = "," -}}{{ end }} + + {{- if .key_jwk }}{{ $sep }}"key_jwk": {{ if eq (kindOf .key_jwk) "string" }}{{ .key_jwk }}{{ else }}{{ toJson .key_jwk }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .usages }}{{ $sep }}"usages": {{ if eq (kindOf .usages) "string" }}{{ .usages }}{{ else }}{{ toJson .usages }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1workers~1scripts~1{script_name}~1secrets~1{secret_name}/delete' @@ -17460,6 +19317,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .settings }}{{ $sep }}"settings": {{ if eq (kindOf .settings) "string" }}{{ .settings }}{{ else }}{{ toJson .settings }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/script_and_version_settings/methods/list' @@ -17561,6 +19431,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .usage_model }}{{ $sep }}"usage_model": {{ toJson .usage_model }}{{- $sep = "," -}}{{ end }} + + {{- if .user_limits }}{{ $sep }}"user_limits": {{ if eq (kindOf .user_limits) "string" }}{{ .user_limits }}{{ else }}{{ toJson .user_limits }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/usage_model/methods/list' @@ -17590,6 +19475,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .files }}{{ $sep }}"files": {{ if eq (kindOf .files) "string" }}{{ .files }}{{ else }}{{ toJson .files }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .metadata }}{{ $sep }}"metadata": {{ if eq (kindOf .metadata) "string" }}{{ .metadata }}{{ else }}{{ toJson .metadata }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' get_by_account: operation: $ref: '#/paths/~1accounts~1{account_id}~1workers~1scripts~1{script_name}~1versions~1{version_id}/get' @@ -17704,6 +19604,41 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .annotations }}{{ $sep }}"annotations": {{ if eq (kindOf .annotations) "string" }}{{ .annotations }}{{ else }}{{ toJson .annotations }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .assets }}{{ $sep }}"assets": {{ if eq (kindOf .assets) "string" }}{{ .assets }}{{ else }}{{ toJson .assets }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .bindings }}{{ $sep }}"bindings": {{ if eq (kindOf .bindings) "string" }}{{ .bindings }}{{ else }}{{ toJson .bindings }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .compatibility_date }}{{ $sep }}"compatibility_date": {{ toJson .compatibility_date }}{{- $sep = "," -}}{{ end }} + + {{- if .compatibility_flags }}{{ $sep }}"compatibility_flags": {{ if eq (kindOf .compatibility_flags) "string" }}{{ .compatibility_flags }}{{ else }}{{ toJson .compatibility_flags }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .containers }}{{ $sep }}"containers": {{ if eq (kindOf .containers) "string" }}{{ .containers }}{{ else }}{{ toJson .containers }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .limits }}{{ $sep }}"limits": {{ if eq (kindOf .limits) "string" }}{{ .limits }}{{ else }}{{ toJson .limits }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .main_module }}{{ $sep }}"main_module": {{ toJson .main_module }}{{- $sep = "," -}}{{ end }} + + {{- if .migrations }}{{ $sep }}"migrations": {{ if eq (kindOf .migrations) "string" }}{{ .migrations }}{{ else }}{{ toJson .migrations }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .modules }}{{ $sep }}"modules": {{ if eq (kindOf .modules) "string" }}{{ .modules }}{{ else }}{{ toJson .modules }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .placement }}{{ $sep }}"placement": {{ if eq (kindOf .placement) "string" }}{{ .placement }}{{ else }}{{ toJson .placement }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .usage_model }}{{ $sep }}"usage_model": {{ toJson .usage_model }}{{- $sep = "," -}}{{ end }} + + } + + ' get_by_account: operation: $ref: '#/paths/~1accounts~1{account_id}~1workers~1workers~1{worker_id}~1versions~1{version_id}/get' diff --git a/providers/src/cloudflare/v00.00.00000/services/workers_for_platforms.yaml b/providers/src/cloudflare/v00.00.00000/services/workers_for_platforms.yaml index c2eef485..43e5cf3a 100644 --- a/providers/src/cloudflare/v00.00.00000/services/workers_for_platforms.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/workers_for_platforms.yaml @@ -3138,6 +3138,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .manifest }}{{ $sep }}"manifest": {{ if eq (kindOf .manifest) "string" }}{{ .manifest }}{{ else }}{{ toJson .manifest }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/scripts/methods/get' @@ -3190,6 +3203,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .files }}{{ $sep }}"files": {{ if eq (kindOf .files) "string" }}{{ .files }}{{ else }}{{ toJson .files }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .metadata }}{{ $sep }}"metadata": {{ if eq (kindOf .metadata) "string" }}{{ .metadata }}{{ else }}{{ toJson .metadata }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/content/methods/list' @@ -3219,6 +3247,33 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .text }}{{ $sep }}"text": {{ toJson .text }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + {{- if .algorithm }}{{ $sep }}"algorithm": {{ if eq (kindOf .algorithm) "string" }}{{ .algorithm }}{{ else }}{{ toJson .algorithm }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .format }}{{ $sep }}"format": {{ toJson .format }}{{- $sep = "," -}}{{ end }} + + {{- if .key_base64 }}{{ $sep }}"key_base64": {{ toJson .key_base64 }}{{- $sep = "," -}}{{ end }} + + {{- if .key_jwk }}{{ $sep }}"key_jwk": {{ if eq (kindOf .key_jwk) "string" }}{{ .key_jwk }}{{ else }}{{ toJson .key_jwk }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .usages }}{{ $sep }}"usages": {{ if eq (kindOf .usages) "string" }}{{ .usages }}{{ else }}{{ toJson .usages }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1workers~1dispatch~1namespaces~1{dispatch_namespace}~1scripts~1{script_name}~1secrets~1{secret_name}/delete' @@ -3263,6 +3318,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .settings }}{{ $sep }}"settings": {{ if eq (kindOf .settings) "string" }}{{ .settings }}{{ else }}{{ toJson .settings }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/settings/methods/list' diff --git a/providers/src/cloudflare/v00.00.00000/services/workflows.yaml b/providers/src/cloudflare/v00.00.00000/services/workflows.yaml index f361b99c..50491817 100644 --- a/providers/src/cloudflare/v00.00.00000/services/workflows.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/workflows.yaml @@ -1,4106 +1,4041 @@ -openapi: 3.0.3 -info: - title: workflows API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/workflows: - get: - description: Lists all workflows configured for the account. - operationId: wor-list-workflows - parameters: - - in: query - name: per_page - schema: - default: 10 - maximum: 100 - minimum: 1 - type: number - - in: query - name: page - schema: - default: 1 - minimum: 1 - type: number - - description: Allows filtering workflows` name. - in: query - name: search - schema: - description: Allows filtering workflows` name. - maxLength: 64 - minLength: 1 - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - result: - items: - properties: - class_name: - type: string - created_on: - format: date-time - type: string - readOnly: true - id: - format: uuid - type: string - instances: - properties: - complete: - type: number - errored: - type: number - paused: - type: number - queued: - type: number - running: - type: number - terminated: - type: number - waiting: - type: number - waitingForPause: - type: number - type: object - modified_on: - format: date-time - type: string - readOnly: true - name: - maxLength: 64 - minLength: 1 - type: string - script_name: - type: string - triggered_on: - format: date-time - nullable: true - type: string - required: - - name - - id - - created_on - - modified_on - - script_name - - class_name - - triggered_on - - instances - type: object - type: array - result_info: - properties: - count: - type: number - cursor: - type: string - page: - type: number - per_page: - type: number - total_count: - type: number - total_pages: - type: number - required: - - per_page - - count - - total_count - type: object - success: - enum: - - true - type: boolean - required: - - success - - errors - - result - - messages - type: object - description: List of all Workflows belonging to a account. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Input Validation Error. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List all Workflows - tags: - - Workflows - x-api-token-group: - - Workers Tail Read - - Workers Scripts Write - - Workers Scripts Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.workers.write - - com.cloudflare.api.workers.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: workflows - resource_chain: [] - method: list - /accounts/{account_id}/workflows/{workflow_name}: - delete: - description: >- - Deletes a Workflow. This only deletes the Workflow and does not delete - or modify any Worker associated to this Workflow or bounded to it. - operationId: wor-delete-workflow - parameters: - - name: workflow_name - in: path - required: true - description: The Workflow name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - result: - properties: - status: - enum: - - ok - type: string - success: - nullable: true - type: boolean - required: - - success - - status - type: object - result_info: - properties: - count: - type: number - cursor: - type: string - page: - type: number - per_page: - type: number - total_count: - type: number - total_pages: - type: number - required: - - per_page - - count - - total_count - type: object - success: - enum: - - true - type: boolean - required: - - success - - errors - - result - - messages - type: object - description: Deletes a Workflow. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Workflow has no deployed versions. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Workflow not found. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Deletes a Workflow - tags: - - Workflows - x-api-token-group: - - Workers Scripts Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.workers.write - - com.cloudflare.api.workers.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: workflows - resource_chain: [] - method: delete - get: - description: Retrieves configuration and metadata for a specific workflow. - operationId: wor-get-workflow-details - parameters: - - name: workflow_name - in: path - required: true - description: The Workflow name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - result: - properties: - class_name: - type: string - created_on: - format: date-time - type: string - readOnly: true - id: - format: uuid - type: string - instances: - properties: - complete: - type: number - errored: - type: number - paused: - type: number - queued: - type: number - running: - type: number - terminated: - type: number - waiting: - type: number - waitingForPause: - type: number - type: object - modified_on: - format: date-time - type: string - readOnly: true - name: - maxLength: 64 - minLength: 1 - type: string - script_name: - type: string - triggered_on: - format: date-time - nullable: true - type: string - required: - - name - - id - - created_on - - modified_on - - script_name - - class_name - - triggered_on - - instances - type: object - result_info: - properties: - count: - type: number - cursor: - type: string - page: - type: number - per_page: - type: number - total_count: - type: number - total_pages: - type: number - required: - - per_page - - count - - total_count - type: object - success: - enum: - - true - type: boolean - required: - - success - - errors - - result - - messages - type: object - description: Get Workflow details. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Workflow has no deployed versions. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Workflow not found. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Workflow details - tags: - - Workflows - x-api-token-group: - - Workers Tail Read - - Workers Scripts Write - - Workers Scripts Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.workers.write - - com.cloudflare.api.workers.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: workflows - resource_chain: [] - method: get - put: - description: Creates a new workflow or updates an existing workflow definition. - operationId: wor-create-or-modify-workflow - parameters: - - name: workflow_name - in: path - required: true - description: The Workflow name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - class_name: - maxLength: 255 - minLength: 1 - type: string - limits: - properties: - steps: - minimum: 1 - type: integer - type: object - script_name: - maxLength: 255 - minLength: 1 - type: string - required: - - script_name - - class_name - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - result: - properties: - class_name: - type: string - created_on: - format: date-time - type: string - readOnly: true - id: - format: uuid - type: string - is_deleted: - type: number - modified_on: - format: date-time - type: string - readOnly: true - name: - maxLength: 64 - minLength: 1 - type: string - script_name: - type: string - terminator_running: - type: number - triggered_on: - format: date-time - nullable: true - type: string - version_id: - format: uuid - type: string - required: - - version_id - - name - - id - - created_on - - modified_on - - script_name - - class_name - - triggered_on - - is_deleted - - terminator_running - type: object - result_info: - properties: - count: - type: number - cursor: - type: string - page: - type: number - per_page: - type: number - total_count: - type: number - total_pages: - type: number - required: - - per_page - - count - - total_count - type: object - success: - enum: - - true - type: boolean - required: - - success - - errors - - result - - messages - type: object - description: >- - Create/modify a Workflow based on a deployed script with an existing - `WorkflowEntrypoint` class. Must be done after deploying the - corresponding script. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Bad Request. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create/modify Workflow - tags: - - Workflows - x-api-token-group: - - Workers Scripts Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.workers.write - - com.cloudflare.api.workers.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: workflows - resource_chain: [] - method: update - /accounts/{account_id}/workflows/{workflow_name}/instances: - get: - description: Lists all instances of a workflow with their execution status. - operationId: wor-list-workflow-instances - parameters: - - name: workflow_name - in: path - required: true - description: The Workflow name. - schema: - type: string - - in: query - name: page - schema: - deprecated: true - description: 'Deprecated: use `cursor` for pagination instead.' - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 50 - maximum: 100 - minimum: 1 - type: number - - description: >- - Opaque token for cursor-based pagination. Mutually exclusive with - `page`. - in: query - name: cursor - schema: - description: >- - Opaque token for cursor-based pagination. Mutually exclusive with - `page`. - type: string - - description: Defines the direction for cursor-based pagination. - in: query - name: direction - schema: - description: Defines the direction for cursor-based pagination. - enum: - - asc - - desc - type: string - - in: query - name: status - schema: - enum: - - queued - - running - - paused - - errored - - terminated - - complete - - waitingForPause - - waiting - type: string - - description: Accepts ISO 8601 with no timezone offsets and in UTC. - in: query - name: date_start - schema: - description: Accepts ISO 8601 with no timezone offsets and in UTC. - format: date-time - type: string - - description: Accepts ISO 8601 with no timezone offsets and in UTC. - in: query - name: date_end - schema: - description: Accepts ISO 8601 with no timezone offsets and in UTC. - format: date-time - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - result: - items: - properties: - created_on: - format: date-time - type: string - readOnly: true - ended_on: - format: date-time - nullable: true - type: string - id: - maxLength: 100 - minLength: 1 - type: string - modified_on: - format: date-time - type: string - readOnly: true - started_on: - format: date-time - nullable: true - type: string - status: - enum: - - queued - - running - - paused - - errored - - terminated - - complete - - waitingForPause - - waiting - type: string - version_id: - format: uuid - type: string - workflow_id: - format: uuid - type: string - required: - - id - - created_on - - modified_on - - started_on - - ended_on - - workflow_id - - version_id - - status - type: object - type: array - result_info: - properties: - count: - type: number - cursor: - type: string - page: - deprecated: true - description: 'Deprecated: use cursor-based pagination instead.' - type: number - per_page: - type: number - total_count: - deprecated: true - description: >- - Deprecated: total count is not reliable with - cursor-based pagination. - type: number - total_pages: - type: number - required: - - per_page - - count - - total_count - type: object - success: - enum: - - true - type: boolean - required: - - success - - errors - - result - - messages - type: object - description: List of workflow instances. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Input Validation Error. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Workflow Name not found. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List of workflow instances - tags: - - Workflows - x-api-token-group: - - Workers Tail Read - - Workers Scripts Write - - Workers Scripts Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.workers.write - - com.cloudflare.api.workers.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: workflows - resource_chain: - - instances - method: list - post: - description: Creates a new instance of a workflow, starting its execution. - operationId: wor-create-new-workflow-instance - parameters: - - name: workflow_name - in: path - required: true - description: The Workflow name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - instance_id: - maximum: 100 - minimum: 1 - type: string - instance_retention: - properties: - error_retention: - description: >- - Specifies the duration in milliseconds or as a string - like '5 minutes'. - type: integer - success_retention: - description: >- - Specifies the duration in milliseconds or as a string - like '5 minutes'. - type: integer - type: object - params: - type: object - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - result: - properties: - id: - maxLength: 100 - minLength: 1 - type: string - status: - enum: - - queued - - running - - paused - - errored - - terminated - - complete - - waitingForPause - - waiting - type: string - version_id: - format: uuid - type: string - workflow_id: - format: uuid - type: string - required: - - id - - workflow_id - - version_id - - status - type: object - result_info: - properties: - count: - type: number - cursor: - type: string - page: - type: number - per_page: - type: number - total_count: - type: number - total_pages: - type: number - required: - - per_page - - count - - total_count - type: object - success: - enum: - - true - type: boolean - required: - - success - - errors - - result - - messages - type: object - description: >- - Create workflow instance. Body is a JSON parsable string that it's - passed into the new instance as the event payload. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Provided Workflow ID is not valid. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Workflow Name not found. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a new workflow instance - tags: - - Workflows - x-api-token-group: - - Workers Scripts Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.workers.write - - com.cloudflare.api.workers.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: workflows - resource_chain: - - instances - method: create - /accounts/{account_id}/workflows/{workflow_name}/instances/batch: - post: - description: Creates multiple workflow instances in a single batch operation. - operationId: wor-batch-create-workflow-instance - parameters: - - name: workflow_name - in: path - required: true - description: The Workflow name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - items: - properties: - instance_id: - maximum: 100 - minimum: 1 - type: string - instance_retention: - properties: - error_retention: - description: >- - Specifies the duration in milliseconds or as a string - like '5 minutes'. - type: integer - success_retention: - description: >- - Specifies the duration in milliseconds or as a string - like '5 minutes'. - type: integer - type: object - params: - type: object - type: object - maxItems: 100 - minItems: 1 - type: array - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - result: - items: - properties: - id: - maxLength: 100 - minLength: 1 - type: string - status: - enum: - - queued - - running - - paused - - errored - - terminated - - complete - - waitingForPause - - waiting - type: string - version_id: - format: uuid - type: string - workflow_id: - format: uuid - type: string - required: - - id - - workflow_id - - version_id - - status - type: object - type: array - result_info: - properties: - count: - type: number - cursor: - type: string - page: - type: number - per_page: - type: number - total_count: - type: number - total_pages: - type: number - required: - - per_page - - count - - total_count - type: object - success: - enum: - - true - type: boolean - required: - - success - - errors - - result - - messages - type: object - description: >- - Batch create workflow instances. Body is a JSON list that contain - all payloads and ids that are passed into the new instance as the - event payload. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Provided Workflow ID is not valid. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Workflow Name not found. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Batch create new Workflow instances - tags: - - Workflows - x-api-token-group: - - Workers Scripts Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.workers.write - - com.cloudflare.api.workers.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/workflows/{workflow_name}/instances/batch/terminate: - post: - description: Terminates multiple workflow instances in a single batch operation. - operationId: wor-batch-terminate-workflow-instances - parameters: - - name: workflow_name - in: path - required: true - description: The Workflow name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - items: - maximum: 100 - minimum: 1 - type: string - maxItems: 100 - minItems: 1 - type: array - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - result: - properties: - instancesTerminated: - type: number - status: - enum: - - ok - - already_running - type: string - required: - - status - - instancesTerminated - type: object - result_info: - properties: - count: - type: number - cursor: - type: string - page: - type: number - per_page: - type: number - total_count: - type: number - total_pages: - type: number - required: - - per_page - - count - - total_count - type: object - success: - enum: - - true - type: boolean - required: - - success - - errors - - result - - messages - type: object - description: >- - Batch terminate instances of a workflow, via a async job. Body is a - JSON list that contain the ids of the instances to terminate. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Provided Workflow ID is not valid. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Workflow Name not found. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Batch terminate instances of a workflow - tags: - - Workflows - x-api-token-group: - - Workers Scripts Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.workers.write - - com.cloudflare.api.workers.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/workflows/{workflow_name}/instances/terminate: - get: - description: Gets the status of a bulk workflow instance termination job. - operationId: wor-status-terminate-workflow-instances - parameters: - - name: workflow_name - in: path - required: true - description: The Workflow name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - result: - properties: - status: - enum: - - running - - not_running - type: string - required: - - status - type: object - result_info: - properties: - count: - type: number - cursor: - type: string - page: - type: number - per_page: - type: number - total_count: - type: number - total_pages: - type: number - required: - - per_page - - count - - total_count - type: object - success: - enum: - - true - type: boolean - required: - - success - - errors - - result - - messages - type: object - description: >- - Get status of the job responsible for terminate all instances of a - workflow. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Input Validation Error. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Workflow Name not found. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: >- - Get status of the job responsible for terminate all instances of a - workflow - tags: - - Workflows - x-api-token-group: - - Workers Tail Read - - Workers Scripts Write - - Workers Scripts Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.workers.write - - com.cloudflare.api.workers.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/workflows/{workflow_name}/instances/{instance_id}: - get: - description: Retrieves logs and execution status for a specific workflow instance. - operationId: wor-describe-workflow-instance - parameters: - - name: workflow_name - in: path - required: true - description: The Workflow name. - schema: - type: string - - name: instance_id - in: path - required: true - description: The Workflow instance ID. - schema: - type: string - - description: >- - When true, omits step details and returns only metadata with - step_count. - in: query - name: simple - schema: - default: 'false' - description: >- - When true, omits step details and returns only metadata with - step_count. - enum: - - 'true' - - 'false' - type: string - - description: >- - Step ordering: "asc" (default, oldest first) or "desc" (newest - first). - in: query - name: order - schema: - default: asc - description: >- - Step ordering: "asc" (default, oldest first) or "desc" (newest - first). - enum: - - asc - - desc - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - result: - properties: - end: - format: date-time - nullable: true - type: string - error: - nullable: true - properties: - message: - type: string - name: - type: string - required: - - name - - message - type: object - output: - type: string - params: - type: object - queued: - format: date-time - type: string - start: - format: date-time - nullable: true - type: string - status: - enum: - - queued - - running - - paused - - errored - - terminated - - complete - - waitingForPause - - waiting - type: string - step_count: - type: integer - steps: - items: - type: object - properties: - attempts: - items: - properties: - end: - format: date-time - nullable: true - type: string - error: - nullable: true - properties: - message: - type: string - name: - type: string - required: - - name - - message - type: object - start: - format: date-time - type: string - success: - nullable: true - type: boolean - required: - - start - - end - - success - - error - type: object - type: array - config: - properties: - retries: - properties: - backoff: - enum: - - constant - - linear - - exponential - type: string - delay: - description: Specifies the delay duration. - type: string - limit: - type: number - required: - - limit - - delay - type: object - timeout: - description: Specifies the timeout duration. - type: string - required: - - retries - - timeout - type: object - end: - format: date-time - nullable: true - type: string - name: - type: string - output: - nullable: true - type: string - start: - format: date-time - type: string - success: - nullable: true - type: boolean - type: - enum: - - step - type: string - error: - nullable: true - properties: - message: - type: string - name: - type: string - required: - - name - - message - type: object - finished: - type: boolean - trigger: - properties: - source: - type: string - required: - - source - type: object - required: - - type - type: array - success: - nullable: true - type: boolean - trigger: - properties: - source: - enum: - - unknown - - api - - binding - - event - - cron - type: string - required: - - source - type: object - versionId: - format: uuid - type: string - required: - - params - - trigger - - versionId - - queued - - start - - end - - step_count - - steps - - success - - error - - status - - output - type: object - result_info: - properties: - count: - type: number - cursor: - type: string - page: - type: number - per_page: - type: number - total_count: - type: number - total_pages: - type: number - required: - - per_page - - count - - total_count - type: object - success: - enum: - - true - type: boolean - required: - - success - - errors - - result - - messages - type: object - description: Get all logs and status from the instance. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Bad Request. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Instance not found. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get logs and status from instance - tags: - - Workflows - x-api-token-group: - - Workers Tail Read - - Workers Scripts Write - - Workers Scripts Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.workers.write - - com.cloudflare.api.workers.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: workflows - resource_chain: - - instances - method: get - /accounts/{account_id}/workflows/{workflow_name}/instances/{instance_id}/events/{event_type}: - post: - description: >- - Sends an event to a running workflow instance to trigger state - transitions. - operationId: wor-send-event-workflow-instance - parameters: - - name: workflow_name - in: path - required: true - description: The Workflow name. - schema: - type: string - - name: instance_id - in: path - required: true - description: The Workflow instance ID. - schema: - type: string - - in: path - name: event_type - schema: - maxLength: 100 - minLength: 1 - type: string - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - result: - type: object - result_info: - properties: - count: - type: number - cursor: - type: string - page: - type: number - per_page: - type: number - total_count: - type: number - total_pages: - type: number - required: - - per_page - - count - - total_count - type: object - success: - enum: - - true - type: boolean - required: - - success - - errors - - messages - type: object - description: Send an event to an instance. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Bad Request. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Workflow not found. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Send event to instance - tags: - - Workflows - x-api-token-group: - - Workers Scripts Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.workers.write - - com.cloudflare.api.workers.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: workflows - resource_chain: - - instances - - events - method: create - /accounts/{account_id}/workflows/{workflow_name}/instances/{instance_id}/status: - patch: - description: >- - Changes the execution status of a workflow instance (e.g., pause, - resume, terminate). - operationId: wor-change-status-workflow-instance - parameters: - - name: workflow_name - in: path - required: true - description: The Workflow name. - schema: - type: string - - name: instance_id - in: path - required: true - description: The Workflow instance ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - from: - description: >- - Step to restart from. Only applicable when status is - "restart". - properties: - count: - exclusiveMinimum: true - minimum: 0 - type: integer - name: - maxLength: 256 - minLength: 1 - type: string - type: - enum: - - do - - sleep - - waitForEvent - type: string - required: - - name - type: object - status: - description: Apply action to instance. - enum: - - resume - - pause - - terminate - - restart - type: string - required: - - status - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - result: - properties: - status: - enum: - - queued - - running - - paused - - errored - - terminated - - complete - - waitingForPause - - waiting - type: string - timestamp: - description: Accepts ISO 8601 with no timezone offsets and in UTC. - format: date-time - type: string - required: - - status - - timestamp - type: object - result_info: - properties: - count: - type: number - cursor: - type: string - page: - type: number - per_page: - type: number - total_count: - type: number - total_pages: - type: number - required: - - per_page - - count - - total_count - type: object - success: - enum: - - true - type: boolean - required: - - success - - errors - - result - - messages - type: object - description: Change status of instance - it can be paused, resumed or terminated. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Bad Request. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Instance not found. - '409': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Instance not in a restartable state. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Change status of instance - tags: - - Workflows - x-api-token-group: - - Workers Scripts Write - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.workers.write - - com.cloudflare.api.workers.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: workflows - resource_chain: - - instances - - status - method: edit - /accounts/{account_id}/workflows/{workflow_name}/versions: - get: - description: Lists all deployed versions of a workflow. - operationId: wor-list-workflow-versions - parameters: - - name: workflow_name - in: path - required: true - description: The Workflow name. - schema: - type: string - - in: query - name: per_page - schema: - default: 50 - maximum: 100 - minimum: 1 - type: number - - in: query - name: page - schema: - default: 1 - minimum: 1 - type: number - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - result: - items: - properties: - class_name: - type: string - created_on: - format: date-time - type: string - readOnly: true - has_dag: - type: boolean - id: - format: uuid - type: string - language: - description: >- - The programming language of the workflow - implementation - enum: - - javascript - - python - type: string - limits: - properties: - steps: - minimum: 1 - type: integer - type: object - modified_on: - format: date-time - type: string - readOnly: true - workflow_id: - format: uuid - type: string - required: - - created_on - - modified_on - - id - - workflow_id - - class_name - - has_dag - - language - type: object - type: array - result_info: - properties: - count: - type: number - cursor: - type: string - page: - type: number - per_page: - type: number - total_count: - type: number - total_pages: - type: number - required: - - per_page - - count - - total_count - type: object - success: - enum: - - true - type: boolean - required: - - success - - errors - - result - - messages - type: object - description: List deployed workflow versions. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Bad Request. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List deployed Workflow versions - tags: - - Workflows - x-api-token-group: - - Workers Tail Read - - Workers Scripts Write - - Workers Scripts Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.workers.write - - com.cloudflare.api.workers.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: workflows - resource_chain: - - versions - method: list - /accounts/{account_id}/workflows/{workflow_name}/versions/{version_id}: - get: - description: Retrieves details for a specific deployed workflow version. - operationId: wor-describe-workflow-versions - parameters: - - name: workflow_name - in: path - required: true - description: The Workflow name. - schema: - type: string - - in: path - name: version_id - schema: - format: uuid - type: string - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - result: - properties: - class_name: - type: string - created_on: - format: date-time - type: string - readOnly: true - has_dag: - type: boolean - id: - format: uuid - type: string - language: - description: >- - The programming language of the workflow - implementation - enum: - - javascript - - python - type: string - limits: - properties: - steps: - minimum: 1 - type: integer - type: object - modified_on: - format: date-time - type: string - readOnly: true - workflow_id: - format: uuid - type: string - required: - - created_on - - modified_on - - id - - workflow_id - - class_name - - has_dag - - language - type: object - result_info: - properties: - count: - type: number - cursor: - type: string - page: - type: number - per_page: - type: number - total_count: - type: number - total_pages: - type: number - required: - - per_page - - count - - total_count - type: object - success: - enum: - - true - type: boolean - required: - - success - - errors - - result - - messages - type: object - description: Get specific version details. - '400': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Bad Request. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Version not found. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Workflow version details - tags: - - Workflows - x-api-token-group: - - Workers Tail Read - - Workers Scripts Write - - Workers Scripts Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.workers.write - - com.cloudflare.api.workers.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: workflows - resource_chain: - - versions - method: get - /accounts/{account_id}/workflows/{workflow_name}/versions/{version_id}/dag: - get: - description: >- - Retrieves the directed acyclic graph (DAG) representation of a workflow - version. - operationId: wor-describe-workflow-versions-dag - parameters: - - name: workflow_name - in: path - required: true - description: The Workflow name. - schema: - type: string - - in: path - name: version_id - schema: - format: uuid - type: string - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - result: - properties: - class_name: - type: string - created_on: - format: date-time - type: string - readOnly: true - dag: - nullable: true - type: object - id: - format: uuid - type: string - modified_on: - format: date-time - type: string - readOnly: true - workflow_id: - format: uuid - type: string - required: - - created_on - - modified_on - - id - - workflow_id - - class_name - - dag - type: object - result_info: - properties: - count: - type: number - cursor: - type: string - page: - type: number - per_page: - type: number - total_count: - type: number - total_pages: - type: number - required: - - per_page - - count - - total_count - type: object - success: - enum: - - true - type: boolean - required: - - success - - errors - - result - - messages - type: object - description: Get the parsed DAG for a specific workflow version. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Version not found. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Workflow version dag - tags: - - Workflows - x-api-token-group: - - Workers Tail Read - - Workers Scripts Write - - Workers Scripts Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.workers.write - - com.cloudflare.api.workers.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /accounts/{account_id}/workflows/{workflow_name}/versions/{version_id}/graph: - get: - description: Retrieves the graph visualization of a workflow version. - operationId: wor-describe-workflow-versions-graph - parameters: - - name: workflow_name - in: path - required: true - description: The Workflow name. - schema: - type: string - - in: path - name: version_id - schema: - format: uuid - type: string - required: true - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - result: - properties: - class_name: - type: string - created_on: - format: date-time - type: string - readOnly: true - graph: - description: Versioned workflow graph payload. - nullable: true - properties: - version: - type: number - workflow: - description: A parsed workflow entrypoint with its step graph. - properties: - class_name: - type: string - functions: - type: object - nodes: - items: - type: object - properties: - duration: - description: >- - Duration as milliseconds (number) or - human-readable string. - type: number - name: - type: string - resolves: - type: number - starts: - type: number - type: - enum: - - step_sleep - type: string - config: - description: >- - Configuration for a step (retries and - timeout). - properties: - retries: - description: Retry policy for a step. - properties: - backoff: - description: Backoff strategy for step retries. - enum: - - constant - - linear - - exponential - type: string - delay: - description: >- - Duration as milliseconds (number) or - human-readable string. - type: number - limit: - type: number - required: - - limit - - delay - - backoff - type: object - timeout: - description: >- - Duration as milliseconds (number) or - human-readable string. - type: number - required: - - retries - - timeout - type: object - nodes: - description: Child nodes (recursive). - items: - type: object - type: array - options: - description: Options for a waitForEvent step. - nullable: true - properties: - event_type: - type: string - timeout: - description: >- - Duration as milliseconds (number) or - human-readable string. - type: number - required: - - event_type - - timeout - type: object - payload: - description: Shape descriptor for JSON payloads. - type: object - properties: - type: - enum: - - unknown - type: string - fields: - description: >- - Nested JsonShape fields (recursive - structure). - type: object - required: - - type - timestamp: - type: string - kind: - description: Parallel execution strategy. - enum: - - all - - any - - all_settled - - race - type: string - catch_block: - nullable: true - properties: - nodes: - description: Child nodes (recursive). - items: - type: object - type: array - type: - enum: - - block - type: string - required: - - type - - nodes - type: object - finally_block: - nullable: true - properties: - nodes: - description: Child nodes (recursive). - items: - type: object - type: array - type: - enum: - - block - type: string - required: - - type - - nodes - type: object - try_block: - nullable: true - properties: - nodes: - description: Child nodes (recursive). - items: - type: object - type: array - type: - enum: - - block - type: string - required: - - type - - nodes - type: object - branches: - items: - properties: - condition: - nullable: true - type: string - nodes: - description: Child nodes (recursive). - items: - type: object - type: array - required: - - condition - - nodes - type: object - type: array - discriminant: - type: string - class_name: - type: string - functions: - type: object - required: - - type - type: array - payload: - description: Shape descriptor for JSON payloads. - type: object - properties: - type: - enum: - - unknown - type: string - fields: - description: >- - Nested JsonShape fields (recursive - structure). - type: object - required: - - type - required: - - class_name - - functions - - nodes - type: object - required: - - version - - workflow - type: object - id: - format: uuid - type: string - modified_on: - format: date-time - type: string - readOnly: true - workflow_id: - format: uuid - type: string - required: - - created_on - - modified_on - - id - - workflow_id - - class_name - - graph - type: object - result_info: - properties: - count: - type: number - cursor: - type: string - page: - type: number - per_page: - type: number - total_count: - type: number - total_pages: - type: number - required: - - per_page - - count - - total_count - type: object - success: - enum: - - true - type: boolean - required: - - success - - errors - - result - - messages - type: object - description: Get the parsed graph for a specific workflow version. - '404': - content: - application/json: - schema: - properties: - errors: - items: - properties: - code: - type: number - message: - type: string - required: - - code - - message - type: object - type: array - messages: - items: - type: string - type: array - result: - enum: - - null - nullable: true - type: object - success: - enum: - - false - type: boolean - required: - - success - - messages - - errors - - result - type: object - description: Version not found. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Workflow version graph - tags: - - Workflows - x-api-token-group: - - Workers Tail Read - - Workers Scripts Write - - Workers Scripts Read - x-cfPermissionsRequired: - enum: - - com.cloudflare.api.workers.write - - com.cloudflare.api.workers.read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true -components: - schemas: {} - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - workflows: - id: cloudflare.workflows.workflows - name: workflows - title: Workflows - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1workflows/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/workflows/methods/get' - - $ref: '#/components/x-stackQL-resources/workflows/methods/list' - insert: [] - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/workflows/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/workflows/methods/update' - instances: - id: cloudflare.workflows.instances - name: instances - title: Instances - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}~1instances/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - batch: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}~1instances~1batch/post - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}~1instances~1{instance_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update_status: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}~1instances~1{instance_id}~1status/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/instances/methods/get' - - $ref: '#/components/x-stackQL-resources/instances/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - workflows_instances: - id: cloudflare.workflows.workflows_instances - name: workflows_instances - title: Workflows Instances - methods: - create_by_account: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}~1instances/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/workflows_instances/methods/create_by_account - update: [] - delete: [] - replace: [] - terminate: - id: cloudflare.workflows.terminate - name: terminate - title: Terminate - methods: - wor_batch_terminate_workflow_instances: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}~1instances~1batch~1terminate/post - response: - mediaType: application/json - openAPIDocKey: '200' - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}~1instances~1terminate/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/terminate/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/terminate/methods/wor_batch_terminate_workflow_instances - update: [] - delete: [] - replace: [] - instances_events: - id: cloudflare.workflows.instances_events - name: instances_events - title: Instances Events - methods: - create_by_account: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}~1instances~1{instance_id}~1events~1{event_type}/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] - versions: - id: cloudflare.workflows.versions - name: versions - title: Versions - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}~1versions/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}~1versions~1{version_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/versions/methods/get' - - $ref: '#/components/x-stackQL-resources/versions/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - dag: - id: cloudflare.workflows.dag - name: dag - title: Dag - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}~1versions~1{version_id}~1dag/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/dag/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - graph: - id: cloudflare.workflows.graph - name: graph - title: Graph - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}~1versions~1{version_id}~1graph/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/graph/methods/list' - insert: [] - update: [] - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: workflows API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/workflows: + get: + description: Lists all workflows configured for the account. + operationId: wor-list-workflows + parameters: + - in: query + name: per_page + schema: + default: 10 + maximum: 100 + minimum: 1 + type: number + - in: query + name: page + schema: + default: 1 + minimum: 1 + type: number + - description: Allows filtering workflows` name. + in: query + name: search + schema: + description: Allows filtering workflows` name. + maxLength: 64 + minLength: 1 + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + result: + items: + properties: + class_name: + type: string + created_on: + format: date-time + type: string + readOnly: true + id: + format: uuid + type: string + instances: + properties: + complete: + type: number + errored: + type: number + paused: + type: number + queued: + type: number + running: + type: number + terminated: + type: number + waiting: + type: number + waitingForPause: + type: number + type: object + modified_on: + format: date-time + type: string + readOnly: true + name: + maxLength: 64 + minLength: 1 + type: string + script_name: + type: string + triggered_on: + format: date-time + nullable: true + type: string + required: + - name + - id + - created_on + - modified_on + - script_name + - class_name + - triggered_on + - instances + type: object + type: array + result_info: + properties: + count: + type: number + cursor: + type: string + page: + type: number + per_page: + type: number + total_count: + type: number + total_pages: + type: number + required: + - per_page + - count + - total_count + type: object + success: + enum: + - true + type: boolean + required: + - success + - errors + - result + - messages + type: object + description: List of all Workflows belonging to a account. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Input Validation Error. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List all Workflows + tags: + - Workflows + x-api-token-group: + - Workers Tail Read + - Workers Scripts Write + - Workers Scripts Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.workers.write + - com.cloudflare.api.workers.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: workflows + resource_chain: [] + method: list + /accounts/{account_id}/workflows/{workflow_name}: + delete: + description: Deletes a Workflow. This only deletes the Workflow and does not delete or modify any Worker associated to this Workflow or bounded to it. + operationId: wor-delete-workflow + parameters: + - name: workflow_name + in: path + required: true + description: The Workflow name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + result: + properties: + status: + enum: + - ok + type: string + success: + nullable: true + type: boolean + required: + - success + - status + type: object + result_info: + properties: + count: + type: number + cursor: + type: string + page: + type: number + per_page: + type: number + total_count: + type: number + total_pages: + type: number + required: + - per_page + - count + - total_count + type: object + success: + enum: + - true + type: boolean + required: + - success + - errors + - result + - messages + type: object + description: Deletes a Workflow. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Workflow has no deployed versions. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Workflow not found. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Deletes a Workflow + tags: + - Workflows + x-api-token-group: + - Workers Scripts Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.workers.write + - com.cloudflare.api.workers.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: workflows + resource_chain: [] + method: delete + get: + description: Retrieves configuration and metadata for a specific workflow. + operationId: wor-get-workflow-details + parameters: + - name: workflow_name + in: path + required: true + description: The Workflow name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + result: + properties: + class_name: + type: string + created_on: + format: date-time + type: string + readOnly: true + id: + format: uuid + type: string + instances: + properties: + complete: + type: number + errored: + type: number + paused: + type: number + queued: + type: number + running: + type: number + terminated: + type: number + waiting: + type: number + waitingForPause: + type: number + type: object + modified_on: + format: date-time + type: string + readOnly: true + name: + maxLength: 64 + minLength: 1 + type: string + script_name: + type: string + triggered_on: + format: date-time + nullable: true + type: string + required: + - name + - id + - created_on + - modified_on + - script_name + - class_name + - triggered_on + - instances + type: object + result_info: + properties: + count: + type: number + cursor: + type: string + page: + type: number + per_page: + type: number + total_count: + type: number + total_pages: + type: number + required: + - per_page + - count + - total_count + type: object + success: + enum: + - true + type: boolean + required: + - success + - errors + - result + - messages + type: object + description: Get Workflow details. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Workflow has no deployed versions. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Workflow not found. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Workflow details + tags: + - Workflows + x-api-token-group: + - Workers Tail Read + - Workers Scripts Write + - Workers Scripts Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.workers.write + - com.cloudflare.api.workers.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: workflows + resource_chain: [] + method: get + put: + description: Creates a new workflow or updates an existing workflow definition. + operationId: wor-create-or-modify-workflow + parameters: + - name: workflow_name + in: path + required: true + description: The Workflow name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + class_name: + maxLength: 255 + minLength: 1 + type: string + limits: + properties: + steps: + minimum: 1 + type: integer + type: object + script_name: + maxLength: 255 + minLength: 1 + type: string + required: + - script_name + - class_name + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + result: + properties: + class_name: + type: string + created_on: + format: date-time + type: string + readOnly: true + id: + format: uuid + type: string + is_deleted: + type: number + modified_on: + format: date-time + type: string + readOnly: true + name: + maxLength: 64 + minLength: 1 + type: string + script_name: + type: string + terminator_running: + type: number + triggered_on: + format: date-time + nullable: true + type: string + version_id: + format: uuid + type: string + required: + - version_id + - name + - id + - created_on + - modified_on + - script_name + - class_name + - triggered_on + - is_deleted + - terminator_running + type: object + result_info: + properties: + count: + type: number + cursor: + type: string + page: + type: number + per_page: + type: number + total_count: + type: number + total_pages: + type: number + required: + - per_page + - count + - total_count + type: object + success: + enum: + - true + type: boolean + required: + - success + - errors + - result + - messages + type: object + description: Create/modify a Workflow based on a deployed script with an existing `WorkflowEntrypoint` class. Must be done after deploying the corresponding script. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Bad Request. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create/modify Workflow + tags: + - Workflows + x-api-token-group: + - Workers Scripts Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.workers.write + - com.cloudflare.api.workers.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: workflows + resource_chain: [] + method: update + /accounts/{account_id}/workflows/{workflow_name}/instances: + get: + description: Lists all instances of a workflow with their execution status. + operationId: wor-list-workflow-instances + parameters: + - name: workflow_name + in: path + required: true + description: The Workflow name. + schema: + type: string + - in: query + name: page + schema: + deprecated: true + description: 'Deprecated: use `cursor` for pagination instead.' + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 50 + maximum: 100 + minimum: 1 + type: number + - description: Opaque token for cursor-based pagination. Mutually exclusive with `page`. + in: query + name: cursor + schema: + description: Opaque token for cursor-based pagination. Mutually exclusive with `page`. + type: string + - description: Defines the direction for cursor-based pagination. + in: query + name: direction + schema: + description: Defines the direction for cursor-based pagination. + enum: + - asc + - desc + type: string + - in: query + name: status + schema: + enum: + - queued + - running + - paused + - errored + - terminated + - complete + - waitingForPause + - waiting + type: string + - description: Accepts ISO 8601 with no timezone offsets and in UTC. + in: query + name: date_start + schema: + description: Accepts ISO 8601 with no timezone offsets and in UTC. + format: date-time + type: string + - description: Accepts ISO 8601 with no timezone offsets and in UTC. + in: query + name: date_end + schema: + description: Accepts ISO 8601 with no timezone offsets and in UTC. + format: date-time + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + result: + items: + properties: + created_on: + format: date-time + type: string + readOnly: true + ended_on: + format: date-time + nullable: true + type: string + id: + maxLength: 100 + minLength: 1 + type: string + modified_on: + format: date-time + type: string + readOnly: true + started_on: + format: date-time + nullable: true + type: string + status: + enum: + - queued + - running + - paused + - errored + - terminated + - complete + - waitingForPause + - waiting + type: string + version_id: + format: uuid + type: string + workflow_id: + format: uuid + type: string + required: + - id + - created_on + - modified_on + - started_on + - ended_on + - workflow_id + - version_id + - status + type: object + type: array + result_info: + properties: + count: + type: number + cursor: + type: string + page: + deprecated: true + description: 'Deprecated: use cursor-based pagination instead.' + type: number + per_page: + type: number + total_count: + deprecated: true + description: 'Deprecated: total count is not reliable with cursor-based pagination.' + type: number + total_pages: + type: number + required: + - per_page + - count + - total_count + type: object + success: + enum: + - true + type: boolean + required: + - success + - errors + - result + - messages + type: object + description: List of workflow instances. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Input Validation Error. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Workflow Name not found. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List of workflow instances + tags: + - Workflows + x-api-token-group: + - Workers Tail Read + - Workers Scripts Write + - Workers Scripts Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.workers.write + - com.cloudflare.api.workers.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: workflows + resource_chain: + - instances + method: list + post: + description: Creates a new instance of a workflow, starting its execution. + operationId: wor-create-new-workflow-instance + parameters: + - name: workflow_name + in: path + required: true + description: The Workflow name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + instance_id: + maximum: 100 + minimum: 1 + type: string + instance_retention: + properties: + error_retention: + description: Specifies the duration in milliseconds or as a string like '5 minutes'. + type: integer + success_retention: + description: Specifies the duration in milliseconds or as a string like '5 minutes'. + type: integer + type: object + params: + type: object + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + result: + properties: + id: + maxLength: 100 + minLength: 1 + type: string + status: + enum: + - queued + - running + - paused + - errored + - terminated + - complete + - waitingForPause + - waiting + type: string + version_id: + format: uuid + type: string + workflow_id: + format: uuid + type: string + required: + - id + - workflow_id + - version_id + - status + type: object + result_info: + properties: + count: + type: number + cursor: + type: string + page: + type: number + per_page: + type: number + total_count: + type: number + total_pages: + type: number + required: + - per_page + - count + - total_count + type: object + success: + enum: + - true + type: boolean + required: + - success + - errors + - result + - messages + type: object + description: Create workflow instance. Body is a JSON parsable string that it's passed into the new instance as the event payload. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Provided Workflow ID is not valid. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Workflow Name not found. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a new workflow instance + tags: + - Workflows + x-api-token-group: + - Workers Scripts Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.workers.write + - com.cloudflare.api.workers.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: workflows + resource_chain: + - instances + method: create + /accounts/{account_id}/workflows/{workflow_name}/instances/batch: + post: + description: Creates multiple workflow instances in a single batch operation. + operationId: wor-batch-create-workflow-instance + parameters: + - name: workflow_name + in: path + required: true + description: The Workflow name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + items: + properties: + instance_id: + maximum: 100 + minimum: 1 + type: string + instance_retention: + properties: + error_retention: + description: Specifies the duration in milliseconds or as a string like '5 minutes'. + type: integer + success_retention: + description: Specifies the duration in milliseconds or as a string like '5 minutes'. + type: integer + type: object + params: + type: object + type: object + maxItems: 100 + minItems: 1 + type: array + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + result: + items: + properties: + id: + maxLength: 100 + minLength: 1 + type: string + status: + enum: + - queued + - running + - paused + - errored + - terminated + - complete + - waitingForPause + - waiting + type: string + version_id: + format: uuid + type: string + workflow_id: + format: uuid + type: string + required: + - id + - workflow_id + - version_id + - status + type: object + type: array + result_info: + properties: + count: + type: number + cursor: + type: string + page: + type: number + per_page: + type: number + total_count: + type: number + total_pages: + type: number + required: + - per_page + - count + - total_count + type: object + success: + enum: + - true + type: boolean + required: + - success + - errors + - result + - messages + type: object + description: Batch create workflow instances. Body is a JSON list that contain all payloads and ids that are passed into the new instance as the event payload. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Provided Workflow ID is not valid. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Workflow Name not found. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Batch create new Workflow instances + tags: + - Workflows + x-api-token-group: + - Workers Scripts Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.workers.write + - com.cloudflare.api.workers.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/workflows/{workflow_name}/instances/batch/terminate: + post: + description: Terminates multiple workflow instances in a single batch operation. + operationId: wor-batch-terminate-workflow-instances + parameters: + - name: workflow_name + in: path + required: true + description: The Workflow name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + items: + maximum: 100 + minimum: 1 + type: string + maxItems: 100 + minItems: 1 + type: array + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + result: + properties: + instancesTerminated: + type: number + status: + enum: + - ok + - already_running + type: string + required: + - status + - instancesTerminated + type: object + result_info: + properties: + count: + type: number + cursor: + type: string + page: + type: number + per_page: + type: number + total_count: + type: number + total_pages: + type: number + required: + - per_page + - count + - total_count + type: object + success: + enum: + - true + type: boolean + required: + - success + - errors + - result + - messages + type: object + description: Batch terminate instances of a workflow, via a async job. Body is a JSON list that contain the ids of the instances to terminate. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Provided Workflow ID is not valid. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Workflow Name not found. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Batch terminate instances of a workflow + tags: + - Workflows + x-api-token-group: + - Workers Scripts Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.workers.write + - com.cloudflare.api.workers.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/workflows/{workflow_name}/instances/terminate: + get: + description: Gets the status of a bulk workflow instance termination job. + operationId: wor-status-terminate-workflow-instances + parameters: + - name: workflow_name + in: path + required: true + description: The Workflow name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + result: + properties: + status: + enum: + - running + - not_running + type: string + required: + - status + type: object + result_info: + properties: + count: + type: number + cursor: + type: string + page: + type: number + per_page: + type: number + total_count: + type: number + total_pages: + type: number + required: + - per_page + - count + - total_count + type: object + success: + enum: + - true + type: boolean + required: + - success + - errors + - result + - messages + type: object + description: Get status of the job responsible for terminate all instances of a workflow. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Input Validation Error. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Workflow Name not found. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get status of the job responsible for terminate all instances of a workflow + tags: + - Workflows + x-api-token-group: + - Workers Tail Read + - Workers Scripts Write + - Workers Scripts Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.workers.write + - com.cloudflare.api.workers.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/workflows/{workflow_name}/instances/{instance_id}: + get: + description: Retrieves logs and execution status for a specific workflow instance. + operationId: wor-describe-workflow-instance + parameters: + - name: workflow_name + in: path + required: true + description: The Workflow name. + schema: + type: string + - name: instance_id + in: path + required: true + description: The Workflow instance ID. + schema: + type: string + - description: When true, omits step details and returns only metadata with step_count. + in: query + name: simple + schema: + default: 'false' + description: When true, omits step details and returns only metadata with step_count. + enum: + - 'true' + - 'false' + type: string + - description: 'Step ordering: "asc" (default, oldest first) or "desc" (newest first).' + in: query + name: order + schema: + default: asc + description: 'Step ordering: "asc" (default, oldest first) or "desc" (newest first).' + enum: + - asc + - desc + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + result: + properties: + end: + format: date-time + nullable: true + type: string + error: + nullable: true + properties: + message: + type: string + name: + type: string + required: + - name + - message + type: object + output: + type: string + params: + type: object + queued: + format: date-time + type: string + start: + format: date-time + nullable: true + type: string + status: + enum: + - queued + - running + - paused + - errored + - terminated + - complete + - waitingForPause + - waiting + type: string + step_count: + type: integer + steps: + items: + type: object + properties: + attempts: + items: + properties: + end: + format: date-time + nullable: true + type: string + error: + nullable: true + properties: + message: + type: string + name: + type: string + required: + - name + - message + type: object + start: + format: date-time + type: string + success: + nullable: true + type: boolean + required: + - start + - end + - success + - error + type: object + type: array + config: + properties: + retries: + properties: + backoff: + enum: + - constant + - linear + - exponential + type: string + delay: + description: Specifies the delay duration. + type: string + limit: + type: number + required: + - limit + - delay + type: object + timeout: + description: Specifies the timeout duration. + type: string + required: + - retries + - timeout + type: object + end: + format: date-time + nullable: true + type: string + name: + type: string + output: + nullable: true + type: string + start: + format: date-time + type: string + success: + nullable: true + type: boolean + type: + enum: + - step + type: string + error: + nullable: true + properties: + message: + type: string + name: + type: string + required: + - name + - message + type: object + finished: + type: boolean + trigger: + properties: + source: + type: string + required: + - source + type: object + required: + - type + type: array + success: + nullable: true + type: boolean + trigger: + properties: + source: + enum: + - unknown + - api + - binding + - event + - cron + type: string + required: + - source + type: object + versionId: + format: uuid + type: string + required: + - params + - trigger + - versionId + - queued + - start + - end + - step_count + - steps + - success + - error + - status + - output + type: object + result_info: + properties: + count: + type: number + cursor: + type: string + page: + type: number + per_page: + type: number + total_count: + type: number + total_pages: + type: number + required: + - per_page + - count + - total_count + type: object + success: + enum: + - true + type: boolean + required: + - success + - errors + - result + - messages + type: object + description: Get all logs and status from the instance. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Bad Request. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Instance not found. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get logs and status from instance + tags: + - Workflows + x-api-token-group: + - Workers Tail Read + - Workers Scripts Write + - Workers Scripts Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.workers.write + - com.cloudflare.api.workers.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: workflows + resource_chain: + - instances + method: get + /accounts/{account_id}/workflows/{workflow_name}/instances/{instance_id}/events/{event_type}: + post: + description: Sends an event to a running workflow instance to trigger state transitions. + operationId: wor-send-event-workflow-instance + parameters: + - name: workflow_name + in: path + required: true + description: The Workflow name. + schema: + type: string + - name: instance_id + in: path + required: true + description: The Workflow instance ID. + schema: + type: string + - in: path + name: event_type + schema: + maxLength: 100 + minLength: 1 + type: string + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + result: + type: object + result_info: + properties: + count: + type: number + cursor: + type: string + page: + type: number + per_page: + type: number + total_count: + type: number + total_pages: + type: number + required: + - per_page + - count + - total_count + type: object + success: + enum: + - true + type: boolean + required: + - success + - errors + - messages + type: object + description: Send an event to an instance. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Bad Request. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Workflow not found. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Send event to instance + tags: + - Workflows + x-api-token-group: + - Workers Scripts Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.workers.write + - com.cloudflare.api.workers.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: workflows + resource_chain: + - instances + - events + method: create + /accounts/{account_id}/workflows/{workflow_name}/instances/{instance_id}/status: + patch: + description: Changes the execution status of a workflow instance (e.g., pause, resume, terminate). + operationId: wor-change-status-workflow-instance + parameters: + - name: workflow_name + in: path + required: true + description: The Workflow name. + schema: + type: string + - name: instance_id + in: path + required: true + description: The Workflow instance ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + from: + description: Step to restart from. Only applicable when status is "restart". + properties: + count: + exclusiveMinimum: true + minimum: 0 + type: integer + name: + maxLength: 256 + minLength: 1 + type: string + type: + enum: + - do + - sleep + - waitForEvent + type: string + required: + - name + type: object + status: + description: Apply action to instance. + enum: + - resume + - pause + - terminate + - restart + type: string + required: + - status + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + result: + properties: + status: + enum: + - queued + - running + - paused + - errored + - terminated + - complete + - waitingForPause + - waiting + type: string + timestamp: + description: Accepts ISO 8601 with no timezone offsets and in UTC. + format: date-time + type: string + required: + - status + - timestamp + type: object + result_info: + properties: + count: + type: number + cursor: + type: string + page: + type: number + per_page: + type: number + total_count: + type: number + total_pages: + type: number + required: + - per_page + - count + - total_count + type: object + success: + enum: + - true + type: boolean + required: + - success + - errors + - result + - messages + type: object + description: Change status of instance - it can be paused, resumed or terminated. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Bad Request. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Instance not found. + '409': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Instance not in a restartable state. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Change status of instance + tags: + - Workflows + x-api-token-group: + - Workers Scripts Write + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.workers.write + - com.cloudflare.api.workers.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: workflows + resource_chain: + - instances + - status + method: edit + /accounts/{account_id}/workflows/{workflow_name}/versions: + get: + description: Lists all deployed versions of a workflow. + operationId: wor-list-workflow-versions + parameters: + - name: workflow_name + in: path + required: true + description: The Workflow name. + schema: + type: string + - in: query + name: per_page + schema: + default: 50 + maximum: 100 + minimum: 1 + type: number + - in: query + name: page + schema: + default: 1 + minimum: 1 + type: number + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + result: + items: + properties: + class_name: + type: string + created_on: + format: date-time + type: string + readOnly: true + has_dag: + type: boolean + id: + format: uuid + type: string + language: + description: The programming language of the workflow implementation + enum: + - javascript + - python + type: string + limits: + properties: + steps: + minimum: 1 + type: integer + type: object + modified_on: + format: date-time + type: string + readOnly: true + workflow_id: + format: uuid + type: string + required: + - created_on + - modified_on + - id + - workflow_id + - class_name + - has_dag + - language + type: object + type: array + result_info: + properties: + count: + type: number + cursor: + type: string + page: + type: number + per_page: + type: number + total_count: + type: number + total_pages: + type: number + required: + - per_page + - count + - total_count + type: object + success: + enum: + - true + type: boolean + required: + - success + - errors + - result + - messages + type: object + description: List deployed workflow versions. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Bad Request. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List deployed Workflow versions + tags: + - Workflows + x-api-token-group: + - Workers Tail Read + - Workers Scripts Write + - Workers Scripts Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.workers.write + - com.cloudflare.api.workers.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: workflows + resource_chain: + - versions + method: list + /accounts/{account_id}/workflows/{workflow_name}/versions/{version_id}: + get: + description: Retrieves details for a specific deployed workflow version. + operationId: wor-describe-workflow-versions + parameters: + - name: workflow_name + in: path + required: true + description: The Workflow name. + schema: + type: string + - in: path + name: version_id + schema: + format: uuid + type: string + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + result: + properties: + class_name: + type: string + created_on: + format: date-time + type: string + readOnly: true + has_dag: + type: boolean + id: + format: uuid + type: string + language: + description: The programming language of the workflow implementation + enum: + - javascript + - python + type: string + limits: + properties: + steps: + minimum: 1 + type: integer + type: object + modified_on: + format: date-time + type: string + readOnly: true + workflow_id: + format: uuid + type: string + required: + - created_on + - modified_on + - id + - workflow_id + - class_name + - has_dag + - language + type: object + result_info: + properties: + count: + type: number + cursor: + type: string + page: + type: number + per_page: + type: number + total_count: + type: number + total_pages: + type: number + required: + - per_page + - count + - total_count + type: object + success: + enum: + - true + type: boolean + required: + - success + - errors + - result + - messages + type: object + description: Get specific version details. + '400': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Bad Request. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Version not found. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Workflow version details + tags: + - Workflows + x-api-token-group: + - Workers Tail Read + - Workers Scripts Write + - Workers Scripts Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.workers.write + - com.cloudflare.api.workers.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: workflows + resource_chain: + - versions + method: get + /accounts/{account_id}/workflows/{workflow_name}/versions/{version_id}/dag: + get: + description: Retrieves the directed acyclic graph (DAG) representation of a workflow version. + operationId: wor-describe-workflow-versions-dag + parameters: + - name: workflow_name + in: path + required: true + description: The Workflow name. + schema: + type: string + - in: path + name: version_id + schema: + format: uuid + type: string + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + result: + properties: + class_name: + type: string + created_on: + format: date-time + type: string + readOnly: true + dag: + nullable: true + type: object + id: + format: uuid + type: string + modified_on: + format: date-time + type: string + readOnly: true + workflow_id: + format: uuid + type: string + required: + - created_on + - modified_on + - id + - workflow_id + - class_name + - dag + type: object + result_info: + properties: + count: + type: number + cursor: + type: string + page: + type: number + per_page: + type: number + total_count: + type: number + total_pages: + type: number + required: + - per_page + - count + - total_count + type: object + success: + enum: + - true + type: boolean + required: + - success + - errors + - result + - messages + type: object + description: Get the parsed DAG for a specific workflow version. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Version not found. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Workflow version dag + tags: + - Workflows + x-api-token-group: + - Workers Tail Read + - Workers Scripts Write + - Workers Scripts Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.workers.write + - com.cloudflare.api.workers.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /accounts/{account_id}/workflows/{workflow_name}/versions/{version_id}/graph: + get: + description: Retrieves the graph visualization of a workflow version. + operationId: wor-describe-workflow-versions-graph + parameters: + - name: workflow_name + in: path + required: true + description: The Workflow name. + schema: + type: string + - in: path + name: version_id + schema: + format: uuid + type: string + required: true + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + result: + properties: + class_name: + type: string + created_on: + format: date-time + type: string + readOnly: true + graph: + description: Versioned workflow graph payload. + nullable: true + properties: + version: + type: number + workflow: + description: A parsed workflow entrypoint with its step graph. + properties: + class_name: + type: string + functions: + type: object + nodes: + items: + type: object + properties: + duration: + description: Duration as milliseconds (number) or human-readable string. + type: number + name: + type: string + resolves: + type: number + starts: + type: number + type: + enum: + - step_sleep + type: string + config: + description: Configuration for a step (retries and timeout). + properties: + retries: + description: Retry policy for a step. + properties: + backoff: + description: Backoff strategy for step retries. + enum: + - constant + - linear + - exponential + type: string + delay: + description: Duration as milliseconds (number) or human-readable string. + type: number + limit: + type: number + required: + - limit + - delay + - backoff + type: object + timeout: + description: Duration as milliseconds (number) or human-readable string. + type: number + required: + - retries + - timeout + type: object + nodes: + description: Child nodes (recursive). + items: + type: object + type: array + options: + description: Options for a waitForEvent step. + nullable: true + properties: + event_type: + type: string + timeout: + description: Duration as milliseconds (number) or human-readable string. + type: number + required: + - event_type + - timeout + type: object + payload: + description: Shape descriptor for JSON payloads. + type: object + properties: + type: + enum: + - unknown + type: string + fields: + description: Nested JsonShape fields (recursive structure). + type: object + required: + - type + timestamp: + type: string + kind: + description: Parallel execution strategy. + enum: + - all + - any + - all_settled + - race + type: string + catch_block: + nullable: true + properties: + nodes: + description: Child nodes (recursive). + items: + type: object + type: array + type: + enum: + - block + type: string + required: + - type + - nodes + type: object + finally_block: + nullable: true + properties: + nodes: + description: Child nodes (recursive). + items: + type: object + type: array + type: + enum: + - block + type: string + required: + - type + - nodes + type: object + try_block: + nullable: true + properties: + nodes: + description: Child nodes (recursive). + items: + type: object + type: array + type: + enum: + - block + type: string + required: + - type + - nodes + type: object + branches: + items: + properties: + condition: + nullable: true + type: string + nodes: + description: Child nodes (recursive). + items: + type: object + type: array + required: + - condition + - nodes + type: object + type: array + discriminant: + type: string + class_name: + type: string + functions: + type: object + required: + - type + type: array + payload: + description: Shape descriptor for JSON payloads. + type: object + properties: + type: + enum: + - unknown + type: string + fields: + description: Nested JsonShape fields (recursive structure). + type: object + required: + - type + required: + - class_name + - functions + - nodes + type: object + required: + - version + - workflow + type: object + id: + format: uuid + type: string + modified_on: + format: date-time + type: string + readOnly: true + workflow_id: + format: uuid + type: string + required: + - created_on + - modified_on + - id + - workflow_id + - class_name + - graph + type: object + result_info: + properties: + count: + type: number + cursor: + type: string + page: + type: number + per_page: + type: number + total_count: + type: number + total_pages: + type: number + required: + - per_page + - count + - total_count + type: object + success: + enum: + - true + type: boolean + required: + - success + - errors + - result + - messages + type: object + description: Get the parsed graph for a specific workflow version. + '404': + content: + application/json: + schema: + properties: + errors: + items: + properties: + code: + type: number + message: + type: string + required: + - code + - message + type: object + type: array + messages: + items: + type: string + type: array + result: + enum: + - null + nullable: true + type: object + success: + enum: + - false + type: boolean + required: + - success + - messages + - errors + - result + type: object + description: Version not found. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Workflow version graph + tags: + - Workflows + x-api-token-group: + - Workers Tail Read + - Workers Scripts Write + - Workers Scripts Read + x-cfPermissionsRequired: + enum: + - com.cloudflare.api.workers.write + - com.cloudflare.api.workers.read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true +components: + schemas: {} + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + workflows: + id: cloudflare.workflows.workflows + name: workflows + title: Workflows + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1workflows/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .class_name }}{{ $sep }}"class_name": {{ toJson .class_name }}{{- $sep = "," -}}{{ end }} + + {{- if .limits }}{{ $sep }}"limits": {{ if eq (kindOf .limits) "string" }}{{ .limits }}{{ else }}{{ toJson .limits }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .script_name }}{{ $sep }}"script_name": {{ toJson .script_name }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/workflows/methods/get' + - $ref: '#/components/x-stackQL-resources/workflows/methods/list' + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/workflows/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/workflows/methods/update' + instances: + id: cloudflare.workflows.instances + name: instances + title: Instances + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}~1instances/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + batch: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}~1instances~1batch/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}~1instances~1{instance_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update_status: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}~1instances~1{instance_id}~1status/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .from }}{{ $sep }}"from": {{ if eq (kindOf .from) "string" }}{{ .from }}{{ else }}{{ toJson .from }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .status }}{{ $sep }}"status": {{ toJson .status }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/instances/methods/get' + - $ref: '#/components/x-stackQL-resources/instances/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + workflows_instances: + id: cloudflare.workflows.workflows_instances + name: workflows_instances + title: Workflows Instances + methods: + create_by_account: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}~1instances/post' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .instance_id }}{{ $sep }}"instance_id": {{ toJson .instance_id }}{{- $sep = "," -}}{{ end }} + + {{- if .instance_retention }}{{ $sep }}"instance_retention": {{ if eq (kindOf .instance_retention) "string" }}{{ .instance_retention }}{{ else }}{{ toJson .instance_retention }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .params }}{{ $sep }}"params": {{ if eq (kindOf .params) "string" }}{{ .params }}{{ else }}{{ toJson .params }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/workflows_instances/methods/create_by_account' + update: [] + delete: [] + replace: [] + terminate: + id: cloudflare.workflows.terminate + name: terminate + title: Terminate + methods: + wor_batch_terminate_workflow_instances: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}~1instances~1batch~1terminate/post' + response: + mediaType: application/json + openAPIDocKey: '200' + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}~1instances~1terminate/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/terminate/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/terminate/methods/wor_batch_terminate_workflow_instances' + update: [] + delete: [] + replace: [] + instances_events: + id: cloudflare.workflows.instances_events + name: instances_events + title: Instances Events + methods: + create_by_account: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}~1instances~1{instance_id}~1events~1{event_type}/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + versions: + id: cloudflare.workflows.versions + name: versions + title: Versions + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}~1versions/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}~1versions~1{version_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/versions/methods/get' + - $ref: '#/components/x-stackQL-resources/versions/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + dag: + id: cloudflare.workflows.dag + name: dag + title: Dag + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}~1versions~1{version_id}~1dag/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/dag/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + graph: + id: cloudflare.workflows.graph + name: graph + title: Graph + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1workflows~1{workflow_name}~1versions~1{version_id}~1graph/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/graph/methods/list' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/zaraz.yaml b/providers/src/cloudflare/v00.00.00000/services/zaraz.yaml index 9964e8d2..4d5a22d1 100644 --- a/providers/src/cloudflare/v00.00.00000/services/zaraz.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/zaraz.yaml @@ -1,1271 +1,1236 @@ -openapi: 3.0.3 -info: - title: zaraz API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /zones/{zone_id}/settings/zaraz/config: - get: - description: >- - Gets latest Zaraz configuration for a zone. It can be preview or - published configuration, whichever was the last updated. Secret - variables values will not be included. - operationId: get-zones-zone_identifier-zaraz-config - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/zarazZarazConfigResponse' - description: Get Zaraz configuration response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/zarazApiResponseCommonFailure' - description: Get Zaraz configuration response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Zaraz configuration - tags: - - Zaraz - x-api-token-group: - - Zaraz Edit - - Zaraz Read - - Zaraz Admin - x-stackql-sdk: - service: zaraz - resource_chain: - - config - method: get - put: - description: Updates Zaraz configuration for a zone. - operationId: put-zones-zone_identifier-zaraz-config - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/zarazZarazConfigBody' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/zarazZarazConfigResponse' - description: Update Zaraz configuration response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/zarazApiResponseCommonFailure' - description: Update Zaraz configuration response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Zaraz configuration - tags: - - Zaraz - x-api-token-group: - - Zaraz Edit - - Zaraz Admin - x-stackql-sdk: - service: zaraz - resource_chain: - - config - method: update - /zones/{zone_id}/settings/zaraz/default: - get: - description: Gets default Zaraz configuration for a zone. - operationId: get-zones-zone_identifier-zaraz-default - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/zarazZarazConfigResponse' - description: Get Zaraz default configuration response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/zarazApiResponseCommonFailure' - description: Get Zaraz default configuration response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get default Zaraz configuration - tags: - - Zaraz - x-api-token-group: - - Zaraz Edit - - Zaraz Read - - Zaraz Admin - x-stackql-sdk: - service: zaraz - resource_chain: - - default - method: get - /zones/{zone_id}/settings/zaraz/export: - get: - description: >- - Exports full current published Zaraz configuration for a zone, secret - variables included. - operationId: get-zones-zone_identifier-zaraz-export - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/zarazZarazConfigReturn' - description: Get Zaraz configuration response. - headers: - Content-Disposition: - schema: - type: string - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/zarazApiResponseCommonFailure' - description: Get Zaraz configuration response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Export Zaraz configuration - tags: - - Zaraz - x-api-token-group: - - Zaraz Edit - - Zaraz Read - - Zaraz Admin - x-stackql-sdk: - service: zaraz - resource_chain: - - export - method: get - /zones/{zone_id}/settings/zaraz/history: - get: - description: Lists a history of published Zaraz configuration records for a zone. - operationId: get-zones-zone_identifier-zaraz-history - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: >- - Ordinal number to start listing the results with. Default value is - 0. - in: query - name: offset - schema: - minimum: 0 - type: integer - - description: Maximum amount of results to list. Default value is 10. - in: query - name: limit - schema: - minimum: 1 - type: integer - - description: The field to sort by. Default is updated_at. - in: query - name: sortField - schema: - enum: - - id - - user_id - - description - - created_at - - updated_at - type: string - - description: Sorting order. Default is DESC. - in: query - name: sortOrder - schema: - enum: - - DESC - - ASC - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/zarazZarazHistoryResponse' - description: List Zaraz historical configuration records response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/zarazApiResponseCommonFailure' - description: List Zaraz historical configuration records failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Zaraz historical configuration records - tags: - - Zaraz - x-api-token-group: - - Zaraz Edit - - Zaraz Read - - Zaraz Admin - x-stackql-sdk: - service: zaraz - resource_chain: - - history - method: list - put: - description: Restores a historical published Zaraz configuration by ID for a zone. - operationId: put-zones-zone_identifier-zaraz-history - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - description: ID of the Zaraz configuration to restore. - minimum: 1 - type: integer - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/zarazZarazConfigResponse' - description: Restore Zaraz historical configuration by ID response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/zarazApiResponseCommonFailure' - description: Restore Zaraz historical configuration by ID failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Restore Zaraz historical configuration by ID - tags: - - Zaraz - x-api-token-group: - - Zaraz Edit - - Zaraz Admin - x-stackql-sdk: - service: zaraz - resource_chain: - - history - method: update - /zones/{zone_id}/settings/zaraz/history/configs: - get: - description: Gets a history of published Zaraz configurations by ID(s) for a zone. - operationId: get-zones-zone_identifier-zaraz-config-history - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: Comma separated list of Zaraz configuration IDs. - explode: false - in: query - name: ids - schema: - items: - type: integer - type: array - style: form - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/zarazZarazConfigHistoryResponse' - description: Get Zaraz historical configurations by ID(s) response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/zarazApiResponseCommonFailure' - description: Get Zaraz historical configurations by ID(s) failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Zaraz historical configurations by ID(s) - tags: - - Zaraz - x-api-token-group: - - Zaraz Edit - - Zaraz Read - - Zaraz Admin - x-stackql-sdk: - service: zaraz - resource_chain: - - history - - configs - method: get - /zones/{zone_id}/settings/zaraz/publish: - post: - description: Publish current Zaraz preview configuration for a zone. - operationId: post-zones-zone_identifier-zaraz-publish - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - description: Zaraz configuration description. - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/zarazMessages' - messages: - $ref: '#/components/schemas/zarazMessages' - success: - description: Whether the API call was successful. - type: boolean - x-auditable: true - result: - type: string - required: - - success - - errors - - messages - - result - type: object - description: Update Zaraz workflow response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/zarazApiResponseCommonFailure' - description: Update Zaraz workflow response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Publish Zaraz preview configuration - tags: - - Zaraz - x-api-token-group: - - Zaraz Admin - x-cfPermissionsRequired: - enum: - - '#zaraz:publish' - x-stackql-sdk: - service: zaraz - resource_chain: - - publish - method: create - /zones/{zone_id}/settings/zaraz/workflow: - get: - description: Gets Zaraz workflow for a zone. - operationId: get-zones-zone_identifier-zaraz-workflow - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/zarazZarazWorkflowResponse' - description: Get Zaraz workflow response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/zarazApiResponseCommonFailure' - description: Get Zaraz workflow response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Zaraz workflow - tags: - - Zaraz - x-api-token-group: - - Zaraz Edit - - Zaraz Read - - Zaraz Admin - x-stackql-sdk: - service: zaraz - resource_chain: - - workflow - method: get - put: - description: Updates Zaraz workflow for a zone. - operationId: put-zones-zone_identifier-zaraz-workflow - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/zarazZarazWorkflow' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/zarazZarazWorkflowResponse' - description: Update Zaraz workflow response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/zarazApiResponseCommonFailure' - description: Update Zaraz workflow response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Zaraz workflow - tags: - - Zaraz - x-api-token-group: - - Zaraz Edit - - Zaraz Admin - x-stackql-sdk: - service: zaraz - resource_chain: [] - method: update -components: - schemas: - unnamedSchemaRef3caeef70a38a3ad696413c7d97d9c394: - properties: - accept_all: - description: Object where keys are language codes. - type: object - confirm_my_choices: - description: Object where keys are language codes. - type: object - reject_all: - description: Object where keys are language codes. - type: object - required: - - accept_all - - reject_all - - confirm_my_choices - type: object - zarazApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/zarazMessages' - messages: - example: [] - $ref: '#/components/schemas/zarazMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - zarazMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - zarazZarazConfigBody: - x-stainless-variantName: trigger_worker - description: Zaraz configuration. - properties: - analytics: - description: Cloudflare Monitoring settings. - properties: - defaultPurpose: - description: Consent purpose assigned to Monitoring. - type: string - x-auditable: true - enabled: - description: Whether Advanced Monitoring reports are enabled. - type: boolean - x-auditable: true - sessionExpTime: - description: Session expiration time (seconds). - maximum: 86400 - minimum: 60 - type: integer - x-auditable: true - type: object - consent: - description: Consent management configuration. - properties: - buttonTextTranslations: - $ref: >- - #/components/schemas/unnamedSchemaRef3caeef70a38a3ad696413c7d97d9c394 - companyEmail: - type: string - x-auditable: true - companyName: - type: string - x-auditable: true - companyStreetAddress: - type: string - x-auditable: true - consentModalIntroHTML: - type: string - x-auditable: true - consentModalIntroHTMLWithTranslations: - description: Object where keys are language codes. - type: object - cookieName: - type: string - x-auditable: true - customCSS: - type: string - x-auditable: true - customIntroDisclaimerDismissed: - type: boolean - x-auditable: true - defaultLanguage: - type: string - x-auditable: true - enabled: - type: boolean - hideModal: - type: boolean - x-auditable: true - purposes: - description: Object where keys are purpose alpha-numeric IDs. - type: object - purposesWithTranslations: - description: Object where keys are purpose alpha-numeric IDs. - type: object - tcfCompliant: - type: boolean - required: - - enabled - type: object - dataLayer: - description: Data layer compatibility mode enabled. - type: boolean - x-auditable: true - debugKey: - description: The key for Zaraz debug mode. - type: string - x-auditable: true - historyChange: - description: Single Page Application support enabled. - type: boolean - x-auditable: true - settings: - description: General Zaraz settings. - properties: - autoInjectScript: - description: Automatic injection of Zaraz scripts enabled. - type: boolean - x-auditable: true - contextEnricher: - description: >- - Details of the worker that receives and edits Zaraz Context - object. - properties: - escapedWorkerName: - type: string - x-auditable: true - workerTag: - type: string - x-auditable: true - required: - - escapedWorkerName - - workerTag - type: object - cookieDomain: - description: The domain Zaraz will use for writing and reading its cookies. - type: string - x-auditable: true - ecommerce: - description: Ecommerce API enabled. - type: boolean - x-auditable: true - eventsApiPath: - description: Custom endpoint for server-side track events. - type: string - x-auditable: true - hideExternalReferer: - description: Hiding external referrer URL enabled. - type: boolean - x-auditable: true - hideIPAddress: - description: Trimming IP address enabled. - type: boolean - x-auditable: true - hideQueryParams: - description: Removing URL query params enabled. - type: boolean - x-auditable: true - hideUserAgent: - description: Removing sensitive data from User Agent string enabled. - type: boolean - initPath: - description: Custom endpoint for Zaraz init script. - type: string - x-auditable: true - injectIframes: - description: Injection of Zaraz scripts into iframes enabled. - type: boolean - x-auditable: true - mcRootPath: - description: Custom path for Managed Components server functionalities. - type: string - x-auditable: true - scriptPath: - description: Custom endpoint for Zaraz main script. - type: string - x-auditable: true - trackPath: - description: Custom endpoint for Zaraz tracking requests. - type: string - x-auditable: true - required: - - autoInjectScript - type: object - triggers: - description: >- - Triggers set up under Zaraz configuration, where key is the trigger - alpha-numeric ID and value is the trigger configuration. - type: object - variables: - description: >- - Variables set up under Zaraz configuration, where key is the - variable alpha-numeric ID and value is the variable configuration. - Values of variables of type secret are not included. - type: object - zarazVersion: - description: Zaraz internal version of the config. - type: integer - x-auditable: true - tools: - description: >- - Tools set up under Zaraz configuration, where key is the - alpha-numeric tool ID and value is the tool configuration object. - type: object - required: - - tools - - triggers - - variables - - settings - - dataLayer - - debugKey - - zarazVersion - type: object - zarazZarazConfigHistoryResponse: - properties: - errors: - $ref: '#/components/schemas/zarazMessages' - messages: - $ref: '#/components/schemas/zarazMessages' - success: - description: Whether the API call was successful. - example: true - type: boolean - x-auditable: true - result: - description: Object where keys are numeric configuration IDs. - type: object - required: - - success - - errors - - messages - - result - type: object - zarazZarazConfigResponse: - properties: - errors: - $ref: '#/components/schemas/zarazMessages' - messages: - $ref: '#/components/schemas/zarazMessages' - success: - description: Whether the API call was successful. - example: true - type: boolean - x-auditable: true - result: - $ref: '#/components/schemas/zarazZarazConfigReturn' - required: - - success - - errors - - messages - - result - type: object - zarazZarazConfigReturn: - description: Zaraz configuration. - properties: - analytics: - description: Cloudflare Monitoring settings. - properties: - defaultPurpose: - description: Consent purpose assigned to Monitoring. - type: string - x-auditable: true - enabled: - description: Whether Advanced Monitoring reports are enabled. - type: boolean - x-auditable: true - sessionExpTime: - description: Session expiration time (seconds). - maximum: 86400 - minimum: 60 - type: integer - x-auditable: true - type: object - consent: - description: Consent management configuration. - properties: - buttonTextTranslations: - $ref: >- - #/components/schemas/unnamedSchemaRef3caeef70a38a3ad696413c7d97d9c394 - companyEmail: - type: string - x-auditable: true - companyName: - type: string - x-auditable: true - companyStreetAddress: - type: string - x-auditable: true - consentModalIntroHTML: - type: string - x-auditable: true - consentModalIntroHTMLWithTranslations: - description: Object where keys are language codes. - type: object - cookieName: - type: string - x-auditable: true - customCSS: - type: string - x-auditable: true - customIntroDisclaimerDismissed: - type: boolean - x-auditable: true - defaultLanguage: - type: string - x-auditable: true - enabled: - type: boolean - hideModal: - type: boolean - x-auditable: true - purposes: - description: Object where keys are purpose alpha-numeric IDs. - type: object - purposesWithTranslations: - description: Object where keys are purpose alpha-numeric IDs. - type: object - tcfCompliant: - type: boolean - required: - - enabled - type: object - dataLayer: - description: Data layer compatibility mode enabled. - type: boolean - x-auditable: true - debugKey: - description: The key for Zaraz debug mode. - type: string - x-auditable: true - historyChange: - description: Single Page Application support enabled. - type: boolean - x-auditable: true - settings: - description: General Zaraz settings. - properties: - autoInjectScript: - description: Automatic injection of Zaraz scripts enabled. - type: boolean - x-auditable: true - contextEnricher: - description: >- - Details of the worker that receives and edits Zaraz Context - object. - properties: - escapedWorkerName: - type: string - x-auditable: true - workerTag: - type: string - x-auditable: true - required: - - escapedWorkerName - - workerTag - type: object - cookieDomain: - description: The domain Zaraz will use for writing and reading its cookies. - type: string - x-auditable: true - ecommerce: - description: Ecommerce API enabled. - type: boolean - x-auditable: true - eventsApiPath: - description: Custom endpoint for server-side track events. - type: string - x-auditable: true - hideExternalReferer: - description: Hiding external referrer URL enabled. - type: boolean - x-auditable: true - hideIPAddress: - description: Trimming IP address enabled. - type: boolean - x-auditable: true - hideQueryParams: - description: Removing URL query params enabled. - type: boolean - x-auditable: true - hideUserAgent: - description: Removing sensitive data from User Agent string enabled. - type: boolean - initPath: - description: Custom endpoint for Zaraz init script. - type: string - x-auditable: true - injectIframes: - description: Injection of Zaraz scripts into iframes enabled. - type: boolean - x-auditable: true - mcRootPath: - description: Custom path for Managed Components server functionalities. - type: string - x-auditable: true - scriptPath: - description: Custom endpoint for Zaraz main script. - type: string - x-auditable: true - trackPath: - description: Custom endpoint for Zaraz tracking requests. - type: string - x-auditable: true - required: - - autoInjectScript - type: object - triggers: - description: >- - Triggers set up under Zaraz configuration, where key is the trigger - alpha-numeric ID and value is the trigger configuration. - type: object - variables: - description: >- - Variables set up under Zaraz configuration, where key is the - variable alpha-numeric ID and value is the variable configuration. - Values of variables of type secret are not included. - type: object - zarazVersion: - description: Zaraz internal version of the config. - type: integer - x-auditable: true - tools: - description: >- - Tools set up under Zaraz configuration, where key is the - alpha-numeric tool ID and value is the tool configuration object. - type: object - required: - - tools - - triggers - - variables - - settings - - dataLayer - - debugKey - - zarazVersion - type: object - zarazZarazHistoryResponse: - properties: - errors: - $ref: '#/components/schemas/zarazMessages' - messages: - $ref: '#/components/schemas/zarazMessages' - success: - description: Whether the API call was successful. - example: true - type: boolean - x-auditable: true - result: - items: - $ref: '#/components/schemas/zarazZarazHistoryResponse_result_item' - type: array - required: - - success - - errors - - messages - - result - type: object - zarazZarazHistoryResponse_result_item: - properties: - createdAt: - description: Date and time the configuration was created. - format: date-time - type: string - x-auditable: true - id: - description: ID of the configuration. - type: integer - x-auditable: true - updatedAt: - description: Date and time the configuration was last updated. - format: date-time - type: string - x-auditable: true - userId: - description: >- - Alpha-numeric ID of the account user who published the - configuration. - type: string - x-auditable: true - description: - description: >- - Configuration description provided by the user who published this - configuration. - type: string - required: - - id - - createdAt - - updatedAt - - userId - - description - type: object - zarazZarazWorkflow: - description: Zaraz workflow. - enum: - - realtime - - preview - type: string - x-auditable: true - zarazZarazWorkflowResponse: - properties: - errors: - $ref: '#/components/schemas/zarazMessages' - messages: - $ref: '#/components/schemas/zarazMessages' - success: - description: Whether the API call was successful. - example: true - type: boolean - x-auditable: true - result: - $ref: '#/components/schemas/zarazZarazWorkflow' - required: - - success - - errors - - messages - - result - type: object - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - config: - id: cloudflare.zaraz.config - name: config - title: Config - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1settings~1zaraz~1config/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1settings~1zaraz~1config/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/config/methods/list' - insert: [] - update: [] - delete: [] - replace: - - $ref: '#/components/x-stackQL-resources/config/methods/update' - default: - id: cloudflare.zaraz.default - name: default - title: Default - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1settings~1zaraz~1default/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/default/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - export: - id: cloudflare.zaraz.export - name: export - title: Export - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1settings~1zaraz~1export/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/export/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - history: - id: cloudflare.zaraz.history - name: history - title: History - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1settings~1zaraz~1history/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1settings~1zaraz~1history/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/history/methods/list' - insert: [] - update: [] - delete: [] - replace: - - $ref: '#/components/x-stackQL-resources/history/methods/update' - configs: - id: cloudflare.zaraz.configs - name: configs - title: Configs - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1settings~1zaraz~1history~1configs/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/configs/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - settings: - id: cloudflare.zaraz.settings - name: settings - title: Settings - methods: - publish: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1settings~1zaraz~1publish/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] - workflow: - id: cloudflare.zaraz.workflow - name: workflow - title: Workflow - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1settings~1zaraz~1workflow/get' - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1settings~1zaraz~1workflow/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/workflow/methods/list' - insert: [] - update: [] - delete: [] - replace: - - $ref: '#/components/x-stackQL-resources/workflow/methods/update' +openapi: 3.0.3 +info: + title: zaraz API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /zones/{zone_id}/settings/zaraz/config: + get: + description: Gets latest Zaraz configuration for a zone. It can be preview or published configuration, whichever was the last updated. Secret variables values will not be included. + operationId: get-zones-zone_identifier-zaraz-config + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/zarazZarazConfigResponse' + description: Get Zaraz configuration response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zarazApiResponseCommonFailure' + description: Get Zaraz configuration response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Zaraz configuration + tags: + - Zaraz + x-api-token-group: + - Zaraz Edit + - Zaraz Read + - Zaraz Admin + x-stackql-sdk: + service: zaraz + resource_chain: + - config + method: get + put: + description: Updates Zaraz configuration for a zone. + operationId: put-zones-zone_identifier-zaraz-config + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/zarazZarazConfigBody' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/zarazZarazConfigResponse' + description: Update Zaraz configuration response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zarazApiResponseCommonFailure' + description: Update Zaraz configuration response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Zaraz configuration + tags: + - Zaraz + x-api-token-group: + - Zaraz Edit + - Zaraz Admin + x-stackql-sdk: + service: zaraz + resource_chain: + - config + method: update + /zones/{zone_id}/settings/zaraz/default: + get: + description: Gets default Zaraz configuration for a zone. + operationId: get-zones-zone_identifier-zaraz-default + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/zarazZarazConfigResponse' + description: Get Zaraz default configuration response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zarazApiResponseCommonFailure' + description: Get Zaraz default configuration response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get default Zaraz configuration + tags: + - Zaraz + x-api-token-group: + - Zaraz Edit + - Zaraz Read + - Zaraz Admin + x-stackql-sdk: + service: zaraz + resource_chain: + - default + method: get + /zones/{zone_id}/settings/zaraz/export: + get: + description: Exports full current published Zaraz configuration for a zone, secret variables included. + operationId: get-zones-zone_identifier-zaraz-export + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/zarazZarazConfigReturn' + description: Get Zaraz configuration response. + headers: + Content-Disposition: + schema: + type: string + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zarazApiResponseCommonFailure' + description: Get Zaraz configuration response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Export Zaraz configuration + tags: + - Zaraz + x-api-token-group: + - Zaraz Edit + - Zaraz Read + - Zaraz Admin + x-stackql-sdk: + service: zaraz + resource_chain: + - export + method: get + /zones/{zone_id}/settings/zaraz/history: + get: + description: Lists a history of published Zaraz configuration records for a zone. + operationId: get-zones-zone_identifier-zaraz-history + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Ordinal number to start listing the results with. Default value is 0. + in: query + name: offset + schema: + minimum: 0 + type: integer + - description: Maximum amount of results to list. Default value is 10. + in: query + name: limit + schema: + minimum: 1 + type: integer + - description: The field to sort by. Default is updated_at. + in: query + name: sortField + schema: + enum: + - id + - user_id + - description + - created_at + - updated_at + type: string + - description: Sorting order. Default is DESC. + in: query + name: sortOrder + schema: + enum: + - DESC + - ASC + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/zarazZarazHistoryResponse' + description: List Zaraz historical configuration records response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zarazApiResponseCommonFailure' + description: List Zaraz historical configuration records failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Zaraz historical configuration records + tags: + - Zaraz + x-api-token-group: + - Zaraz Edit + - Zaraz Read + - Zaraz Admin + x-stackql-sdk: + service: zaraz + resource_chain: + - history + method: list + put: + description: Restores a historical published Zaraz configuration by ID for a zone. + operationId: put-zones-zone_identifier-zaraz-history + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + description: ID of the Zaraz configuration to restore. + minimum: 1 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/zarazZarazConfigResponse' + description: Restore Zaraz historical configuration by ID response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zarazApiResponseCommonFailure' + description: Restore Zaraz historical configuration by ID failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Restore Zaraz historical configuration by ID + tags: + - Zaraz + x-api-token-group: + - Zaraz Edit + - Zaraz Admin + x-stackql-sdk: + service: zaraz + resource_chain: + - history + method: update + /zones/{zone_id}/settings/zaraz/history/configs: + get: + description: Gets a history of published Zaraz configurations by ID(s) for a zone. + operationId: get-zones-zone_identifier-zaraz-config-history + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Comma separated list of Zaraz configuration IDs. + explode: false + in: query + name: ids + schema: + items: + type: integer + type: array + style: form + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/zarazZarazConfigHistoryResponse' + description: Get Zaraz historical configurations by ID(s) response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zarazApiResponseCommonFailure' + description: Get Zaraz historical configurations by ID(s) failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Zaraz historical configurations by ID(s) + tags: + - Zaraz + x-api-token-group: + - Zaraz Edit + - Zaraz Read + - Zaraz Admin + x-stackql-sdk: + service: zaraz + resource_chain: + - history + - configs + method: get + /zones/{zone_id}/settings/zaraz/publish: + post: + description: Publish current Zaraz preview configuration for a zone. + operationId: post-zones-zone_identifier-zaraz-publish + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + description: Zaraz configuration description. + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/zarazMessages' + messages: + $ref: '#/components/schemas/zarazMessages' + success: + description: Whether the API call was successful. + type: boolean + x-auditable: true + result: + type: string + required: + - success + - errors + - messages + - result + type: object + description: Update Zaraz workflow response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zarazApiResponseCommonFailure' + description: Update Zaraz workflow response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Publish Zaraz preview configuration + tags: + - Zaraz + x-api-token-group: + - Zaraz Admin + x-cfPermissionsRequired: + enum: + - '#zaraz:publish' + x-stackql-sdk: + service: zaraz + resource_chain: + - publish + method: create + /zones/{zone_id}/settings/zaraz/workflow: + get: + description: Gets Zaraz workflow for a zone. + operationId: get-zones-zone_identifier-zaraz-workflow + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/zarazZarazWorkflowResponse' + description: Get Zaraz workflow response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zarazApiResponseCommonFailure' + description: Get Zaraz workflow response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Zaraz workflow + tags: + - Zaraz + x-api-token-group: + - Zaraz Edit + - Zaraz Read + - Zaraz Admin + x-stackql-sdk: + service: zaraz + resource_chain: + - workflow + method: get + put: + description: Updates Zaraz workflow for a zone. + operationId: put-zones-zone_identifier-zaraz-workflow + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/zarazZarazWorkflow' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/zarazZarazWorkflowResponse' + description: Update Zaraz workflow response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zarazApiResponseCommonFailure' + description: Update Zaraz workflow response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Zaraz workflow + tags: + - Zaraz + x-api-token-group: + - Zaraz Edit + - Zaraz Admin + x-stackql-sdk: + service: zaraz + resource_chain: [] + method: update +components: + schemas: + unnamedSchemaRef3caeef70a38a3ad696413c7d97d9c394: + properties: + accept_all: + description: Object where keys are language codes. + type: object + confirm_my_choices: + description: Object where keys are language codes. + type: object + reject_all: + description: Object where keys are language codes. + type: object + required: + - accept_all + - reject_all + - confirm_my_choices + type: object + zarazApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/zarazMessages' + messages: + example: [] + $ref: '#/components/schemas/zarazMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + zarazMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + zarazZarazConfigBody: + x-stainless-variantName: trigger_worker + description: Zaraz configuration. + properties: + analytics: + description: Cloudflare Monitoring settings. + properties: + defaultPurpose: + description: Consent purpose assigned to Monitoring. + type: string + x-auditable: true + enabled: + description: Whether Advanced Monitoring reports are enabled. + type: boolean + x-auditable: true + sessionExpTime: + description: Session expiration time (seconds). + maximum: 86400 + minimum: 60 + type: integer + x-auditable: true + type: object + consent: + description: Consent management configuration. + properties: + buttonTextTranslations: + $ref: '#/components/schemas/unnamedSchemaRef3caeef70a38a3ad696413c7d97d9c394' + companyEmail: + type: string + x-auditable: true + companyName: + type: string + x-auditable: true + companyStreetAddress: + type: string + x-auditable: true + consentModalIntroHTML: + type: string + x-auditable: true + consentModalIntroHTMLWithTranslations: + description: Object where keys are language codes. + type: object + cookieName: + type: string + x-auditable: true + customCSS: + type: string + x-auditable: true + customIntroDisclaimerDismissed: + type: boolean + x-auditable: true + defaultLanguage: + type: string + x-auditable: true + enabled: + type: boolean + hideModal: + type: boolean + x-auditable: true + purposes: + description: Object where keys are purpose alpha-numeric IDs. + type: object + purposesWithTranslations: + description: Object where keys are purpose alpha-numeric IDs. + type: object + tcfCompliant: + type: boolean + required: + - enabled + type: object + dataLayer: + description: Data layer compatibility mode enabled. + type: boolean + x-auditable: true + debugKey: + description: The key for Zaraz debug mode. + type: string + x-auditable: true + historyChange: + description: Single Page Application support enabled. + type: boolean + x-auditable: true + settings: + description: General Zaraz settings. + properties: + autoInjectScript: + description: Automatic injection of Zaraz scripts enabled. + type: boolean + x-auditable: true + contextEnricher: + description: Details of the worker that receives and edits Zaraz Context object. + properties: + escapedWorkerName: + type: string + x-auditable: true + workerTag: + type: string + x-auditable: true + required: + - escapedWorkerName + - workerTag + type: object + cookieDomain: + description: The domain Zaraz will use for writing and reading its cookies. + type: string + x-auditable: true + ecommerce: + description: Ecommerce API enabled. + type: boolean + x-auditable: true + eventsApiPath: + description: Custom endpoint for server-side track events. + type: string + x-auditable: true + hideExternalReferer: + description: Hiding external referrer URL enabled. + type: boolean + x-auditable: true + hideIPAddress: + description: Trimming IP address enabled. + type: boolean + x-auditable: true + hideQueryParams: + description: Removing URL query params enabled. + type: boolean + x-auditable: true + hideUserAgent: + description: Removing sensitive data from User Agent string enabled. + type: boolean + initPath: + description: Custom endpoint for Zaraz init script. + type: string + x-auditable: true + injectIframes: + description: Injection of Zaraz scripts into iframes enabled. + type: boolean + x-auditable: true + mcRootPath: + description: Custom path for Managed Components server functionalities. + type: string + x-auditable: true + scriptPath: + description: Custom endpoint for Zaraz main script. + type: string + x-auditable: true + trackPath: + description: Custom endpoint for Zaraz tracking requests. + type: string + x-auditable: true + required: + - autoInjectScript + type: object + triggers: + description: Triggers set up under Zaraz configuration, where key is the trigger alpha-numeric ID and value is the trigger configuration. + type: object + variables: + description: Variables set up under Zaraz configuration, where key is the variable alpha-numeric ID and value is the variable configuration. Values of variables of type secret are not included. + type: object + zarazVersion: + description: Zaraz internal version of the config. + type: integer + x-auditable: true + tools: + description: Tools set up under Zaraz configuration, where key is the alpha-numeric tool ID and value is the tool configuration object. + type: object + required: + - tools + - triggers + - variables + - settings + - dataLayer + - debugKey + - zarazVersion + type: object + zarazZarazConfigHistoryResponse: + properties: + errors: + $ref: '#/components/schemas/zarazMessages' + messages: + $ref: '#/components/schemas/zarazMessages' + success: + description: Whether the API call was successful. + example: true + type: boolean + x-auditable: true + result: + description: Object where keys are numeric configuration IDs. + type: object + required: + - success + - errors + - messages + - result + type: object + zarazZarazConfigResponse: + properties: + errors: + $ref: '#/components/schemas/zarazMessages' + messages: + $ref: '#/components/schemas/zarazMessages' + success: + description: Whether the API call was successful. + example: true + type: boolean + x-auditable: true + result: + $ref: '#/components/schemas/zarazZarazConfigReturn' + required: + - success + - errors + - messages + - result + type: object + zarazZarazConfigReturn: + description: Zaraz configuration. + properties: + analytics: + description: Cloudflare Monitoring settings. + properties: + defaultPurpose: + description: Consent purpose assigned to Monitoring. + type: string + x-auditable: true + enabled: + description: Whether Advanced Monitoring reports are enabled. + type: boolean + x-auditable: true + sessionExpTime: + description: Session expiration time (seconds). + maximum: 86400 + minimum: 60 + type: integer + x-auditable: true + type: object + consent: + description: Consent management configuration. + properties: + buttonTextTranslations: + $ref: '#/components/schemas/unnamedSchemaRef3caeef70a38a3ad696413c7d97d9c394' + companyEmail: + type: string + x-auditable: true + companyName: + type: string + x-auditable: true + companyStreetAddress: + type: string + x-auditable: true + consentModalIntroHTML: + type: string + x-auditable: true + consentModalIntroHTMLWithTranslations: + description: Object where keys are language codes. + type: object + cookieName: + type: string + x-auditable: true + customCSS: + type: string + x-auditable: true + customIntroDisclaimerDismissed: + type: boolean + x-auditable: true + defaultLanguage: + type: string + x-auditable: true + enabled: + type: boolean + hideModal: + type: boolean + x-auditable: true + purposes: + description: Object where keys are purpose alpha-numeric IDs. + type: object + purposesWithTranslations: + description: Object where keys are purpose alpha-numeric IDs. + type: object + tcfCompliant: + type: boolean + required: + - enabled + type: object + dataLayer: + description: Data layer compatibility mode enabled. + type: boolean + x-auditable: true + debugKey: + description: The key for Zaraz debug mode. + type: string + x-auditable: true + historyChange: + description: Single Page Application support enabled. + type: boolean + x-auditable: true + settings: + description: General Zaraz settings. + properties: + autoInjectScript: + description: Automatic injection of Zaraz scripts enabled. + type: boolean + x-auditable: true + contextEnricher: + description: Details of the worker that receives and edits Zaraz Context object. + properties: + escapedWorkerName: + type: string + x-auditable: true + workerTag: + type: string + x-auditable: true + required: + - escapedWorkerName + - workerTag + type: object + cookieDomain: + description: The domain Zaraz will use for writing and reading its cookies. + type: string + x-auditable: true + ecommerce: + description: Ecommerce API enabled. + type: boolean + x-auditable: true + eventsApiPath: + description: Custom endpoint for server-side track events. + type: string + x-auditable: true + hideExternalReferer: + description: Hiding external referrer URL enabled. + type: boolean + x-auditable: true + hideIPAddress: + description: Trimming IP address enabled. + type: boolean + x-auditable: true + hideQueryParams: + description: Removing URL query params enabled. + type: boolean + x-auditable: true + hideUserAgent: + description: Removing sensitive data from User Agent string enabled. + type: boolean + initPath: + description: Custom endpoint for Zaraz init script. + type: string + x-auditable: true + injectIframes: + description: Injection of Zaraz scripts into iframes enabled. + type: boolean + x-auditable: true + mcRootPath: + description: Custom path for Managed Components server functionalities. + type: string + x-auditable: true + scriptPath: + description: Custom endpoint for Zaraz main script. + type: string + x-auditable: true + trackPath: + description: Custom endpoint for Zaraz tracking requests. + type: string + x-auditable: true + required: + - autoInjectScript + type: object + triggers: + description: Triggers set up under Zaraz configuration, where key is the trigger alpha-numeric ID and value is the trigger configuration. + type: object + variables: + description: Variables set up under Zaraz configuration, where key is the variable alpha-numeric ID and value is the variable configuration. Values of variables of type secret are not included. + type: object + zarazVersion: + description: Zaraz internal version of the config. + type: integer + x-auditable: true + tools: + description: Tools set up under Zaraz configuration, where key is the alpha-numeric tool ID and value is the tool configuration object. + type: object + required: + - tools + - triggers + - variables + - settings + - dataLayer + - debugKey + - zarazVersion + type: object + zarazZarazHistoryResponse: + properties: + errors: + $ref: '#/components/schemas/zarazMessages' + messages: + $ref: '#/components/schemas/zarazMessages' + success: + description: Whether the API call was successful. + example: true + type: boolean + x-auditable: true + result: + items: + $ref: '#/components/schemas/zarazZarazHistoryResponse_result_item' + type: array + required: + - success + - errors + - messages + - result + type: object + zarazZarazHistoryResponse_result_item: + properties: + createdAt: + description: Date and time the configuration was created. + format: date-time + type: string + x-auditable: true + id: + description: ID of the configuration. + type: integer + x-auditable: true + updatedAt: + description: Date and time the configuration was last updated. + format: date-time + type: string + x-auditable: true + userId: + description: Alpha-numeric ID of the account user who published the configuration. + type: string + x-auditable: true + description: + description: Configuration description provided by the user who published this configuration. + type: string + required: + - id + - createdAt + - updatedAt + - userId + - description + type: object + zarazZarazWorkflow: + description: Zaraz workflow. + enum: + - realtime + - preview + type: string + x-auditable: true + zarazZarazWorkflowResponse: + properties: + errors: + $ref: '#/components/schemas/zarazMessages' + messages: + $ref: '#/components/schemas/zarazMessages' + success: + description: Whether the API call was successful. + example: true + type: boolean + x-auditable: true + result: + $ref: '#/components/schemas/zarazZarazWorkflow' + required: + - success + - errors + - messages + - result + type: object + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + config: + id: cloudflare.zaraz.config + name: config + title: Config + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings~1zaraz~1config/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings~1zaraz~1config/put' + response: + mediaType: application/json + openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .analytics }}{{ $sep }}"analytics": {{ if eq (kindOf .analytics) "string" }}{{ .analytics }}{{ else }}{{ toJson .analytics }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .consent }}{{ $sep }}"consent": {{ if eq (kindOf .consent) "string" }}{{ .consent }}{{ else }}{{ toJson .consent }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .dataLayer }}{{ $sep }}"dataLayer": {{ toJson .dataLayer }}{{- $sep = "," -}}{{ end }} + + {{- if .debugKey }}{{ $sep }}"debugKey": {{ toJson .debugKey }}{{- $sep = "," -}}{{ end }} + + {{- if .historyChange }}{{ $sep }}"historyChange": {{ toJson .historyChange }}{{- $sep = "," -}}{{ end }} + + {{- if .settings }}{{ $sep }}"settings": {{ if eq (kindOf .settings) "string" }}{{ .settings }}{{ else }}{{ toJson .settings }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .triggers }}{{ $sep }}"triggers": {{ if eq (kindOf .triggers) "string" }}{{ .triggers }}{{ else }}{{ toJson .triggers }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .variables }}{{ $sep }}"variables": {{ if eq (kindOf .variables) "string" }}{{ .variables }}{{ else }}{{ toJson .variables }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .zarazVersion }}{{ $sep }}"zarazVersion": {{ toJson .zarazVersion }}{{- $sep = "," -}}{{ end }} + + {{- if .tools }}{{ $sep }}"tools": {{ if eq (kindOf .tools) "string" }}{{ .tools }}{{ else }}{{ toJson .tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/config/methods/list' + insert: [] + update: [] + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/config/methods/update' + default: + id: cloudflare.zaraz.default + name: default + title: Default + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings~1zaraz~1default/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/default/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + export: + id: cloudflare.zaraz.export + name: export + title: Export + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings~1zaraz~1export/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/export/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + history: + id: cloudflare.zaraz.history + name: history + title: History + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings~1zaraz~1history/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings~1zaraz~1history/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/history/methods/list' + insert: [] + update: [] + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/history/methods/update' + configs: + id: cloudflare.zaraz.configs + name: configs + title: Configs + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings~1zaraz~1history~1configs/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/configs/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + settings: + id: cloudflare.zaraz.settings + name: settings + title: Settings + methods: + publish: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings~1zaraz~1publish/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + workflow: + id: cloudflare.zaraz.workflow + name: workflow + title: Workflow + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings~1zaraz~1workflow/get' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings~1zaraz~1workflow/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/workflow/methods/list' + insert: [] + update: [] + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/workflow/methods/update' diff --git a/providers/src/cloudflare/v00.00.00000/services/zero_trust.yaml b/providers/src/cloudflare/v00.00.00000/services/zero_trust.yaml index 22736ed4..c2919e55 100644 --- a/providers/src/cloudflare/v00.00.00000/services/zero_trust.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/zero_trust.yaml @@ -14146,7 +14146,6 @@ paths: type: string entry_name: type: string - required: [] type: object title: Existing Column type: array @@ -34065,9 +34064,9 @@ components: require: $ref: '#/components/schemas/accessSchemasRequire' required: - - name - include - decision + - name description: The UUID of the reusable policy you wish to test example: f1a8b3c9d4e5f6789a0b1c2d3e4f5678a9b0c1d2e3f4a5b67890c1d2e3f4b5a6 type: array @@ -34126,8 +34125,8 @@ components: $ref: '#/components/schemas/accessSchemasRequire' type: object required: - - decision - include + - decision - name accessPolicyTestId: description: The UUID of the policy test. @@ -46377,6 +46376,31 @@ components: response: mediaType: application/json openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allow_code_mode }}{{ $sep }}"allow_code_mode": {{ toJson .allow_code_mode }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .hostname }}{{ $sep }}"hostname": {{ toJson .hostname }}{{- $sep = "," -}}{{ end }} + + {{- if .id }}{{ $sep }}"id": {{ toJson .id }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .secure_web_gateway }}{{ $sep }}"secure_web_gateway": {{ toJson .secure_web_gateway }}{{- $sep = "," -}}{{ end }} + + {{- if .servers }}{{ $sep }}"servers": {{ if eq (kindOf .servers) "string" }}{{ .servers }}{{ else }}{{ toJson .servers }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1access~1ai-controls~1mcp~1portals~1{id}/delete' @@ -46399,6 +46423,29 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allow_code_mode }}{{ $sep }}"allow_code_mode": {{ toJson .allow_code_mode }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .hostname }}{{ $sep }}"hostname": {{ toJson .hostname }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .secure_web_gateway }}{{ $sep }}"secure_web_gateway": {{ toJson .secure_web_gateway }}{{- $sep = "," -}}{{ end }} + + {{- if .servers }}{{ $sep }}"servers": {{ if eq (kindOf .servers) "string" }}{{ .servers }}{{ else }}{{ toJson .servers }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/portals/methods/get' @@ -46431,6 +46478,33 @@ components: response: mediaType: application/json openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .auth_credentials }}{{ $sep }}"auth_credentials": {{ toJson .auth_credentials }}{{- $sep = "," -}}{{ end }} + + {{- if .auth_type }}{{ $sep }}"auth_type": {{ toJson .auth_type }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .hostname }}{{ $sep }}"hostname": {{ toJson .hostname }}{{- $sep = "," -}}{{ end }} + + {{- if .id }}{{ $sep }}"id": {{ toJson .id }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .updated_prompts }}{{ $sep }}"updated_prompts": {{ if eq (kindOf .updated_prompts) "string" }}{{ .updated_prompts }}{{ else }}{{ toJson .updated_prompts }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .updated_tools }}{{ $sep }}"updated_tools": {{ if eq (kindOf .updated_tools) "string" }}{{ .updated_tools }}{{ else }}{{ toJson .updated_tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1access~1ai-controls~1mcp~1servers~1{id}/delete' @@ -46453,6 +46527,27 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .auth_credentials }}{{ $sep }}"auth_credentials": {{ toJson .auth_credentials }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .updated_prompts }}{{ $sep }}"updated_prompts": {{ if eq (kindOf .updated_prompts) "string" }}{{ .updated_prompts }}{{ else }}{{ toJson .updated_prompts }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .updated_tools }}{{ $sep }}"updated_tools": {{ if eq (kindOf .updated_tools) "string" }}{{ .updated_tools }}{{ else }}{{ toJson .updated_tools }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sync: operation: $ref: '#/paths/~1accounts~1{account_id}~1access~1ai-controls~1mcp~1servers~1{id}~1sync/post' @@ -46818,6 +46913,43 @@ components: response: mediaType: application/json openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .approval_groups }}{{ $sep }}"approval_groups": {{ if eq (kindOf .approval_groups) "string" }}{{ .approval_groups }}{{ else }}{{ toJson .approval_groups }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .approval_required }}{{ $sep }}"approval_required": {{ toJson .approval_required }}{{- $sep = "," -}}{{ end }} + + {{- if .connection_rules }}{{ $sep }}"connection_rules": {{ if eq (kindOf .connection_rules) "string" }}{{ .connection_rules }}{{ else }}{{ toJson .connection_rules }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .isolation_required }}{{ $sep }}"isolation_required": {{ toJson .isolation_required }}{{- $sep = "," -}}{{ end }} + + {{- if .mfa_config }}{{ $sep }}"mfa_config": {{ if eq (kindOf .mfa_config) "string" }}{{ .mfa_config }}{{ else }}{{ toJson .mfa_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .purpose_justification_prompt }}{{ $sep }}"purpose_justification_prompt": {{ toJson .purpose_justification_prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .purpose_justification_required }}{{ $sep }}"purpose_justification_required": {{ toJson .purpose_justification_required }}{{- $sep = "," -}}{{ end }} + + {{- if .session_duration }}{{ $sep }}"session_duration": {{ toJson .session_duration }}{{- $sep = "," -}}{{ end }} + + {{- if .decision }}{{ $sep }}"decision": {{ toJson .decision }}{{- $sep = "," -}}{{ end }} + + {{- if .exclude }}{{ $sep }}"exclude": {{ if eq (kindOf .exclude) "string" }}{{ .exclude }}{{ else }}{{ toJson .exclude }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .include }}{{ $sep }}"include": {{ if eq (kindOf .include) "string" }}{{ .include }}{{ else }}{{ toJson .include }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .require }}{{ $sep }}"require": {{ if eq (kindOf .require) "string" }}{{ .require }}{{ else }}{{ toJson .require }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' delete_by_account: operation: $ref: '#/paths/~1accounts~1{account_id}~1access~1policies~1{policy_id}/delete' @@ -46840,6 +46972,43 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .approval_groups }}{{ $sep }}"approval_groups": {{ if eq (kindOf .approval_groups) "string" }}{{ .approval_groups }}{{ else }}{{ toJson .approval_groups }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .approval_required }}{{ $sep }}"approval_required": {{ toJson .approval_required }}{{- $sep = "," -}}{{ end }} + + {{- if .connection_rules }}{{ $sep }}"connection_rules": {{ if eq (kindOf .connection_rules) "string" }}{{ .connection_rules }}{{ else }}{{ toJson .connection_rules }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .isolation_required }}{{ $sep }}"isolation_required": {{ toJson .isolation_required }}{{- $sep = "," -}}{{ end }} + + {{- if .mfa_config }}{{ $sep }}"mfa_config": {{ if eq (kindOf .mfa_config) "string" }}{{ .mfa_config }}{{ else }}{{ toJson .mfa_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .purpose_justification_prompt }}{{ $sep }}"purpose_justification_prompt": {{ toJson .purpose_justification_prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .purpose_justification_required }}{{ $sep }}"purpose_justification_required": {{ toJson .purpose_justification_required }}{{- $sep = "," -}}{{ end }} + + {{- if .session_duration }}{{ $sep }}"session_duration": {{ toJson .session_duration }}{{- $sep = "," -}}{{ end }} + + {{- if .decision }}{{ $sep }}"decision": {{ toJson .decision }}{{- $sep = "," -}}{{ end }} + + {{- if .exclude }}{{ $sep }}"exclude": {{ if eq (kindOf .exclude) "string" }}{{ .exclude }}{{ else }}{{ toJson .exclude }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .include }}{{ $sep }}"include": {{ if eq (kindOf .include) "string" }}{{ .include }}{{ else }}{{ toJson .include }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .require }}{{ $sep }}"require": {{ if eq (kindOf .require) "string" }}{{ .require }}{{ else }}{{ toJson .require }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/access_policies/methods/get_by_account' @@ -46865,6 +47034,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .policies }}{{ $sep }}"policies": {{ if eq (kindOf .policies) "string" }}{{ .policies }}{{ else }}{{ toJson .policies }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' get: operation: $ref: '#/paths/~1accounts~1{account_id}~1access~1policy-tests~1{policy_test_id}/get' @@ -47276,6 +47458,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .config }}{{ $sep }}"config": {{ if eq (kindOf .config) "string" }}{{ .config }}{{ else }}{{ toJson .config }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/cfd_tunnel_configurations/methods/list_by_account' @@ -47304,6 +47499,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .resources }}{{ $sep }}"resources": {{ if eq (kindOf .resources) "string" }}{{ .resources }}{{ else }}{{ toJson .resources }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: [] insert: [] @@ -47452,6 +47660,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .policy_ids }}{{ $sep }}"policy_ids": {{ if eq (kindOf .policy_ids) "string" }}{{ .policy_ids }}{{ else }}{{ toJson .policy_ids }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .version_config }}{{ $sep }}"version_config": {{ if eq (kindOf .version_config) "string" }}{{ .version_config }}{{ else }}{{ toJson .version_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1devices~1deployment-groups~1{group_id}/delete' @@ -47474,6 +47699,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .policy_ids }}{{ $sep }}"policy_ids": {{ if eq (kindOf .policy_ids) "string" }}{{ .policy_ids }}{{ else }}{{ toJson .policy_ids }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .version_config }}{{ $sep }}"version_config": {{ if eq (kindOf .version_config) "string" }}{{ .version_config }}{{ else }}{{ toJson .version_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/deployment_groups/methods/get' @@ -47573,6 +47815,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .config }}{{ $sep }}"config": {{ if eq (kindOf .config) "string" }}{{ .config }}{{ else }}{{ toJson .config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1teamnet~1routes~1network~1{ip_network_encoded}/delete' @@ -47611,6 +47870,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .config }}{{ $sep }}"config": {{ if eq (kindOf .config) "string" }}{{ .config }}{{ else }}{{ toJson .config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1devices~1physical-devices~1{device_id}/delete' @@ -47632,6 +47908,63 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allow_mode_switch }}{{ $sep }}"allow_mode_switch": {{ toJson .allow_mode_switch }}{{- $sep = "," -}}{{ end }} + + {{- if .allow_updates }}{{ $sep }}"allow_updates": {{ toJson .allow_updates }}{{- $sep = "," -}}{{ end }} + + {{- if .allowed_to_leave }}{{ $sep }}"allowed_to_leave": {{ toJson .allowed_to_leave }}{{- $sep = "," -}}{{ end }} + + {{- if .auto_connect }}{{ $sep }}"auto_connect": {{ toJson .auto_connect }}{{- $sep = "," -}}{{ end }} + + {{- if .captive_portal }}{{ $sep }}"captive_portal": {{ toJson .captive_portal }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .disable_auto_fallback }}{{ $sep }}"disable_auto_fallback": {{ toJson .disable_auto_fallback }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .exclude }}{{ $sep }}"exclude": {{ if eq (kindOf .exclude) "string" }}{{ .exclude }}{{ else }}{{ toJson .exclude }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .exclude_office_ips }}{{ $sep }}"exclude_office_ips": {{ toJson .exclude_office_ips }}{{- $sep = "," -}}{{ end }} + + {{- if .include }}{{ $sep }}"include": {{ if eq (kindOf .include) "string" }}{{ .include }}{{ else }}{{ toJson .include }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .lan_allow_minutes }}{{ $sep }}"lan_allow_minutes": {{ toJson .lan_allow_minutes }}{{- $sep = "," -}}{{ end }} + + {{- if .lan_allow_subnet_size }}{{ $sep }}"lan_allow_subnet_size": {{ toJson .lan_allow_subnet_size }}{{- $sep = "," -}}{{ end }} + + {{- if .match }}{{ $sep }}"match": {{ toJson .match }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .precedence }}{{ $sep }}"precedence": {{ toJson .precedence }}{{- $sep = "," -}}{{ end }} + + {{- if .register_interface_ip_with_dns }}{{ $sep }}"register_interface_ip_with_dns": {{ toJson .register_interface_ip_with_dns }}{{- $sep = "," -}}{{ end }} + + {{- if .sccm_vpn_boundary_support }}{{ $sep }}"sccm_vpn_boundary_support": {{ toJson .sccm_vpn_boundary_support }}{{- $sep = "," -}}{{ end }} + + {{- if .service_mode_v2 }}{{ $sep }}"service_mode_v2": {{ if eq (kindOf .service_mode_v2) "string" }}{{ .service_mode_v2 }}{{ else }}{{ toJson .service_mode_v2 }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .support_url }}{{ $sep }}"support_url": {{ toJson .support_url }}{{- $sep = "," -}}{{ end }} + + {{- if .switch_locked }}{{ $sep }}"switch_locked": {{ toJson .switch_locked }}{{- $sep = "," -}}{{ end }} + + {{- if .tunnel_protocol }}{{ $sep }}"tunnel_protocol": {{ toJson .tunnel_protocol }}{{- $sep = "," -}}{{ end }} + + {{- if .virtual_networks }}{{ $sep }}"virtual_networks": {{ if eq (kindOf .virtual_networks) "string" }}{{ .virtual_networks }}{{ else }}{{ toJson .virtual_networks }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' unrevoke: config: requestBodyTranslate: @@ -47732,6 +48065,53 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allow_mode_switch }}{{ $sep }}"allow_mode_switch": {{ toJson .allow_mode_switch }}{{- $sep = "," -}}{{ end }} + + {{- if .allow_updates }}{{ $sep }}"allow_updates": {{ toJson .allow_updates }}{{- $sep = "," -}}{{ end }} + + {{- if .allowed_to_leave }}{{ $sep }}"allowed_to_leave": {{ toJson .allowed_to_leave }}{{- $sep = "," -}}{{ end }} + + {{- if .auto_connect }}{{ $sep }}"auto_connect": {{ toJson .auto_connect }}{{- $sep = "," -}}{{ end }} + + {{- if .captive_portal }}{{ $sep }}"captive_portal": {{ toJson .captive_portal }}{{- $sep = "," -}}{{ end }} + + {{- if .disable_auto_fallback }}{{ $sep }}"disable_auto_fallback": {{ toJson .disable_auto_fallback }}{{- $sep = "," -}}{{ end }} + + {{- if .exclude }}{{ $sep }}"exclude": {{ if eq (kindOf .exclude) "string" }}{{ .exclude }}{{ else }}{{ toJson .exclude }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .exclude_office_ips }}{{ $sep }}"exclude_office_ips": {{ toJson .exclude_office_ips }}{{- $sep = "," -}}{{ end }} + + {{- if .include }}{{ $sep }}"include": {{ if eq (kindOf .include) "string" }}{{ .include }}{{ else }}{{ toJson .include }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .lan_allow_minutes }}{{ $sep }}"lan_allow_minutes": {{ toJson .lan_allow_minutes }}{{- $sep = "," -}}{{ end }} + + {{- if .lan_allow_subnet_size }}{{ $sep }}"lan_allow_subnet_size": {{ toJson .lan_allow_subnet_size }}{{- $sep = "," -}}{{ end }} + + {{- if .register_interface_ip_with_dns }}{{ $sep }}"register_interface_ip_with_dns": {{ toJson .register_interface_ip_with_dns }}{{- $sep = "," -}}{{ end }} + + {{- if .sccm_vpn_boundary_support }}{{ $sep }}"sccm_vpn_boundary_support": {{ toJson .sccm_vpn_boundary_support }}{{- $sep = "," -}}{{ end }} + + {{- if .service_mode_v2 }}{{ $sep }}"service_mode_v2": {{ if eq (kindOf .service_mode_v2) "string" }}{{ .service_mode_v2 }}{{ else }}{{ toJson .service_mode_v2 }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .support_url }}{{ $sep }}"support_url": {{ toJson .support_url }}{{- $sep = "," -}}{{ end }} + + {{- if .switch_locked }}{{ $sep }}"switch_locked": {{ toJson .switch_locked }}{{- $sep = "," -}}{{ end }} + + {{- if .tunnel_protocol }}{{ $sep }}"tunnel_protocol": {{ toJson .tunnel_protocol }}{{- $sep = "," -}}{{ end }} + + {{- if .virtual_networks }}{{ $sep }}"virtual_networks": {{ if eq (kindOf .virtual_networks) "string" }}{{ .virtual_networks }}{{ else }}{{ toJson .virtual_networks }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/default/methods/list' @@ -47754,6 +48134,63 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allow_mode_switch }}{{ $sep }}"allow_mode_switch": {{ toJson .allow_mode_switch }}{{- $sep = "," -}}{{ end }} + + {{- if .allow_updates }}{{ $sep }}"allow_updates": {{ toJson .allow_updates }}{{- $sep = "," -}}{{ end }} + + {{- if .allowed_to_leave }}{{ $sep }}"allowed_to_leave": {{ toJson .allowed_to_leave }}{{- $sep = "," -}}{{ end }} + + {{- if .auto_connect }}{{ $sep }}"auto_connect": {{ toJson .auto_connect }}{{- $sep = "," -}}{{ end }} + + {{- if .captive_portal }}{{ $sep }}"captive_portal": {{ toJson .captive_portal }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .disable_auto_fallback }}{{ $sep }}"disable_auto_fallback": {{ toJson .disable_auto_fallback }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .exclude }}{{ $sep }}"exclude": {{ if eq (kindOf .exclude) "string" }}{{ .exclude }}{{ else }}{{ toJson .exclude }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .exclude_office_ips }}{{ $sep }}"exclude_office_ips": {{ toJson .exclude_office_ips }}{{- $sep = "," -}}{{ end }} + + {{- if .include }}{{ $sep }}"include": {{ if eq (kindOf .include) "string" }}{{ .include }}{{ else }}{{ toJson .include }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .lan_allow_minutes }}{{ $sep }}"lan_allow_minutes": {{ toJson .lan_allow_minutes }}{{- $sep = "," -}}{{ end }} + + {{- if .lan_allow_subnet_size }}{{ $sep }}"lan_allow_subnet_size": {{ toJson .lan_allow_subnet_size }}{{- $sep = "," -}}{{ end }} + + {{- if .match }}{{ $sep }}"match": {{ toJson .match }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .precedence }}{{ $sep }}"precedence": {{ toJson .precedence }}{{- $sep = "," -}}{{ end }} + + {{- if .register_interface_ip_with_dns }}{{ $sep }}"register_interface_ip_with_dns": {{ toJson .register_interface_ip_with_dns }}{{- $sep = "," -}}{{ end }} + + {{- if .sccm_vpn_boundary_support }}{{ $sep }}"sccm_vpn_boundary_support": {{ toJson .sccm_vpn_boundary_support }}{{- $sep = "," -}}{{ end }} + + {{- if .service_mode_v2 }}{{ $sep }}"service_mode_v2": {{ if eq (kindOf .service_mode_v2) "string" }}{{ .service_mode_v2 }}{{ else }}{{ toJson .service_mode_v2 }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .support_url }}{{ $sep }}"support_url": {{ toJson .support_url }}{{- $sep = "," -}}{{ end }} + + {{- if .switch_locked }}{{ $sep }}"switch_locked": {{ toJson .switch_locked }}{{- $sep = "," -}}{{ end }} + + {{- if .tunnel_protocol }}{{ $sep }}"tunnel_protocol": {{ toJson .tunnel_protocol }}{{- $sep = "," -}}{{ end }} + + {{- if .virtual_networks }}{{ $sep }}"virtual_networks": {{ if eq (kindOf .virtual_networks) "string" }}{{ .virtual_networks }}{{ else }}{{ toJson .virtual_networks }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' get_by_account: operation: $ref: '#/paths/~1accounts~1{account_id}~1devices~1policy~1{policy_id}/get' @@ -47997,6 +48434,31 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .expiration }}{{ $sep }}"expiration": {{ toJson .expiration }}{{- $sep = "," -}}{{ end }} + + {{- if .input }}{{ $sep }}"input": {{ if eq (kindOf .input) "string" }}{{ .input }}{{ else }}{{ toJson .input }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .match }}{{ $sep }}"match": {{ if eq (kindOf .match) "string" }}{{ .match }}{{ else }}{{ toJson .match }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .schedule }}{{ $sep }}"schedule": {{ toJson .schedule }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1devices~1posture~1{rule_id}/delete' @@ -48019,6 +48481,31 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .expiration }}{{ $sep }}"expiration": {{ toJson .expiration }}{{- $sep = "," -}}{{ end }} + + {{- if .input }}{{ $sep }}"input": {{ if eq (kindOf .input) "string" }}{{ .input }}{{ else }}{{ toJson .input }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .match }}{{ $sep }}"match": {{ if eq (kindOf .match) "string" }}{{ .match }}{{ else }}{{ toJson .match }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .schedule }}{{ $sep }}"schedule": {{ toJson .schedule }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/posture/methods/get' @@ -48051,6 +48538,25 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .config }}{{ $sep }}"config": {{ if eq (kindOf .config) "string" }}{{ .config }}{{ else }}{{ toJson .config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interval }}{{ $sep }}"interval": {{ toJson .interval }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1devices~1posture~1integration~1{integration_id}/delete' @@ -48088,6 +48594,25 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .config }}{{ $sep }}"config": {{ if eq (kindOf .config) "string" }}{{ .config }}{{ else }}{{ toJson .config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interval }}{{ $sep }}"interval": {{ toJson .interval }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' update: config: requestBodyTranslate: @@ -48332,6 +48857,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .commands }}{{ $sep }}"commands": {{ if eq (kindOf .commands) "string" }}{{ .commands }}{{ else }}{{ toJson .commands }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' get_downloads: operation: $ref: '#/paths/~1accounts~1{account_id}~1dex~1commands~1{command_id}~1downloads~1{filename}/get' @@ -48410,6 +48948,31 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .data }}{{ $sep }}"data": {{ if eq (kindOf .data) "string" }}{{ .data }}{{ else }}{{ toJson .data }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .interval }}{{ $sep }}"interval": {{ toJson .interval }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .target_policies }}{{ $sep }}"target_policies": {{ if eq (kindOf .target_policies) "string" }}{{ .target_policies }}{{ else }}{{ toJson .target_policies }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .targeted }}{{ $sep }}"targeted": {{ toJson .targeted }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1dex~1devices~1dex_tests~1{dex_test_id}/delete' @@ -48432,6 +48995,31 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .data }}{{ $sep }}"data": {{ if eq (kindOf .data) "string" }}{{ .data }}{{ else }}{{ toJson .data }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .interval }}{{ $sep }}"interval": {{ toJson .interval }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .target_policies }}{{ $sep }}"target_policies": {{ if eq (kindOf .target_policies) "string" }}{{ .target_policies }}{{ else }}{{ toJson .target_policies }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .targeted }}{{ $sep }}"targeted": {{ toJson .targeted }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/dex_tests/methods/get' @@ -48857,6 +49445,25 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .pattern }}{{ $sep }}"pattern": {{ if eq (kindOf .pattern) "string" }}{{ .pattern }}{{ else }}{{ toJson .pattern }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + } + + ' update: config: requestBodyTranslate: @@ -48866,6 +49473,27 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .pattern }}{{ $sep }}"pattern": {{ if eq (kindOf .pattern) "string" }}{{ .pattern }}{{ else }}{{ toJson .pattern }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: [] insert: @@ -48959,6 +49587,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .auth_requirements }}{{ $sep }}"auth_requirements": {{ if eq (kindOf .auth_requirements) "string" }}{{ .auth_requirements }}{{ else }}{{ toJson .auth_requirements }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/account_mapping/methods/list' @@ -48988,6 +49629,27 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .action }}{{ $sep }}"action": {{ if eq (kindOf .action) "string" }}{{ .action }}{{ else }}{{ toJson .action }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .conditions }}{{ $sep }}"conditions": {{ if eq (kindOf .conditions) "string" }}{{ .conditions }}{{ else }}{{ toJson .conditions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1dlp~1email~1rules~1{rule_id}/delete' @@ -49010,6 +49672,27 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .action }}{{ $sep }}"action": {{ if eq (kindOf .action) "string" }}{{ .action }}{{ else }}{{ toJson .action }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .conditions }}{{ $sep }}"conditions": {{ if eq (kindOf .conditions) "string" }}{{ .conditions }}{{ else }}{{ toJson .conditions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/email_rules/methods/get' @@ -49035,6 +49718,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .new_priorities }}{{ $sep }}"new_priorities": {{ if eq (kindOf .new_priorities) "string" }}{{ .new_priorities }}{{ else }}{{ toJson .new_priorities }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' reset_expiration: operation: $ref: '#/paths/~1accounts~1{account_id}~1gateway~1rules~1{rule_id}~1reset_expiration/post' @@ -49069,6 +49765,27 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .pattern }}{{ $sep }}"pattern": {{ if eq (kindOf .pattern) "string" }}{{ .pattern }}{{ else }}{{ toJson .pattern }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .profile_id }}{{ $sep }}"profile_id": {{ toJson .profile_id }}{{- $sep = "," -}}{{ end }} + + } + + ' delete_by_account: operation: $ref: '#/paths/~1accounts~1{account_id}~1dlp~1entries~1{entry_id}/delete' @@ -49257,6 +49974,29 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ai_context_enabled }}{{ $sep }}"ai_context_enabled": {{ toJson .ai_context_enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .allowed_match_count }}{{ $sep }}"allowed_match_count": {{ toJson .allowed_match_count }}{{- $sep = "," -}}{{ end }} + + {{- if .confidence_threshold }}{{ $sep }}"confidence_threshold": {{ toJson .confidence_threshold }}{{- $sep = "," -}}{{ end }} + + {{- if .context_awareness }}{{ $sep }}"context_awareness": {{ if eq (kindOf .context_awareness) "string" }}{{ .context_awareness }}{{ else }}{{ toJson .context_awareness }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .entries }}{{ $sep }}"entries": {{ if eq (kindOf .entries) "string" }}{{ .entries }}{{ else }}{{ toJson .entries }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ocr_enabled }}{{ $sep }}"ocr_enabled": {{ toJson .ocr_enabled }}{{- $sep = "," -}}{{ end }} + + } + + ' create_config: config: requestBodyTranslate: @@ -49266,6 +50006,29 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ai_context_enabled }}{{ $sep }}"ai_context_enabled": {{ toJson .ai_context_enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .allowed_match_count }}{{ $sep }}"allowed_match_count": {{ toJson .allowed_match_count }}{{- $sep = "," -}}{{ end }} + + {{- if .confidence_threshold }}{{ $sep }}"confidence_threshold": {{ toJson .confidence_threshold }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled_entries }}{{ $sep }}"enabled_entries": {{ if eq (kindOf .enabled_entries) "string" }}{{ .enabled_entries }}{{ else }}{{ toJson .enabled_entries }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .entries }}{{ $sep }}"entries": {{ if eq (kindOf .entries) "string" }}{{ .entries }}{{ else }}{{ toJson .entries }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ocr_enabled }}{{ $sep }}"ocr_enabled": {{ toJson .ocr_enabled }}{{- $sep = "," -}}{{ end }} + + } + + ' get: operation: $ref: '#/paths/~1accounts~1{account_id}~1dlp~1profiles~1{profile_id}/get' @@ -49302,6 +50065,41 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ai_context_enabled }}{{ $sep }}"ai_context_enabled": {{ toJson .ai_context_enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .allowed_match_count }}{{ $sep }}"allowed_match_count": {{ toJson .allowed_match_count }}{{- $sep = "," -}}{{ end }} + + {{- if .confidence_threshold }}{{ $sep }}"confidence_threshold": {{ toJson .confidence_threshold }}{{- $sep = "," -}}{{ end }} + + {{- if .context_awareness }}{{ $sep }}"context_awareness": {{ if eq (kindOf .context_awareness) "string" }}{{ .context_awareness }}{{ else }}{{ toJson .context_awareness }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .data_classes }}{{ $sep }}"data_classes": {{ if eq (kindOf .data_classes) "string" }}{{ .data_classes }}{{ else }}{{ toJson .data_classes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .data_tags }}{{ $sep }}"data_tags": {{ if eq (kindOf .data_tags) "string" }}{{ .data_tags }}{{ else }}{{ toJson .data_tags }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .entries }}{{ $sep }}"entries": {{ if eq (kindOf .entries) "string" }}{{ .entries }}{{ else }}{{ toJson .entries }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .ocr_enabled }}{{ $sep }}"ocr_enabled": {{ toJson .ocr_enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .sensitivity_levels }}{{ $sep }}"sensitivity_levels": {{ if eq (kindOf .sensitivity_levels) "string" }}{{ .sensitivity_levels }}{{ else }}{{ toJson .sensitivity_levels }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .shared_entries }}{{ $sep }}"shared_entries": {{ if eq (kindOf .shared_entries) "string" }}{{ .shared_entries }}{{ else }}{{ toJson .shared_entries }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' delete_by_account: operation: $ref: '#/paths/~1accounts~1{account_id}~1dlp~1profiles~1custom~1{profile_id}/delete' @@ -49324,6 +50122,41 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ai_context_enabled }}{{ $sep }}"ai_context_enabled": {{ toJson .ai_context_enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .allowed_match_count }}{{ $sep }}"allowed_match_count": {{ toJson .allowed_match_count }}{{- $sep = "," -}}{{ end }} + + {{- if .confidence_threshold }}{{ $sep }}"confidence_threshold": {{ toJson .confidence_threshold }}{{- $sep = "," -}}{{ end }} + + {{- if .context_awareness }}{{ $sep }}"context_awareness": {{ if eq (kindOf .context_awareness) "string" }}{{ .context_awareness }}{{ else }}{{ toJson .context_awareness }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .data_classes }}{{ $sep }}"data_classes": {{ if eq (kindOf .data_classes) "string" }}{{ .data_classes }}{{ else }}{{ toJson .data_classes }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .data_tags }}{{ $sep }}"data_tags": {{ if eq (kindOf .data_tags) "string" }}{{ .data_tags }}{{ else }}{{ toJson .data_tags }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .entries }}{{ $sep }}"entries": {{ if eq (kindOf .entries) "string" }}{{ .entries }}{{ else }}{{ toJson .entries }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .ocr_enabled }}{{ $sep }}"ocr_enabled": {{ toJson .ocr_enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .sensitivity_levels }}{{ $sep }}"sensitivity_levels": {{ if eq (kindOf .sensitivity_levels) "string" }}{{ .sensitivity_levels }}{{ else }}{{ toJson .sensitivity_levels }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .shared_entries }}{{ $sep }}"shared_entries": {{ if eq (kindOf .shared_entries) "string" }}{{ .shared_entries }}{{ else }}{{ toJson .shared_entries }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/profiles_custom/methods/get_by_account' @@ -49349,6 +50182,31 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ai_context_enabled }}{{ $sep }}"ai_context_enabled": {{ toJson .ai_context_enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .allowed_match_count }}{{ $sep }}"allowed_match_count": {{ toJson .allowed_match_count }}{{- $sep = "," -}}{{ end }} + + {{- if .confidence_threshold }}{{ $sep }}"confidence_threshold": {{ toJson .confidence_threshold }}{{- $sep = "," -}}{{ end }} + + {{- if .context_awareness }}{{ $sep }}"context_awareness": {{ if eq (kindOf .context_awareness) "string" }}{{ .context_awareness }}{{ else }}{{ toJson .context_awareness }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .entries }}{{ $sep }}"entries": {{ if eq (kindOf .entries) "string" }}{{ .entries }}{{ else }}{{ toJson .entries }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ocr_enabled }}{{ $sep }}"ocr_enabled": {{ toJson .ocr_enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .profile_id }}{{ $sep }}"profile_id": {{ toJson .profile_id }}{{- $sep = "," -}}{{ end }} + + } + + ' delete_by_account: operation: $ref: '#/paths/~1accounts~1{account_id}~1dlp~1profiles~1predefined~1{profile_id}/delete' @@ -49392,6 +50250,29 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ai_context_enabled }}{{ $sep }}"ai_context_enabled": {{ toJson .ai_context_enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .allowed_match_count }}{{ $sep }}"allowed_match_count": {{ toJson .allowed_match_count }}{{- $sep = "," -}}{{ end }} + + {{- if .confidence_threshold }}{{ $sep }}"confidence_threshold": {{ toJson .confidence_threshold }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled_entries }}{{ $sep }}"enabled_entries": {{ if eq (kindOf .enabled_entries) "string" }}{{ .enabled_entries }}{{ else }}{{ toJson .enabled_entries }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .entries }}{{ $sep }}"entries": {{ if eq (kindOf .entries) "string" }}{{ .entries }}{{ else }}{{ toJson .entries }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .ocr_enabled }}{{ $sep }}"ocr_enabled": {{ toJson .ocr_enabled }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/predefined_config/methods/list' @@ -49427,6 +50308,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ai_context_analysis }}{{ $sep }}"ai_context_analysis": {{ toJson .ai_context_analysis }}{{- $sep = "," -}}{{ end }} + + {{- if .ocr }}{{ $sep }}"ocr": {{ toJson .ocr }}{{- $sep = "," -}}{{ end }} + + {{- if .payload_logging }}{{ $sep }}"payload_logging": {{ if eq (kindOf .payload_logging) "string" }}{{ .payload_logging }}{{ else }}{{ toJson .payload_logging }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' update: config: requestBodyTranslate: @@ -49436,6 +50334,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ai_context_analysis }}{{ $sep }}"ai_context_analysis": {{ toJson .ai_context_analysis }}{{- $sep = "," -}}{{ end }} + + {{- if .ocr }}{{ $sep }}"ocr": {{ toJson .ocr }}{{- $sep = "," -}}{{ end }} + + {{- if .payload_logging }}{{ $sep }}"payload_logging": {{ if eq (kindOf .payload_logging) "string" }}{{ .payload_logging }}{{ else }}{{ toJson .payload_logging }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/dlp_settings/methods/list' @@ -49473,6 +50388,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .settings }}{{ $sep }}"settings": {{ if eq (kindOf .settings) "string" }}{{ .settings }}{{ else }}{{ toJson .settings }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/gateway/methods/list' @@ -49521,6 +50449,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .approved_apps }}{{ $sep }}"approved_apps": {{ if eq (kindOf .approved_apps) "string" }}{{ .approved_apps }}{{ else }}{{ toJson .approved_apps }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .in_review_apps }}{{ $sep }}"in_review_apps": {{ if eq (kindOf .in_review_apps) "string" }}{{ .in_review_apps }}{{ else }}{{ toJson .in_review_apps }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .unapproved_apps }}{{ $sep }}"unapproved_apps": {{ if eq (kindOf .unapproved_apps) "string" }}{{ .unapproved_apps }}{{ else }}{{ toJson .unapproved_apps }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/review_status/methods/list' @@ -49679,6 +50624,23 @@ components: response: mediaType: application/json openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .associated_hostnames }}{{ $sep }}"associated_hostnames": {{ if eq (kindOf .associated_hostnames) "string" }}{{ .associated_hostnames }}{{ else }}{{ toJson .associated_hostnames }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .certificate }}{{ $sep }}"certificate": {{ toJson .certificate }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + } + + ' update_by_account: config: requestBodyTranslate: @@ -49688,6 +50650,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .associated_hostnames }}{{ $sep }}"associated_hostnames": {{ if eq (kindOf .associated_hostnames) "string" }}{{ .associated_hostnames }}{{ else }}{{ toJson .associated_hostnames }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + } + + ' get: operation: $ref: '#/paths/~1zones~1{zone_id}~1access~1certificates~1{certificate_id}/get' @@ -49704,6 +50681,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .associated_hostnames }}{{ $sep }}"associated_hostnames": {{ if eq (kindOf .associated_hostnames) "string" }}{{ .associated_hostnames }}{{ else }}{{ toJson .associated_hostnames }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1zones~1{zone_id}~1access~1certificates~1{certificate_id}/delete' @@ -49743,6 +50735,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .settings }}{{ $sep }}"settings": {{ if eq (kindOf .settings) "string" }}{{ .settings }}{{ else }}{{ toJson .settings }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/gateway_configuration/methods/list_by_account' @@ -49790,6 +50795,25 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .items }}{{ $sep }}"items": {{ if eq (kindOf .items) "string" }}{{ .items }}{{ else }}{{ toJson .items }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1gateway~1lists~1{list_id}/delete' @@ -49812,6 +50836,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .append }}{{ $sep }}"append": {{ if eq (kindOf .append) "string" }}{{ .append }}{{ else }}{{ toJson .append }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .remove }}{{ $sep }}"remove": {{ if eq (kindOf .remove) "string" }}{{ .remove }}{{ else }}{{ toJson .remove }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' update: config: requestBodyTranslate: @@ -49821,6 +50860,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .items }}{{ $sep }}"items": {{ if eq (kindOf .items) "string" }}{{ .items }}{{ else }}{{ toJson .items }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/lists/methods/get' @@ -49873,6 +50929,29 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .client_default }}{{ $sep }}"client_default": {{ toJson .client_default }}{{- $sep = "," -}}{{ end }} + + {{- if .dns_destination_ips_id }}{{ $sep }}"dns_destination_ips_id": {{ toJson .dns_destination_ips_id }}{{- $sep = "," -}}{{ end }} + + {{- if .ecs_support }}{{ $sep }}"ecs_support": {{ toJson .ecs_support }}{{- $sep = "," -}}{{ end }} + + {{- if .endpoints }}{{ $sep }}"endpoints": {{ if eq (kindOf .endpoints) "string" }}{{ .endpoints }}{{ else }}{{ toJson .endpoints }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .networks }}{{ $sep }}"networks": {{ if eq (kindOf .networks) "string" }}{{ .networks }}{{ else }}{{ toJson .networks }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1gateway~1locations~1{location_id}/delete' @@ -49895,6 +50974,29 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .client_default }}{{ $sep }}"client_default": {{ toJson .client_default }}{{- $sep = "," -}}{{ end }} + + {{- if .dns_destination_ips_id }}{{ $sep }}"dns_destination_ips_id": {{ toJson .dns_destination_ips_id }}{{- $sep = "," -}}{{ end }} + + {{- if .ecs_support }}{{ $sep }}"ecs_support": {{ toJson .ecs_support }}{{- $sep = "," -}}{{ end }} + + {{- if .endpoints }}{{ $sep }}"endpoints": {{ if eq (kindOf .endpoints) "string" }}{{ .endpoints }}{{ else }}{{ toJson .endpoints }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .networks }}{{ $sep }}"networks": {{ if eq (kindOf .networks) "string" }}{{ .networks }}{{ else }}{{ toJson .networks }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/locations/methods/get' @@ -49927,6 +51029,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .redact_pii }}{{ $sep }}"redact_pii": {{ toJson .redact_pii }}{{- $sep = "," -}}{{ end }} + + {{- if .settings_by_rule_type }}{{ $sep }}"settings_by_rule_type": {{ if eq (kindOf .settings_by_rule_type) "string" }}{{ .settings_by_rule_type }}{{ else }}{{ toJson .settings_by_rule_type }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/logging/methods/list' @@ -50032,6 +51149,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .ips }}{{ $sep }}"ips": {{ if eq (kindOf .ips) "string" }}{{ .ips }}{{ else }}{{ toJson .ips }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/proxy_endpoints/methods/get' @@ -50064,6 +51196,41 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .action }}{{ $sep }}"action": {{ toJson .action }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .device_posture }}{{ $sep }}"device_posture": {{ toJson .device_posture }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .expiration }}{{ $sep }}"expiration": {{ if eq (kindOf .expiration) "string" }}{{ .expiration }}{{ else }}{{ toJson .expiration }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .filters }}{{ $sep }}"filters": {{ if eq (kindOf .filters) "string" }}{{ .filters }}{{ else }}{{ toJson .filters }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .identity }}{{ $sep }}"identity": {{ toJson .identity }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .precedence }}{{ $sep }}"precedence": {{ toJson .precedence }}{{- $sep = "," -}}{{ end }} + + {{- if .rule_settings }}{{ $sep }}"rule_settings": {{ if eq (kindOf .rule_settings) "string" }}{{ .rule_settings }}{{ else }}{{ toJson .rule_settings }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .schedule }}{{ $sep }}"schedule": {{ if eq (kindOf .schedule) "string" }}{{ .schedule }}{{ else }}{{ toJson .schedule }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .traffic }}{{ $sep }}"traffic": {{ toJson .traffic }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1gateway~1rules~1{rule_id}/delete' @@ -50086,6 +51253,41 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .action }}{{ $sep }}"action": {{ toJson .action }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .device_posture }}{{ $sep }}"device_posture": {{ toJson .device_posture }}{{- $sep = "," -}}{{ end }} + + {{- if .enabled }}{{ $sep }}"enabled": {{ toJson .enabled }}{{- $sep = "," -}}{{ end }} + + {{- if .expiration }}{{ $sep }}"expiration": {{ if eq (kindOf .expiration) "string" }}{{ .expiration }}{{ else }}{{ toJson .expiration }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .filters }}{{ $sep }}"filters": {{ if eq (kindOf .filters) "string" }}{{ .filters }}{{ else }}{{ toJson .filters }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .identity }}{{ $sep }}"identity": {{ toJson .identity }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .precedence }}{{ $sep }}"precedence": {{ toJson .precedence }}{{- $sep = "," -}}{{ end }} + + {{- if .rule_settings }}{{ $sep }}"rule_settings": {{ if eq (kindOf .rule_settings) "string" }}{{ .rule_settings }}{{ else }}{{ toJson .rule_settings }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .schedule }}{{ $sep }}"schedule": {{ if eq (kindOf .schedule) "string" }}{{ .schedule }}{{ else }}{{ toJson .schedule }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .traffic }}{{ $sep }}"traffic": {{ toJson .traffic }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/gateway_rules/methods/get' @@ -50152,6 +51354,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .target_ids }}{{ $sep }}"target_ids": {{ if eq (kindOf .target_ids) "string" }}{{ .target_ids }}{{ else }}{{ toJson .target_ids }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1accounts~1{account_id}~1infrastructure~1targets~1{target_id}/delete' @@ -50174,6 +51389,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .hostname }}{{ $sep }}"hostname": {{ toJson .hostname }}{{- $sep = "," -}}{{ end }} + + {{- if .ip }}{{ $sep }}"ip": {{ if eq (kindOf .ip) "string" }}{{ .ip }}{{ else }}{{ toJson .ip }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/targets/methods/get' @@ -50199,6 +51429,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .hostname }}{{ $sep }}"hostname": {{ toJson .hostname }}{{- $sep = "," -}}{{ end }} + + {{- if .ip }}{{ $sep }}"ip": {{ if eq (kindOf .ip) "string" }}{{ .ip }}{{ else }}{{ toJson .ip }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: [] insert: [] @@ -50722,6 +51967,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .behaviors }}{{ $sep }}"behaviors": {{ if eq (kindOf .behaviors) "string" }}{{ .behaviors }}{{ else }}{{ toJson .behaviors }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/behaviours/methods/list' @@ -50905,6 +52163,95 @@ components: response: mediaType: application/json openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allow_authenticate_via_warp }}{{ $sep }}"allow_authenticate_via_warp": {{ toJson .allow_authenticate_via_warp }}{{- $sep = "," -}}{{ end }} + + {{- if .allow_iframe }}{{ $sep }}"allow_iframe": {{ toJson .allow_iframe }}{{- $sep = "," -}}{{ end }} + + {{- if .allowed_idps }}{{ $sep }}"allowed_idps": {{ if eq (kindOf .allowed_idps) "string" }}{{ .allowed_idps }}{{ else }}{{ toJson .allowed_idps }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .app_launcher_visible }}{{ $sep }}"app_launcher_visible": {{ toJson .app_launcher_visible }}{{- $sep = "," -}}{{ end }} + + {{- if .auto_redirect_to_identity }}{{ $sep }}"auto_redirect_to_identity": {{ toJson .auto_redirect_to_identity }}{{- $sep = "," -}}{{ end }} + + {{- if .cors_headers }}{{ $sep }}"cors_headers": {{ if eq (kindOf .cors_headers) "string" }}{{ .cors_headers }}{{ else }}{{ toJson .cors_headers }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_deny_message }}{{ $sep }}"custom_deny_message": {{ toJson .custom_deny_message }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_deny_url }}{{ $sep }}"custom_deny_url": {{ toJson .custom_deny_url }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_non_identity_deny_url }}{{ $sep }}"custom_non_identity_deny_url": {{ toJson .custom_non_identity_deny_url }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_pages }}{{ $sep }}"custom_pages": {{ if eq (kindOf .custom_pages) "string" }}{{ .custom_pages }}{{ else }}{{ toJson .custom_pages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .destinations }}{{ $sep }}"destinations": {{ if eq (kindOf .destinations) "string" }}{{ .destinations }}{{ else }}{{ toJson .destinations }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .domain }}{{ $sep }}"domain": {{ toJson .domain }}{{- $sep = "," -}}{{ end }} + + {{- if .enable_binding_cookie }}{{ $sep }}"enable_binding_cookie": {{ toJson .enable_binding_cookie }}{{- $sep = "," -}}{{ end }} + + {{- if .http_only_cookie_attribute }}{{ $sep }}"http_only_cookie_attribute": {{ toJson .http_only_cookie_attribute }}{{- $sep = "," -}}{{ end }} + + {{- if .logo_url }}{{ $sep }}"logo_url": {{ toJson .logo_url }}{{- $sep = "," -}}{{ end }} + + {{- if .mfa_config }}{{ $sep }}"mfa_config": {{ if eq (kindOf .mfa_config) "string" }}{{ .mfa_config }}{{ else }}{{ toJson .mfa_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .oauth_configuration }}{{ $sep }}"oauth_configuration": {{ if eq (kindOf .oauth_configuration) "string" }}{{ .oauth_configuration }}{{ else }}{{ toJson .oauth_configuration }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .options_preflight_bypass }}{{ $sep }}"options_preflight_bypass": {{ toJson .options_preflight_bypass }}{{- $sep = "," -}}{{ end }} + + {{- if .path_cookie_attribute }}{{ $sep }}"path_cookie_attribute": {{ toJson .path_cookie_attribute }}{{- $sep = "," -}}{{ end }} + + {{- if .read_service_tokens_from_header }}{{ $sep }}"read_service_tokens_from_header": {{ toJson .read_service_tokens_from_header }}{{- $sep = "," -}}{{ end }} + + {{- if .same_site_cookie_attribute }}{{ $sep }}"same_site_cookie_attribute": {{ toJson .same_site_cookie_attribute }}{{- $sep = "," -}}{{ end }} + + {{- if .scim_config }}{{ $sep }}"scim_config": {{ if eq (kindOf .scim_config) "string" }}{{ .scim_config }}{{ else }}{{ toJson .scim_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .self_hosted_domains }}{{ $sep }}"self_hosted_domains": {{ if eq (kindOf .self_hosted_domains) "string" }}{{ .self_hosted_domains }}{{ else }}{{ toJson .self_hosted_domains }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .service_auth_401_redirect }}{{ $sep }}"service_auth_401_redirect": {{ toJson .service_auth_401_redirect }}{{- $sep = "," -}}{{ end }} + + {{- if .session_duration }}{{ $sep }}"session_duration": {{ toJson .session_duration }}{{- $sep = "," -}}{{ end }} + + {{- if .skip_interstitial }}{{ $sep }}"skip_interstitial": {{ toJson .skip_interstitial }}{{- $sep = "," -}}{{ end }} + + {{- if .tags }}{{ $sep }}"tags": {{ if eq (kindOf .tags) "string" }}{{ .tags }}{{ else }}{{ toJson .tags }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + {{- if .use_clientless_isolation_app_launcher_url }}{{ $sep }}"use_clientless_isolation_app_launcher_url": {{ toJson .use_clientless_isolation_app_launcher_url }}{{- $sep = "," -}}{{ end }} + + {{- if .policies }}{{ $sep }}"policies": {{ if eq (kindOf .policies) "string" }}{{ .policies }}{{ else }}{{ toJson .policies }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .saas_app }}{{ $sep }}"saas_app": {{ if eq (kindOf .saas_app) "string" }}{{ .saas_app }}{{ else }}{{ toJson .saas_app }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .app_launcher_logo_url }}{{ $sep }}"app_launcher_logo_url": {{ toJson .app_launcher_logo_url }}{{- $sep = "," -}}{{ end }} + + {{- if .bg_color }}{{ $sep }}"bg_color": {{ toJson .bg_color }}{{- $sep = "," -}}{{ end }} + + {{- if .footer_links }}{{ $sep }}"footer_links": {{ if eq (kindOf .footer_links) "string" }}{{ .footer_links }}{{ else }}{{ toJson .footer_links }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .header_bg_color }}{{ $sep }}"header_bg_color": {{ toJson .header_bg_color }}{{- $sep = "," -}}{{ end }} + + {{- if .landing_page_design }}{{ $sep }}"landing_page_design": {{ if eq (kindOf .landing_page_design) "string" }}{{ .landing_page_design }}{{ else }}{{ toJson .landing_page_design }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .skip_app_launcher_login_page }}{{ $sep }}"skip_app_launcher_login_page": {{ toJson .skip_app_launcher_login_page }}{{- $sep = "," -}}{{ end }} + + {{- if .target_criteria }}{{ $sep }}"target_criteria": {{ if eq (kindOf .target_criteria) "string" }}{{ .target_criteria }}{{ else }}{{ toJson .target_criteria }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' list: operation: $ref: '#/paths/~1zones~1{zone_id}~1access~1apps/get' @@ -50921,6 +52268,95 @@ components: response: mediaType: application/json openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allow_authenticate_via_warp }}{{ $sep }}"allow_authenticate_via_warp": {{ toJson .allow_authenticate_via_warp }}{{- $sep = "," -}}{{ end }} + + {{- if .allow_iframe }}{{ $sep }}"allow_iframe": {{ toJson .allow_iframe }}{{- $sep = "," -}}{{ end }} + + {{- if .allowed_idps }}{{ $sep }}"allowed_idps": {{ if eq (kindOf .allowed_idps) "string" }}{{ .allowed_idps }}{{ else }}{{ toJson .allowed_idps }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .app_launcher_visible }}{{ $sep }}"app_launcher_visible": {{ toJson .app_launcher_visible }}{{- $sep = "," -}}{{ end }} + + {{- if .auto_redirect_to_identity }}{{ $sep }}"auto_redirect_to_identity": {{ toJson .auto_redirect_to_identity }}{{- $sep = "," -}}{{ end }} + + {{- if .cors_headers }}{{ $sep }}"cors_headers": {{ if eq (kindOf .cors_headers) "string" }}{{ .cors_headers }}{{ else }}{{ toJson .cors_headers }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_deny_message }}{{ $sep }}"custom_deny_message": {{ toJson .custom_deny_message }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_deny_url }}{{ $sep }}"custom_deny_url": {{ toJson .custom_deny_url }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_non_identity_deny_url }}{{ $sep }}"custom_non_identity_deny_url": {{ toJson .custom_non_identity_deny_url }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_pages }}{{ $sep }}"custom_pages": {{ if eq (kindOf .custom_pages) "string" }}{{ .custom_pages }}{{ else }}{{ toJson .custom_pages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .destinations }}{{ $sep }}"destinations": {{ if eq (kindOf .destinations) "string" }}{{ .destinations }}{{ else }}{{ toJson .destinations }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .domain }}{{ $sep }}"domain": {{ toJson .domain }}{{- $sep = "," -}}{{ end }} + + {{- if .enable_binding_cookie }}{{ $sep }}"enable_binding_cookie": {{ toJson .enable_binding_cookie }}{{- $sep = "," -}}{{ end }} + + {{- if .http_only_cookie_attribute }}{{ $sep }}"http_only_cookie_attribute": {{ toJson .http_only_cookie_attribute }}{{- $sep = "," -}}{{ end }} + + {{- if .logo_url }}{{ $sep }}"logo_url": {{ toJson .logo_url }}{{- $sep = "," -}}{{ end }} + + {{- if .mfa_config }}{{ $sep }}"mfa_config": {{ if eq (kindOf .mfa_config) "string" }}{{ .mfa_config }}{{ else }}{{ toJson .mfa_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .oauth_configuration }}{{ $sep }}"oauth_configuration": {{ if eq (kindOf .oauth_configuration) "string" }}{{ .oauth_configuration }}{{ else }}{{ toJson .oauth_configuration }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .options_preflight_bypass }}{{ $sep }}"options_preflight_bypass": {{ toJson .options_preflight_bypass }}{{- $sep = "," -}}{{ end }} + + {{- if .path_cookie_attribute }}{{ $sep }}"path_cookie_attribute": {{ toJson .path_cookie_attribute }}{{- $sep = "," -}}{{ end }} + + {{- if .read_service_tokens_from_header }}{{ $sep }}"read_service_tokens_from_header": {{ toJson .read_service_tokens_from_header }}{{- $sep = "," -}}{{ end }} + + {{- if .same_site_cookie_attribute }}{{ $sep }}"same_site_cookie_attribute": {{ toJson .same_site_cookie_attribute }}{{- $sep = "," -}}{{ end }} + + {{- if .scim_config }}{{ $sep }}"scim_config": {{ if eq (kindOf .scim_config) "string" }}{{ .scim_config }}{{ else }}{{ toJson .scim_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .self_hosted_domains }}{{ $sep }}"self_hosted_domains": {{ if eq (kindOf .self_hosted_domains) "string" }}{{ .self_hosted_domains }}{{ else }}{{ toJson .self_hosted_domains }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .service_auth_401_redirect }}{{ $sep }}"service_auth_401_redirect": {{ toJson .service_auth_401_redirect }}{{- $sep = "," -}}{{ end }} + + {{- if .session_duration }}{{ $sep }}"session_duration": {{ toJson .session_duration }}{{- $sep = "," -}}{{ end }} + + {{- if .skip_interstitial }}{{ $sep }}"skip_interstitial": {{ toJson .skip_interstitial }}{{- $sep = "," -}}{{ end }} + + {{- if .tags }}{{ $sep }}"tags": {{ if eq (kindOf .tags) "string" }}{{ .tags }}{{ else }}{{ toJson .tags }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + {{- if .use_clientless_isolation_app_launcher_url }}{{ $sep }}"use_clientless_isolation_app_launcher_url": {{ toJson .use_clientless_isolation_app_launcher_url }}{{- $sep = "," -}}{{ end }} + + {{- if .policies }}{{ $sep }}"policies": {{ if eq (kindOf .policies) "string" }}{{ .policies }}{{ else }}{{ toJson .policies }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .saas_app }}{{ $sep }}"saas_app": {{ if eq (kindOf .saas_app) "string" }}{{ .saas_app }}{{ else }}{{ toJson .saas_app }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .app_launcher_logo_url }}{{ $sep }}"app_launcher_logo_url": {{ toJson .app_launcher_logo_url }}{{- $sep = "," -}}{{ end }} + + {{- if .bg_color }}{{ $sep }}"bg_color": {{ toJson .bg_color }}{{- $sep = "," -}}{{ end }} + + {{- if .footer_links }}{{ $sep }}"footer_links": {{ if eq (kindOf .footer_links) "string" }}{{ .footer_links }}{{ else }}{{ toJson .footer_links }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .header_bg_color }}{{ $sep }}"header_bg_color": {{ toJson .header_bg_color }}{{- $sep = "," -}}{{ end }} + + {{- if .landing_page_design }}{{ $sep }}"landing_page_design": {{ if eq (kindOf .landing_page_design) "string" }}{{ .landing_page_design }}{{ else }}{{ toJson .landing_page_design }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .skip_app_launcher_login_page }}{{ $sep }}"skip_app_launcher_login_page": {{ toJson .skip_app_launcher_login_page }}{{- $sep = "," -}}{{ end }} + + {{- if .target_criteria }}{{ $sep }}"target_criteria": {{ if eq (kindOf .target_criteria) "string" }}{{ .target_criteria }}{{ else }}{{ toJson .target_criteria }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' update_by_account: config: requestBodyTranslate: @@ -50930,6 +52366,95 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allow_authenticate_via_warp }}{{ $sep }}"allow_authenticate_via_warp": {{ toJson .allow_authenticate_via_warp }}{{- $sep = "," -}}{{ end }} + + {{- if .allow_iframe }}{{ $sep }}"allow_iframe": {{ toJson .allow_iframe }}{{- $sep = "," -}}{{ end }} + + {{- if .allowed_idps }}{{ $sep }}"allowed_idps": {{ if eq (kindOf .allowed_idps) "string" }}{{ .allowed_idps }}{{ else }}{{ toJson .allowed_idps }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .app_launcher_visible }}{{ $sep }}"app_launcher_visible": {{ toJson .app_launcher_visible }}{{- $sep = "," -}}{{ end }} + + {{- if .auto_redirect_to_identity }}{{ $sep }}"auto_redirect_to_identity": {{ toJson .auto_redirect_to_identity }}{{- $sep = "," -}}{{ end }} + + {{- if .cors_headers }}{{ $sep }}"cors_headers": {{ if eq (kindOf .cors_headers) "string" }}{{ .cors_headers }}{{ else }}{{ toJson .cors_headers }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_deny_message }}{{ $sep }}"custom_deny_message": {{ toJson .custom_deny_message }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_deny_url }}{{ $sep }}"custom_deny_url": {{ toJson .custom_deny_url }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_non_identity_deny_url }}{{ $sep }}"custom_non_identity_deny_url": {{ toJson .custom_non_identity_deny_url }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_pages }}{{ $sep }}"custom_pages": {{ if eq (kindOf .custom_pages) "string" }}{{ .custom_pages }}{{ else }}{{ toJson .custom_pages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .destinations }}{{ $sep }}"destinations": {{ if eq (kindOf .destinations) "string" }}{{ .destinations }}{{ else }}{{ toJson .destinations }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .domain }}{{ $sep }}"domain": {{ toJson .domain }}{{- $sep = "," -}}{{ end }} + + {{- if .enable_binding_cookie }}{{ $sep }}"enable_binding_cookie": {{ toJson .enable_binding_cookie }}{{- $sep = "," -}}{{ end }} + + {{- if .http_only_cookie_attribute }}{{ $sep }}"http_only_cookie_attribute": {{ toJson .http_only_cookie_attribute }}{{- $sep = "," -}}{{ end }} + + {{- if .logo_url }}{{ $sep }}"logo_url": {{ toJson .logo_url }}{{- $sep = "," -}}{{ end }} + + {{- if .mfa_config }}{{ $sep }}"mfa_config": {{ if eq (kindOf .mfa_config) "string" }}{{ .mfa_config }}{{ else }}{{ toJson .mfa_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .oauth_configuration }}{{ $sep }}"oauth_configuration": {{ if eq (kindOf .oauth_configuration) "string" }}{{ .oauth_configuration }}{{ else }}{{ toJson .oauth_configuration }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .options_preflight_bypass }}{{ $sep }}"options_preflight_bypass": {{ toJson .options_preflight_bypass }}{{- $sep = "," -}}{{ end }} + + {{- if .path_cookie_attribute }}{{ $sep }}"path_cookie_attribute": {{ toJson .path_cookie_attribute }}{{- $sep = "," -}}{{ end }} + + {{- if .read_service_tokens_from_header }}{{ $sep }}"read_service_tokens_from_header": {{ toJson .read_service_tokens_from_header }}{{- $sep = "," -}}{{ end }} + + {{- if .same_site_cookie_attribute }}{{ $sep }}"same_site_cookie_attribute": {{ toJson .same_site_cookie_attribute }}{{- $sep = "," -}}{{ end }} + + {{- if .scim_config }}{{ $sep }}"scim_config": {{ if eq (kindOf .scim_config) "string" }}{{ .scim_config }}{{ else }}{{ toJson .scim_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .self_hosted_domains }}{{ $sep }}"self_hosted_domains": {{ if eq (kindOf .self_hosted_domains) "string" }}{{ .self_hosted_domains }}{{ else }}{{ toJson .self_hosted_domains }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .service_auth_401_redirect }}{{ $sep }}"service_auth_401_redirect": {{ toJson .service_auth_401_redirect }}{{- $sep = "," -}}{{ end }} + + {{- if .session_duration }}{{ $sep }}"session_duration": {{ toJson .session_duration }}{{- $sep = "," -}}{{ end }} + + {{- if .skip_interstitial }}{{ $sep }}"skip_interstitial": {{ toJson .skip_interstitial }}{{- $sep = "," -}}{{ end }} + + {{- if .tags }}{{ $sep }}"tags": {{ if eq (kindOf .tags) "string" }}{{ .tags }}{{ else }}{{ toJson .tags }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + {{- if .use_clientless_isolation_app_launcher_url }}{{ $sep }}"use_clientless_isolation_app_launcher_url": {{ toJson .use_clientless_isolation_app_launcher_url }}{{- $sep = "," -}}{{ end }} + + {{- if .policies }}{{ $sep }}"policies": {{ if eq (kindOf .policies) "string" }}{{ .policies }}{{ else }}{{ toJson .policies }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .saas_app }}{{ $sep }}"saas_app": {{ if eq (kindOf .saas_app) "string" }}{{ .saas_app }}{{ else }}{{ toJson .saas_app }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .app_launcher_logo_url }}{{ $sep }}"app_launcher_logo_url": {{ toJson .app_launcher_logo_url }}{{- $sep = "," -}}{{ end }} + + {{- if .bg_color }}{{ $sep }}"bg_color": {{ toJson .bg_color }}{{- $sep = "," -}}{{ end }} + + {{- if .footer_links }}{{ $sep }}"footer_links": {{ if eq (kindOf .footer_links) "string" }}{{ .footer_links }}{{ else }}{{ toJson .footer_links }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .header_bg_color }}{{ $sep }}"header_bg_color": {{ toJson .header_bg_color }}{{- $sep = "," -}}{{ end }} + + {{- if .landing_page_design }}{{ $sep }}"landing_page_design": {{ if eq (kindOf .landing_page_design) "string" }}{{ .landing_page_design }}{{ else }}{{ toJson .landing_page_design }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .skip_app_launcher_login_page }}{{ $sep }}"skip_app_launcher_login_page": {{ toJson .skip_app_launcher_login_page }}{{- $sep = "," -}}{{ end }} + + {{- if .target_criteria }}{{ $sep }}"target_criteria": {{ if eq (kindOf .target_criteria) "string" }}{{ .target_criteria }}{{ else }}{{ toJson .target_criteria }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' delete_by_account: operation: $ref: '#/paths/~1accounts~1{account_id}~1access~1apps~1{app_id}/delete' @@ -50945,6 +52470,95 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allow_authenticate_via_warp }}{{ $sep }}"allow_authenticate_via_warp": {{ toJson .allow_authenticate_via_warp }}{{- $sep = "," -}}{{ end }} + + {{- if .allow_iframe }}{{ $sep }}"allow_iframe": {{ toJson .allow_iframe }}{{- $sep = "," -}}{{ end }} + + {{- if .allowed_idps }}{{ $sep }}"allowed_idps": {{ if eq (kindOf .allowed_idps) "string" }}{{ .allowed_idps }}{{ else }}{{ toJson .allowed_idps }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .app_launcher_visible }}{{ $sep }}"app_launcher_visible": {{ toJson .app_launcher_visible }}{{- $sep = "," -}}{{ end }} + + {{- if .auto_redirect_to_identity }}{{ $sep }}"auto_redirect_to_identity": {{ toJson .auto_redirect_to_identity }}{{- $sep = "," -}}{{ end }} + + {{- if .cors_headers }}{{ $sep }}"cors_headers": {{ if eq (kindOf .cors_headers) "string" }}{{ .cors_headers }}{{ else }}{{ toJson .cors_headers }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_deny_message }}{{ $sep }}"custom_deny_message": {{ toJson .custom_deny_message }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_deny_url }}{{ $sep }}"custom_deny_url": {{ toJson .custom_deny_url }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_non_identity_deny_url }}{{ $sep }}"custom_non_identity_deny_url": {{ toJson .custom_non_identity_deny_url }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_pages }}{{ $sep }}"custom_pages": {{ if eq (kindOf .custom_pages) "string" }}{{ .custom_pages }}{{ else }}{{ toJson .custom_pages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .destinations }}{{ $sep }}"destinations": {{ if eq (kindOf .destinations) "string" }}{{ .destinations }}{{ else }}{{ toJson .destinations }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .domain }}{{ $sep }}"domain": {{ toJson .domain }}{{- $sep = "," -}}{{ end }} + + {{- if .enable_binding_cookie }}{{ $sep }}"enable_binding_cookie": {{ toJson .enable_binding_cookie }}{{- $sep = "," -}}{{ end }} + + {{- if .http_only_cookie_attribute }}{{ $sep }}"http_only_cookie_attribute": {{ toJson .http_only_cookie_attribute }}{{- $sep = "," -}}{{ end }} + + {{- if .logo_url }}{{ $sep }}"logo_url": {{ toJson .logo_url }}{{- $sep = "," -}}{{ end }} + + {{- if .mfa_config }}{{ $sep }}"mfa_config": {{ if eq (kindOf .mfa_config) "string" }}{{ .mfa_config }}{{ else }}{{ toJson .mfa_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .oauth_configuration }}{{ $sep }}"oauth_configuration": {{ if eq (kindOf .oauth_configuration) "string" }}{{ .oauth_configuration }}{{ else }}{{ toJson .oauth_configuration }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .options_preflight_bypass }}{{ $sep }}"options_preflight_bypass": {{ toJson .options_preflight_bypass }}{{- $sep = "," -}}{{ end }} + + {{- if .path_cookie_attribute }}{{ $sep }}"path_cookie_attribute": {{ toJson .path_cookie_attribute }}{{- $sep = "," -}}{{ end }} + + {{- if .read_service_tokens_from_header }}{{ $sep }}"read_service_tokens_from_header": {{ toJson .read_service_tokens_from_header }}{{- $sep = "," -}}{{ end }} + + {{- if .same_site_cookie_attribute }}{{ $sep }}"same_site_cookie_attribute": {{ toJson .same_site_cookie_attribute }}{{- $sep = "," -}}{{ end }} + + {{- if .scim_config }}{{ $sep }}"scim_config": {{ if eq (kindOf .scim_config) "string" }}{{ .scim_config }}{{ else }}{{ toJson .scim_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .self_hosted_domains }}{{ $sep }}"self_hosted_domains": {{ if eq (kindOf .self_hosted_domains) "string" }}{{ .self_hosted_domains }}{{ else }}{{ toJson .self_hosted_domains }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .service_auth_401_redirect }}{{ $sep }}"service_auth_401_redirect": {{ toJson .service_auth_401_redirect }}{{- $sep = "," -}}{{ end }} + + {{- if .session_duration }}{{ $sep }}"session_duration": {{ toJson .session_duration }}{{- $sep = "," -}}{{ end }} + + {{- if .skip_interstitial }}{{ $sep }}"skip_interstitial": {{ toJson .skip_interstitial }}{{- $sep = "," -}}{{ end }} + + {{- if .tags }}{{ $sep }}"tags": {{ if eq (kindOf .tags) "string" }}{{ .tags }}{{ else }}{{ toJson .tags }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + {{- if .use_clientless_isolation_app_launcher_url }}{{ $sep }}"use_clientless_isolation_app_launcher_url": {{ toJson .use_clientless_isolation_app_launcher_url }}{{- $sep = "," -}}{{ end }} + + {{- if .policies }}{{ $sep }}"policies": {{ if eq (kindOf .policies) "string" }}{{ .policies }}{{ else }}{{ toJson .policies }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .saas_app }}{{ $sep }}"saas_app": {{ if eq (kindOf .saas_app) "string" }}{{ .saas_app }}{{ else }}{{ toJson .saas_app }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .app_launcher_logo_url }}{{ $sep }}"app_launcher_logo_url": {{ toJson .app_launcher_logo_url }}{{- $sep = "," -}}{{ end }} + + {{- if .bg_color }}{{ $sep }}"bg_color": {{ toJson .bg_color }}{{- $sep = "," -}}{{ end }} + + {{- if .footer_links }}{{ $sep }}"footer_links": {{ if eq (kindOf .footer_links) "string" }}{{ .footer_links }}{{ else }}{{ toJson .footer_links }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .header_bg_color }}{{ $sep }}"header_bg_color": {{ toJson .header_bg_color }}{{- $sep = "," -}}{{ end }} + + {{- if .landing_page_design }}{{ $sep }}"landing_page_design": {{ if eq (kindOf .landing_page_design) "string" }}{{ .landing_page_design }}{{ else }}{{ toJson .landing_page_design }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .skip_app_launcher_login_page }}{{ $sep }}"skip_app_launcher_login_page": {{ toJson .skip_app_launcher_login_page }}{{- $sep = "," -}}{{ end }} + + {{- if .target_criteria }}{{ $sep }}"target_criteria": {{ if eq (kindOf .target_criteria) "string" }}{{ .target_criteria }}{{ else }}{{ toJson .target_criteria }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' delete_by_zone: operation: $ref: '#/paths/~1zones~1{zone_id}~1access~1apps~1{app_id}/delete' @@ -51112,6 +52726,35 @@ components: response: mediaType: application/json openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .precedence }}{{ $sep }}"precedence": {{ toJson .precedence }}{{- $sep = "," -}}{{ end }} + + {{- if .approval_groups }}{{ $sep }}"approval_groups": {{ if eq (kindOf .approval_groups) "string" }}{{ .approval_groups }}{{ else }}{{ toJson .approval_groups }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .approval_required }}{{ $sep }}"approval_required": {{ toJson .approval_required }}{{- $sep = "," -}}{{ end }} + + {{- if .connection_rules }}{{ $sep }}"connection_rules": {{ if eq (kindOf .connection_rules) "string" }}{{ .connection_rules }}{{ else }}{{ toJson .connection_rules }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .isolation_required }}{{ $sep }}"isolation_required": {{ toJson .isolation_required }}{{- $sep = "," -}}{{ end }} + + {{- if .mfa_config }}{{ $sep }}"mfa_config": {{ if eq (kindOf .mfa_config) "string" }}{{ .mfa_config }}{{ else }}{{ toJson .mfa_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .purpose_justification_prompt }}{{ $sep }}"purpose_justification_prompt": {{ toJson .purpose_justification_prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .purpose_justification_required }}{{ $sep }}"purpose_justification_required": {{ toJson .purpose_justification_required }}{{- $sep = "," -}}{{ end }} + + {{- if .session_duration }}{{ $sep }}"session_duration": {{ toJson .session_duration }}{{- $sep = "," -}}{{ end }} + + } + + ' list_by_zone: operation: $ref: '#/paths/~1zones~1{zone_id}~1access~1apps~1{app_id}~1policies/get' @@ -51128,6 +52771,35 @@ components: response: mediaType: application/json openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .precedence }}{{ $sep }}"precedence": {{ toJson .precedence }}{{- $sep = "," -}}{{ end }} + + {{- if .approval_groups }}{{ $sep }}"approval_groups": {{ if eq (kindOf .approval_groups) "string" }}{{ .approval_groups }}{{ else }}{{ toJson .approval_groups }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .approval_required }}{{ $sep }}"approval_required": {{ toJson .approval_required }}{{- $sep = "," -}}{{ end }} + + {{- if .connection_rules }}{{ $sep }}"connection_rules": {{ if eq (kindOf .connection_rules) "string" }}{{ .connection_rules }}{{ else }}{{ toJson .connection_rules }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .isolation_required }}{{ $sep }}"isolation_required": {{ toJson .isolation_required }}{{- $sep = "," -}}{{ end }} + + {{- if .mfa_config }}{{ $sep }}"mfa_config": {{ if eq (kindOf .mfa_config) "string" }}{{ .mfa_config }}{{ else }}{{ toJson .mfa_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .purpose_justification_prompt }}{{ $sep }}"purpose_justification_prompt": {{ toJson .purpose_justification_prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .purpose_justification_required }}{{ $sep }}"purpose_justification_required": {{ toJson .purpose_justification_required }}{{- $sep = "," -}}{{ end }} + + {{- if .session_duration }}{{ $sep }}"session_duration": {{ toJson .session_duration }}{{- $sep = "," -}}{{ end }} + + } + + ' get_by_account: operation: $ref: '#/paths/~1accounts~1{account_id}~1access~1apps~1{app_id}~1policies~1{policy_id}/get' @@ -51144,6 +52816,35 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .precedence }}{{ $sep }}"precedence": {{ toJson .precedence }}{{- $sep = "," -}}{{ end }} + + {{- if .approval_groups }}{{ $sep }}"approval_groups": {{ if eq (kindOf .approval_groups) "string" }}{{ .approval_groups }}{{ else }}{{ toJson .approval_groups }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .approval_required }}{{ $sep }}"approval_required": {{ toJson .approval_required }}{{- $sep = "," -}}{{ end }} + + {{- if .connection_rules }}{{ $sep }}"connection_rules": {{ if eq (kindOf .connection_rules) "string" }}{{ .connection_rules }}{{ else }}{{ toJson .connection_rules }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .isolation_required }}{{ $sep }}"isolation_required": {{ toJson .isolation_required }}{{- $sep = "," -}}{{ end }} + + {{- if .mfa_config }}{{ $sep }}"mfa_config": {{ if eq (kindOf .mfa_config) "string" }}{{ .mfa_config }}{{ else }}{{ toJson .mfa_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .purpose_justification_prompt }}{{ $sep }}"purpose_justification_prompt": {{ toJson .purpose_justification_prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .purpose_justification_required }}{{ $sep }}"purpose_justification_required": {{ toJson .purpose_justification_required }}{{- $sep = "," -}}{{ end }} + + {{- if .session_duration }}{{ $sep }}"session_duration": {{ toJson .session_duration }}{{- $sep = "," -}}{{ end }} + + } + + ' delete_by_account: operation: $ref: '#/paths/~1accounts~1{account_id}~1access~1apps~1{app_id}~1policies~1{policy_id}/delete' @@ -51166,6 +52867,35 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .precedence }}{{ $sep }}"precedence": {{ toJson .precedence }}{{- $sep = "," -}}{{ end }} + + {{- if .approval_groups }}{{ $sep }}"approval_groups": {{ if eq (kindOf .approval_groups) "string" }}{{ .approval_groups }}{{ else }}{{ toJson .approval_groups }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .approval_required }}{{ $sep }}"approval_required": {{ toJson .approval_required }}{{- $sep = "," -}}{{ end }} + + {{- if .connection_rules }}{{ $sep }}"connection_rules": {{ if eq (kindOf .connection_rules) "string" }}{{ .connection_rules }}{{ else }}{{ toJson .connection_rules }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .isolation_required }}{{ $sep }}"isolation_required": {{ toJson .isolation_required }}{{- $sep = "," -}}{{ end }} + + {{- if .mfa_config }}{{ $sep }}"mfa_config": {{ if eq (kindOf .mfa_config) "string" }}{{ .mfa_config }}{{ else }}{{ toJson .mfa_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .purpose_justification_prompt }}{{ $sep }}"purpose_justification_prompt": {{ toJson .purpose_justification_prompt }}{{- $sep = "," -}}{{ end }} + + {{- if .purpose_justification_required }}{{ $sep }}"purpose_justification_required": {{ toJson .purpose_justification_required }}{{- $sep = "," -}}{{ end }} + + {{- if .session_duration }}{{ $sep }}"session_duration": {{ toJson .session_duration }}{{- $sep = "," -}}{{ end }} + + } + + ' delete_by_zone: operation: $ref: '#/paths/~1zones~1{zone_id}~1access~1apps~1{app_id}~1policies~1{policy_id}/delete' @@ -51238,6 +52968,19 @@ components: response: mediaType: application/json openAPIDocKey: '202' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .settings }}{{ $sep }}"settings": {{ if eq (kindOf .settings) "string" }}{{ .settings }}{{ else }}{{ toJson .settings }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' list: operation: $ref: '#/paths/~1zones~1{zone_id}~1access~1certificates~1settings/get' @@ -51254,6 +52997,19 @@ components: response: mediaType: application/json openAPIDocKey: '202' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .settings }}{{ $sep }}"settings": {{ if eq (kindOf .settings) "string" }}{{ .settings }}{{ else }}{{ toJson .settings }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/settings/methods/list' @@ -51327,6 +53083,23 @@ components: response: mediaType: application/json openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .associated_hostnames }}{{ $sep }}"associated_hostnames": {{ if eq (kindOf .associated_hostnames) "string" }}{{ .associated_hostnames }}{{ else }}{{ toJson .associated_hostnames }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .certificate }}{{ $sep }}"certificate": {{ toJson .certificate }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + } + + ' get: operation: $ref: '#/paths/~1accounts~1{account_id}~1access~1certificates~1{certificate_id}/get' @@ -51428,6 +53201,27 @@ components: response: mediaType: application/json openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .exclude }}{{ $sep }}"exclude": {{ if eq (kindOf .exclude) "string" }}{{ .exclude }}{{ else }}{{ toJson .exclude }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .include }}{{ $sep }}"include": {{ if eq (kindOf .include) "string" }}{{ .include }}{{ else }}{{ toJson .include }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .is_default }}{{ $sep }}"is_default": {{ toJson .is_default }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .require }}{{ $sep }}"require": {{ if eq (kindOf .require) "string" }}{{ .require }}{{ else }}{{ toJson .require }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' create_by_zone: config: requestBodyTranslate: @@ -51437,6 +53231,27 @@ components: response: mediaType: application/json openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .exclude }}{{ $sep }}"exclude": {{ if eq (kindOf .exclude) "string" }}{{ .exclude }}{{ else }}{{ toJson .exclude }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .include }}{{ $sep }}"include": {{ if eq (kindOf .include) "string" }}{{ .include }}{{ else }}{{ toJson .include }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .is_default }}{{ $sep }}"is_default": {{ toJson .is_default }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .require }}{{ $sep }}"require": {{ if eq (kindOf .require) "string" }}{{ .require }}{{ else }}{{ toJson .require }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' get_by_account: operation: $ref: '#/paths/~1accounts~1{account_id}~1access~1groups~1{group_id}/get' @@ -51453,6 +53268,27 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .exclude }}{{ $sep }}"exclude": {{ if eq (kindOf .exclude) "string" }}{{ .exclude }}{{ else }}{{ toJson .exclude }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .include }}{{ $sep }}"include": {{ if eq (kindOf .include) "string" }}{{ .include }}{{ else }}{{ toJson .include }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .is_default }}{{ $sep }}"is_default": {{ toJson .is_default }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .require }}{{ $sep }}"require": {{ if eq (kindOf .require) "string" }}{{ .require }}{{ else }}{{ toJson .require }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' delete_by_account: operation: $ref: '#/paths/~1accounts~1{account_id}~1access~1groups~1{group_id}/delete' @@ -51475,6 +53311,27 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .exclude }}{{ $sep }}"exclude": {{ if eq (kindOf .exclude) "string" }}{{ .exclude }}{{ else }}{{ toJson .exclude }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .include }}{{ $sep }}"include": {{ if eq (kindOf .include) "string" }}{{ .include }}{{ else }}{{ toJson .include }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .is_default }}{{ $sep }}"is_default": {{ toJson .is_default }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .require }}{{ $sep }}"require": {{ if eq (kindOf .require) "string" }}{{ .require }}{{ else }}{{ toJson .require }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' delete_by_zone: operation: $ref: '#/paths/~1zones~1{zone_id}~1access~1groups~1{group_id}/delete' @@ -51516,6 +53373,25 @@ components: response: mediaType: application/json openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .config }}{{ $sep }}"config": {{ if eq (kindOf .config) "string" }}{{ .config }}{{ else }}{{ toJson .config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .scim_config }}{{ $sep }}"scim_config": {{ if eq (kindOf .scim_config) "string" }}{{ .scim_config }}{{ else }}{{ toJson .scim_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' list_by_zone: operation: $ref: '#/paths/~1zones~1{zone_id}~1access~1identity_providers/get' @@ -51532,6 +53408,25 @@ components: response: mediaType: application/json openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .config }}{{ $sep }}"config": {{ if eq (kindOf .config) "string" }}{{ .config }}{{ else }}{{ toJson .config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .scim_config }}{{ $sep }}"scim_config": {{ if eq (kindOf .scim_config) "string" }}{{ .scim_config }}{{ else }}{{ toJson .scim_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' get_by_account: operation: $ref: '#/paths/~1accounts~1{account_id}~1access~1identity_providers~1{identity_provider_id}/get' @@ -51548,6 +53443,25 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .config }}{{ $sep }}"config": {{ if eq (kindOf .config) "string" }}{{ .config }}{{ else }}{{ toJson .config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .scim_config }}{{ $sep }}"scim_config": {{ if eq (kindOf .scim_config) "string" }}{{ .scim_config }}{{ else }}{{ toJson .scim_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' delete_by_account: operation: $ref: '#/paths/~1accounts~1{account_id}~1access~1identity_providers~1{identity_provider_id}/delete' @@ -51570,6 +53484,25 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .config }}{{ $sep }}"config": {{ if eq (kindOf .config) "string" }}{{ .config }}{{ else }}{{ toJson .config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .scim_config }}{{ $sep }}"scim_config": {{ if eq (kindOf .scim_config) "string" }}{{ .scim_config }}{{ else }}{{ toJson .scim_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' delete_by_zone: operation: $ref: '#/paths/~1zones~1{zone_id}~1access~1identity_providers~1{identity_provider_id}/delete' @@ -51613,6 +53546,49 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allow_authenticate_via_warp }}{{ $sep }}"allow_authenticate_via_warp": {{ toJson .allow_authenticate_via_warp }}{{- $sep = "," -}}{{ end }} + + {{- if .auth_domain }}{{ $sep }}"auth_domain": {{ toJson .auth_domain }}{{- $sep = "," -}}{{ end }} + + {{- if .auto_redirect_to_identity }}{{ $sep }}"auto_redirect_to_identity": {{ toJson .auto_redirect_to_identity }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_pages }}{{ $sep }}"custom_pages": {{ if eq (kindOf .custom_pages) "string" }}{{ .custom_pages }}{{ else }}{{ toJson .custom_pages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .deny_unmatched_requests }}{{ $sep }}"deny_unmatched_requests": {{ toJson .deny_unmatched_requests }}{{- $sep = "," -}}{{ end }} + + {{- if .deny_unmatched_requests_exempted_zone_names }}{{ $sep }}"deny_unmatched_requests_exempted_zone_names": {{ if eq (kindOf .deny_unmatched_requests_exempted_zone_names) "string" }}{{ .deny_unmatched_requests_exempted_zone_names }}{{ else }}{{ toJson .deny_unmatched_requests_exempted_zone_names }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .is_ui_read_only }}{{ $sep }}"is_ui_read_only": {{ toJson .is_ui_read_only }}{{- $sep = "," -}}{{ end }} + + {{- if .login_design }}{{ $sep }}"login_design": {{ if eq (kindOf .login_design) "string" }}{{ .login_design }}{{ else }}{{ toJson .login_design }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .mfa_config }}{{ $sep }}"mfa_config": {{ if eq (kindOf .mfa_config) "string" }}{{ .mfa_config }}{{ else }}{{ toJson .mfa_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .mfa_required_for_all_apps }}{{ $sep }}"mfa_required_for_all_apps": {{ toJson .mfa_required_for_all_apps }}{{- $sep = "," -}}{{ end }} + + {{- if .mfa_ssh_piv_key_requirements }}{{ $sep }}"mfa_ssh_piv_key_requirements": {{ if eq (kindOf .mfa_ssh_piv_key_requirements) "string" }}{{ .mfa_ssh_piv_key_requirements }}{{ else }}{{ toJson .mfa_ssh_piv_key_requirements }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .session_duration }}{{ $sep }}"session_duration": {{ toJson .session_duration }}{{- $sep = "," -}}{{ end }} + + {{- if .ui_read_only_toggle_reason }}{{ $sep }}"ui_read_only_toggle_reason": {{ toJson .ui_read_only_toggle_reason }}{{- $sep = "," -}}{{ end }} + + {{- if .user_seat_expiration_inactive_time }}{{ $sep }}"user_seat_expiration_inactive_time": {{ toJson .user_seat_expiration_inactive_time }}{{- $sep = "," -}}{{ end }} + + {{- if .warp_auth_session_duration }}{{ $sep }}"warp_auth_session_duration": {{ toJson .warp_auth_session_duration }}{{- $sep = "," -}}{{ end }} + + } + + ' create_by_account: config: requestBodyTranslate: @@ -51622,6 +53598,47 @@ components: response: mediaType: application/json openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allow_authenticate_via_warp }}{{ $sep }}"allow_authenticate_via_warp": {{ toJson .allow_authenticate_via_warp }}{{- $sep = "," -}}{{ end }} + + {{- if .auth_domain }}{{ $sep }}"auth_domain": {{ toJson .auth_domain }}{{- $sep = "," -}}{{ end }} + + {{- if .auto_redirect_to_identity }}{{ $sep }}"auto_redirect_to_identity": {{ toJson .auto_redirect_to_identity }}{{- $sep = "," -}}{{ end }} + + {{- if .deny_unmatched_requests }}{{ $sep }}"deny_unmatched_requests": {{ toJson .deny_unmatched_requests }}{{- $sep = "," -}}{{ end }} + + {{- if .deny_unmatched_requests_exempted_zone_names }}{{ $sep }}"deny_unmatched_requests_exempted_zone_names": {{ if eq (kindOf .deny_unmatched_requests_exempted_zone_names) "string" }}{{ .deny_unmatched_requests_exempted_zone_names }}{{ else }}{{ toJson .deny_unmatched_requests_exempted_zone_names }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .is_ui_read_only }}{{ $sep }}"is_ui_read_only": {{ toJson .is_ui_read_only }}{{- $sep = "," -}}{{ end }} + + {{- if .login_design }}{{ $sep }}"login_design": {{ if eq (kindOf .login_design) "string" }}{{ .login_design }}{{ else }}{{ toJson .login_design }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .mfa_config }}{{ $sep }}"mfa_config": {{ if eq (kindOf .mfa_config) "string" }}{{ .mfa_config }}{{ else }}{{ toJson .mfa_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .mfa_required_for_all_apps }}{{ $sep }}"mfa_required_for_all_apps": {{ toJson .mfa_required_for_all_apps }}{{- $sep = "," -}}{{ end }} + + {{- if .mfa_ssh_piv_key_requirements }}{{ $sep }}"mfa_ssh_piv_key_requirements": {{ if eq (kindOf .mfa_ssh_piv_key_requirements) "string" }}{{ .mfa_ssh_piv_key_requirements }}{{ else }}{{ toJson .mfa_ssh_piv_key_requirements }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .session_duration }}{{ $sep }}"session_duration": {{ toJson .session_duration }}{{- $sep = "," -}}{{ end }} + + {{- if .ui_read_only_toggle_reason }}{{ $sep }}"ui_read_only_toggle_reason": {{ toJson .ui_read_only_toggle_reason }}{{- $sep = "," -}}{{ end }} + + {{- if .user_seat_expiration_inactive_time }}{{ $sep }}"user_seat_expiration_inactive_time": {{ toJson .user_seat_expiration_inactive_time }}{{- $sep = "," -}}{{ end }} + + {{- if .warp_auth_session_duration }}{{ $sep }}"warp_auth_session_duration": {{ toJson .warp_auth_session_duration }}{{- $sep = "," -}}{{ end }} + + } + + ' list_by_zone: operation: $ref: '#/paths/~1zones~1{zone_id}~1access~1organizations/get' @@ -51638,6 +53655,49 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allow_authenticate_via_warp }}{{ $sep }}"allow_authenticate_via_warp": {{ toJson .allow_authenticate_via_warp }}{{- $sep = "," -}}{{ end }} + + {{- if .auth_domain }}{{ $sep }}"auth_domain": {{ toJson .auth_domain }}{{- $sep = "," -}}{{ end }} + + {{- if .auto_redirect_to_identity }}{{ $sep }}"auto_redirect_to_identity": {{ toJson .auto_redirect_to_identity }}{{- $sep = "," -}}{{ end }} + + {{- if .custom_pages }}{{ $sep }}"custom_pages": {{ if eq (kindOf .custom_pages) "string" }}{{ .custom_pages }}{{ else }}{{ toJson .custom_pages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .deny_unmatched_requests }}{{ $sep }}"deny_unmatched_requests": {{ toJson .deny_unmatched_requests }}{{- $sep = "," -}}{{ end }} + + {{- if .deny_unmatched_requests_exempted_zone_names }}{{ $sep }}"deny_unmatched_requests_exempted_zone_names": {{ if eq (kindOf .deny_unmatched_requests_exempted_zone_names) "string" }}{{ .deny_unmatched_requests_exempted_zone_names }}{{ else }}{{ toJson .deny_unmatched_requests_exempted_zone_names }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .is_ui_read_only }}{{ $sep }}"is_ui_read_only": {{ toJson .is_ui_read_only }}{{- $sep = "," -}}{{ end }} + + {{- if .login_design }}{{ $sep }}"login_design": {{ if eq (kindOf .login_design) "string" }}{{ .login_design }}{{ else }}{{ toJson .login_design }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .mfa_config }}{{ $sep }}"mfa_config": {{ if eq (kindOf .mfa_config) "string" }}{{ .mfa_config }}{{ else }}{{ toJson .mfa_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .mfa_required_for_all_apps }}{{ $sep }}"mfa_required_for_all_apps": {{ toJson .mfa_required_for_all_apps }}{{- $sep = "," -}}{{ end }} + + {{- if .mfa_ssh_piv_key_requirements }}{{ $sep }}"mfa_ssh_piv_key_requirements": {{ if eq (kindOf .mfa_ssh_piv_key_requirements) "string" }}{{ .mfa_ssh_piv_key_requirements }}{{ else }}{{ toJson .mfa_ssh_piv_key_requirements }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .session_duration }}{{ $sep }}"session_duration": {{ toJson .session_duration }}{{- $sep = "," -}}{{ end }} + + {{- if .ui_read_only_toggle_reason }}{{ $sep }}"ui_read_only_toggle_reason": {{ toJson .ui_read_only_toggle_reason }}{{- $sep = "," -}}{{ end }} + + {{- if .user_seat_expiration_inactive_time }}{{ $sep }}"user_seat_expiration_inactive_time": {{ toJson .user_seat_expiration_inactive_time }}{{- $sep = "," -}}{{ end }} + + {{- if .warp_auth_session_duration }}{{ $sep }}"warp_auth_session_duration": {{ toJson .warp_auth_session_duration }}{{- $sep = "," -}}{{ end }} + + } + + ' create_by_zone: config: requestBodyTranslate: @@ -51647,6 +53707,47 @@ components: response: mediaType: application/json openAPIDocKey: '201' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .allow_authenticate_via_warp }}{{ $sep }}"allow_authenticate_via_warp": {{ toJson .allow_authenticate_via_warp }}{{- $sep = "," -}}{{ end }} + + {{- if .auth_domain }}{{ $sep }}"auth_domain": {{ toJson .auth_domain }}{{- $sep = "," -}}{{ end }} + + {{- if .auto_redirect_to_identity }}{{ $sep }}"auto_redirect_to_identity": {{ toJson .auto_redirect_to_identity }}{{- $sep = "," -}}{{ end }} + + {{- if .deny_unmatched_requests }}{{ $sep }}"deny_unmatched_requests": {{ toJson .deny_unmatched_requests }}{{- $sep = "," -}}{{ end }} + + {{- if .deny_unmatched_requests_exempted_zone_names }}{{ $sep }}"deny_unmatched_requests_exempted_zone_names": {{ if eq (kindOf .deny_unmatched_requests_exempted_zone_names) "string" }}{{ .deny_unmatched_requests_exempted_zone_names }}{{ else }}{{ toJson .deny_unmatched_requests_exempted_zone_names }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .is_ui_read_only }}{{ $sep }}"is_ui_read_only": {{ toJson .is_ui_read_only }}{{- $sep = "," -}}{{ end }} + + {{- if .login_design }}{{ $sep }}"login_design": {{ if eq (kindOf .login_design) "string" }}{{ .login_design }}{{ else }}{{ toJson .login_design }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .mfa_config }}{{ $sep }}"mfa_config": {{ if eq (kindOf .mfa_config) "string" }}{{ .mfa_config }}{{ else }}{{ toJson .mfa_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .mfa_required_for_all_apps }}{{ $sep }}"mfa_required_for_all_apps": {{ toJson .mfa_required_for_all_apps }}{{- $sep = "," -}}{{ end }} + + {{- if .mfa_ssh_piv_key_requirements }}{{ $sep }}"mfa_ssh_piv_key_requirements": {{ if eq (kindOf .mfa_ssh_piv_key_requirements) "string" }}{{ .mfa_ssh_piv_key_requirements }}{{ else }}{{ toJson .mfa_ssh_piv_key_requirements }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .session_duration }}{{ $sep }}"session_duration": {{ toJson .session_duration }}{{- $sep = "," -}}{{ end }} + + {{- if .ui_read_only_toggle_reason }}{{ $sep }}"ui_read_only_toggle_reason": {{ toJson .ui_read_only_toggle_reason }}{{- $sep = "," -}}{{ end }} + + {{- if .user_seat_expiration_inactive_time }}{{ $sep }}"user_seat_expiration_inactive_time": {{ toJson .user_seat_expiration_inactive_time }}{{- $sep = "," -}}{{ end }} + + {{- if .warp_auth_session_duration }}{{ $sep }}"warp_auth_session_duration": {{ toJson .warp_auth_session_duration }}{{- $sep = "," -}}{{ end }} + + } + + ' revoke_users_by_account: config: requestBodyTranslate: diff --git a/providers/src/cloudflare/v00.00.00000/services/zones.yaml b/providers/src/cloudflare/v00.00.00000/services/zones.yaml index 3ff3b20b..6ca3ca74 100644 --- a/providers/src/cloudflare/v00.00.00000/services/zones.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/zones.yaml @@ -7251,10 +7251,10 @@ components: items: type: string required: - - cache_by_device_type - - wp_plugin - wordpress - hostnames + - cache_by_device_type + - wp_plugin - enabled - cf zonesSslRecommenderEnabled: @@ -7635,6 +7635,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .account }}{{ $sep }}"account": {{ if eq (kindOf .account) "string" }}{{ .account }}{{ else }}{{ toJson .account }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1zones~1{zone_id}/delete' @@ -7657,6 +7674,23 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .paused }}{{ $sep }}"paused": {{ toJson .paused }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + {{- if .vanity_name_servers }}{{ $sep }}"vanity_name_servers": {{ if eq (kindOf .vanity_name_servers) "string" }}{{ .vanity_name_servers }}{{ else }}{{ toJson .vanity_name_servers }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' trigger_activation_check: operation: $ref: '#/paths/~1zones~1{zone_id}~1activation_check/put' @@ -7803,6 +7837,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .environments }}{{ $sep }}"environments": {{ if eq (kindOf .environments) "string" }}{{ .environments }}{{ else }}{{ toJson .environments }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' create: config: requestBodyTranslate: @@ -7812,6 +7859,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .environments }}{{ $sep }}"environments": {{ if eq (kindOf .environments) "string" }}{{ .environments }}{{ else }}{{ toJson .environments }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' update: config: requestBodyTranslate: @@ -7821,6 +7881,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .environments }}{{ $sep }}"environments": {{ if eq (kindOf .environments) "string" }}{{ .environments }}{{ else }}{{ toJson .environments }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' delete: operation: $ref: '#/paths/~1zones~1{zone_id}~1environments~1{environment_id}/delete' @@ -7865,6 +7938,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .topics }}{{ $sep }}"topics": {{ if eq (kindOf .topics) "string" }}{{ .topics }}{{ else }}{{ toJson .topics }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/custom_topics/methods/list' @@ -8024,6 +8110,19 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .value }}{{ $sep }}"value": {{ if eq (kindOf .value) "string" }}{{ .value }}{{ else }}{{ toJson .value }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/aegis/methods/list' @@ -8227,6 +8326,25 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .cache_reserve }}{{ $sep }}"cache_reserve": {{ if eq (kindOf .cache_reserve) "string" }}{{ .cache_reserve }}{{ else }}{{ toJson .cache_reserve }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .regional_tiered_cache }}{{ $sep }}"regional_tiered_cache": {{ if eq (kindOf .regional_tiered_cache) "string" }}{{ .regional_tiered_cache }}{{ else }}{{ toJson .regional_tiered_cache }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .smart_routing }}{{ $sep }}"smart_routing": {{ if eq (kindOf .smart_routing) "string" }}{{ .smart_routing }}{{ else }}{{ toJson .smart_routing }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .smart_tiered_cache }}{{ $sep }}"smart_tiered_cache": {{ if eq (kindOf .smart_tiered_cache) "string" }}{{ .smart_tiered_cache }}{{ else }}{{ toJson .smart_tiered_cache }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/smart_shield/methods/list' @@ -8285,6 +8403,43 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .address }}{{ $sep }}"address": {{ toJson .address }}{{- $sep = "," -}}{{ end }} + + {{- if .check_regions }}{{ $sep }}"check_regions": {{ if eq (kindOf .check_regions) "string" }}{{ .check_regions }}{{ else }}{{ toJson .check_regions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_fails }}{{ $sep }}"consecutive_fails": {{ toJson .consecutive_fails }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_successes }}{{ $sep }}"consecutive_successes": {{ toJson .consecutive_successes }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .http_config }}{{ $sep }}"http_config": {{ if eq (kindOf .http_config) "string" }}{{ .http_config }}{{ else }}{{ toJson .http_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interval }}{{ $sep }}"interval": {{ toJson .interval }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .retries }}{{ $sep }}"retries": {{ toJson .retries }}{{- $sep = "," -}}{{ end }} + + {{- if .suspended }}{{ $sep }}"suspended": {{ toJson .suspended }}{{- $sep = "," -}}{{ end }} + + {{- if .tcp_config }}{{ $sep }}"tcp_config": {{ if eq (kindOf .tcp_config) "string" }}{{ .tcp_config }}{{ else }}{{ toJson .tcp_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .timeout }}{{ $sep }}"timeout": {{ toJson .timeout }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' smart_shield_delete_health_check: operation: $ref: '#/paths/~1zones~1{zone_id}~1smart_shield~1healthchecks~1{healthcheck_id}/delete' @@ -8307,6 +8462,43 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .address }}{{ $sep }}"address": {{ toJson .address }}{{- $sep = "," -}}{{ end }} + + {{- if .check_regions }}{{ $sep }}"check_regions": {{ if eq (kindOf .check_regions) "string" }}{{ .check_regions }}{{ else }}{{ toJson .check_regions }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_fails }}{{ $sep }}"consecutive_fails": {{ toJson .consecutive_fails }}{{- $sep = "," -}}{{ end }} + + {{- if .consecutive_successes }}{{ $sep }}"consecutive_successes": {{ toJson .consecutive_successes }}{{- $sep = "," -}}{{ end }} + + {{- if .description }}{{ $sep }}"description": {{ toJson .description }}{{- $sep = "," -}}{{ end }} + + {{- if .http_config }}{{ $sep }}"http_config": {{ if eq (kindOf .http_config) "string" }}{{ .http_config }}{{ else }}{{ toJson .http_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .interval }}{{ $sep }}"interval": {{ toJson .interval }}{{- $sep = "," -}}{{ end }} + + {{- if .name }}{{ $sep }}"name": {{ toJson .name }}{{- $sep = "," -}}{{ end }} + + {{- if .retries }}{{ $sep }}"retries": {{ toJson .retries }}{{- $sep = "," -}}{{ end }} + + {{- if .suspended }}{{ $sep }}"suspended": {{ toJson .suspended }}{{- $sep = "," -}}{{ end }} + + {{- if .tcp_config }}{{ $sep }}"tcp_config": {{ if eq (kindOf .tcp_config) "string" }}{{ .tcp_config }}{{ else }}{{ toJson .tcp_config }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .timeout }}{{ $sep }}"timeout": {{ toJson .timeout }}{{- $sep = "," -}}{{ end }} + + {{- if .type }}{{ $sep }}"type": {{ toJson .type }}{{- $sep = "," -}}{{ end }} + + } + + ' smart_shield_update_health_check: config: requestBodyTranslate: @@ -8316,6 +8508,25 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .errors }}{{ $sep }}"errors": {{ if eq (kindOf .errors) "string" }}{{ .errors }}{{ else }}{{ toJson .errors }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .messages }}{{ $sep }}"messages": {{ if eq (kindOf .messages) "string" }}{{ .messages }}{{ else }}{{ toJson .messages }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .result }}{{ $sep }}"result": {{ if eq (kindOf .result) "string" }}{{ .result }}{{ else }}{{ toJson .result }}{{ end }}{{- $sep = "," -}}{{ end }} + + {{- if .success }}{{ $sep }}"success": {{ toJson .success }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/healthchecks/methods/get' @@ -8349,6 +8560,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency }}{{ $sep }}"frequency": {{ toJson .frequency }}{{- $sep = "," -}}{{ end }} + + {{- if .rate_plan }}{{ $sep }}"rate_plan": {{ if eq (kindOf .rate_plan) "string" }}{{ .rate_plan }}{{ else }}{{ toJson .rate_plan }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' update: config: requestBodyTranslate: @@ -8358,6 +8584,21 @@ components: response: mediaType: application/json openAPIDocKey: '200' + request: + mediaType: application/json + transform: + type: golang_template_json_v0.3.0 + body: '{ + + {{- $sep := "" -}} + + {{- if .frequency }}{{ $sep }}"frequency": {{ toJson .frequency }}{{- $sep = "," -}}{{ end }} + + {{- if .rate_plan }}{{ $sep }}"rate_plan": {{ if eq (kindOf .rate_plan) "string" }}{{ .rate_plan }}{{ else }}{{ toJson .rate_plan }}{{ end }}{{- $sep = "," -}}{{ end }} + + } + + ' sqlVerbs: select: - $ref: '#/components/x-stackQL-resources/subscriptions/methods/list'