bam-query

Send RPC and HTTP requests to test ByteDance service APIs via BAM.

Updated Apr 30, 2026
One-click install
npx skills add https://github.com/yuezhen-huang/my-bytedance-skillhub --skill bam-query-yuezhen-huang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bam-query
Source: https://github.com/yuezhen-huang/my-bytedance-skillhub/tree/main/bam-query
Command: npx skills add https://github.com/yuezhen-huang/my-bytedance-skillhub --skill bam-query-yuezhen-huang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Testing internal RPC and HTTP interfaces against live or BOE environments normally requires manual IDL lookup, gateway configuration, and request construction. This Skill automates interface testing through BAM (ByteDance API Management), handling IDL version resolution, region routing, and authentication so you can validate APIs quickly. ## Core Features & Use Cases - RPC Interface Testing: Send RPC requests to any service by PSM and function name, with automatic IDL version fetching from BAM's published version list. - HTTP Endpoint Testing: Call HTTP paths with full control over method, query params, headers, and cookies, validated against the service's IDL definition. - Multi-Region Routing: Route requests across Singapore-Central, US-East, China-North, China-BOE, and US-BOE with automatic VDC, zone, and gateway derivation. - Safety Guardrails: Enforces explicit user confirmation of red-line parameters before touching production environments, while allowing direct execution against non-production BOE environments. - Use Case: You need to verify a new GetItem RPC on a staging service. Provide the PSM, function name, and BOE VRegion, and the Skill executes the request and returns the response with log_id for tracing in Argos. ## Quick Start Ask the agent to send an RPC request to PSM desrpc.stability.thrift_server calling GetItem in the US-BOE region with an empty request body.

Frequently Asked Questions about bam-query

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test an RPC interface with BAM?

Provide the service PSM, the RPC function name, a target VRegion, and a JSON request body. The Skill auto-fetches the latest published IDL version from BAM and sends the request, returning the response with a log_id for tracing.

How do I send an HTTP request with query parameters and headers?

Set action to http, provide the psm and http_path as a pure path, then pass query strings via http_query, headers via http_req_headers, and cookies via http_cookies as key-value arrays. Do not embed query strings in http_path, as that causes IDL validation failures.

Which VRegions are supported for API testing?

Supported VRegions are Singapore-Central (sg), US-East (us), China-North (cn), China-BOE (boe), and US-BOE (boei18n). The VRegion determines the gateway URL, JWT type, default zone, and VDC, all of which can be overridden manually.

Why does BAM return instance not found or no available instance?

These errors mean service discovery failed, usually because the service is not deployed in the selected VRegion or VDC, or the env parameter is incorrect. The Skill reports the error and suggests trying another VDC in the same VRegion, but never switches VRegion automatically.

Does BAM query require confirmation before sending requests?

Yes, for production targets the Skill displays red-line parameters (PSM, API, IDL version, VRegion, env, cluster, request body) and waits for explicit confirmation. Requests to BOE environments skip confirmation because they are non-production and do not affect live services.

How is the IDL version selected for a BAM request?

If idl_version is not specified, the Skill auto-fetches the latest published version from BAM for the given PSM and branch, falling back to master when no versions are published. You can also pin an exact version such as 1.0.5.