Treasure Data Util API

The Util API from Treasure Data — 1 operation(s) for util.

Operations 1

POST /api/util/convert_segment_rule convert_segment_rule

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/treasure-data-util-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 email required.

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

OpenAPI Specification

treasure-data-util-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: llm-api Util API
  version: 1.0.0
servers:
- url: https://llm-api.treasuredata.com
- url: https://llm-api.eu01.treasuredata.com
- url: https://llm-api.ap02.treasuredata.com
- url: https://llm-api.treasuredata.co.jp
security:
- ApiKeyAuth: []
tags:
- name: Util
paths:
  /api/util/convert_segment_rule:
    post:
      summary: convert_segment_rule
      tags:
      - Util
      responses:
        '200':
          description: creates a rule with only base segment references using AND logic
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                  description:
                    type: string
                  fullIonRule:
                    type: object
                    properties:
                      conditions:
                        type: array
                        items:
                          type: object
                          properties:
                            conditions:
                              type: array
                              items:
                                type: object
                                properties:
                                  arrayMatching: {}
                                  exclude:
                                    type: boolean
                                  leftValue:
                                    type:
                                    - object
                                    - 'null'
                                    properties:
                                      name:
                                        type: string
                                    required:
                                    - name
                                  operator:
                                    type:
                                    - object
                                    - 'null'
                                    properties:
                                      type:
                                        type: string
                                      not:
                                        type: boolean
                                      rightValue:
                                        oneOf:
                                        - type: number
                                          format: float
                                        - type: integer
                                    required:
                                    - type
                                    - not
                                    - rightValue
                                  type:
                                    type: string
                                  id:
                                    type:
                                    - string
                                    - 'null'
                                required:
                                - exclude
                                - type
                            type:
                              type: string
                          required:
                          - conditions
                          - type
                      type:
                        type: string
                    required:
                    - conditions
                    - type
                required:
                - name
                - description
                - fullIonRule
              example:
                name: Test Simplified Ion Rule
                description: This is a simplified ion rule generated by a chat agent.
                fullIonRule:
                  conditions:
                  - conditions:
                    - exclude: false
                      id: '22222'
                      type: Reference
                    - exclude: false
                      id: '33333'
                      type: Reference
                    - exclude: false
                      id: '44444'
                      type: Reference
                    type: And
                  type: And
        '400':
          description: Bad request - invalid input parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  error:
                    type: string
                required:
                - status
                - error
              example:
                status: '400'
                error: 'param is missing or the value is empty: name'
        '422':
          description: Validation error - invalid or missing parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  error:
                    type: string
                required:
                - status
                - error
              example:
                status: '422'
                error: simplifiedIonRule is missing required keys
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
                parent_segment_id:
                  type: string
                simplifiedIonRule:
                  type: object
                  properties:
                    title:
                      type: string
                    summary:
                      type: string
                    conditions:
                      type: array
                      items:
                        type: object
                        properties:
                          attribute_column:
                            type: string
                            description: Column name to filter on (alternative to left_value)
                          operator:
                            type:
                            - string
                            - 'null'
                            description: Comparison operator
                            enum:
                            - '='
                            - '!='
                            - '>'
                            - '>='
                            - <
                            - <=
                            - IS NULL
                            - IS NOT NULL
                            - IN
                            - BETWEEN
                            - REGEX
                            - NOT REGEX
                          right_value:
                            oneOf:
                            - type: string
                            - type: number
                            - type: boolean
                            - type: array
                              items:
                                oneOf:
                                - type: string
                                - type: number
                                - type: boolean
                            - type: object
                              additionalProperties: true
                            description: Value to compare against (optional, not needed for IS NULL/IS NOT NULL operators)
                          reason:
                            type:
                            - string
                            - 'null'
                            description: Human-readable explanation for this condition
                          left_value:
                            type:
                            - string
                            - 'null'
                            description: Column name to filter on (alternative to attribute_column)
                          logic:
                            type:
                            - string
                            - 'null'
                            enum:
                            - ALL
                            - ANY
                            description: Logic operator for nested conditions
                          conditions:
                            type:
                            - array
                            - 'null'
                            items:
                              type: object
                              properties:
                                left_value:
                                  type: string
                                operator:
                                  type: string
                                  enum:
                                  - '='
                                  - '!='
                                  - '>'
                                  - '>='
                                  - <
                                  - <=
                                  - IS NULL
                                  - IS NOT NULL
                                  - IN
                                  - BETWEEN
                                  - REGEX
                                  - NOT REGEX
                                right_value:
                                  oneOf:
                                  - type: integer
                                  - type: string
                                reason:
                                  type: string
                              required:
                              - left_value
                              - operator
                              - right_value
                              - reason
                            description: Nested conditions array
                    logic:
                      type: string
                    baseSegmentIds:
                      type: object
                      properties:
                        logic:
                          type: string
                          enum:
                          - ALL
                          - ANY
                        segment_ids:
                          type: array
                          items:
                            type: string
                        segmentIds:
                          type: array
                          items:
                            type: string
                      required:
                      - logic
                      - segmentIds
                  required:
                  - title
                  - summary
                  anyOf:
                  - type: object
                    required:
                    - conditions
                  - type: object
                    required:
                    - baseSegmentIds
              required:
              - name
              - description
              - simplifiedIonRule
            example:
              name: Test Simplified Ion Rule
              description: This is a simplified ion rule generated by a chat agent.
              parent_segment_id: '11111'
              simplifiedIonRule:
                title: Base Segments AND Combination
                summary: Segment combining base segments with AND logic
                conditions: []
                logic: ''
                baseSegmentIds:
                  logic: ALL
                  segment_ids:
                  - '12345'
                  - '67890'
                  segmentIds:
                  - '22222'
                  - '33333'
                  - '44444'
components:
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: TD1