Apidog Docs
🇺🇸 English
  • 🇺🇸 English
  • 🇯🇵 日本語
HomeLearning CenterSupport CenterAPI References
HomeLearning CenterSupport CenterAPI References
Discord Community
Slack Community
X / Twitter
🇺🇸 English
  • 🇺🇸 English
  • 🇯🇵 日本語
  1. Sending requests
  • Back to home
  • Support Center
  • Apidog Support Center
  • Import/Export
    • How to import API data into Apidog?
    • How to import cURL in Apidog?
    • How to migrate Postman environments to Apidog?
    • How to auto - group endpoints on Swagger/OpenAPI import?
  • Sending requests
    • Does Apidog support Socket.IO?
    • Why is the "+" in the parameter value decoded as a space?
    • How to send a request in Apidog?
    • How to send a graphQL request in Apidog?
    • How to send a gRPC request in Apidog?
    • How to send a SOAP/WebService request in Apidog?
    • How to send a WebSocket request in Apidog?
    • Does Apidog support pre-request/test scripts and assertions in WebSocket APIs?
    • How to send a SSE request in Apidog?
    • How to add default headers at the folder level?
    • Does Apidog support pre-request/test scripts and assertions in gRPC APIs?
    • Why am I getting a "socket hang up" error when sending a request?
    • ELANREFUSED.DNS Resolver Error
  • Designing APIs
    • How do I use variables in the path?
    • Can I use a response component as the default response?
    • How to check who has modified an endpoint?
    • How can I bulk delete endpoint folders in Apidog?
    • How can I bulk add/remove prefixes to the path of endpoints?
    • How to move a Property's level in the Schema Editor?
    • If a string property has multiple enumerated values and is used in various locations, how can this enum be consistently referenced throughout?
    • How to get Apidog resource folder ID?
    • How do I get the resource floder ID of Apidog?
    • How do I use variables in a URL path?
    • What should I do if an endpoint, document, or test scenario is accidentally deleted?
    • Does Apidog support request code for custom endpoints?
  • Debugging APIs
    • How does Apidog integrate with third-party key management systems?
    • Why does the same request work correctly in other tools (such as Postman) but not in Apidog?
    • How to fetch variable values from database in Apidog?
    • How to migrate environments from other tools to Apidog?
    • How to assert using scripts in Apidog?
    • JSONPath can only extract arrays. How can we extract a single element from within them in Apidog?
    • How to configure database operations in Apidog when different environments have different database account credentials?
    • How to get service base URL in custom script?
    • Why does Apidog report an error exceeding the maximum Node.js string length when the API response is too large?
    • What is the size limit for console printing?Why do I get an error when printing large files?
    • How to resolve DB2 database connection errors on Windows?
    • How to Generate Dynamic Values in Apidog Custom Scripts?
    • Why does the client request for the same endpoint succeed, but an error occurs when debugging on the web side: "Unable to request address"?
    • Why does Apidog report an error when the response is too large?
    • How do I use the Apidog recording endpoint?
    • When defining an endpoint response, is it allowed for the endpoint to have no response content?
    • How do I get the service baseURL in a custom script?
    • How do I view the original packet in Apidog?
    • How do I make an asynchronous request in an Apidog script?
    • What is the console print size limit? Why Do I Get an Error When I Print a Large File?
    • How do I upload a file on an endpoint request?
    • What to Do If Apidog crashes or Response Data Isn’t Showing ?
  • Mock API data
    • How to mock APIs automatically?
    • What can Apidog mocking do?
    • How to mock fixed API data in Apidog?
    • How to mock conditional data in Apidog?
    • How to enable cloud mock in Apidog?
    • How to enable self-hosted mock in Apidog?
    • Does Apidog support mocking WebSocket APIs?
    • Why Is the Browser Not Returning Content When Requesting the Mock endpoint?
  • Automated tests
    • Why do test scenarios run without issues on my local client, but errors occur when running them in the Apidog CLI or runner?
    • How to create a test scenario in Apidog?
    • How to pass data between test steps?
    • Why am I not able to successfully reference pre-step data?
    • How to use foreach loop in Apidog?
    • What are the differences between sync data from endpoints/endpoint cases?
    • How to use test data in Apidog?
    • How to retrive test data in scripts in Apidog?
    • How to run test scenarios in batch in Apidog?
    • How to schedule test tasks in Apidog?
    • How to run performance test in Apidog?
    • How can I view the actual requests and responses in the performance tests?
    • How can I export performance test reports in Apidog?
    • How to use database query results as parameters for looping API requests?
    • Capture and Validate Stripe Webhooks in ApiDog During CI/CD
    • How to resolve the "Error: unable to verify the first certificate on runner" error?
    • General Runner Docker Container "Not Found" Error.
    • How to Set the Server Host for the General Runner in Apidog Web Version?
    • Why Scheduled test scenario endedup with 0 request?
    • What should I do if the file upload parameter cannot be found in Runner or CLI?
    • How to use Runner to run a test scenario with an upload file step?
    • How do I resolve the "Error: unable to verify the first certificate on runner" error?
    • How do I access and search the runner logs to identify the issue when a problem arises with a runner?
    • What should I do if the endpoint parameter is an upload file and cannot be found in Runner or CLI?
    • Why Aren't Test Steps Automatically Synchronized When the API Use Case Changes?
    • Why Does Using Multiple Dollar Signs in a Markdown Document Cause Some Content to Not Display Correctly?
  • Publish API Docs
    • How to hide all Apidog logos in published documents?
    • When the API spec is updated, will the API doc change?
    • How to share APIs to collaborators in Apidog?
    • How to customize domain of Apidog documentations?
    • How to create multi-version documentation in Apidog?
    • Scope of sharing for Publish Docs Sites in Apidog
    • Scope of sharing for Share Doc list in Apidog
    • Why publlished Share Docs is not showing the hostname?
    • How Can Document Users Modify the Base URL in Shared Docs ?
  • Markdown
    • How to use cards to link to various pages or endpoints within Apidog?
    • Why is some content not displayed correctly when using multiple $ symbols in Markdown documents?
    • How to use transparent background images in Apidog Markdown?
    • How to set the column width of a Markdown table?
  • Branches
    • How to access the sprint branch?
  • Administration
    • How to install Apidog client silently?
    • Why am I seeing a 'No Permission' error despite having admin access?
    • How do I check the runner version number?
    • Does Apidog support win7?
    • Why does Apidog show the error "Cannot locate program entry point DiscardVirtualMemory in dynamic link library KERNEL32.dll" after installation?
    • Can I set up a separate billing account for my team in Apidog?
  • Billing
  • Account & preferences
  • Apidog Europe
  1. Sending requests

How to send a gRPC request in Apidog?

gRPC is an efficient, fast, and reliable Remote Procedure Call (RPC) framework widely used in various scenarios. In microservices architecture, Apidog facilitates efficient communication across services. For scenarios involving substantial data transfer, Apidog utilizes streaming capabilities to reduce network latency and bandwidth consumption.
The gRPC API debugging functionality is currently in the Beta testing phase. Apidog version must be equal to or greater than 2.3.0 to use the gRPC API debugging feature.

Create a New gRPC Project#

Click the "New Project" button on the Apidog homepage and select "gRPC Project (Beta)."

Import Proto#

gRPC follows an API-First approach, meaning that before development, services, methods, and messages must be defined through .proto files. Therefore, before debugging gRPC APIs using Apidog, you need to import the .proto file that serves as the API definition.

Initial Import#

Currently, there are two ways to import .proto files:
Local file
URL hosting the .proto file
The selected .proto file will be imported as one Proto, where the service will be imported as a service, and rpc will be imported as methods.
If the chosen .proto file depends on other .proto files, you need to manually add the dependency directory.
Services from other .proto files that the selected .proto file depends on will also be imported into the same Proto if their package belongs to the same package as the selected .proto file.

Reimport#

If the imported .proto file undergoes changes, it can be reimported in Apidog: right-click on Proto, then click the "Reimport" button.

Invocation Methods#

When defining gRPC methods using .proto files, Apidog supports four types:
Unary: One-way call
Server Streaming: Server-side streaming
Client Streaming: Client-side streaming
Bidirectional Streaming: Bidirectional streaming
Apidog supports all four method types.

Unary Call#

Unary calls are similar to HTTP requests. Enter the URL in the address bar, input the message content in JSON format under the Message tab, click the "Invoke" button, and the unary call will be initiated.
Additionally, you can manually fill in Metadata and Auth information to meet authentication or other complex scenarios.

Streaming Call#

Streaming calls are similar to WebSocket connections. After initiating the call, you can write and send messages under the Message tab. Server streaming, client streaming, and bidirectional streaming fall under the streaming call types.
Apidog provides a timeline view that centrally displays the call status, sent messages, and received messages in chronological order. Clicking on a message allows easy viewing of message details.

Advanced Usage#

Auto-generate Dynamic Values#

Apidog can recognize the content in .proto files, allowing you to click the "Auto-generate" button to generate the message body. For more flexible dynamic data, you can configure and generate expressions using the "Dynamic Values" feature.
Refer to the "Dynamic Values" for more detailed instructions.

Use Variables#

You can use Apidog variables in gRPC messages and Metadata.Refer to the "Environment Variable Types" documentation for detailed instructions.

Enable TLS#

gRPC APIs support establishing secure connections through TLS.
Using Apidog, you can click on the protocol selector in front of the URL to quickly toggle the TLS status.
Additionally, Apidog is compatible with using grpcs:// in the URL to enable TLS for the connection. Conversely, grpc:// indicates TLS is not enabled.

Manage Server Addresses and Environments#

Click the plus icon on the right side of the URL address bar to add the currently used server address to an environment.
Then, select the environment and server address in the upper right corner, and choose "Follow Default" in the URL address bar to use a unified server address for debugging all methods.

View Proto Files and API Parameters#

View Proto File Content#

In Apidog, clicking on the Proto in the left directory tree allows you to view the raw content of the .proto file.

View Request and Response Parameters#

gRPC uses ProtoBuf as the serialization format, meaning that each message is transmitted in ProtoBuf format when sending or receiving messages. Unlike other text-based serialization formats (JSON, XML), ProtoBuf is a binary format not suitable for human writing and reading. Therefore, when calling gRPC APIs In Apidog, all messages are written and displayed in JSON format.
You can view the request and response parameters represented in JSON format on the API information page.
ProtoBuf and JSON have a mapping relationship for data types, as shown in the table below:
ProtoBuf 3JSONJSON Example
messageobject{"fooBar": v, "g": null, …}
enumstring"FOO_BAR"
map<K,V>object{"k": v, …}
repeated Varray[v, …]
boolbooleantrue, false
stringstring"Hello World!"
bytesbase64 string"YWJjMTIzIT8kKiYoKSctPUB+"
int32, fixed32, uint32number1, -10, 0
int64, fixed64, uint64string"1", "-10"
float, doublenumber1.1, -10.0, 0, "NaN", "Infinity"

Save Debugging Information#

After completing debugging, click the "Save" button to save server URL, messages, Metadata, etc., in the current method for other team members to debug.
Previous
How to send a graphQL request in Apidog?
Next
How to send a SOAP/WebService request in Apidog?
Built with