openapi: 3.0.0 info: title: 10Web API V1 Account Cache API description: 'The 10Web API provides a comprehensive set of endpoints for managing websites, DNS zones, domains, SSL certificates, backups, and more. This RESTful API allows you to integrate 10Web''s powerful hosting and website management capabilities into your own applications. ' servers: - url: https://api.10web.io tags: - name: Cache description: Operations for cache management paths: /v1/hosting/websites/{website_id}/cache/enable: put: summary: Enable FastCGI caching for a website tags: - Cache parameters: - $ref: '#/components/parameters/WebsiteId' - $ref: '#/components/parameters/Authorization' requestBody: required: false content: application/json: schema: type: object properties: cache_time: type: integer description: Cache TTL in minutes (must be between 1 and 1500) minimum: 1 maximum: 1500 example: 600 responses: '200': description: Cache enabled successfully content: application/json: schema: $ref: '#/components/schemas/StatusResponse' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Unauthorized' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' /v1/hosting/websites/{website_id}/cache/disable: put: summary: Disable FastCGI caching for a website tags: - Cache parameters: - $ref: '#/components/parameters/WebsiteId' - $ref: '#/components/parameters/Authorization' responses: '200': description: Cache disabled successfully content: application/json: schema: $ref: '#/components/schemas/StatusResponse' '403': $ref: '#/components/responses/Unauthorized' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' /v1/hosting/websites/{website_id}/cache: delete: summary: Purge all cache for a website tags: - Cache parameters: - $ref: '#/components/parameters/WebsiteId' - $ref: '#/components/parameters/Authorization' requestBody: required: false content: application/json: schema: type: object properties: recache: type: integer description: Whether to rebuild the cache (1) or just clear it (0) enum: - 0 - 1 responses: '200': description: Cache purged successfully content: application/json: schema: $ref: '#/components/schemas/StatusResponse' '403': $ref: '#/components/responses/Unauthorized' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' /v1/hosting/websites/{website_id}/object-cache/toggle: post: summary: Toggle object cache for a website tags: - Cache parameters: - $ref: '#/components/parameters/WebsiteId' - $ref: '#/components/parameters/Authorization' requestBody: required: true content: application/json: schema: type: object required: - action properties: action: type: string description: Action to perform on object cache enum: - enable - disable example: enable responses: '200': description: Object cache setting updated successfully content: application/json: schema: $ref: '#/components/schemas/StatusResponse' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Unauthorized' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' /v1/hosting/websites/{website_id}/object-cache/flush: post: summary: Flush object cache for a website tags: - Cache parameters: - $ref: '#/components/parameters/WebsiteId' - $ref: '#/components/parameters/Authorization' responses: '200': description: Object cache flushed successfully content: application/json: schema: type: object properties: message: type: string description: Success message status: type: string enum: - ok - error example: message: Object cache flushed successfully status: ok '403': $ref: '#/components/responses/Unauthorized' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalServerError' components: responses: TooManyRequests: description: Too many requests content: application/json: schema: type: object properties: status: type: string enum: - error message: type: string example: Too many requests. Please try again later. Unauthorized: description: Unauthorized access content: application/json: schema: type: object properties: status: type: string enum: - error message: type: string example: Unauthorized access BadRequest: description: Bad request content: application/json: schema: type: object properties: status: type: string enum: - error message: type: string example: Invalid request parameters InternalServerError: description: Something went wrong content: application/json: schema: type: object properties: status: type: string enum: - error message: type: string example: Something went wrong parameters: Authorization: name: x-api-key in: header required: true schema: type: string description: API key for authentication example: API_KEY WebsiteId: name: website_id in: path required: true schema: type: integer schemas: StatusResponse: type: object properties: status: type: string enum: - ok - error example: status: ok