Users

Create git repository

Changed on

Creates a repository through a connected git account and commits the initial files into it, either the given files or the files of an Actor template archive (templateArchiveUrl).

post/v2/integrations/git/{providerId}/create-repo

Request

  • Base URL
    https://api.apify.com
  • Auth
    • HTTP bearer
    • or API key in query parameter token

Path parameters

providerIdstring required
Example:github-app

The connected git account to use: github-app for the GitHub App, or the ID of a connected GitLab or Bitbucket integration, as returned by Get git provider integrations.

Request body

workspacestring required

Where to create the repository, as the id of one of the provider's workspaces. On GitLab, this is the numeric namespace ID.

repoNamestring required
isPrivateboolean required
templateArchiveUrlstring

URL of an Actor template archive whose files are committed as the initial commit. Can't be combined with files.

Example request

{
  "workspace": "janedoe",
  "repoName": "my-actor",
  "isPrivate": true,
  "files": [
    {
      "path": "src/main.js",
      "content": "console.log('Hello');",
      "encoding": "utf-8"
    }
  ],
  "templateArchiveUrl": "https://github.com/apify/actor-templates/blob/master/dist/templates/js-start.zip?raw=true"
}

Response

Example response

{
  "data": {
    "sshUrl": "git@github.com:janedoe/my-actor.git",
    "httpsUrl": "https://github.com/janedoe/my-actor.git",
    "htmlUrl": "https://github.com/janedoe/my-actor"
  }
}

Changes

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      endpoint added