Create an endpoint rule

post

/admin/endpointRules

Request

There are no request parameters for this operation.

Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
Match One Schema
Show Source
Nested Schema : outlier-detection
Type: object
Show Source
  • Pattern: ^([1-9]\d*h)?([1-9]\d*m)?([1-9]\d*s)?$
    This field captures the amount of time for which a host should be ejected from the pool of available hosts once it has been identified as an outlier. The value of this field is multiplied by the number of consecutive 5xx errors to calculate the total ejection time.
    Example: 10s
  • This field captures the number of consecutive 5xx HTTP responses received from a host before it is considered an outlier and is ejected from the pool of available hosts.
  • Pattern: ^([1-9]\d*h)?([1-9]\d*m)?([1-9]\d*s)?$
    This field captures the amount of time during which consecutive 5xx errors are counted. For example, if the interval is set to "30s", then any consecutive 5xx errors received from a host within 30 seconds will be counted towards its ejection.
    Example: 30m
Match One Schema
Show Source
Back to Top

Response

Supported Media Types

201 Response

Created
Body ()
Root Schema : EndpointRule
Type: object
Show Source
Match One Schema
Show Source
Nested Schema : outlier-detection
Type: object
Show Source
  • Pattern: ^([1-9]\d*h)?([1-9]\d*m)?([1-9]\d*s)?$
    This field captures the amount of time for which a host should be ejected from the pool of available hosts once it has been identified as an outlier. The value of this field is multiplied by the number of consecutive 5xx errors to calculate the total ejection time.
    Example: 10s
  • Minimum Value: 1
    Multiple Of: 1
    This field captures the number of consecutive 5xx HTTP responses received from a host before it is considered an outlier and is ejected from the pool of available hosts.
  • Pattern: ^([1-9]\d*h)?([1-9]\d*m)?([1-9]\d*s)?$
    This field captures the amount of time during which consecutive 5xx errors are counted. For example, if the interval is set to "30s", then any consecutive 5xx errors received from a host within 30 seconds will be counted towards its ejection.
    Example: 30m
Match One Schema
Show Source

400 Response

Bad Request
Body ()
Root Schema : Error
Type: object
Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx)
Show Source

401 Response

Unauthorized
Body ()
Root Schema : Error
Type: object
Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx)
Show Source

403 Response

Forbidden
Body ()
Root Schema : Error
Type: object
Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx)
Show Source

404 Response

Not Found
Body ()
Root Schema : Error
Type: object
Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx)
Show Source

409 Response

Conflict
Body ()
Root Schema : Error
Type: object
Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx)
Show Source

500 Response

Internal Server Error
Body ()
Root Schema : Error
Type: object
Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx)
Show Source
Back to Top

Examples

The following example shows how to create an endpoint rule by submitting a post request on the REST resource using cURL.

cURL Command

curl --<username:password> --request POST '{FABRIC_HOST}/admin/endpointRules' --header 'Authorization: Bearer <accessToken> --header 'Content-Type: application/json' -D @create_endpointrule.JSON

Example of Request Body

The following shows an example of the request body in JSON format.

{
    "host": "oracle2.ad2.fusionappsdphx1.oraclevcn.com",
    "outlier-detection": {
        "consecutive-5xx-errors": 5,
        "interval": "30s",
        "base-ejection-time": "60s"
    }
}

Example of Response Body

The following shows an example of the response body in JSON format.

{
    "host": "oracle2.ad2.fusionappsdphx1.oraclevcn.com",
    "outlier-detection": {
        "consecutive-5xx-errors": 5,
        "interval": "30s",
        "base-ejection-time": "60s"
    },
    "id": "oracle2-ad2-fusionappsdphx1-oraclevcn-comwp47m"
}
Back to Top