Git operation APIs

You can use Git APIs in Continuous Integration / Continuous Deployment (CI/CD) workflows to pull files from Git repositories. The APIs listed below perform Git operations on repositories associated with Classic APIM and APIM 3.0 assets. For authentication, use JWTs or individual user accounts, not SnapLogic service accounts.

Git operation APIs
POST /apim/git-branch/{path_to_apiversion_or_service} Duplicate the Git branch associated with the Classic API version or APIM 3.0 Service and use the currently tracked commit as the head of the new branch.
POST /apim/create-version/{path_to_apiversion} Create a Classic APIM API version using the files in the specified Git repository and branch.
POST /api_service/git/version Create an APIM 3.0 Service version from a Git repository.
POST /apim/checkout/{path_to_apiversion_or_service} Check out the specified Git branch for the specified Classic API version or APIM 3.0 Service.
POST /apim/pull/{path_to_apiversion_or_service} Update the Classic API version or APIM 3.0 Service with the latest files from the associated Git repository.
POST /apim/git-tag/{path_to_apiversion_or_service} Associate the specified Git tag with the commit that is currently tracked by the Classic API version or APIM 3.0 Service.
GET /apim/git-tag/{path_to_apiversion_or_service} Retrieve the list of Git tags associated with the commit that is currently tracked by the Classic API version or APIM 3.0 Service.
GET /apim/repo-status/{path_to_apiversion_or_service} Retrieve the status of the Git repository associated with the specified Classic API version or APIM 3.0 Service.
POST /apim/discard_changes/{path_to_apiversion_or_service} Discard local changes to the listed assets in the Classic API version or APIM 3.0 Service.
GET /apim/untrack/{path_to_apiversion_or_service} Stop tracking a Classic API version or APIM 3.0 Service with Git.