To send a request to the GoodData.CN API, you can use any of the following tools:
While you can use CURL for simple use-cases, we recommended using more advanced tools to communicate with the Gooddata.CN API. We suggest tools that are capable of generating API requests and payloads using the OpenAPI schema.
Use the following steps to configure Postman for use with GoodData.CN
- Install Postman.
- Select Import > Link.
- Copy and paste the URL of the GoodData.CN raw OpenAPI schema into the Enter a URL field.
- Select Continue.
- Select Show advanced settings and set Folder Organization to Tags.
- Select Import.
- Select Collections and then select the OpenAPI definition for GoodData.CN.
- In the Authorization tab, select Type and choose Bearer Token.
- Insert your API Token into the Token field.
- In the Variables1 tab, set the baseUrl to the hostname for your organization.
- Save your configuration.
- Select an endpoint and try to send a request.
Generate your own client
- Download the GoodData.CN OpenAPI schema.
- Generate the client in the language of your choice with https://openapi-generator.tech. 2
The following example generates a TypeScript client into the current folder:
openapi-generator generate -i https://www.gooddata.com/developers/cloud-native/doc/latest/api/gooddata-cn-oapi-all-raw-schema.json -g typescript-rxjs -o .
If you need a particular version of the OAPI document, then replace the part
latest by the desired version in the URI from the example.
More about Postman variables: https://learning.postman.com/docs/sending-requests/variables/#accessing-variables ↩︎
Note that in some languages, the code generated from openapi-generator might not be valid. You must update it manually. Java/Kotlin: https://github.com/OpenAPITools/openapi-generator/issues/634 / https://github.com/OpenAPITools/openapi-generator/issues/5903 / https://github.com/OpenAPITools/openapi-generator/issues/2892. Python: https://github.com/OpenAPITools/openapi-generator/issues/8892 ↩︎