openapi: 3.0.0 info: title: 'API Ikoula' contact: email: ikoula@ikoula.com version: 1.0.0 servers: - url: 'https://api.ikoula.com/' description: 'API en production' paths: /vps: get: tags: - vps summary: 'Lists the client services.' operationId: c96786724e02856161ca1c0c3625a288 responses: '200': description: 'Subscriptions list.' content: application/json: schema: properties: type: { type: string } message: { type: string } subscriptions: { type: array, items: { properties: { id: { type: string }, name: { type: string }, ip: { type: string }, plan: { type: string }, comments: { type: string } }, type: object } } type: object security: - login: [] - crypted_password: [] '/vps/{subscr_id}': get: tags: - vps summary: 'Details of a service.' operationId: 8f211c971bbebffeaa8207d94915da38 parameters: - $ref: '#/components/parameters/subscr_id_in_path_required' responses: '200': description: 'Service details.' content: application/json: schema: properties: type: { type: string } message: { type: string } vmid: { type: string } name: { type: string } host: { type: string } status: { description: 'Service status', type: string } vm_status: { description: 'Virtual machine status', type: string } CPUCount: { type: string } memory: { description: 'RAM in MB', type: string } disk: { description: 'Disk size in GB', type: string } os: { description: 'Operating system name', type: string } type: object security: - login: [] - crypted_password: [] '/vps/{subscr_id}/status': get: tags: - vps summary: 'Get the status of the virtual machine.' operationId: db374b16a313519ffccc78ad4a5c740f parameters: - $ref: '#/components/parameters/subscr_id_in_path_required' responses: '200': description: 'Statut de la machine virtuelle' content: application/json: schema: properties: type: { type: string } message: { type: string } mesage: { type: string } type: object security: - login: [] - crypted_password: [] '/vps/{subscr_id}/start': put: tags: - vps summary: 'Start the virtual machine.' operationId: 4fd07a9d457384ad40ea20d7e7d206dd parameters: - $ref: '#/components/parameters/subscr_id_in_path_required' responses: '200': description: 'Request status' content: application/json: schema: properties: type: { type: string } message: { type: string } mesage: { type: string } type: object security: - login: [] - crypted_password: [] '/vps/{subscr_id}/stop': put: tags: - vps summary: 'Stop the virtual machine (Hardware).' operationId: 5998a976293a2c1b05f2dde19bcf6cf9 parameters: - $ref: '#/components/parameters/subscr_id_in_path_required' responses: '200': description: 'Request status' content: application/json: schema: properties: type: { type: string } message: { type: string } mesage: { type: string } type: object security: - login: [] - crypted_password: [] '/vps/{subscr_id}/shutdown': put: tags: - vps summary: 'Stop the virtual machine (Software).' operationId: cbb3cd0ded0806fc2ee276885d58d259 parameters: - $ref: '#/components/parameters/subscr_id_in_path_required' responses: '200': description: 'Request status' content: application/json: schema: properties: type: { type: string } message: { type: string } mesage: { type: string } type: object security: - login: [] - crypted_password: [] '/vps/{subscr_id}/pause': put: tags: - vps summary: 'Pause the virtual machine.' operationId: 70b7ca61022d7d75b90b3b2cf1444140 parameters: - $ref: '#/components/parameters/subscr_id_in_path_required' responses: '200': description: 'Request status' content: application/json: schema: properties: type: { type: string } message: { type: string } mesage: { type: string } type: object security: - login: [] - crypted_password: [] '/vps/{subscr_id}/resume': put: tags: - vps summary: 'Resume the virtual machine.' operationId: 511cf7cdd1e8226e304754dde98f2b10 parameters: - $ref: '#/components/parameters/subscr_id_in_path_required' responses: '200': description: 'Request status' content: application/json: schema: properties: type: { type: string } message: { type: string } mesage: { type: string } type: object security: - login: [] - crypted_password: [] '/vps/{subscr_id}/suspend': put: tags: - vps summary: 'Suspend the virtual machine.' operationId: 33c858c8d6da97aff372293e086ab2a3 parameters: - $ref: '#/components/parameters/subscr_id_in_path_required' responses: '200': description: 'Request status' content: application/json: schema: properties: type: { type: string } message: { type: string } mesage: { type: string } type: object security: - login: [] - crypted_password: [] '/vps/{subscr_id}/snapshot': get: tags: - vps - snapshot summary: "Lists all the virtual machine's snapshot." operationId: 751205563e4671e210d7a8d1249ffdf2 parameters: - $ref: '#/components/parameters/subscr_id_in_path_required' responses: '200': description: 'Snapshots list' content: application/json: schema: properties: type: { type: string } message: { type: string } snapshots: { type: array, items: { properties: { id: { type: string }, buildHost: { type: string }, name: { type: string }, notes: { type: string } }, type: object } } type: object '400': description: 'Bad request' security: - login: [] - crypted_password: [] post: tags: - vps - snapshot summary: 'Create a snapshot of the virtual machine.' operationId: 63ee34f7bd5e3271ae895504535c897b parameters: - $ref: '#/components/parameters/subscr_id_in_path_required' responses: '200': description: 'Request status' content: application/json: schema: properties: type: { type: string } mesage: { type: string } type: object security: - login: [] - crypted_password: [] '/vps/{subscr_id}/snapshot/{snapshot_name}': post: tags: - vps - snapshot summary: 'Rollback to snapshot.' operationId: 33e741cc4990850bbaf0c4fc511d6ac7 parameters: - $ref: '#/components/parameters/subscr_id_in_path_required' - name: snapshot_name in: path required: true schema: type: string responses: '200': description: OK security: - login: [] - crypted_password: [] delete: tags: - vps - snapshot summary: 'Deletes a snapshot.' operationId: 44c7a1fb824e58db6e6f39b26c5c3e79 parameters: - $ref: '#/components/parameters/subscr_id_in_path_required' - name: snapshot_name in: path required: true schema: type: string responses: '200': description: OK security: - login: [] - crypted_password: [] '/vps/{server_ip}/dns-sec': get: tags: - vps - dns-sec summary: 'Lists the secondary DNS.' operationId: 12ef96d9c81a647b943772286175a736 parameters: - name: server_ip in: path required: true schema: type: string responses: '200': description: 'List of Secondary DNS' content: application/json: schema: properties: type: { type: string } dns: { type: array, items: { properties: { id: { type: string }, ip: { type: string }, name: { type: string } }, type: object } } type: object security: - login: [] - crypted_password: [] post: tags: - vps - dns-sec summary: 'Adds a secondary DNS.' operationId: 87b15f5eb5d1a8c825717887ca3a337c parameters: - name: server_ip in: path required: true schema: type: string requestBody: required: true content: application/json: schema: required: - dns_name properties: dns_name: type: string type: object responses: '200': description: 'Non testée' security: - login: [] - crypted_password: [] '/vps/{server_ip}/dns-sec/{dns_id}': put: tags: - vps - dns-sec summary: 'Modifies a secondary DNS.' operationId: a5f808c1d111020cd46c392e6ffb225e parameters: - name: server_ip in: path required: true schema: type: string - name: dns_id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: required: - dns_name properties: dns_name: type: string type: object responses: '200': description: OK security: - login: [] - crypted_password: [] delete: tags: - vps - dns-sec summary: 'Deletes a secondary DNS.' operationId: 35f7025af65cd6a0af3d8f52e497c456 parameters: - name: server_ip in: path required: true schema: type: string - name: dns_id in: path required: true schema: type: integer responses: '200': description: OK security: - login: [] - crypted_password: [] '/vps/{server_ip}/reverse-dns': get: tags: - vps - reverse-dns summary: 'Lists the reverse DNS.' operationId: d10f05d33aff189143572a93a6ec9ee6 parameters: - name: server_ip in: path required: true schema: type: string responses: '200': description: 'List of the reverse DNS.' content: application/json: schema: properties: type: { type: string } reverse_dns: { type: array, items: { properties: { id: { type: string }, ip: { type: string }, name: { type: string } }, type: object } } type: object security: - login: [] - crypted_password: [] '/vps/{reverse_dns_ip}/reverse-dns/{reverse_dns_id}': put: tags: - vps - reverse-dns summary: 'Modify a reverse DNS.' operationId: 6132204d9b9ee7e139789fe9f6930f63 parameters: - name: reverse_dns_ip in: path required: true schema: type: string - name: reverse_dns_id in: path required: true schema: type: integer requestBody: required: true content: application/x-www-form-urlencoded: schema: properties: reverse_dns_name: type: string type: object responses: '200': description: 'Statut de la requête' content: application/json: schema: properties: type: { type: string } mesage: { type: string } message: { type: string } type: object security: - login: [] - crypted_password: [] '/vps/{server_ip}/scan-secu': get: tags: - vps - scan-secu summary: 'Lists the security scans.' operationId: 4011d7e34eb2cee0323e8c7097780a6b parameters: - name: server_ip in: path required: true schema: type: string responses: '200': description: 'Secury scan list.' content: application/json: schema: properties: type: { type: string } scans: { type: array, items: { properties: { id: { type: string }, id_task: { type: string }, status_id: { type: string }, status: { type: string }, update: { type: string }, date: { type: string }, delay: { type: string } }, type: object } } type: object security: - login: [] - crypted_password: [] post: tags: - vps - scan-secu summary: 'Request a security scan.' operationId: fcf7b341f2990ad16aa8b742f7417b28 parameters: - name: server_ip in: path required: true schema: type: string requestBody: required: true content: application/json: schema: properties: scan_date: type: string type: object responses: '200': description: 'Request status' security: - login: [] - crypted_password: [] '/vps/{server_ip}/scan-secu/{scan_id}': get: tags: - vps - scan-secu summary: 'Get a security scan results.' operationId: 1bdd9b7e355a83bc79b925eea42599fc parameters: - name: server_ip in: path required: true schema: type: string - name: scan_id in: path required: true schema: type: integer responses: '200': description: "Scan's result." content: application/json: schema: properties: type: { type: string } mesage: { type: string } message: { type: string } type: object security: - login: [] - crypted_password: [] delete: tags: - vps - scan-secu summary: 'Stop a security scan.' operationId: db9134e67f6aa1b7c7c56af6522206bd parameters: - name: server_ip in: path required: true schema: type: string - name: scan_id in: path required: true schema: type: integer responses: '200': description: 'Request status' security: - login: [] - crypted_password: [] '/vps/{subscr_id}/raz': get: tags: - vps - raz summary: 'Lists all available operating systems for a reset.' operationId: 17ed3edfbbb7ed667ad3adb11e12cf97 parameters: - $ref: '#/components/parameters/subscr_id_in_path_required' responses: '200': description: 'Operating system list' content: application/json: schema: properties: type: { type: string } message: { type: string } os: { type: array, items: { properties: { id: { type: string }, name: { type: string } }, type: object } } type: object security: - login: [] - crypted_password: [] post: tags: - vps - raz summary: 'Resets a virtual machine.' operationId: 99c223d1d499045d4c8e85465354ed94 parameters: - $ref: '#/components/parameters/subscr_id_in_path_required' requestBody: required: true content: application/json: schema: required: - os_id properties: os_id: type: string type: object responses: '200': description: OK security: - login: [] - crypted_password: [] '/vps/{subscr_id}/firewall/rule': get: tags: - vps - firewall summary: 'Lists the rules on the firewall.' operationId: 14b0b88c68a68389cb30a392287a8288 parameters: - $ref: '#/components/parameters/subscr_id_in_path_required' responses: '200': description: OK content: application/json: schema: properties: type: { type: string, example: OK } message: { type: string } code: { type: integer, example: '200' } rules: { type: array, items: { properties: { host: { type: string }, vm_id: { type: integer }, enabled: { type: boolean }, position: { type: integer }, interface: { type: string }, type: { type: string }, action: { type: string }, source: { description: 'IP list', type: array, items: { } }, source_port: { description: 'Port (range) list', type: array, items: { } }, destination: { description: 'IP list', type: array, items: { } }, destination_port: { description: 'Port (range) list', type: array, items: { } }, protocol: { type: string, example: tcp }, log_level: { type: string }, comment: { type: string } }, type: object } } type: object '400': description: 'Invalid request' '401': description: Unauthorized '404': description: 'Not found' security: - login: [] - crypted_password: [] post: tags: - vps - firewall summary: 'Add a rule to the firewall.' operationId: 3d23dc8c92f96d39f422762d8dbf3dc4 parameters: - $ref: '#/components/parameters/subscr_id_in_path_required' requestBody: required: true content: application/json: schema: required: - type - enabled - action_or_group properties: type: type: string enum: [in, out, group] action_or_group: type: string enum: [DROP, ACCEPT, REJECT, group_name] source: type: array items: { } source_port: type: array items: { } destination: type: array items: { } destination_port: type: array items: { } interface: type: string protocol: type: string example: tcp log_level: type: string comment: type: string enabled: type: boolean type: object responses: '200': description: OK '400': description: 'Invalid request' '401': description: Unauthorized '404': description: 'Not found' security: - login: [] - crypted_password: [] '/vps/{subscr_id}/firewall/rule/{rule_position}': get: tags: - vps - firewall summary: 'Get the details of a rule.' operationId: 519ca6a1236581ee10e9075bd0ff9b9b parameters: - $ref: '#/components/parameters/subscr_id_in_path_required' - $ref: '#/components/parameters/rule_position_in_path_required' responses: '200': description: OK content: application/json: schema: properties: type: { type: string, example: OK } message: { type: string } code: { type: integer, example: '200' } rule: { properties: { host: { type: string }, vm_id: { type: integer }, enabled: { type: boolean }, position: { type: integer }, interface: { type: string }, type: { type: string }, action: { type: string }, source: { description: 'IP list', type: array, items: { } }, source_port: { description: 'Port (range) list', type: array, items: { } }, destination: { description: 'IP list', type: array, items: { } }, destination_port: { description: 'Port (range) list', type: array, items: { } }, protocol: { type: string, example: tcp }, log_level: { type: string }, comment: { type: string } }, type: object } type: object '401': description: Unauthorized '400': description: 'Invalid request' '404': description: 'Not found' security: - login: [] - crypted_password: [] put: tags: - vps - firewall summary: 'Modifies a rule from the firewall.' operationId: b54cb9c10ff7adb0aba1bfbd2465c7e8 parameters: - $ref: '#/components/parameters/subscr_id_in_path_required' - $ref: '#/components/parameters/rule_position_in_path_required' requestBody: required: true content: application/json: schema: required: - type - enabled - action_or_group properties: type: type: string enum: [in, out, group] action_or_group: type: string enum: [DROP, ACCEPT, REJECT, group_name] source: type: array items: { } source_port: type: array items: { } destination: type: array items: { } destination_port: type: array items: { } interface: type: string protocol: type: string example: tcp log_level: type: string comment: type: string enabled: type: boolean rule_new_position: type: integer type: object responses: '200': description: OK '401': description: Unauthorized '400': description: 'Invalid request' '404': description: 'Not found' security: - login: [] - crypted_password: [] delete: tags: - vps - firewall summary: 'Deletes a rule from the firewall.' operationId: 3c9645c2b2972d8075f8c7d3417c0635 parameters: - $ref: '#/components/parameters/subscr_id_in_path_required' - $ref: '#/components/parameters/rule_position_in_path_required' responses: '200': description: OK '401': description: Unauthorized '400': description: 'Invalid request' '404': description: 'Not found' security: - login: [] - crypted_password: [] '/vps/{subscr_id}/firewall/rule/ikoula': put: tags: - vps - firewall summary: 'Activates or deactivates the rule for Ikoula services.' operationId: 670d9fe0b02fb728b75680b1aa15f48e parameters: - $ref: '#/components/parameters/subscr_id_in_path_required' requestBody: required: true content: application/json: schema: required: - enabled properties: enabled: type: boolean type: object responses: '200': description: OK '401': description: Unauthorized '404': description: 'Not Found' security: - login: [] - crypted_password: [] components: parameters: subscr_id_in_path_required: name: subscr_id in: path required: true schema: type: integer rule_position_in_path_required: name: rule_position in: path required: true schema: type: integer securitySchemes: login: type: apiKey name: login in: query crypted_password: type: apiKey name: crypted_password in: query security: login: [] password: [] crypted_password: [] tags: - name: vps description: vps - name: snapshot description: snapshot - name: dns-sec description: dns-sec - name: reverse-dns description: reverse-dns - name: scan-secu description: scan-secu - name: raz description: raz - name: firewall description: firewall