QBench API v2 introduces significant improvements over its predecessor, API v1, but it maintains compatibility with the underlying protocols. If you're familiar with using the previous version of the API, you’ll find that API v2 offers enhanced functionality with only minor changes.
One of the most noticeable differences between API v1 and API v2 lies in the structure of the endpoints and the format of the expected payloads. The API v2 follows the same core protocols, ensuring ease of transition for existing users. However, the updated endpoint structure and payload expectations bring a more streamlined and intuitive experience for developers.
Authentication: Same Process as API v1
If you’re authenticating, it’s going to be the same process as in API v1. As a matter of fact, you’ll even hit the v1 endpoints to get your authentication token. This means you can continue using the same authentication flow you’re familiar with while taking advantage of the new features in API v2.
We are also deprecating some features from v1, so be sure to review any changes to ensure a smooth transition to v2.
Key Differences Between API v2 and API v1
While the core functionalities remain consistent, here are the primary differences to be aware of when transitioning from API v1 to v2:
-
Endpoint Structure: The endpoint URLs have been restructured to align with new conventions. This change improves clarity and better organizes API calls, making it easier to work with.
-
Expected Payload Format: In API v2, the payload format has been updated to ensure compatibility with modern web standards, offering better flexibility and efficiency in how data is transmitted.
These updates are designed to enhance your experience while maintaining backward compatibility with existing systems. As such, developers can continue leveraging their familiarity with the previous version while taking advantage of the improvements in API v2.
Accessing API v2 Documentation in Swagger Hub
The most up-to-date API v2 documentation can be found in Swagger Hub, providing a detailed guide to help you navigate the new features and functionalities. To access this documentation:
- Navigate to Your QBench Instance: Begin by logging into your QBench instance.
- Access Configuration Settings: Go to Configuration > Application > Developer > Settings.
- Select an API Client: Choose any API client listed in the settings.
-
View Documentation: Click on the "Docs" tab. This will redirect you to a page containing the complete API documentation in Swagger Hub. The URL structure for the page will be:
{QBENCH_URL}/qbench/api/v2/docs/openapi/{API_CLIENT_ID}
In Swagger Hub, you can interactively make API calls directly from the documentation, making it easier to test and experiment with various endpoints.
Interactive Testing Through Swagger
One of the highlights of the new documentation in Swagger Hub is the ability to interactively make API calls. You can explore the available endpoints, modify requests, and test responses in real-time, all within the documentation interface. This functionality is especially useful for developers as it provides hands-on experience with the API and helps debug issues or learn how to implement specific API features.
Conclusion
API v2 builds upon the solid foundation established by API v1 while introducing important changes to improve the user experience. The updated endpoint structure and payload formats enhance overall performance and usability. With the interactive Swagger documentation, developers now have a powerful tool to seamlessly integrate and test API calls within their QBench environments.
Be sure to regularly check the API documentation for updates and best practices to maximize your development process.
Comments
0 comments
Please sign in to leave a comment.