Ayla Networks Rules.json API

The Rules.json API from Ayla Networks — 1 operation(s) for rules.json.

Operations 2

POST /rules.json Create rule #
GET /rules.json Get rules #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/ayla-networks:ayla-networks-rules-json-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

ayla-networks-rules-json-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: rule-service Rules.json API
  version: '1.0'
servers:
- url: https://rulesservice-dev.aylanetworks.com/rulesservice/v1/
security:
- sec0: []
tags:
- name: Rules.json
paths:
  /rules.json:
    post:
      summary: Create rule
      description: This API creates a rule for the user. Devices specified in the rule must exist. The caller must own, or have rights to, the device. Actions can be included at rule-creation time, or they can be added to the rule later.
      operationId: create-rule
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - RAW_BODY
              properties:
                RAW_BODY:
                  type: string
                  format: json
      responses:
        '201':
          content:
            application/json:
              schema:
                type: object
                properties:
                  rule:
                    type: object
                    properties:
                      rule_uuid:
                        type: string
                        example: 3aedf330-4d19-11f1-97c5-3b132d297a3a
                      name:
                        type: string
                        example: Blue LED Rule
                      description:
                        type: string
                        example: Trigger Blue LED actions based on property value
                      expression:
                        type: string
                        example: DATAPOINT(AC000W000340333,Blue_LED) == 1
                      is_enabled:
                        type: boolean
                        example: true
                        default: true
                      is_abstract:
                        type: boolean
                        example: false
                        default: true
                      is_template:
                        type: boolean
                        example: false
                        default: true
                      action_ids:
                        type: array
                        items:
                          type: string
                          example: 4633da41-4d03-11f1-b2b0-d1744a9d4c09
                      parameters:
                        type: object
                        properties: {}
                      user_uuid:
                        type: string
                        example: b02ce872-42d8-11f1-8aa5-f6a43ee69b74
                      created_at:
                        type: string
                        example: '2026-05-11T09:10:18.661Z'
                      updated_at:
                        type: string
                        example: '2026-05-11T09:10:18.661Z'
                      created_by:
                        type: string
                        example: b02ce872-42d8-11f1-8aa5-f6a43ee69b74
                      updated_by:
                        type: string
                        example: b02ce872-42d8-11f1-8aa5-f6a43ee69b74
                      facility_uuid:
                        type: string
                        example: ''
              examples:
                Created:
                  summary: Created
                  value:
                    rule:
                      rule_uuid: 3aedf330-4d19-11f1-97c5-3b132d297a3a
                      name: Blue LED Rule
                      description: Trigger Blue LED actions based on property value
                      expression: DATAPOINT(AC000W000340333,Blue_LED) == 1
                      is_enabled: true
                      is_abstract: false
                      is_template: false
                      action_ids:
                      - 4633da41-4d03-11f1-b2b0-d1744a9d4c09
                      parameters: {}
                      user_uuid: b02ce872-42d8-11f1-8aa5-f6a43ee69b74
                      created_at: '2026-05-11T09:10:18.661Z'
                      updated_at: '2026-05-11T09:10:18.661Z'
                      created_by: b02ce872-42d8-11f1-8aa5-f6a43ee69b74
                      updated_by: b02ce872-42d8-11f1-8aa5-f6a43ee69b74
                      facility_uuid: ''
          description: Created
        '400':
          content: {}
          description: Bad Request
        '401':
          content: {}
          description: Unauthorized
        '403':
          content: {}
          description: Forbidden
        '404':
          content: {}
          description: Not Found
        '422':
          content: {}
          description: Unprocessable Entity
      deprecated: false
      tags:
      - Rules.json
    get:
      summary: Get rules
      description: 'This API returns an array of rules.


        The query parameters are optional. However, if you set one, then you must set the other, too.'
      operationId: get-rules
      parameters:
      - name: type
        in: query
        description: 'Rule type: device or user.'
        schema:
          type: string
      - name: id
        in: query
        description: DSN or user uuid.
        schema:
          type: string
      - name: oemId
        in: query
        description: Valid OEM ID. <br>Mandatory for Ayla admin users. <br>Optional for OEM users, if provided, the value should always be their OEM ID.
        schema:
          type: string
      - name: tag
        in: query
        description: Valid value is 'subscription' or 'SUBSCRIPTION'.
        schema:
          type: string
      - name: is_internal
        in: query
        description: Possible values are as follows:<br><b>true</b> - Only internal rules will be available in the response.<br><b>false</b> - Only non-internal rules will be available in the response.</br><b>When not specified</b> - all rules will be available in the response.
        schema:
          type: boolean
      - name: paginated
        in: query
        description: true or 1 means results will be paginated.
        schema:
          type: boolean
      - name: per_page
        in: query
        description: Maximum number of records per page.
        schema:
          type: integer
          format: int32
      - name: page
        in: query
        description: API result page number that you want to display.
        schema:
          type: integer
          format: int32
      - name: sort_order
        in: query
        description: Ascending (asc) or descending (desc).
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              examples:
                Result:
                  value:
                    rules:
                    - rule_uuid: 7e89xxxxx20-11f1-bdfe-43dd63608803
                      name: Blue LED ON Rule
                      expression: DATAPOINT(AC000W000340333,Blue_LED) == 1
                      is_enabled: true
                      is_abstract: false
                      is_template: false
                      action_ids:
                      - 4633da41-4d03-11f1-xxxxxx-d1744a9d4c09
                      parameters: {}
                      user_uuid: b02ce872-xxxxx-11f1-8aa5-f6a43ee69b74
                      created_at: '2026-05-11T10:02:18.447Z'
                      updated_at: '2026-05-11T10:02:18.447Z'
                      created_by: b02ce872-xxxx-11f1-8aa5-f6a43ee69b74
                      updated_by: b02ce872-xxxxx-11f1-8aa5-f6a43ee69b74
                      facility_uuid: ''
                    - rule_uuid: 7e597480-xxxx-11f1-bdfe-43dd63608803
                      name: Blue LED OFF Rule
                      expression: DATAPOINT(AC000W000340333,Blue_LED) == 0
                      is_enabled: true
                      is_abstract: false
                      is_template: false
                      action_ids:
                      - 4633da41-4d03-xxxxx-b2b0-d1744a9d4c09
                      parameters: {}
                      user_uuid: b02ce872-xxxx-11f1-8aa5-f6a43ee69b74
                      created_at: '2026-05-11T10:02:18.214Z'
                      updated_at: '2026-05-11T10:02:18.214Z'
                      created_by: b02ce872-42d8-11f1-8aa5-f6a43ee69b74
                      updated_by: b02ce872-42d8-11f1-8aa5-f6a43ee69b74
                      facility_uuid: ''
                    - rule_uuid: 3aedf330-xxxx-11f1-97c5-3b132d297a3a
                      name: Blue LED Rule
                      description: Trigger Blue LED actions based on property value
                      expression: DATAPOINT(AC000W000340333,Blue_LED) == 1
                      is_enabled: true
                      is_abstract: false
                      is_template: false
                      action_ids:
                      - 4633da41-4d03-xxxxx-b2b0-d1744a9d4c09
                      parameters: {}
                      user_uuid: b02ce872-xxxx-11f1-8aa5-f6a43ee69b74
                      created_at: '2026-05-11T09:10:18.661Z'
                      updated_at: '2026-05-11T09:10:18.661Z'
                      created_by: b02ce872-42d8-11f1-8aa5-f6a43ee69b74
                      updated_by: b02ce872-42d8-11f1-8aa5-f6a43ee69b74
                      facility_uuid: ''
                    - rule_uuid: 31a3d800-xxxx-11f1-8a2a-4de0204d2c4f
                      name: trigger for 12869031
                      description: trigger for ESP32 demo|-|Blue_LED|-|T:1778150441286
                      expression: DATAPOINT(AC000W031847421,Blue_LED) > 0 || TRUE
                      is_enabled: true
                      is_abstract: false
                      is_template: false
                      action_ids:
                      - 419d3302-xxxxx-11f1-8a2a-4de0204d2c4f
                      parameters:
                        compare_type: ==
                        base_type: boolean
                        trigger_type: always
                      user_uuid: b02ce872-xxxxx-11f1-8aa5-f6a43ee69b74
                      created_at: '2026-05-07T10:40:41.431Z'
                      updated_at: '2026-05-07T10:40:41.431Z'
                      created_by: b02ce872-42d8-11f1-8aa5-f6a43ee69b74
                      updated_by: b02ce872-42d8-11f1-8aa5-f6a43ee69b74
              schema:
                type: object
                properties:
                  rules:
                    type: array
                    items:
                      type: object
                      properties:
                        rule_uuid:
                          type: string
                          example: 7e89xxxxx20-11f1-bdfe-43dd63608803
                        name:
                          type: string
                          example: Blue LED ON Rule
                        expression:
                          type: string
                          example: DATAPOINT(AC000W000340333,Blue_LED) == 1
                        is_enabled:
                          type: boolean
                          example: true
                          default: true
                        is_abstract:
                          type: boolean
                          example: false
                          default: true
                        is_template:
                          type: boolean
                          example: false
                          default: true
                        action_ids:
                          type: array
                          items:
                            type: string
                            example: 4633da41-4d03-11f1-xxxxxx-d1744a9d4c09
                        parameters:
                          type: object
                          properties: {}
                        user_uuid:
                          type: string
                          example: b02ce872-xxxxx-11f1-8aa5-f6a43ee69b74
                        created_at:
                          type: string
                          example: '2026-05-11T10:02:18.447Z'
                        updated_at:
                          type: string
                          example: '2026-05-11T10:02:18.447Z'
                        created_by:
                          type: string
                          example: b02ce872-xxxx-11f1-8aa5-f6a43ee69b74
                        updated_by:
                          type: string
                          example: b02ce872-xxxxx-11f1-8aa5-f6a43ee69b74
                        facility_uuid:
                          type: string
                          example: ''
        '401':
          content: {}
          description: Unauthorized
        '403':
          content: {}
          description: Forbidden
      deprecated: false
      tags:
      - Rules.json
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-default: auth_token
x-readme-fauxas: true
x-provenance:
  method: searched
  source: https://docs.aylanetworks.com/reference
  harvested: '2026-10-14'
  tool: harvest-readme-openapi.py
  note: Assembled verbatim from the OpenAPI definition ReadMe embeds in each operation page of the provider's developer portal; paths and components merged by API title, nothing authored.
  assembled_from:
  - https://docs.aylanetworks.com/reference/create-action.md
  - https://docs.aylanetworks.com/reference/create-actions-in-bulk.md
  - https://docs.aylanetworks.com/reference/create-rule.md
  - https://docs.aylanetworks.com/reference/create-rules-in-bulk.md
  - https://docs.aylanetworks.com/reference/delete-action.md
  - https://docs.aylanetworks.com/reference/delete-actions-in-bulk.md
  - https://docs.aylanetworks.com/reference/delete-rule-1.md
  - https://docs.aylanetworks.com/reference/delete-rule-action.md
  - https://docs.aylanetworks.com/reference/delete-rule-actions-by-dsn.md
  - https://docs.aylanetworks.com/reference/delete-rule.md
  - https://docs.aylanetworks.com/reference/delete-rules-actions-by-dsn-user-uuid.md
  - https://docs.aylanetworks.com/reference/get-action-types.md
  - https://docs.aylanetworks.com/reference/get-action.md
  - https://docs.aylanetworks.com/reference/get-actions.md
  - https://docs.aylanetworks.com/reference/get-diagnostic-states.md
  - https://docs.aylanetworks.com/reference/get-rule-actions.md
  - https://docs.aylanetworks.com/reference/get-rule-devices.md
  - https://docs.aylanetworks.com/reference/get-rule.md
  - https://docs.aylanetworks.com/reference/get-rules.md
  - https://docs.aylanetworks.com/reference/update-an-action.md
  - https://docs.aylanetworks.com/reference/update-rule.md
  merge:
    pages: 21
    deduped: 20
    conflicts_kept_first: 0