Rule Metadata API
Base URL: https://api.asgardeo.io/t/<ORGANIZATION_NAME>/api/server/v1
The WSO2 Identity Platform Rule Metadata REST API (version v1).
Download the OpenAPI definition (YAML)
Security schemes
OAuth2: oauth2
authorizationCode flow, token URL https://api.asgardeo.io/t/{org-name}/oauth2/token, authorization URL https://api.asgardeo.io/t/{org-name}/oauth2/authorize
1 scopes
| Scope | Description |
|---|---|
read | internal_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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
flow | query | string | Yes | 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: |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | Type | Required | Description |
|---|---|---|---|
field | Field | ||
operators | array 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. | |
value | Value |
Field
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Name of the field. This is an immutable attribute and uniquely identifies the field allowed in the rule. | |
displayName | string | Display name of the field. Use as a user friendly label of the field to show in UI. | |
dependantFields | array 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
| Name | Type | Required | Description |
|---|---|---|---|
inputType | string | 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:
Allowed values: | |
valueType | string | 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:
Allowed values: | |
valueReferenceAttribute | string | 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'. | |
valueDisplayAttribute | string | 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'. | |
links | array of Link | Endpoints to retrieve or search for options dynamically. Included only when 'valueType' is 'reference'. | |
values | array of ValueObject | List of selectable values for options fields when 'valueType' is 'string', 'number', 'boolean', or 'date'. |
Operator
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Name of the operator. The immutable identifier of the operator referenced within the rule expression. | |
displayName | string | Display name of the operator. Use as a user friendly label of the operator to show in UI. |
ValueObject
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | The name that uniquely identifies the option. | |
displayName | string | The display name for the option. |
Link
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
href | string | Url of the endpoint. | |
method | string | Http method. Allowed values: | |
rel | string | Indicates the endpoint’s relation to retrieving or filtering field values. Allowed values: |
Error
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Error code | |
message | string | Error message. | |
description | string | Detailed error description. | |
traceId | string | Trace identifier to refer at troubleshooting logs to troubleshoot the problem. |
Was this page helpful?