Diagnosing API errors
If you encounter an error while making API requests and need help, contact support.
Technical support will resolve your issue faster if you use additional HTTP request and response headers.
Request headers
Use the following headers when making HTTP requests:
-
x-client-request-idis a unique request ID. We recommend using a UUID. Send this ID to the technical support team to help us find a specific request in the system and assist you.You can generate a UUID either online or through the library for the programming language you use.
-
x-data-logging-enabled: Flag that enables saving user-provided data from the request.By default, the service does not store data you send via the API. Your data will be stored if you provide
truein this header. Along with the request ID, this will help technical support solve your problem.
Examples
You can use the headers below to locate your synchronous search query.
curl \
--request POST \
--header "Authorization: Bearer <IAM_token>" \
--data "@body.json" \
"https://searchapi.api.cloud.yandex.net/v2/web/search" \
> result.json
Response headers
Each server response contains headers that provide even more information about the request execution:
x-request-id: Unique response IDx-server-trace-id: Unique request execution log ID
To get the x-request-id and x-server-trace-id values, your application must log server response headers.
You can find an example of implementing access to gRPC headers in the grpc-go documentation.