- Install Postman to run postman testing
Postman is a widely used collaboration platform for API development and testing.Using this third-party tool, you can easily test APIs with environments generatedfor your test platforms and imported testing collections of API queries.
Postman collections are comprised of REST, Document, or GraphQL schema and queriesto run or test against one or more defined environments.The tool includes a collection runner testing utilityfor testing against query assertions embedded in the collection.Collections and environments can be imported or exportedwith Postman.
For Astra Stargate development, three collections that correspond to the documentation code examples are available:
Each collection lets you try out creation, insertion, and deletion of both data and schema, as required.
To use the collections, you'll need to download and configure a postman environment.Two environments are also available, one for Astra and one for the open-source Stargatedocker image.A small amount of configuration is necessary in the single environment to set yourparameters before use.
- link:https://github.com/stargate/docs/blob/master/modules/developers-guide/examples/json/Stargate%20Astra%20API%20Environment.postman_environment.json[Astra environment]
- link:https://github.com/stargate/docs/blob/master/modules/developers-guide/examples/json/Stargate%20OSS%20API%20Environment.postman_environment.json[Stargate OSS environment]
Astra
There are three items that must beretrieved from the Astra DB dashboard and configured in the Postman environment:
- ASTRADBID
- ASTRADBREGION
- ASTRADB_APPLICATIONTOKEN
Open the environment in Postmanand copy/paste in the appropriate values.You can also edit the JSON file directly, if you prefer.
Stargate OSS
If you are using non-standard ports, you'll need tochange them in the Postman environment.You can also edit the JSON file directly, if you prefer.
BloomRPC resources
Prerequisite
Install BloomRPC to run gRPC testing.
BloomRPC aims to provide the simplest and most efficient developer experience forexploring and querying your GRPC services.Using this third-party tool, you can easily test gRPC proto files with environments generatedfor your test platforms.
For instance, the proto files can beimported into BloomRPC.Select `ExecuteQuery` from the imported files.Set the environment to your Astra DB URL if running Astra, orset the environment to `localhost:8090` if running a Stargate OSS docker container.In the metadata, add an authentication token using the Astra bearer token and setto `{"x-cassandra-token": "
- 1
You should get the same results from the database table that you received runningcommand-line tools.