Skip to main content
You're reading Identity & Access Management 7.2.0. The newest release is 7.3.0, and Cloud has the newest features. Go to the newest release

Rule Metadata API

Download OpenAPI (YAML)Version v1

Base URL: https://localhost:9443/t/carbon.super/api/server/v1

The WSO2 Identity Server Rule Metadata REST API (version v1).

Download the OpenAPI definition (YAML)

Security schemes​

BasicAuth: HTTP basic

OAuth2: oauth2

authorizationCode flow, token URL https://localhost:9443/oauth2/token, authorization URL https://localhost:9443/oauth2/authorize

1 scopes
ScopeDescription
readinternal_rule_metadata_view

Metadata​

Get metadata for rule configuration.​

GET /rules/metadata

This API provides a list of fields, associated metadata, and applicable operators for each field based on the specified flow type. This information is used to populate the UI for rule configuration.

Scope (Permission) required: internal_rule_metadata_view

Parameters

NameInTypeRequiredDescription
flowquerystringYes

Specifies the flow to retrieve rule metadata. This ensures that the metadata returned is relevant to the given flow.

Note: At present, only the 'preIssueAccessToken','preUpdatePassword' and 'preUpdateProfile' flows are supported.

Allowed values: preIssueAccessToken, preUpdatePassword, preUpdateProfile, preLogin, postLogin, inLogin, preRegistration, inRegistration, inPasswordExpiry

Responses

CodeDescriptionSchema
200

Applicable fields and operators

ExpressionMeta
400

Bad Request

401

Unauthorized

500

Server Error

Error

Schemas​

ExpressionMeta​

Type: array of FieldDefinition

Represents the metadata for rule expressions. It includes field definitions and associated operators.

FieldDefinition​

Type: object

3 properties
NameTypeRequiredDescription
fieldField
operatorsarray of Operator

Specifies the list of valid operators that can be applied to this field in rule expressions. Each operator defines a comparison or matching condition (e.g., "equals", "contains", "greaterThan") that determines how the field's value will be evaluated within a rule.

valueValue

Field​

Type: object

3 properties
NameTypeRequiredDescription
namestring

Name of the field. This is an immutable attribute and uniquely identifies the field allowed in the rule.

displayNamestring

Display name of the field. Use as a user friendly label of the field to show in UI.

dependantFieldsarray of string

Lists the names of fields on which this field depends for its display or selection in the next expression.

Value​

Type: object

6 properties
NameTypeRequiredDescription
inputTypestring

Defines how the field should be presented and populated in the rule configuration UI. This property indicates whether the field allows direct user input or if the values are selected from predefined options. Possible types include:

  • "input": Allows for direct user entry, such as text or numeric input.
  • "options": Provides a list of selectable values, often fetched from an external data source, enabling users to pick from predefined choices.

Allowed values: input, options

valueTypestring

Specifies the expected data type for the field’s value within a rule expression. This property defines how the field's value should be interpreted when used in rule conditions. Possible types include:

  • "string": Text value.
  • "number": Numerical value.
  • "boolean": True or false.
  • "date": Date value.
  • "reference": A reference to an external identifier, often used with options-type fields to indicate that the value is an ID or a unique attribute from related data."

Allowed values: string, number, boolean, date, reference

valueReferenceAttributestring

The key attribute in the options data (e.g., 'id') used to represent the option's selected value in rule expressions. Only available when 'valueType' is 'reference'.

valueDisplayAttributestring

The attribute to show as the label for each option in the dropdown (e.g., 'name') when listing options. Only available when 'valueType' is 'reference'.

linksarray of Link

Endpoints to retrieve or search for options dynamically. Included only when 'valueType' is 'reference'.

valuesarray of ValueObject

List of selectable values for options fields when 'valueType' is 'string', 'number', 'boolean', or 'date'.

Operator​

Type: object

2 properties
NameTypeRequiredDescription
namestring

Name of the operator. The immutable identifier of the operator referenced within the rule expression.

displayNamestring

Display name of the operator. Use as a user friendly label of the operator to show in UI.

ValueObject​

Type: object

2 properties
NameTypeRequiredDescription
namestring

The name that uniquely identifies the option.

displayNamestring

The display name for the option.

Type: object

3 properties
NameTypeRequiredDescription
hrefstring

Url of the endpoint.

methodstring

Http method.

Allowed values: GET

relstring

Indicates the endpoint’s relation to retrieving or filtering field values.

Allowed values: values, filter

Error​

Type: object

4 properties
NameTypeRequiredDescription
codestring

Error code

messagestring

Error message.

descriptionstring

Detailed error description.

traceIdstring

Trace identifier to refer at troubleshooting logs to troubleshoot the problem.

Was this page helpful?