> For the complete documentation index, see [llms.txt](https://docs.rierino.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rierino.com/devops/api-event-and-process-flows/configuring-saga-steps/event-step/specialized-actions/consume-web-of-things.md).

# Consume Web of Things

## Consume Web of Things Actions

### GetWOTEntry

Returns details of a Thing using its discovery endpoint. Uses `domain` event metadata to refer to the Thing ID.

### GetWOTProperty

Reads a specific property from a Thing. Event metadata fields applicable for this action are as follows:

{% tabs %}
{% tab title="Table" %}

| Field          | Definition                                         | Example         | Default |
| -------------- | -------------------------------------------------- | --------------- | ------- |
| Domain         | ID of the Thing to read from                       | coffee\_machine | -       |
| Output Element | Json path for the output in response event payload | output          | -       |
| {% endtab %}   |                                                    |                 |         |

{% tab title="JSON Schema" %}

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Consume Web of Things GetWOTProperty action eventMeta fields",
  "type": "object",
  "properties": {
    "eventMeta": {
      "type": "object",
      "properties": {
        "domain": {
          "type": "string",
          "definition": "ID of the \"Thing\" to read from",
          "example": "coffee_machine",
          "default": null
        },
        "outputElement": {
          "type": "string",
          "definition": "Json path for the output in response event payload",
          "example": "output",
          "default": null
        }
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}

With event metadata parameters as:

{% tabs %}
{% tab title="Table" %}

| Parameter    | Definition                   | Example | Default |
| ------------ | ---------------------------- | ------- | ------- |
| Property     | Name of the property to read | level   | -       |
| {% endtab %} |                              |         |         |

{% tab title="JSON Schema" %}

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Consume Web of Things GetWOTProperty action eventMeta.parameters",
  "type": "object",
  "properties": {
    "eventMeta": {
      "type": "object",
      "properties": {
        "parameters": {
          "type": "object",
          "properties": {
            "property": {
              "type": "string",
              "definition": "Name of the property to read",
              "example": "level",
              "default": null
            }
          }
        }
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}

### WriteWOTProperty

Writes a specific property to a Thing. Event metadata fields applicable for this action are as follows:

{% tabs %}
{% tab title="Table" %}

| Field          | Definition                                             | Example         | Default |
| -------------- | ------------------------------------------------------ | --------------- | ------- |
| Domain         | ID of the Thing to write to                            | coffee\_machine | -       |
| Input Element  | Json path for the input in event payload to write from | input           | -       |
| Output Element | Json path for the output in response event payload     | output          | -       |
| {% endtab %}   |                                                        |                 |         |

{% tab title="JSON Schema" %}

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Consume Web of Things WriteWOTProperty action eventMeta fields",
  "type": "object",
  "properties": {
    "eventMeta": {
      "type": "object",
      "properties": {
        "domain": {
          "type": "string",
          "definition": "ID of the \"Thing\" to write to",
          "example": "coffee_machine",
          "default": null
        },
        "inputElement": {
          "type": "string",
          "definition": "Json path for the input in event payload to write from",
          "example": "input",
          "default": null
        },
        "outputElement": {
          "type": "string",
          "definition": "Json path for the output in response event payload",
          "example": "output",
          "default": null
        }
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}

With event metadata parameters as:

{% tabs %}
{% tab title="Table" %}

| Parameter    | Definition                    | Example | Default |
| ------------ | ----------------------------- | ------- | ------- |
| Property     | Name of the property to write | level   | -       |
| {% endtab %} |                               |         |         |

{% tab title="JSON Schema" %}

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Consume Web of Things WriteWOTProperty action eventMeta.parameters",
  "type": "object",
  "properties": {
    "eventMeta": {
      "type": "object",
      "properties": {
        "parameters": {
          "type": "object",
          "properties": {
            "property": {
              "type": "string",
              "definition": "Name of the property to write",
              "example": "level",
              "default": null
            }
          }
        }
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}

### InvokeWOTAction

Invokes a specific action on a Thing. Event metadata fields applicable for this action are as follows:

{% tabs %}
{% tab title="Table" %}

| Field          | Definition                                                           | Example         | Default |
| -------------- | -------------------------------------------------------------------- | --------------- | ------- |
| Domain         | ID of the Thing to invoke action on                                  | coffee\_machine | -       |
| Input Element  | Json path for the input in event payload to use as action parameters | input           | -       |
| Output Element | Json path for the output in response event payload                   | output          | -       |
| {% endtab %}   |                                                                      |                 |         |

{% tab title="JSON Schema" %}

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Consume Web of Things InvokeWOTAction action eventMeta fields",
  "type": "object",
  "properties": {
    "eventMeta": {
      "type": "object",
      "properties": {
        "domain": {
          "type": "string",
          "definition": "ID of the \"Thing\" to invoke action on",
          "example": "coffee_machine",
          "default": null
        },
        "inputElement": {
          "type": "string",
          "definition": "Json path for the input in event payload to use as action parameters",
          "example": "input",
          "default": null
        },
        "outputElement": {
          "type": "string",
          "definition": "Json path for the output in response event payload",
          "example": "output",
          "default": null
        }
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}

With event metadata parameters as:

{% tabs %}
{% tab title="Table" %}

| Parameter    | Definition                 | Example | Default |
| ------------ | -------------------------- | ------- | ------- |
| Action       | Name of the action to call | cleanup | -       |
| {% endtab %} |                            |         |         |

{% tab title="JSON Schema" %}

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Consume Web of Things InvokeWOTAction action eventMeta.parameters",
  "type": "object",
  "properties": {
    "eventMeta": {
      "type": "object",
      "properties": {
        "parameters": {
          "type": "object",
          "properties": {
            "action": {
              "type": "string",
              "definition": "Name of the action to call",
              "example": "cleanup",
              "default": null
            }
          }
        }
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.rierino.com/devops/api-event-and-process-flows/configuring-saga-steps/event-step/specialized-actions/consume-web-of-things.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
