{"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 !"},"dbaas.logs.Operation":{"type":"object","description":"Asynchronous operation","properties":{"aliasId":{"type":"string","description":"Alias used","nullable":true,"format":"uuid","readOnly":true},"createdAt":{"type":"string","description":"Operation creation","format":"date-time","readOnly":true},"dashboardId":{"type":"string","description":"Dashboard used","nullable":true,"format":"uuid","readOnly":true},"encryptionKeyId":{"type":"string","description":"Encryption key used","nullable":true,"format":"uuid","readOnly":true},"indexId":{"type":"string","description":"Index used","nullable":true,"format":"uuid","readOnly":true},"inputId":{"type":"string","description":"Input used","nullable":true,"format":"uuid","readOnly":true},"operationId":{"type":"string","description":"Operation ID","format":"uuid","readOnly":true},"osdId":{"type":"string","description":"OpenSearch Dashboards used","nullable":true,"format":"uuid","readOnly":true},"roleId":{"type":"string","description":"Role used","nullable":true,"format":"uuid","readOnly":true},"serviceName":{"type":"string","description":"Service name","readOnly":true},"state":{"allOf":[{"$ref":"#/components/schemas/dbaas.logs.OperationStateEnum"}],"description":"Operation status","readOnly":true},"streamId":{"type":"string","description":"Stream used","nullable":true,"format":"uuid","readOnly":true},"subscriptionId":{"type":"string","description":"Subscription used","nullable":true,"format":"uuid","readOnly":true},"tenantId":{"type":"string","description":"Metrics tenant used","nullable":true,"format":"uuid","readOnly":true},"tokenId":{"type":"string","description":"Token used","nullable":true,"format":"uuid","readOnly":true},"updatedAt":{"type":"string","description":"Operation last update","nullable":true,"format":"date-time","readOnly":true}}},"dbaas.logs.OperationStateEnum":{"type":"string","description":"Possible values for OperationStateEnum","enum":["FAILURE","PENDING","RECEIVED","RETRY","REVOKED","RUNNING","STARTED","SUCCESS"]},"dbaas.logs.OutputGraylogStreamAlertCreation":{"type":"object","description":"New Graylog alert","properties":{"backlog":{"type":"integer","description":"Backlog"},"conditionType":{"allOf":[{"$ref":"#/components/schemas/dbaas.logs.StreamAlertConditionConditionTypeEnum"}],"description":"Condition type","nullable":true},"constraintType":{"allOf":[{"$ref":"#/components/schemas/dbaas.logs.StreamAlertConditionConstraintTypeEnum"}],"description":"Constraint type","nullable":true},"field":{"type":"string","description":"Field","nullable":true},"grace":{"type":"integer","description":"Grace period"},"queryFilter":{"type":"string","description":"Query filter","nullable":true},"repeatNotificationsEnabled":{"type":"boolean","description":"Repeat notifications enabled","nullable":true},"threshold":{"type":"integer","description":"Threshold","nullable":true},"thresholdType":{"allOf":[{"$ref":"#/components/schemas/dbaas.logs.StreamAlertConditionThresholdTypeEnum"}],"description":"Threshold type","nullable":true},"time":{"type":"integer","description":"Time","nullable":true},"title":{"type":"string","description":"Title"},"value":{"type":"string","description":"Value","nullable":true}},"required":["backlog","grace","title"]},"dbaas.logs.OutputGraylogStreamAlertUpdate":{"type":"object","description":"Graylog alert update","properties":{"backlog":{"type":"integer","description":"Backlog"},"conditionType":{"allOf":[{"$ref":"#/components/schemas/dbaas.logs.StreamAlertConditionConditionTypeEnum"}],"description":"Condition type","nullable":true},"constraintType":{"allOf":[{"$ref":"#/components/schemas/dbaas.logs.StreamAlertConditionConstraintTypeEnum"}],"description":"Constraint type","nullable":true},"field":{"type":"string","description":"Field","nullable":true},"grace":{"type":"integer","description":"Grace period"},"queryFilter":{"type":"string","description":"Query filter","nullable":true},"repeatNotificationsEnabled":{"type":"boolean","description":"Repeat notifications enabled","nullable":true},"threshold":{"type":"integer","description":"Threshold","nullable":true},"thresholdType":{"allOf":[{"$ref":"#/components/schemas/dbaas.logs.StreamAlertConditionThresholdTypeEnum"}],"description":"Threshold type","nullable":true},"time":{"type":"integer","description":"Time","nullable":true},"title":{"type":"string","description":"Title"},"value":{"type":"string","description":"Value","nullable":true}},"required":["backlog","grace","title"]},"dbaas.logs.StreamAlertCondition":{"type":"object","description":"Alert condition","properties":{"alertId":{"type":"string","description":"Stream alert condition ID","format":"uuid","readOnly":true},"backlog":{"type":"integer","description":"Backlog size","readOnly":true},"conditionType":{"allOf":[{"$ref":"#/components/schemas/dbaas.logs.StreamAlertConditionConditionTypeEnum"}],"description":"Alert condition type","nullable":true,"readOnly":true},"constraintType":{"allOf":[{"$ref":"#/components/schemas/dbaas.logs.StreamAlertConditionConstraintTypeEnum"}],"description":"Constraint type","nullable":true,"readOnly":true},"field":{"type":"string","description":"Field name","nullable":true,"readOnly":true},"grace":{"type":"integer","description":"Grace period in minutes","readOnly":true},"queryFilter":{"type":"string","description":"Query filter","nullable":true,"readOnly":true},"repeatNotificationsEnabled":{"type":"boolean","description":"Repeat notifications","nullable":true,"readOnly":true},"threshold":{"type":"integer","description":"Threshold","nullable":true,"readOnly":true},"thresholdType":{"allOf":[{"$ref":"#/components/schemas/dbaas.logs.StreamAlertConditionThresholdTypeEnum"}],"description":"Threshold condition","nullable":true,"readOnly":true},"time":{"type":"integer","description":"Time lapse in minutes","nullable":true,"readOnly":true},"title":{"type":"string","description":"Condition label","readOnly":true},"value":{"type":"string","description":"Field value","nullable":true,"readOnly":true}}},"dbaas.logs.StreamAlertConditionConditionTypeEnum":{"type":"string","description":"Possible values for StreamAlertConditionConditionTypeEnum","enum":["FIELD_CONTENT_VALUE","FIELD_VALUE","MESSAGE_COUNT"]},"dbaas.logs.StreamAlertConditionConstraintTypeEnum":{"type":"string","description":"Possible values for StreamAlertConditionConstraintTypeEnum","enum":["MAX","MEAN","MIN","STDLABEU","SUM"]},"dbaas.logs.StreamAlertConditionThresholdTypeEnum":{"type":"string","description":"Possible values for StreamAlertConditionThresholdTypeEnum","enum":["EQ","GT","GTE","LT","LTE"]},"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"},"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":{"/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert":{"get":{"summary":"List stream alerts","description":"Returns the stream alerts of the Logs Data Platform service.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"serviceName","description":"Service name","required":true,"schema":{"type":"string"}},{"in":"path","name":"streamId","description":"Stream ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"type":"string","format":"uuid"}}}}},"404":{"description":"Error 404 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::NotFound::ServiceDoesNotExists":{"value":{"class":"Client::NotFound::ServiceDoesNotExists","message":"Service '{{.criteria}}' doesn't exist"}},"Client::NotFound::StreamDoesNotExists":{"value":{"class":"Client::NotFound::StreamDoesNotExists","message":"Stream '{{.criteria}}' doesn't exist"}}}}}}},"x-developer-hub-navigation":[["Manage & Operate","Logs Data Platform","Data streams","Alerts@@@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(\"/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert\")\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(\"/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"ldp:apiovh:output/graylog/stream/alert/get","required":true}],"x-expanded-response":"DbaasLogsStreamAlertCondition"},"post":{"summary":"Create a stream alert","description":"Creates a stream alert on the Logs Data Platform service.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"serviceName","description":"Service name","required":true,"schema":{"type":"string"}},{"in":"path","name":"streamId","description":"Stream ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dbaas.logs.OutputGraylogStreamAlertCreation"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dbaas.logs.Operation"}}}},"403":{"description":"Error 403 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::Forbidden::Busy":{"value":{"class":"Client::Forbidden::Busy","message":"An operation is already running for this service: {{.operations}}. Please retry later."}},"Client::Forbidden::OnlyOwnerCanPerformAction":{"value":{"class":"Client::Forbidden::OnlyOwnerCanPerformAction","message":"Only the owner is allowed to perform this action"}},"Client::Forbidden::ServiceUnavailable":{"value":{"class":"Client::Forbidden::ServiceUnavailable","message":"Service '{{.serviceName}}' unavailable, status is '{{.status}}'"}}}}}},"404":{"description":"Error 404 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::NotFound::ServiceDoesNotExists":{"value":{"class":"Client::NotFound::ServiceDoesNotExists","message":"Service '{{.criteria}}' doesn't exist"}},"Client::NotFound::StreamDoesNotExists":{"value":{"class":"Client::NotFound::StreamDoesNotExists","message":"Stream '{{.criteria}}' doesn't exist"}}}}}},"409":{"description":"Error 409 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::Conflict::AlertAlreadyExists":{"value":{"class":"Client::Conflict::AlertAlreadyExists","message":"An alert with the same criteria already exists"}}}}}}},"x-developer-hub-navigation":[["Manage & Operate","Logs Data Platform","Data streams","Alerts@@@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\n# Request body type: dbaas.logs.OutputGraylogStreamAlertCreation\nresult = client.post(\"/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert\",\n\tbacklog = None, # Backlog (type: integer)\n\tconditionType = None, # Condition type (type: dbaas.logs.StreamAlertConditionConditionTypeEnum, nullable)\n\tconstraintType = None, # Constraint type (type: dbaas.logs.StreamAlertConditionConstraintTypeEnum, nullable)\n\tfield = None, # Field (type: string, nullable)\n\tgrace = None, # Grace period (type: integer)\n\tqueryFilter = None, # Query filter (type: string, nullable)\n\trepeatNotificationsEnabled = None, # Repeat notifications enabled (type: boolean, nullable)\n\tthreshold = None, # Threshold (type: integer, nullable)\n\tthresholdType = None, # Threshold type (type: dbaas.logs.StreamAlertConditionThresholdTypeEnum, nullable)\n\ttime = None, # Time (type: integer, nullable)\n\ttitle = None, # Title (type: string)\n\tvalue = None, # Value (type: string, nullable)\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: dbaas.logs.OutputGraylogStreamAlertCreation\n$result = $ovh->post(\"/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert\", array(\n\tbacklog => null, // Backlog (type: integer)\n\tconditionType => null, // Condition type (type: dbaas.logs.StreamAlertConditionConditionTypeEnum, nullable)\n\tconstraintType => null, // Constraint type (type: dbaas.logs.StreamAlertConditionConstraintTypeEnum, nullable)\n\tfield => null, // Field (type: string, nullable)\n\tgrace => null, // Grace period (type: integer)\n\tqueryFilter => null, // Query filter (type: string, nullable)\n\trepeatNotificationsEnabled => null, // Repeat notifications enabled (type: boolean, nullable)\n\tthreshold => null, // Threshold (type: integer, nullable)\n\tthresholdType => null, // Threshold type (type: dbaas.logs.StreamAlertConditionThresholdTypeEnum, nullable)\n\ttime => null, // Time (type: integer, nullable)\n\ttitle => null, // Title (type: string)\n\tvalue => null, // Value (type: string, nullable)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"ldp:apiovh:output/graylog/stream/alert/create","required":true}]}},"/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert/{alertId}":{"delete":{"summary":"Delete a stream alert","description":"Deletes the stream alert.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"alertId","description":"Alert ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"serviceName","description":"Service name","required":true,"schema":{"type":"string"}},{"in":"path","name":"streamId","description":"Stream ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dbaas.logs.Operation"}}}},"403":{"description":"Error 403 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::Forbidden::Busy":{"value":{"class":"Client::Forbidden::Busy","message":"An operation is already running for this service: {{.operations}}. Please retry later."}},"Client::Forbidden::OnlyOwnerCanPerformAction":{"value":{"class":"Client::Forbidden::OnlyOwnerCanPerformAction","message":"Only the owner is allowed to perform this action"}}}}}},"404":{"description":"Error 404 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::NotFound::AlertDoesNotExists":{"value":{"class":"Client::NotFound::AlertDoesNotExists","message":"Stream alert '{{.alertId}}' doesn't exist"}},"Client::NotFound::ServiceDoesNotExists":{"value":{"class":"Client::NotFound::ServiceDoesNotExists","message":"Service '{{.criteria}}' doesn't exist"}},"Client::NotFound::StreamDoesNotExists":{"value":{"class":"Client::NotFound::StreamDoesNotExists","message":"Stream '{{.criteria}}' doesn't exist"}}}}}}},"x-developer-hub-navigation":[["Manage & Operate","Logs Data Platform","Data streams","Alerts@@@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.delete(\"/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert/{alertId}\")\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(\"/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert/{alertId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"ldp:apiovh:output/graylog/stream/alert/delete","required":true}]},"get":{"summary":"Get a stream alert","description":"Returns the stream alert.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"alertId","description":"Alert ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"serviceName","description":"Service name","required":true,"schema":{"type":"string"}},{"in":"path","name":"streamId","description":"Stream ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dbaas.logs.StreamAlertCondition"}}}},"404":{"description":"Error 404 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::NotFound::AlertDoesNotExists":{"value":{"class":"Client::NotFound::AlertDoesNotExists","message":"Stream alert '{{.alertId}}' doesn't exist"}},"Client::NotFound::ServiceDoesNotExists":{"value":{"class":"Client::NotFound::ServiceDoesNotExists","message":"Service '{{.criteria}}' doesn't exist"}},"Client::NotFound::StreamDoesNotExists":{"value":{"class":"Client::NotFound::StreamDoesNotExists","message":"Stream '{{.criteria}}' doesn't exist"}}}}}}},"x-developer-hub-navigation":[["Manage & Operate","Logs Data Platform","Data streams","Alerts@@@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(\"/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert/{alertId}\")\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(\"/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert/{alertId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"ldp:apiovh:output/graylog/stream/alert/get","required":true}],"x-response-identifier":"alertId"},"put":{"summary":"Update a stream alert","description":"Updates the stream alert.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"alertId","description":"Alert ID","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"serviceName","description":"Service name","required":true,"schema":{"type":"string"}},{"in":"path","name":"streamId","description":"Stream ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dbaas.logs.OutputGraylogStreamAlertUpdate"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dbaas.logs.Operation"}}}},"403":{"description":"Error 403 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::Forbidden::Busy":{"value":{"class":"Client::Forbidden::Busy","message":"An operation is already running for this service: {{.operations}}. Please retry later."}},"Client::Forbidden::OnlyOwnerCanPerformAction":{"value":{"class":"Client::Forbidden::OnlyOwnerCanPerformAction","message":"Only the owner is allowed to perform this action"}},"Client::Forbidden::ServiceUnavailable":{"value":{"class":"Client::Forbidden::ServiceUnavailable","message":"Service '{{.serviceName}}' unavailable, status is '{{.status}}'"}}}}}},"404":{"description":"Error 404 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::NotFound::ServiceDoesNotExists":{"value":{"class":"Client::NotFound::ServiceDoesNotExists","message":"Service '{{.criteria}}' doesn't exist"}},"Client::NotFound::StreamDoesNotExists":{"value":{"class":"Client::NotFound::StreamDoesNotExists","message":"Stream '{{.criteria}}' doesn't exist"}}}}}},"409":{"description":"Error 409 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::Conflict::AlertAlreadyExists":{"value":{"class":"Client::Conflict::AlertAlreadyExists","message":"An alert with the same criteria already exists"}}}}}}},"x-developer-hub-navigation":[["Manage & Operate","Logs Data Platform","Data streams","Alerts@@@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: dbaas.logs.OutputGraylogStreamAlertUpdate\nresult = client.put(\"/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert/{alertId}\",\n\tbacklog = None, # Backlog (type: integer)\n\tconditionType = None, # Condition type (type: dbaas.logs.StreamAlertConditionConditionTypeEnum, nullable)\n\tconstraintType = None, # Constraint type (type: dbaas.logs.StreamAlertConditionConstraintTypeEnum, nullable)\n\tfield = None, # Field (type: string, nullable)\n\tgrace = None, # Grace period (type: integer)\n\tqueryFilter = None, # Query filter (type: string, nullable)\n\trepeatNotificationsEnabled = None, # Repeat notifications enabled (type: boolean, nullable)\n\tthreshold = None, # Threshold (type: integer, nullable)\n\tthresholdType = None, # Threshold type (type: dbaas.logs.StreamAlertConditionThresholdTypeEnum, nullable)\n\ttime = None, # Time (type: integer, nullable)\n\ttitle = None, # Title (type: string)\n\tvalue = None, # Value (type: string, nullable)\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: dbaas.logs.OutputGraylogStreamAlertUpdate\n$result = $ovh->put(\"/dbaas/logs/{serviceName}/output/graylog/stream/{streamId}/alert/{alertId}\", array(\n\tbacklog => null, // Backlog (type: integer)\n\tconditionType => null, // Condition type (type: dbaas.logs.StreamAlertConditionConditionTypeEnum, nullable)\n\tconstraintType => null, // Constraint type (type: dbaas.logs.StreamAlertConditionConstraintTypeEnum, nullable)\n\tfield => null, // Field (type: string, nullable)\n\tgrace => null, // Grace period (type: integer)\n\tqueryFilter => null, // Query filter (type: string, nullable)\n\trepeatNotificationsEnabled => null, // Repeat notifications enabled (type: boolean, nullable)\n\tthreshold => null, // Threshold (type: integer, nullable)\n\tthresholdType => null, // Threshold type (type: dbaas.logs.StreamAlertConditionThresholdTypeEnum, nullable)\n\ttime => null, // Time (type: integer, nullable)\n\ttitle => null, // Title (type: string)\n\tvalue => null, // Value (type: string, nullable)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"ldp:apiovh:output/graylog/stream/alert/edit","required":true}]}}}}
