Property Data Types

In Rely, properties are fundamental attributes that define the characteristics of your entities. Understanding property data types is crucial for two main reasons:

  1. Managing Entities: Entity property values can be modified either through the Overview tab on the entity's page for a more user-friendly interface or directly within the Code tab for those who prefer editing in code format. It's important to recognise that different data types lead to different editing workflows and display elements.

  2. Customising Data Models: While adapting the blueprints in your data model, selecting appropriate property data types for your blueprint properties impacts the functionality and flexibility of entities created from it. You can modify blueprints within the Data Model section, either through the UI on the "Builder" page or as code on the "Blueprint" page. For guidance on expanding and customising your data model, read more here.

Here's a closer look at the property data types available in Rely and how they're used:

String

Strings represent text data. They are versatile and can include mostly anything from namespaces, statuses, etc.

How to define a "string" property as code within a blueprint.
{
  // Blueprint metadata
  ...
  // Blueprint Properties
  "schemaProperties": {
    "type": "object",
    "properties": {
      // My string property
      "my-property-id": {
        "type": "string",
        "format": null
        "title": "My Property Title",
        "description": "..."
      }
}

Number

Numbers are used for numerical data, from quantities to identifiers.

How to define a "number" property as code within a blueprint.
{
  // Blueprint metadata
  ...
  // Blueprint Properties
  "schemaProperties": {
    "type": "object",
    "properties": {
      // My number property
      "my-number-property": {
        "type": "number",
        "format": null,
        "title": "My Number Property",
        "description": "A numeric property."
      }
    }
  }
}

Date-Time

This type is used for date values, ensuring events are accurately timestamped.

How to define a "date-time" property as code within a blueprint.
{
  // Blueprint metadata
  ...
  // Blueprint Properties
  "schemaProperties": {
    "type": "object",
    "properties": {
      // My date-time property
      "my-datetime-property": {
        "type": "string",
        "format": "date-time",
        "title": "My DateTime Property",
        "description": "A property for date and time."
      }
    }
  }
}

Boolean

Booleans represent binary choices, such as true/false or yes/no scenarios.

How to define a "boolean" property as code within a blueprint.
{
  // Blueprint metadata
  ...
  // Blueprint Properties
  "schemaProperties": {
    "type": "object",
    "properties": {
      // My boolean property
      "my-boolean-property": {
        "type": "boolean",
        "format": null,
        "title": "My Boolean Property",
        "description": "A true or false property."
      }
    }
  }
}

URL

URLs are used to store web addresses, linking to external resources. Here's some general considerations to keep in mind:

  • Validation: When assigning values to URL properties, only valid URLs will be accepted. This ensures that the links are functional and lead to actual resources.

  • Display Simplification: To maintain clarity and prevent clutter in the web application, Rely.io simplifies the display of URLs. Instead of showing the full URL, which can be lengthy and cumbersome, only the domain name is displayed. This approach keeps the interface clean and focused, without sacrificing access to the full URL.

How to define a "URL" property as code within a blueprint.
{
  // Blueprint metadata
  ...
  // Blueprint Properties
  "schemaProperties": {
    "type": "object",
    "properties": {
      // My URL property
      "my-url-property": {
        "type": "string",
        "format": "url",
        "title": "My URL Property",
        "description": "A property for web addresses."
      }
    }
  }
}

JSON

JSON properties in Rely offer a flexible solution for storing unstructured data. These properties accept JSON payloads without the need for a predefined schema, accommodating a wide range of data representations.

The payload for JSON properties is sanitised upon storage to ensure security and integrity, allowing for a versatile and "everything goes" approach to data storage - as long as it's a valid JSON.

How to define a "json" property as code within a blueprint.
{
  // Blueprint metadata
  ...
  // Blueprint Properties
  "schemaProperties": {
    "type": "object",
    "properties": {
      // My JSON property
      "my-json-property": {
        "type": "string",
        "format": "json",
        "title": "My JSON Property",
        "description": "A property for JSON data."
      }
    }
  }
}

Object

Object properties in Rely are designed for structured data storage, enabling the representation of complex, nested information structures. These properties require users to define a clear schema beforehand, which outlines the specific structure and type of data that the object will hold.

This pre-specification of schema ensures that any data stored in or updated to an object property strictly adheres to the defined structure, maintaining data integrity and consistency across your entities.

How to define a "string" property as code within a blueprint.
{
  // Blueprint metadata
  ...
  // Blueprint Properties
   "schemaProperties":{
      "type":"object",
      "properties":{
          // My Object property
         "my-object-property":{
            "type":"object",
            "format":null,
            "title":"My Object Property",
            "description":"...",
            // My Object Schema 
            "properties":{
               "first-shcmea-prop":{
                  "type":"string",
                  "title":"My First Prop",
                  "description":""
               },
               "second-schema-prop":{
                  "type":"object",
                  "title":"My Second Prop",
                  "description":"...",
                  "properties":{
                     "nested-prop":{
                        "type":"string",
                        "title":"A nested prop",
                        "description":"..."
                     }
                  }
               }
            }
         }
      }
   }
}

YAML

YAML is ideal for configuration data, favoured for its readability.

The payload for such properties is sanitised upon storage to ensure security and integrity, allowing for a versatile and "everything goes" approach to data storage - as long as it's a valid YAML.

How to define a "yaml" property as code within a blueprint.
{
  // Blueprint metadata
  ...
  // Blueprint Properties
  "schemaProperties": {
    "type": "object",
    "properties": {
      // My YAML property
      "my-yaml-property": {
        "type": "string",
        "format": "yaml",
        "title": "My YAML Property",
        "description": "A property for YAML data."
      }
    }
  }
}

Markdown

Markdown properties are used for text that includes formatting, such as documentation or notes.

The payload for such properties is sanitised upon storage to ensure security and integrity, allowing for a versatile and "everything goes" approach to data storage.

How to define a "markdown" property as code within a blueprint.
{
  // Blueprint metadata
  ...
  // Blueprint Properties
  "schemaProperties": {
    "type": "object",
    "properties": {
      // My markdown property
      "my-markdown-property": {
        "type": "string",
        "format": "markdown",
        "title": "My Markdown Property",
        "description": "A property for Markdown text."
      }
    }
  }
}

OpenAPI

OpenAPI properties should be set to a URL pointing to a valid OpenAPI JSON schema. The display will render the API specification as Swagger documentation.

How to define an "OpenAPI" property as code within a blueprint.
{
  // Blueprint metadata
  ...
  // Blueprint Properties
  "schemaProperties": {
    "type": "object",
    "properties": {
      // My OpenAPI property
      "my-openapi-property": {
        "type": "string",
        "format": "url/openApi",
        "title": "My OpenAPI Property",
        "description": "A URL to an OpenAPI specification."
      }
    }
  }
}

Iframe

Iframe properties need to be set to URL pointing to a webpage. The display will render the webpage itself, embedding it directly within Rely.

How to define an "iframe" property as code within a blueprint.
{
  // Blueprint metadata
  ...
  // Blueprint Properties
  "schemaProperties": {
    "type": "object",
    "properties": {
      // My iframe property
      "my-iframe-property": {
        "type": "string",
        "format": "url/iframe",
        "title": "My Iframe Property",
        "description": "A URL to a webpage for iframe embedding."
      }
    }
  }
}

Array

Arrays are used to store lists of values, which can be of any basic data type.

How to define an "array" property as code within a blueprint.
{
  // Blueprint metadata
  ...
  // Blueprint Properties
  "schemaProperties": {
    "type": "object",
    "properties": {
      // My array property
      "my-array-property": {
        "type": "array",
        "format": null,
        "title": "My Array Property",
        "description": "..."
      }
    }
  }
}

Time Series

Time Series Query properties enable you to set up queries for retrieving metrics from external tools through your plugin integrations. Data retrieval occurs at scheduled intervals, but can also be immediately updated upon visiting a specific entity page featuring time-series properties.

To utilize this feature, it's essential to have compatible plugins (e.g., Grafana Cloud) installed. After selecting the desired plugin, you can craft your query using the querying language provided by the plugin's data source. For instance, Grafana's querying language can be employed to import metrics directly into your software catalog (refer to the Grafana documentation for more details).

Before submission, Rely conducts a real-time execution of the query to verify its functionality and to ensure it yields data in the correct format.

It is recommended that you define these property types via the UI.

Single Value Query

Similar to Time Series Query properties, Single Value Query properties are designed to fetch specific data points from external tools via plugin integrations. The key difference lies in the expected result: Single Value Queries aim to return a singular data point as opposed to a series of data points over time.

To utilize this feature, it's essential to have compatible plugins (e.g., Grafana Cloud) installed. After selecting the desired plugin, you can craft your query using the querying language provided by the plugin's data source. For instance, Grafana's querying language can be employed to import metrics directly into your software catalog (refer to the Grafana documentation for more details).

Before submission, Rely conducts a real-time execution of the query to verify its functionality and to ensure it yields data in the correct format.

It is recommended that you define these property types via the UI.

Last updated