|
3202 | 3202 | "tags": [ |
3203 | 3203 | "agent builder" |
3204 | 3204 | ], |
| 3205 | + "x-codeSamples": [ |
| 3206 | + { |
| 3207 | + "lang": "curl", |
| 3208 | + "source": "curl \\\n -X GET \"https://${KIBANA_URL}/api/agent_builder/tools\" \\\n -H \"Authorization: ApiKey ${API_KEY}\"\n" |
| 3209 | + }, |
| 3210 | + { |
| 3211 | + "lang": "Console", |
| 3212 | + "source": "GET kbn:/api/agent_builder/tools\n" |
| 3213 | + } |
| 3214 | + ], |
3205 | 3215 | "x-state": "Added in 9.2.0" |
3206 | 3216 | }, |
3207 | 3217 | "post": { |
|
3403 | 3413 | "tags": [ |
3404 | 3414 | "agent builder" |
3405 | 3415 | ], |
| 3416 | + "x-codeSamples": [ |
| 3417 | + { |
| 3418 | + "lang": "curl", |
| 3419 | + "source": "curl \\\n -X POST \"https://${KIBANA_URL}/api/agent_builder/tools\" \\\n -H \"Authorization: ApiKey ${API_KEY}\" \\\n -H \"kbn-xsrf: true\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"id\": \"example-esql-tool\",\n \"type\": \"esql\",\n \"description\": \"Example ES|QL query tool for analyzing financial trades with time filtering\",\n \"tags\": [\"analytics\", \"finance\"],\n \"configuration\": {\n \"query\": \"FROM financial_trades | WHERE execution_timestamp >= ?startTime | STATS trade_count=COUNT(*), avg_price=AVG(execution_price) BY symbol | SORT trade_count DESC | LIMIT ?limit\",\n \"params\": {\n \"startTime\": {\n \"type\": \"date\",\n \"description\": \"Start time for the analysis in ISO format\"\n },\n \"limit\": {\n \"type\": \"integer\",\n \"description\": \"Maximum number of results to return\"\n }\n }\n }\n }'\n" |
| 3420 | + }, |
| 3421 | + { |
| 3422 | + "lang": "Console", |
| 3423 | + "source": "POST kbn:/api/agent_builder/tools\n{\n \"id\": \"example-esql-tool\",\n \"type\": \"esql\",\n \"description\": \"An ES|QL query tool for analyzing financial trades with time filtering\",\n \"tags\": [\"analytics\", \"finance\", \"updated\"],\n \"configuration\": {\n \"query\": \"FROM financial_trades | WHERE execution_timestamp >= ?startTime | STATS trade_count=COUNT(*), avg_price=AVG(execution_price) BY symbol | SORT trade_count DESC | LIMIT ?limit\",\n \"params\": {\n \"startTime\": {\n \"type\": \"date\",\n \"description\": \"Start time for the analysis in ISO format\"\n },\n \"limit\": {\n \"type\": \"integer\",\n \"description\": \"Maximum number of results to return\"\n }\n }\n }\n}\n" |
| 3424 | + } |
| 3425 | + ], |
3406 | 3426 | "x-state": "Added in 9.2.0" |
3407 | 3427 | } |
3408 | 3428 | }, |
|
3708 | 3728 | "tags": [ |
3709 | 3729 | "agent builder" |
3710 | 3730 | ], |
| 3731 | + "x-codeSamples": [ |
| 3732 | + { |
| 3733 | + "lang": "curl", |
| 3734 | + "source": "curl \\\n -X POST \"https://${KIBANA_URL}/api/agent_builder/tools/_execute\" \\\n -H \"Authorization: ApiKey ${API_KEY}\" \\\n -H \"kbn-xsrf: true\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"tool_id\": \"platform.core.search\",\n \"tool_params\": {\n \"query\": \"can you find john doe's email from the employee index?\"}\n }\n }'\n" |
| 3735 | + }, |
| 3736 | + { |
| 3737 | + "lang": "Console", |
| 3738 | + "source": "POST kbn:/api/agent_builder/tools/_execute\n{\n \"tool_id\": \"platform.core.search\",\n \"tool_params\": {\n \"query\": \"can you find john doe's email from the employee index?\"\n }\n}\n" |
| 3739 | + } |
| 3740 | + ], |
3711 | 3741 | "x-state": "Added in 9.2.0" |
3712 | 3742 | } |
3713 | 3743 | }, |
|
3757 | 3787 | "tags": [ |
3758 | 3788 | "agent builder" |
3759 | 3789 | ], |
| 3790 | + "x-codeSamples": [ |
| 3791 | + { |
| 3792 | + "lang": "curl", |
| 3793 | + "source": "curl \\\n -X DELETE \"https://${KIBANA_URL}/api/agent_builder/tools/{toolId}\" \\\n -H \"Authorization: ApiKey ${API_KEY}\" \\\n -H \"kbn-xsrf: true\"\n" |
| 3794 | + }, |
| 3795 | + { |
| 3796 | + "lang": "Console", |
| 3797 | + "source": "DELETE kbn:/api/agent_builder/tools/{toolId}\n" |
| 3798 | + } |
| 3799 | + ], |
3760 | 3800 | "x-state": "Added in 9.2.0" |
3761 | 3801 | }, |
3762 | 3802 | "get": { |
|
3894 | 3934 | "tags": [ |
3895 | 3935 | "agent builder" |
3896 | 3936 | ], |
| 3937 | + "x-codeSamples": [ |
| 3938 | + { |
| 3939 | + "lang": "curl", |
| 3940 | + "source": "curl \\\n -X GET \"https://${KIBANA_URL}/api/agent_builder/tools/{toolId}\" \\\n -H \"Authorization: ApiKey ${API_KEY}\"\n" |
| 3941 | + }, |
| 3942 | + { |
| 3943 | + "lang": "Console", |
| 3944 | + "source": "GET kbn:/api/agent_builder/tools/{toolId}\n" |
| 3945 | + } |
| 3946 | + ], |
3897 | 3947 | "x-state": "Added in 9.2.0" |
3898 | 3948 | }, |
3899 | 3949 | "put": { |
|
4095 | 4145 | "tags": [ |
4096 | 4146 | "agent builder" |
4097 | 4147 | ], |
| 4148 | + "x-codeSamples": [ |
| 4149 | + { |
| 4150 | + "lang": "curl", |
| 4151 | + "source": "curl \\\n -X PUT \"https://${KIBANA_URL}/api/agent_builder/tools/{toolId}\" \\\n -H \"Authorization: ApiKey ${API_KEY}\" \\\n -H \"kbn-xsrf: true\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"description\": \"Updated ES|QL query tool for analyzing financial trades with time filtering\",\n \"tags\": [\"analytics\", \"finance\", \"updated\"],\n \"configuration\": {\n \"query\": \"FROM financial_trades | WHERE execution_timestamp >= ?startTime | STATS trade_count=COUNT(*), avg_price=AVG(execution_price) BY symbol | SORT trade_count DESC | LIMIT ?limit\",\n \"params\": {\n \"startTime\": {\n \"type\": \"date\",\n \"description\": \"Start time for the analysis in ISO format\"\n },\n \"limit\": {\n \"type\": \"integer\",\n \"description\": \"Maximum number of results to return\"\n }\n }\n }\n }'\n" |
| 4152 | + }, |
| 4153 | + { |
| 4154 | + "lang": "Console", |
| 4155 | + "source": "PUT kbn:/api/agent_builder/tools/{toolId}\n{\n \"description\": \"Updated ES|QL query tool for analyzing financial trades with time filtering\",\n \"tags\": [\"analytics\", \"finance\", \"updated\"],\n \"configuration\": {\n \"query\": \"FROM financial_trades | WHERE execution_timestamp >= ?startTime | STATS trade_count=COUNT(*), avg_price=AVG(execution_price) BY symbol | SORT trade_count DESC | LIMIT ?limit\",\n \"params\": {\n \"startTime\": {\n \"type\": \"date\",\n \"description\": \"Start time for the analysis in ISO format\"\n },\n \"limit\": {\n \"type\": \"integer\",\n \"description\": \"Maximum number of results to return\"\n }\n }\n }\n}\n" |
| 4156 | + } |
| 4157 | + ], |
4098 | 4158 | "x-state": "Added in 9.2.0" |
4099 | 4159 | } |
4100 | 4160 | }, |
|
0 commit comments