{"openapi":"3.0.0","info":{"title":"OVHcloud API specification","description":"Specification for OVHcloud API","version":"1.0","contact":{"name":"OVH","email":"api@ml.ovh.net"}},"servers":[{"url":"https://api.eu.ovhcloud.com/1.0"}],"components":{"schemas":{"any":{"description":"Can be anything (text, int, bool, json, html, etc.)","example":"This is a content of any type !"},"duration":{"type":"string","description":"Duration (e.g., P1Y2M3DT4H6M9S)","example":"P1Y2M3DT4H6M9S"},"email":{"type":"string","description":"Email address (e.g., api@ml.ovh.net)","format":"email","example":"api@ml.ovh.net"},"internationalPhoneNumber":{"type":"string","description":"International phone number","format":"phone-number"},"ip":{"type":"string","description":"IP address (e.g., 192.0.2.0)","format":"ipv4","example":"192.0.2.0"},"ipBlock":{"type":"string","description":"IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)","format":"ip-block","example":"192.0.2.0/24"},"ipInterface":{"type":"string","description":"IP address (e.g., 192.0.2.0)","format":"ipv4","example":"192.0.2.0"},"ipv4":{"type":"string","description":"IPv4 address (e.g., 192.0.2.0)","format":"ipv4","example":"192.0.2.0"},"ipv4Block":{"type":"string","description":"IPv4 CIDR notation (e.g., 192.0.2.0/24)","format":"ipv4-block","example":"192.0.2.0/24"},"ipv6":{"type":"string","description":"IPv6 address (e.g., 2001:41d0:1:1994::1)","format":"ipv6","example":"2001:41d0:1:1994::1"},"ipv6Block":{"type":"string","description":"IPv6 CIDR notation (e.g., 2001:41d0::/128)","format":"ipv6-block","example":"2001:41d0::/128"},"macAddress":{"type":"string","description":"MAC address (e.g., 00:00:5e:00:53:01)","format":"mac-address","example":"00:00:5e:00:53:01"},"me.Migration":{"type":"object","description":"Country Migration","properties":{"from":{"allOf":[{"$ref":"#/components/schemas/nichandle.OvhSubsidiaryEnum"}],"description":"Billing country to migrate from","readOnly":true},"id":{"type":"integer","description":"Migration Id","readOnly":true},"status":{"allOf":[{"$ref":"#/components/schemas/me.migration.StatusEnum"}],"description":"Migration status","readOnly":true},"steps":{"type":"array","description":"Migration steps","nullable":true,"items":{"$ref":"#/components/schemas/me.migration.Step"},"readOnly":true},"to":{"allOf":[{"$ref":"#/components/schemas/nichandle.OvhSubsidiaryEnum"}],"description":"Billing country to migrate to","readOnly":true}}},"me.agreements.AgreementStatusEnum":{"type":"string","description":"State of the agreement","enum":["ko","obsolete","ok","todo"]},"me.agreements.ContractAgreement":{"type":"object","description":"Contract Agreement","properties":{"agreed":{"allOf":[{"$ref":"#/components/schemas/me.agreements.AgreementStatusEnum"}],"description":"State of the agreement","readOnly":true},"contractId":{"type":"integer","description":"Contract ID","readOnly":true},"date":{"type":"string","description":"Date of creation if the agreement is not signed. Date of signature if the agreement is signed","format":"date-time","readOnly":true},"id":{"type":"integer","description":"Contract Agreement ID","readOnly":true}}},"me.migration.Contract":{"type":"object","description":"contract","properties":{"active":{"type":"boolean","description":"Status","readOnly":true},"date":{"type":"string","description":"Date","format":"date","readOnly":true},"id":{"type":"integer","description":"ID","readOnly":true},"name":{"type":"string","description":"Name","readOnly":true},"pdf":{"type":"string","description":"PDF URL","readOnly":true},"text":{"type":"string","description":"Text of the contract","readOnly":true}}},"me.migration.StatusEnum":{"type":"string","description":"Status of the migration","enum":["CANCELED","CHECKED","DOING","MIGRATED","TODO","TO_CHECK"]},"me.migration.Step":{"type":"object","description":"Country Migration Step","properties":{"contracts":{"allOf":[{"$ref":"#/components/schemas/me.migration.step.Contracts"}],"description":"Contracts data","nullable":true,"readOnly":true},"debt":{"allOf":[{"$ref":"#/components/schemas/me.migration.step.Debt"}],"description":"Debt data","nullable":true,"readOnly":true},"name":{"allOf":[{"$ref":"#/components/schemas/me.migration.step.NameEnum"}],"description":"Migration step name","readOnly":true},"orders":{"allOf":[{"$ref":"#/components/schemas/me.migration.step.Orders"}],"description":"Orders data","nullable":true,"readOnly":true},"status":{"allOf":[{"$ref":"#/components/schemas/me.migration.step.StatusEnum"}],"description":"Billing step status","readOnly":true}}},"me.migration.step.Contracts":{"type":"object","description":"Country Migration step contracts data","properties":{"agreements":{"type":"array","description":"Array of contract agreements to accept","items":{"$ref":"#/components/schemas/me.agreements.ContractAgreement"},"readOnly":true}}},"me.migration.step.Debt":{"type":"object","description":"Country Migration step debt data","properties":{"balanceAmount":{"allOf":[{"$ref":"#/components/schemas/order.Price"}],"description":"Balance amount","nullable":true,"readOnly":true},"ovhAccountAmount":{"allOf":[{"$ref":"#/components/schemas/order.Price"}],"description":"OVH Account amount","nullable":true,"readOnly":true}}},"me.migration.step.NameEnum":{"type":"string","description":"Name of the migration step","enum":["CONTRACTS","DEBT","NIC","ORDERS"]},"me.migration.step.Orders":{"type":"object","description":"Country Migration step orders data","properties":{"pendingOperations":{"type":"boolean","description":"Whether there is pending operations","readOnly":true},"pendingPromotions":{"type":"boolean","description":"Whether there is pending promotions","readOnly":true},"pendingSubscriptions":{"type":"boolean","description":"Whether there is pending subscriptions","readOnly":true}}},"me.migration.step.StatusEnum":{"type":"string","description":"Status of the migration step","enum":["OK","PENDING"]},"nichandle.OvhSubsidiaryEnum":{"type":"string","description":"OVH subsidiaries","enum":["CZ","DE","ES","EU","FI","FR","GB","IE","IT","LT","MA","NL","PL","PT","SN","TN"]},"order.CurrencyCodeEnum":{"type":"string","description":"Currency code","enum":["AUD","CAD","CZK","EUR","GBP","INR","LTL","MAD","N/A","PLN","SGD","TND","USD","XOF","points"]},"order.Price":{"type":"object","description":"Price with its currency and textual representation","properties":{"currencyCode":{"allOf":[{"$ref":"#/components/schemas/order.CurrencyCodeEnum"}],"description":"Currency code","readOnly":true},"priceInUcents":{"type":"integer","description":"Price in microcents","nullable":true,"readOnly":true},"text":{"type":"string","description":"Textual representation","readOnly":true},"value":{"type":"number","description":"The effective price","readOnly":true}}},"phoneNumber":{"type":"string","description":"Phone number","format":"phone-number"},"time":{"type":"string","description":"Time (e.g., 15:04:05)","format":"time","example":"15:04:05"}},"securitySchemes":{"oAuth2AuthCode":{"type":"oauth2","description":"Oauth2","x-client-id":"1bb9c7df371741c0","x-client-secret":"a5b4de870aca620d10fbf63cd18d205b","flows":{"authorizationCode":{"authorizationUrl":"https://auth.eu.ovhcloud.com/oauth2/authorize","tokenUrl":"https://auth.eu.ovhcloud.com/oauth2/token","scopes":{"account/all":"Manage your account","all":"Manage your whole account and all your services","services/all":"Manage your services lifecycle and billing"}}}}}},"paths":{"/me/migration":{"get":{"summary":"Retrieve all country migrations","security":[{"oAuth2AuthCode":[]}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"type":"integer"}}}}}},"x-developer-hub-navigation":[["Misc","Migration"]],"x-badges":[{"color":"blue","label":"Beta version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/me/migration\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/me/migration\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"account:apiovh:me/migration/get","required":true}],"x-expanded-response":"MeMigration"}},"/me/migration/{migrationId}":{"get":{"summary":"Retrieve information about a country migration","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"migrationId","description":"Migration ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/me.Migration"}}}}},"x-developer-hub-navigation":[["Misc","Migration"]],"x-badges":[{"color":"blue","label":"Beta version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/me/migration/{migrationId}\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/me/migration/{migrationId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"account:apiovh:me/migration/get","required":true}],"x-response-identifier":"id"}},"/me/migration/{migrationId}/contract":{"get":{"summary":"Retrieve all contracts for a billing country migration","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"migrationId","description":"Migration ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"type":"integer"}}}}}},"x-developer-hub-navigation":[["Misc","Migration"]],"x-badges":[{"color":"blue","label":"Beta version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/me/migration/{migrationId}/contract\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/me/migration/{migrationId}/contract\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"account:apiovh:me/migration/contract/get","required":true}],"x-expanded-response":"MeMigrationContract"}},"/me/migration/{migrationId}/contract/{contractId}":{"get":{"summary":"Retrieve detail about a contract for a billing country migration","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"contractId","description":"Contract ID","required":true,"schema":{"type":"integer"}},{"in":"path","name":"migrationId","description":"Migration ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/me.migration.Contract"}}}}},"x-developer-hub-navigation":[["Misc","Migration"]],"x-badges":[{"color":"blue","label":"Beta version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/me/migration/{migrationId}/contract/{contractId}\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/me/migration/{migrationId}/contract/{contractId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"account:apiovh:me/migration/contract/get","required":true}],"x-response-identifier":"id"}},"/me/migration/{migrationId}/contract/{contractId}/accept":{"post":{"summary":"Accept contract","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"contractId","description":"Contract ID","required":true,"schema":{"type":"integer"}},{"in":"path","name":"migrationId","description":"Migration ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/me.agreements.ContractAgreement"}}}}},"x-developer-hub-navigation":[["Misc","Migration"]],"x-badges":[{"color":"blue","label":"Beta version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.post(\"/me/migration/{migrationId}/contract/{contractId}/accept\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->post(\"/me/migration/{migrationId}/contract/{contractId}/accept\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"account:apiovh:me/migration/contract/accept","required":true}]}},"/me/migration/{migrationId}/contract/{contractId}/agreement":{"get":{"summary":"Retrieve agreement for this contract","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"contractId","description":"Contract ID","required":true,"schema":{"type":"integer"}},{"in":"path","name":"migrationId","description":"Migration ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/me.agreements.ContractAgreement"}}}}},"x-developer-hub-navigation":[["Misc","Migration"]],"x-badges":[{"color":"blue","label":"Beta version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/me/migration/{migrationId}/contract/{contractId}/agreement\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/me/migration/{migrationId}/contract/{contractId}/agreement\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"account:apiovh:me/migration/contract/agreement/get","required":true}],"x-response-identifier":"id"}}}}
