• Document Up to Date

List Remote Repositories (deprecated)

List remote Git repositories for a site.

Important

This API is deprecated and provided only as a reference. Please see listRemoteRepositories for the current version.

Resource Information

This service uses the tomcat application on port 8080 by default. To see a list of default ports click here

The context for this API is /studio, please prefix the API URLs with this context.

HTTP Verb
GET
URL
/api/1/services/api/1/repo/list-remote.json
Response Formats
JSON
Required Role
Admin, site admin

Parameters

Name
Type
Required
Description
site_id
String
Site to use

Example

Request

GET .../api/1/services/api/1/repo/list-remote.json?site_id=mysite

Response

Status 200 OK

{
  "total": 2
  "remotes" :
  [
    {
      "name" : "origin",
      "url" :  "https://github.com/craftercms/craftercms.git",
      "fetch" :  "+refs/heads/*:refs/remotes/origin/*",
      "push_url" :  "https://github.com/craftercms/craftercms.git",
      "branches" :  [ "master", "qa" ]
    },
    {
      "name" : "upstream",
      "url" :  "https://github.com/myrepo/craftercms.git",
      "fetch" :  "+refs/heads/\*:refs/remotes/origin/\*",
      "push_url" :  "https://github.com/myrepo/craftercms.git",
      "branches" :  [ "master", "qa" ]
    }
  ]
}

Responses

Status
Location
Response Body
200


400

{ "message" : "Invalid parameter: site_id" }
400

{ "message" : "Bad Request" }
401

{ "message" : "Unauthorized" }
404

{ "message" : "Site not found" }
500

{ "message" : "Internal server error" }