{"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"},"ip.MitigationIp":{"type":"object","description":"Your IP on mitigation","properties":{"auto":{"type":"boolean","description":"Set on true if your ip is on auto-mitigation","readOnly":true},"ipOnMitigation":{"allOf":[{"$ref":"#/components/schemas/ipv4"}],"readOnly":true},"permanent":{"type":"boolean","description":"DEPRECATED: this field is kept for backward compatibility of the API, changing its value has no operational impact"},"state":{"allOf":[{"$ref":"#/components/schemas/ip.MitigationStateEnum"}],"description":"Current state of your ip on mitigation","readOnly":true}}},"ip.MitigationProfile":{"type":"object","description":"Mitigation profile for your ip","properties":{"autoMitigationTimeOut":{"allOf":[{"$ref":"#/components/schemas/ip.MitigationProfileAutoMitigationTimeOutEnum"}],"description":"Delay to wait before remove ip from auto mitigation after an attack"},"ipMitigationProfile":{"allOf":[{"$ref":"#/components/schemas/ipv4"}],"readOnly":true},"state":{"allOf":[{"$ref":"#/components/schemas/ip.MitigationProfileStateEnum"}],"description":"Current state of your mitigation profile","readOnly":true}}},"ip.MitigationProfileAutoMitigationTimeOutEnum":{"type":"integer","description":"Possible values for auto mitigation timeout (minutes)","enum":[0,15,60,360,1560]},"ip.MitigationProfileStateEnum":{"type":"string","description":"Possible values for mitigation profile state","enum":["ok","tasksPending"]},"ip.MitigationStateEnum":{"type":"string","description":"Possible values for mitigation state","enum":["creationPending","ok","removalPending"]},"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"},"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":{"/ip/{ip}/mitigation":{"get":{"summary":"List mitigation entries","description":"List mitigation entries. Returns the IP addresses of the block that have a VAC DDoS mitigation entry. Filterable by state or auto-mitigation.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"query","name":"auto","description":"Filter the value of auto property (=)","schema":{"type":"boolean"}},{"in":"path","name":"ip","required":true,"schema":{"$ref":"#/components/schemas/ipBlock"}},{"in":"query","name":"state","description":"Filter the value of state property (=)","schema":{"$ref":"#/components/schemas/ip.MitigationStateEnum"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ipv4"}}}}}},"x-developer-hub-navigation":[["Network","IP addresses","VAC DDoS protection@@@10"]],"x-badges":[{"color":"green","label":"Stable production 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(\"/ip/{ip}/mitigation\")\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(\"/ip/{ip}/mitigation\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"ip:apiovh:mitigation/get","required":true}],"x-expanded-response":"IpMitigationIp"},"post":{"summary":"Create a mitigation entry","description":"Create a mitigation entry. Creates a VAC DDoS mitigation entry for an IP address of the block. No longer needed: entries are created automatically during an attack.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"ip","required":true,"schema":{"$ref":"#/components/schemas/ipBlock"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ipOnMitigation":{"$ref":"#/components/schemas/ipv4"}},"required":["ipOnMitigation"]}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ip.MitigationIp"}}}}},"x-developer-hub-navigation":[["Network","IP addresses","VAC DDoS protection@@@50"]],"x-badges":[{"color":"green","label":"Stable production 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\n# Request body type: ipv4\nresult = client.post(\"/ip/{ip}/mitigation\",\n\tipOnMitigation = None, #  (type: ipv4)\n)\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// Request body type: ipv4\n$result = $ovh->post(\"/ip/{ip}/mitigation\", array(\n\tipOnMitigation => null, //  (type: ipv4)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"ip:apiovh:mitigation/create","required":true}]}},"/ip/{ip}/mitigation/{ipOnMitigation}":{"delete":{"summary":"Delete a mitigation entry","description":"Delete a mitigation entry. Removes a given IP address of the block from VAC mitigation, and returns its mitigation entry with its state.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"ip","required":true,"schema":{"$ref":"#/components/schemas/ipBlock"}},{"in":"path","name":"ipOnMitigation","required":true,"schema":{"$ref":"#/components/schemas/ipv4"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ip.MitigationIp"}}}}},"x-developer-hub-navigation":[["Network","IP addresses","VAC DDoS protection@@@70"]],"x-badges":[{"color":"green","label":"Stable production 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.delete(\"/ip/{ip}/mitigation/{ipOnMitigation}\")\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->delete(\"/ip/{ip}/mitigation/{ipOnMitigation}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"ip:apiovh:mitigation/delete","required":true}]},"get":{"summary":"Get a mitigation entry","description":"Get a mitigation entry. Returns whether a given IP address of the block is under VAC auto-mitigation, and its state: creationPending, ok or removalPending.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"ip","required":true,"schema":{"$ref":"#/components/schemas/ipBlock"}},{"in":"path","name":"ipOnMitigation","required":true,"schema":{"$ref":"#/components/schemas/ipv4"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ip.MitigationIp"}}}}},"x-developer-hub-navigation":[["Network","IP addresses","VAC DDoS protection@@@30"]],"x-badges":[{"color":"green","label":"Stable production 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(\"/ip/{ip}/mitigation/{ipOnMitigation}\")\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(\"/ip/{ip}/mitigation/{ipOnMitigation}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"ip:apiovh:mitigation/get","required":true}]}},"/ip/{ip}/mitigationProfiles":{"get":{"summary":"List IP mitigation timeouts","description":"List IP mitigation timeouts. Returns the IPs of the block with a custom VAC mitigation timeout: how long each one stays in mitigation after an attack ends.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"ip","required":true,"schema":{"$ref":"#/components/schemas/ipBlock"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ipv4"}}}}}},"x-developer-hub-navigation":[["Network","IP addresses","VAC DDoS protection@@@20"]],"x-badges":[{"color":"green","label":"Stable production 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(\"/ip/{ip}/mitigationProfiles\")\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(\"/ip/{ip}/mitigationProfiles\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"ip:apiovh:mitigationProfiles/get","required":true}],"x-expanded-response":"IpMitigationProfile"},"post":{"summary":"Create an IP mitigation timeout","description":"Create an IP mitigation timeout. Sets how long, in minutes: 0, 15, 60, 360 or 1560, a given IP address stays in VAC mitigation after an attack ends.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"ip","required":true,"schema":{"$ref":"#/components/schemas/ipBlock"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"autoMitigationTimeOut":{"description":"Delay to wait before remove ip from auto mitigation after an attack","$ref":"#/components/schemas/ip.MitigationProfileAutoMitigationTimeOutEnum"},"ipMitigationProfile":{"$ref":"#/components/schemas/ipv4"}},"required":["autoMitigationTimeOut","ipMitigationProfile"]}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ip.MitigationProfile"}}}}},"x-developer-hub-navigation":[["Network","IP addresses","VAC DDoS protection@@@60"]],"x-badges":[{"color":"green","label":"Stable production 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(\"/ip/{ip}/mitigationProfiles\",\n\tautoMitigationTimeOut = None, # Delay to wait before remove ip from auto mitigation after an attack (type: ip.MitigationProfileAutoMitigationTimeOutEnum)\n\tipMitigationProfile = None, #  (type: ipv4)\n)\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(\"/ip/{ip}/mitigationProfiles\", array(\n\tautoMitigationTimeOut => null, // Delay to wait before remove ip from auto mitigation after an attack (type: ip.MitigationProfileAutoMitigationTimeOutEnum)\n\tipMitigationProfile => null, //  (type: ipv4)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"ip:apiovh:mitigationProfiles/create","required":true}]}},"/ip/{ip}/mitigationProfiles/{ipMitigationProfile}":{"delete":{"summary":"Delete an IP mitigation timeout","description":"Delete an IP mitigation timeout. Removes the custom VAC mitigation timeout of a given IP address; the default applies again. The call returns no content.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"ip","required":true,"schema":{"$ref":"#/components/schemas/ipBlock"}},{"in":"path","name":"ipMitigationProfile","required":true,"schema":{"$ref":"#/components/schemas/ipv4"}}],"responses":{"200":{"description":"successful operation"}},"x-developer-hub-navigation":[["Network","IP addresses","VAC DDoS protection@@@80"]],"x-badges":[{"color":"green","label":"Stable production 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.delete(\"/ip/{ip}/mitigationProfiles/{ipMitigationProfile}\")\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->delete(\"/ip/{ip}/mitigationProfiles/{ipMitigationProfile}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"ip:apiovh:mitigationProfiles/delete","required":true}]},"get":{"summary":"Get an IP mitigation timeout","description":"Get an IP mitigation timeout. Returns the VAC mitigation timeout of a given IP address, in minutes, and its state: ok or tasksPending.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"ip","required":true,"schema":{"$ref":"#/components/schemas/ipBlock"}},{"in":"path","name":"ipMitigationProfile","required":true,"schema":{"$ref":"#/components/schemas/ipv4"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ip.MitigationProfile"}}}}},"x-developer-hub-navigation":[["Network","IP addresses","VAC DDoS protection@@@40"]],"x-badges":[{"color":"green","label":"Stable production 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(\"/ip/{ip}/mitigationProfiles/{ipMitigationProfile}\")\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(\"/ip/{ip}/mitigationProfiles/{ipMitigationProfile}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"ip:apiovh:mitigationProfiles/get","required":true}]},"put":{"summary":"Update an IP mitigation timeout","description":"Update an IP mitigation timeout. Changes the VAC mitigation timeout of a given IP address, the only editable field, to 0, 15, 60, 360 or 1560 minutes.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"ip","required":true,"schema":{"$ref":"#/components/schemas/ipBlock"}},{"in":"path","name":"ipMitigationProfile","required":true,"schema":{"$ref":"#/components/schemas/ipv4"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ip.MitigationProfile"}}}},"responses":{"200":{"description":"successful operation"}},"x-developer-hub-navigation":[["Network","IP addresses","VAC DDoS protection@@@90"]],"x-badges":[{"color":"green","label":"Stable production 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\n# Request body type: ip.MitigationProfile\nresult = client.put(\"/ip/{ip}/mitigationProfiles/{ipMitigationProfile}\",\n\tautoMitigationTimeOut = None, # Delay to wait before remove ip from auto mitigation after an attack (type: ip.MitigationProfileAutoMitigationTimeOutEnum)\n)\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// Request body type: ip.MitigationProfile\n$result = $ovh->put(\"/ip/{ip}/mitigationProfiles/{ipMitigationProfile}\", array(\n\tautoMitigationTimeOut => null, // Delay to wait before remove ip from auto mitigation after an attack (type: ip.MitigationProfileAutoMitigationTimeOutEnum)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"ip:apiovh:mitigationProfiles/edit","required":true}]}}}}
