Create a routing criteria

post

/admin/routingCriteria

Request

There are no request parameters for this operation.

Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
Nested Schema : any-criteria-of
Type: array
Minimum Number of Items: 1
an array of objects which can hold all supported routing criteria. Multiple such objects in the array mean that only one of the array members needs to match to match the whole criterion. On the other hand all routing criteria in a single item have to all match
Show Source
Nested Schema : match-post-processing
Type: object
this section captures instructions that need to get executed in case a successful match has happened and the call to the backend has succeeded
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : abac-criteria
Type: array
Minimum Number of Items: 1
allows using Helidon ABAC expressions
Show Source
Nested Schema : boolean-criterion
Type: object
used for the simple use cases to trun off certain alternatives, by including a false criterion or to define an always true criterion
Show Source
Match One Schema
Show Source
Nested Schema : expression-criteria
Type: array
Minimum Number of Items: 1
criteria using the CX Industry Framework custom expression language. You can specify multiple criteria. Then all provided criteria have to evaluate to a match.
Show Source
Nested Schema : header-criteria
Type: array
Minimum Number of Items: 1
This kind of criteria allows taking routing decisions based on HTTP request headers, both regular as well as custom. Header criteria match when either one of the configured fixed values matches or when there is a match to the provided regular expression. You can also specify whether the header should be passed down to the called target or should be swallowed by Industries Framework routing.
Show Source
Nested Schema : http-method-criteria
Type: object
this kind of routing criterion allows you specifying a list of HTTP methods of which one has to be then the one used for the request
Show Source
Match One Schema
Show Source
Nested Schema : http-version-criteria
Type: object
this kind of routing criterion allows you routing different inbound HTTP protocol version requests to separate targets. Mainly useful for migration scenarios
Show Source
Match One Schema
Show Source
Nested Schema : interaction-context-criteria
Type: object
Leverages the information in an interaction context (see the RoutingContextEnrichmentSpecification custom resource) to persist some fact information over multiple requests to Industries Framework.
Show Source
Match One Schema
Show Source
Nested Schema : path-param-criteria
Type: object
allows specifying URL path parameters for routing. Exact-match and regular expression are supported. the key and value information are supposed to be provided in unencoded form.
Show Source
Nested Schema : query-param-criteria
Type: object
allows specifying URL query parameters for routing. Exact-match and regular expression are supported. the key and value information are supposed to be provided in unencoded form. So: "@type" instead of "%40type"
Show Source
Match One Schema
Show Source
Nested Schema : ref-criterion
Type: object
Show Source
  • criteria-refs
    Minimum Number of Items: 1
    This kind of criterion allows aggregating over other named criteria. Main use case is composition as you can specify multiple entries that then all must match individually to match the whole criteria-refs criterion
  • meant to capture record level documentation
Nested Schema : workspace-client-criteria
Type: object
allows routing by taking information of the workspace client into account. It is dependent on the OpenID Connect JWT and the WorkspaceClient custom resource. workspace clients can be identified either directly via their name or via labels. If both names and labels are provided, then they are treated as disjunction (logical or). So, matches have to either be have a listed name or carry a correct label. Carrying both is not required, but does not have any additional effect
Show Source
Nested Schema : items
Type: object
Show Source
Match One Schema
Show Source
Nested Schema : items
Type: object
Show Source
  • meant to capture record level documentation
  • Default Value: orcl-tmf-21c
    Allowed Values: [ "orcl-tmf-21c" ]
    indicates the expression language implementation. At this point in time the routing solution only supports the query language introduced before 21D that is indicated by the sole implementation language label orcl-tmf-21c
  • the actual expression string
Match One Schema
Show Source
Nested Schema : items
Type: object
Show Source
Match One Schema
Show Source
Nested Schema : header-value-one-of
Type: array
Minimum Number of Items: 1
the list of fixed candidate values of which one should match. Mutually exclusive with ecma262-regex-value
Show Source
Nested Schema : http-methods
Type: array
Minimum Number of Items: 1
Show Source
  • Allowed Values: [ "GET", "PUT", "POST", "HEAD", "OPTIONS", "PATCH", "DELETE" ]
Nested Schema : http-protocol-versions
Type: array
Minimum Number of Items: 1
Show Source
Nested Schema : interaction-context-specs
Type: array
Minimum Number of Items: 1
Show Source
Nested Schema : items
Type: object
Show Source
Match One Schema
Show Source
Nested Schema : context-item-value-one-of
Type: array
Minimum Number of Items: 1
the exact value candidates the context item should be checked against. Mutually exclusive with ecma262-context-item-regex-value
Show Source
Nested Schema : path-parameters
Type: array
Minimum Number of Items: 1
Show Source
Nested Schema : items
Type: object
Show Source
  • a regular expression the unencoded path parameter value checked against for value match. Mutually exclusive with path-parameter-value-oneOf and both path-parameter-min-value and path-parameter-max-value
  • specifies a maximum number the path parameter must have. Ignored for string parameters. The type of the parameter is set on the API custom resource. Mutually exclusive with path-parameter-value-oneOf and ecma262-path-parameter-regex
  • specifies a minimum number the path parameter must have. Ignored for string parameters. The type of the parameter is set on the API custom resource. Mutually exclusive with path-parameter-value-oneOf and ecma262-path-parameter-regex
  • Pattern: ^[a-z][a-z0-9\-]*$
    the path parameter name in unencoded (URL) form
  • path-parameter-value-oneOf
    Minimum Number of Items: 1
    a list of distinct (unencoded) value candidates the path parameter should be checked for exact value match. Mutually exclusive with ecma262-path-parameter-regex and both path-parameter-min-value and path-parameter-max-value
Match One Schema
Show Source
Nested Schema : path-parameter-value-oneOf
Type: array
Minimum Number of Items: 1
a list of distinct (unencoded) value candidates the path parameter should be checked for exact value match. Mutually exclusive with ecma262-path-parameter-regex and both path-parameter-min-value and path-parameter-max-value
Show Source
Nested Schema : query-parameters
Type: array
Minimum Number of Items: 1
Show Source
Nested Schema : items
Type: object
Show Source
Match One Schema
Show Source
Nested Schema : query-parameter-value-one-of
Type: array
Minimum Number of Items: 1
a list of distinct (unencoded) value candidates the query parameter should be checked for exact value match. Mutually exclusive with ecma262-query-parameter-regex
Show Source
Nested Schema : criteria-refs
Type: array
Minimum Number of Items: 1
This kind of criterion allows aggregating over other named criteria. Main use case is composition as you can specify multiple entries that then all must match individually to match the whole criteria-refs criterion
Show Source
Nested Schema : matching-workspace-client-labels
Type: array
Minimum Number of Items: 1
WorkspaceClient allows specifying key-only and key/value labels. You can specify both variants here. All labels must match and out of multiple values given for a label one must match
Show Source
Nested Schema : matching-workspace-client-names
Type: array
Minimum Number of Items: 1
these are the .spec.client-name values of the WorkspaceClient documents
Show Source
Nested Schema : token-types
Type: array
list of matching token types. No limitation by default
Default Value: [ "user-access-token", "client-token" ]
Show Source
Nested Schema : items
Type: object
Show Source
Match One Schema
Show Source
Nested Schema : label-values
Type: array
Minimum Number of Items: 1
the WorkspaceClient label candidate values
Show Source
Back to Top

Response

Supported Media Types

201 Response

Created
Body ()
Root Schema : RoutingCriteria
Type: object
Show Source
  • any-criteria-of
    Minimum Number of Items: 1
    An array of objects which can hold all supported routing criteria. Multiple such objects in the array mean that only one of the array members needs to match to match the whole criterion. On the other hand all routing criteria in a single item have to all match.
  • meant to capture record level documentation
  • Pattern: ^[A-Z0-9]{4,24}$
    a technical (scrambled) key that is used in scenarios where the taken routing decisions have to be propagated downstream for tracing or when a specific routing criteria is supposed to be used for making unique links
  • match-post-processing
    this section captures instructions that need to get executed in case a successful match has happened and the call to the backend has succeeded
Nested Schema : any-criteria-of
Type: array
Minimum Number of Items: 1
An array of objects which can hold all supported routing criteria. Multiple such objects in the array mean that only one of the array members needs to match to match the whole criterion. On the other hand all routing criteria in a single item have to all match.
Show Source
Nested Schema : match-post-processing
Type: object
this section captures instructions that need to get executed in case a successful match has happened and the call to the backend has succeeded
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : abac-criteria
Type: array
Minimum Number of Items: 1
allows using Helidon ABAC expressions
Show Source
Nested Schema : boolean-criterion
Type: object
used for the simple use cases to trun off certain alternatives, by including a false criterion or to define an always true criterion
Show Source
Match One Schema
Show Source
Nested Schema : expression-criteria
Type: array
Minimum Number of Items: 1
criteria using the CX Industry Framework custom expression language. You can specify multiple criteria. Then all provided criteria have to evaluate to a match.
Show Source
Nested Schema : header-criteria
Type: array
Minimum Number of Items: 1
This kind of criteria allows taking routing decisions based on HTTP request headers, both regular as well as custom. Header criteria match when either one of the configured fixed values matches or when there is a match to the provided regular expression. You can also specify whether the header should be passed down to the called target or should be swallowed by Industries Framework routing.
Show Source
Nested Schema : http-method-criteria
Type: object
this kind of routing criterion allows you specifying a list of HTTP methods of which one has to be then the one used for the request
Show Source
Match One Schema
Show Source
Nested Schema : http-version-criteria
Type: object
this kind of routing criterion allows you routing different inbound HTTP protocol version requests to separate targets. Mainly useful for migration scenarios
Show Source
Match One Schema
Show Source
Nested Schema : interaction-context-criteria
Type: object
Leverages the information in an interaction context (see the RoutingContextEnrichmentSpecification custom resource) to persist some fact information over multiple requests to Industries Framework.
Show Source
Match One Schema
Show Source
Nested Schema : jwt-criteria
Type: object
Show Source
Match One Schema
Show Source
Nested Schema : path-param-criteria
Type: object
allows specifying URL path parameters for routing. Exact-match and regular expression are supported. the key and value information are supposed to be provided in unencoded form.
Show Source
Nested Schema : query-param-criteria
Type: object
allows specifying URL query parameters for routing. Exact-match and regular expression are supported. the key and value information are supposed to be provided in unencoded form. So: "@type" instead of "%40type"
Show Source
Match One Schema
Show Source
Nested Schema : ref-criterion
Type: object
Show Source
  • criteria-refs
    Minimum Number of Items: 1
    This kind of criterion allows aggregating over other named criteria. Main use case is composition as you can specify multiple entries that then all must match individually to match the whole criteria-refs criterion
  • meant to capture record level documentation
Nested Schema : workspace-client-criteria
Type: object
allows routing by taking information of the workspace client into account. It is dependent on the OpenID Connect JWT and the WorkspaceClient custom resource. workspace clients can be identified either directly via their name or via labels. If both names and labels are provided, then they are treated as disjunction (logical or). So, matches have to either be have a listed name or carry a correct label. Carrying both is not required, but does not have any additional effect
Show Source
Nested Schema : items
Type: object
Show Source
Match One Schema
Show Source
Nested Schema : items
Type: object
Show Source
  • meant to capture record level documentation
  • Default Value: orcl-tmf-21c
    Allowed Values: [ "orcl-tmf-21c" ]
    indicates the expression language implementation. At this point in time the routing solution only supports the query language introduced before 21D that is indicated by the sole implementation language label orcl-tmf-21c
  • the actual expression string
Match One Schema
Show Source
Nested Schema : items
Type: object
Show Source
Match One Schema
Show Source
Nested Schema : header-value-one-of
Type: array
Minimum Number of Items: 1
the list of fixed candidate values of which one should match. Mutually exclusive with ecma262-regex-value
Show Source
Nested Schema : http-methods
Type: array
Minimum Number of Items: 1
Show Source
  • Allowed Values: [ "GET", "PUT", "POST", "HEAD", "OPTIONS", "PATCH", "DELETE" ]
Nested Schema : http-protocol-versions
Type: array
Minimum Number of Items: 1
Show Source
Nested Schema : interaction-context-specs
Type: array
Minimum Number of Items: 1
Show Source
Nested Schema : items
Type: object
Show Source
Match One Schema
Show Source
Nested Schema : context-item-value-one-of
Type: array
Minimum Number of Items: 1
the exact value candidates the context item should be checked against. Mutually exclusive with ecma262-context-item-regex-value
Show Source
Nested Schema : claims
Type: array
Minimum Number of Items: 1
Show Source
Nested Schema : items
Type: object
Show Source
Match One Schema
Show Source
Nested Schema : claim-value-one-of
Type: array
Minimum Number of Items: 1
a list of distinct (unencoded) value candidates the claim should be checked for exact value match. Mutually exclusive with ecma262-claim-regex
Show Source
Nested Schema : path-parameters
Type: array
Minimum Number of Items: 1
Show Source
Nested Schema : items
Type: object
Show Source
  • a regular expression the unencoded path parameter value checked against for value match. Mutually exclusive with path-parameter-value-oneOf and both path-parameter-min-value and path-parameter-max-value
  • specifies a maximum number the path parameter must have. Ignored for string parameters. The type of the parameter is set on the API custom resource. Mutually exclusive with path-parameter-value-oneOf and ecma262-path-parameter-regex
  • specifies a minimum number the path parameter must have. Ignored for string parameters. The type of the parameter is set on the API custom resource. Mutually exclusive with path-parameter-value-oneOf and ecma262-path-parameter-regex
  • Pattern: ^[a-z][a-z0-9\-]*$
    the path parameter name in unencoded (URL) form
  • path-parameter-value-oneOf
    Minimum Number of Items: 1
    a list of distinct (unencoded) value candidates the path parameter should be checked for exact value match. Mutually exclusive with ecma262-path-parameter-regex and both path-parameter-min-value and path-parameter-max-value
Match One Schema
Show Source
Nested Schema : path-parameter-value-oneOf
Type: array
Minimum Number of Items: 1
a list of distinct (unencoded) value candidates the path parameter should be checked for exact value match. Mutually exclusive with ecma262-path-parameter-regex and both path-parameter-min-value and path-parameter-max-value
Show Source
Nested Schema : query-parameters
Type: array
Minimum Number of Items: 1
Show Source
Nested Schema : items
Type: object
Show Source
Match One Schema
Show Source
Nested Schema : query-parameter-value-one-of
Type: array
Minimum Number of Items: 1
a list of distinct (unencoded) value candidates the query parameter should be checked for exact value match. Mutually exclusive with ecma262-query-parameter-regex
Show Source
Nested Schema : criteria-refs
Type: array
Minimum Number of Items: 1
This kind of criterion allows aggregating over other named criteria. Main use case is composition as you can specify multiple entries that then all must match individually to match the whole criteria-refs criterion
Show Source
Nested Schema : matching-workspace-client-labels
Type: array
Minimum Number of Items: 1
WorkspaceClient allows specifying key-only and key/value labels. You can specify both variants here. All labels must match and out of multiple values given for a label one must match
Show Source
Nested Schema : matching-workspace-client-names
Type: array
Minimum Number of Items: 1
these are the .spec.client-name values of the WorkspaceClient documents
Show Source
Nested Schema : token-types
Type: array
list of matching token types. No limitation by default
Default Value: [ "user-access-token", "client-token" ]
Show Source
Nested Schema : items
Type: object
Show Source
Match One Schema
Show Source
Nested Schema : label-values
Type: array
Minimum Number of Items: 1
the WorkspaceClient label candidate values
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 a routing criteria by submitting a POST request on the REST resource using cURL.

cURL Command

curl -H 'Authorization: Bearer <Token>' -X POST https://{FABRIC_HOST}/admin/routingCriteria -H "Content-Type: application/json" -D @create_routingcriteria.json | json_pp

Example of Request Body

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

{
    "any-criteria-of": [
        {
            "header-criteria": [
                {
                    "request-header-name": "biling-system",
                    "header-value-one-of": [
                        "postpaid"
                    ],
                    "header-backend-handling": "routing-only"
                }
            ]
        }
    ],
    "criteria-link-key": "Billing Prepaid"
}

Example of Response Body

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

{
    "any-criteria-of": [
        {
            "header-criteria": [
                {
                    "request-header-name": "biling-system",
                    "header-value-one-of": [
                        "postpaid"
                    ],
                    "header-backend-handling": "routing-only"
                }
            ]
        }
    ],
    "id": "UNI1651248080",
    "criteria-link-key": "Billing Prepaid"
}
Back to Top