Create internal subscription GET endpoint
What does this MR do and why?
Issue: https://gitlab.com/gitlab-org/customers-gitlab-com/-/issues/9773+
Create internal subscription GET endpoint
We need to be able to query this endpoint without the current_user
once
we change the authentication method. Migrate it to an internal endpoint
so that we can do this.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
Start CustomersDot and the GDK.
- GitLab: Create a new group and purchase a subscription for it
-
CustomersDot: Query the new internal API
namespace_id = Order.where.not(gl_namespace_id: nil).last.gl_namespace_id Client::GitlabApp.get("/api/v4/internal/gitlab_subscriptions/namespaces/#{namespace_id}/gitlab_subscription", { token: Client::GitlabApp::ADMIN_API_TOKEN })
-
CustomersDot: Query the old API
namespace_id = Order.where.not(gl_namespace_id: nil).last.gl_namespace_id Client::GitlabApp.get("/api/v4/namespaces/#{namespace_id}/gitlab_subscription", { token: Client::GitlabApp::ADMIN_API_TOKEN })
The results should be the same.
Edited by Josianne Hyson