Skip to content

[FR] Expose takeoverEditLock functionality for Versions in CLI tool #402

@grushabshah

Description

@grushabshah

Is your feature request related to a problem? Please describe.

Currently due to the edit-lock restrictions user needs to go to the UI to take over , which breaks the flow of any automation.

Describe the solution you'd like

It seems there is a mechanism in the cli tool to take over the edit lock:
https://github.com/GoogleCloudPlatform/application-integration-management-toolkit/blob/9e19b2b4d306aa8ae7f0f02e5cf7254b9156c727/internal/client/integrations/integrations.go#L379C6-L379C22

But I do not see this function call anywhere in the code.

If we inspect browser activity when clicking "Take Over" from UI, I do see this undocumented API Call:
google.cloud.integrations.v1alpha.IntegrationVersions/TakeoverEditLock

The REST API explorer already has a way to takeover edit locks but only for Test Cases

And Modifying this API call seems to work well so far:

curl --request POST \
 'https://integrations.googleapis.com/v1alpha/projects/[PROJECT_NUMBER]/locations/[LOCATION]/integrations/[INTEGRATION_NAME]/versions/[VERSION_ID]:takeoverEditLock' \
  --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{}' \
  --compressed

Can this be implemented in the CLI tool as well?

Describe alternatives you've considered
Modifying an undocumented restapi call works, so API exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions