API Document (Swagger)¶
When you enter the VC Hub host address in the browser and append the suffix "swagger" (e.g., https://example.com/swagger, http://localhost:8066/swagger), it will navigate to the Open API documentation page. This page lists all the Open API definitions for VC Hub.

We can use Swagger to invoke and test these Open APIs.
- Click the "Authorize" button to enter the access token. For access token, we can refer to the chapter Open Id Connect. Please to noted when enter the access token, the access token should be formated as "Bearer {access_token}".

- Click the down arrow icon to expand the API detail panel

- Click the "Try it out", then click the "Execute" button to invoke the API, the

- The server response with data of API result.

How to Specify the Response Language?¶
When calling the API, include the following field in your HTTP request headers: Accept-Language: zh-CN or Accept-Language: en-US
The system determines the response language in the following priority order:
- Accept-Language header: If set to
zh-CNoren-US, the system will strictly return messages in the specified language. - User session cookie: If
Accept-Languageis not set, the system will read the language flag from the session cookie (e.g.,lang=en-US). - Default language: If both values are missing or invalid, the system defaults to English (
en-US).
Supported Languages:
zh-CN: Simplified Chineseen-US: American English
Example: The application serves both Chinese and American users. If you need to obtain detailed information about a certain user, to avoid communication barriers caused by language differences, the system returns error messages based on the user’s language preference when an API call fails.
Chinese user request:
Response:
American user request:
Response: