Sync API collections with Azure DevOps and AWS CodeCommit

If your company runs on Azure DevOps or on AWS, your repositories are probably in Azure Repos or CodeCommit, not on GitHub. Collection sync works with both. You paste a credential; there's no app to install and nothing for an administrator to register.

Azure DevOps

  1. In Azure DevOps open User settings ▸ Personal access tokens ▸ New Token.
  2. Pick the organization that holds the repository. Scopes: Custom defined ▸ Code: Read & write. Choose an expiry.
  3. In Requestarium: Git sync ▸ Azure DevOps ▸ Connect with a token. Paste the token and the organization.

The organization field takes any of these forms:

  • contoso
  • https://dev.azure.com/contoso
  • https://contoso.visualstudio.com
  • an Azure DevOps Server collection URL

When you pick a repository, its "owner" is the project, which may contain spaces.

Branch policies apply. A branch that requires pull requests refuses the push (TF402455), and the app says the account can't push there. You have two options. Link a working branch and merge it the usual way. Or turn on Push via pull request so each push opens a pull request for you.

There's no "Connect with Azure DevOps" button. Azure DevOps OAuth apps are deprecated in favour of Microsoft Entra ID, so a token is the supported way for now.

AWS CodeCommit

CodeCommit's API needs an IAM access key. The "HTTPS Git credentials" you'd use with git clone don't work here.

  1. In IAM, create a user (or use an existing one) and attach a policy like this:

``json codecommit-sync-policy.json { "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Action": [ "codecommit:ListRepositories", "codecommit:BatchGetRepositories", "codecommit:GetRepository", "codecommit:ListBranches", "codecommit:GetBranch", "codecommit:GetCommit", "codecommit:GetFolder", "codecommit:GetBlob", "codecommit:CreateCommit" ], "Resource": "*" }] } ``

Narrow Resource to arn:aws:codecommit:<region>:<account>:<repo> for the repositories you sync. ListRepositories needs *.

  1. Security credentials ▸ Create access key.
  2. In Requestarium: Git sync ▸ AWS CodeCommit ▸ Connect with a token. Enter the access key id, the secret access key and the region (eu-central-1, or paste a clone URL and the region is read from it).

Requests are signed with SigV4. The key is checked with STS GetCallerIdentity, and the dialog shows which IAM user it belongs to. Temporary credentials (session tokens, SSO, assumed roles) aren't supported yet, so use a dedicated IAM user with only this policy.

A push uses CreateCommit with the parent commit. A push that changes more than 100 files is split into several commits.

CodeCommit has no pull request API that Requestarium uses. With Push via pull request on, a push creates the branch, and you open the pull request in the AWS console or with aws codecommit create-pull-request.

One connection per provider

Each person has one Azure DevOps connection (one organization) and one CodeCommit connection (one region) at a time. Connecting again replaces it. The secret is stored encrypted, and it isn't refreshed: when the token or key expires, sync asks you to connect again.

If several people edit the collection and not all of them should hold repository credentials, a workspace bot lets them sync through one shared account.